Skip to main content

Salamoonder SDK

A straightforward Python wrapper for Salamoonder's API, designed for easy integration and async usage. Perfect for solving captchas and bypassing bot detection on various platforms.

PyPI version Python 3.8+ License: MIT

Features

  • Simple and intuitive async API
  • Support for multiple captcha types:
    • Akamai Web Sensor
    • Akamai SBSD (Sensor Based Script Detection)
    • Kasada protection bypass
    • DataDome (Slider & Interstitial)
    • Incapsula/Imperva
    • Twitch Public Integrity
  • Fully async with async/await patterns
  • Comprehensive error handling and logging
  • Modern Python with full type hints
  • Production-ready with proper resource management

Installation

pip install salamoonder

Requirements

  • Python >= 3.8

Quick Start

import asyncio
from salamoonder import Salamoonder

async def main():
    async with Salamoonder('YOUR_API_KEY') as client:
        # Create and solve a Kasada captcha task
        task_id = await client.task.createTask('KasadaCaptchaSolver', 
            pjs_url='https://example.com/script.js',
            cd_only="false"
        )
      
        # Poll for the result
        solution = await client.task.getTaskResult(task_id)
        print('Solution:', solution)

asyncio.run(main())

Usage Examples

Akamai Web Sensor

async with Salamoonder('YOUR_API_KEY') as client:
    task_id = await client.task.createTask('AkamaiWebSensorSolver',
        url='https://example.com',
        abck='abck_cookie_value',
        bmsz='bmsz_cookie_value', 
        script='sensor_script_content',
        sensor_url='https://sensor.example.com/sensor.js',
        count=0,
        data='sensor_data',
        user_agent='Mozilla/5.0 (Windows NT 10.0; Win64; x64)...'
    )
  
    result = await client.task.getTaskResult(task_id, interval=2)  # Poll every 2 seconds
    print('Result:', result)

Kasada

async with Salamoonder('YOUR_API_KEY') as client:
    # Kasada Captcha  
    captcha_task_id = await client.task.createTask('KasadaCaptchaSolver',
        pjs_url='https://example.com/script.js',
        cd_only="false"
    )
    captcha_result = await client.task.getTaskResult(captcha_task_id)
  
    # Kasada Payload
    payload_task_id = await client.task.createTask('KasadaPayloadSolver',
        url='https://example.com',
        script_content='script_content_here',
        script_url='https://example.com/script.js'
    )
    payload_result = await client.task.getTaskResult(payload_task_id)

DataDome

async with Salamoonder('YOUR_API_KEY') as client:
    ua = 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/142.0.0.0 Safari/537.36'

    # Slider captcha
    challenge = await client.datadome.get_slider_challenge(
        html=response.text,
        datadome_cookie='your_dd_cookie',
        referer='https://example.com/page',
        user_agent=ua,
    )
    slider_task_id = await client.task.createTask('DataDomeSliderSolver',
        captcha_url=challenge['captcha_url'],
        challenge_page=challenge['challenge_page'],
        user_agent=ua,
    )
    slider_result = await client.task.getTaskResult(slider_task_id)

    # Interstitial captcha
    challenge = await client.datadome.get_interstitial_challenge(
        html=response.text,
        datadome_cookie='your_dd_cookie',
        referer='https://example.com/page',
        user_agent=ua,
    )
    interstitial_task_id = await client.task.createTask('DataDomeInterstitialSolver',
        captcha_url=challenge['captcha_url'],
        challenge_page=challenge['challenge_page'],
        user_agent=ua,
    )
    interstitial_result = await client.task.getTaskResult(interstitial_task_id)

Direct Client Methods

For custom HTTP requests with TLS client impersonation:

async with Salamoonder('YOUR_API_KEY') as client:
    # GET request
    response = await client.get('https://example.com', 
        headers={'User-Agent': 'Custom UA'},
        proxy='http://proxy:port'
    )
  
    # POST request
    post_response = await client.post('https://example.com/api',
        json={'key': 'value'},
        headers={'Content-Type': 'application/json'}
    )

API Reference

Salamoonder Class

Main entry point for the library.

async with Salamoonder(api_key, base_url=None, impersonate=None) as client:
    # Your code here
    pass

Parameters:

  • api_key (str) - Your Salamoonder API key (required)
  • base_url (str) - API base URL (default: https://salamoonder.com/api)
  • impersonate (str) - Browser to impersonate (default: chrome133a)

Properties:

  • task - Tasks API instance (recommended for solving captchas)
  • akamai, akamai_sbsd, datadome, kasada - Low-level solver instances (advanced use only)
  • session - Session information and cookies

Methods:

  • get(url, **kwargs) - Make a GET request
  • post(url, **kwargs) - Make a POST request

Supported Anti-Bot Solutions

🔒 Kasada

  • Script extraction and parsing
  • Payload solving
  • Challenge submission

🛡️ Akamai Bot Manager

  • Web sensor data extraction
  • SBSD (Sensor Based Script Detection) support
  • Cookie management

🔐 DataDome

  • Slider captcha URL parsing
  • Interstitial challenge support

Supported Captcha Types

  • KasadaCaptchaSolver
  • KasadaPayloadSolver
  • AkamaiWebSensorSolver
  • AkamaiSBSDSolver
  • DataDomeSliderSolver
  • DataDomeInterstitialSolver
  • IncapsulaReese84Solver
  • IncapsulaUTMVCSolver
  • Twitch_PublicIntegrity

Module Exports

You can import individual modules if needed:

# Main class and main exports
from salamoonder import Salamoonder
from salamoonder.tasks import Tasks
from salamoonder.client import Client

# Error classes
from salamoonder.client import APIError, MissingAPIKeyError

# For advanced/low-level operations only
from salamoonder.utils.akamai import AkamaiWeb, AkamaiSBSD
from salamoonder.utils.datadome import Datadome
from salamoonder.utils.kasada import Kasada

Note: The utility classes (AkamaiWeb, AkamaiSBSD, Datadome, Kasada) are for low-level operations. For most use cases, use the Tasks API through the main client.

Error Handling

import asyncio
from salamoonder import Salamoonder
from salamoonder.client import APIError, MissingAPIKeyError

async def main():
    try:
        async with Salamoonder('YOUR_API_KEY') as client:
            task_id = await client.task.createTask('KasadaCaptchaSolver',
                pjs_url='https://example.com/script.js',
                cd_only="false"
            )
            result = await client.task.getTaskResult(task_id)
    except MissingAPIKeyError:
        print('API key is required')
    except APIError as error:
        print('API error:', error)
    except Exception as error:
        print('Unexpected error:', error)

asyncio.run(main())

Configuration

Custom Base URL

async with Salamoonder(
    api_key='your_key',
    base_url='https://custom-api.salamoonder.com/api'
) as client:
    pass

Browser Impersonation

async with Salamoonder(
    api_key='your_key', 
    impersonate='chrome133a'  # or firefox, safari
) as client:
    # Requests will impersonate the specified browser
    pass

Proxy Support

# All methods support proxy parameter
result = await client.akamai.fetch_and_extract(
    website_url='https://example.com',
    user_agent='Mozilla/5.0...',
    proxy='http://username:password@proxy.example.com:8080'
)

Logging

Enable debug logging to see detailed information:

import logging
logging.basicConfig(level=logging.DEBUG)

# Now all salamoonder operations will show debug info
async with Salamoonder(api_key='key') as client:
    # Debug logs will show HTTP requests, responses, etc.
    await client.task.createTask(...)

Performance Tips

  • Use async context managers (async with) for automatic resource cleanup
  • Reuse the same client instance for multiple operations
  • Process multiple tasks concurrently with asyncio.gather()
# Good: Reuse client for multiple operations
async with Salamoonder(api_key='key') as client:
    task1 = await client.task.createTask(...)
    task2 = await client.task.createTask(...)
  
    # Wait for both results concurrently
    results = await asyncio.gather(
        client.task.getTaskResult(task1),
        client.task.getTaskResult(task2)
    )

License

MIT - See LICENSE file for details

Support

For issues, feature requests, or questions, please visit:

Metadata

Release files for salamoonder 1.0.5.post1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for salamoonder 1.0.5.post1
File Size Uploaded Provenance Actions
salamoonder-1.0.5.post1.tar.gz 21.2 kB Without provenance Details for salamoonder-1.0.5.post1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for salamoonder 1.0.5.post1
File Interpreter ABI Platform Actions
salamoonder-1.0.5.post1-py3-none-any.whl Python 3 none any Details for salamoonder-1.0.5.post1-py3-none-any.whl

Total release size: 41.7 kB

Release files / salamoonder-1.0.5.post1.tar.gz

Download URL salamoonder-1.0.5.post1.tar.gz
Size 21.2 kB
Tags Source
SHA-256 checksum
How to use checksums
8ee2eeb661feb3c5c2bcfd9a92522822db27f8ee1d42917cfbcd66228d482373
BLAKE2b-256 checksum
How to use checksums
0f6357848ba072f896aa96d3d1aa844c3fe6db0d2e8419b3eac46efb4b567379
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.1

Release files / salamoonder-1.0.5.post1-py3-none-any.whl

Download URL salamoonder-1.0.5.post1-py3-none-any.whl
Size 20.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
51221aa7b91ee8518ba86a256b75ef8d76ce6ea6cc0aa3fae9a4dc116cf27868
BLAKE2b-256 checksum
How to use checksums
03e8340285643b265fb9040949be7b7e15bbea9aec3acd2fd54185ab5d2670a5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.1

Security for salamoonder 1.0.5.post1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page