Skip to main content

TikTok Captcha Solver API - Solve puzzle, rotate, and shapes captchas automatically

Project description

CaptchaSolved - TikTok Captcha Solver API

PyPI version Python

The easiest way to solve TikTok captchas automatically. Works with Selenium, Playwright, and any automation framework.

Get your API key at: https://captchasolved.com

Supported Captchas

Type Description Accuracy
🧩 Puzzle/Slide Slide the piece to complete the puzzle 100%
🔄 Rotate Rotate the image to the correct angle 99%
🎲 3D Shapes Click the matching 3D objects 98%
🖼️ Icon Select the correct objects 98%

Installation

pip install captchasolved

With Selenium:

pip install captchasolved[selenium]

With Playwright:

pip install captchasolved[playwright]

Quick Start

Direct API Client

from captchasolved import ApiClient

client = ApiClient("your-api-key")

# Solve puzzle/slide captcha
result = client.puzzle(puzzle_image, piece_image)
slide_pixels = result.get_slide_pixels(puzzle_width=300)
print(f"Slide {slide_pixels} pixels to the right")

# Solve rotate captcha
result = client.rotate(outer_image, inner_image)
print(f"Rotate {result.angle} degrees")

# Solve shapes captcha
result = client.shapes(captcha_image)
(x1, y1), (x2, y2) = result.get_click_points(width=300, height=200)
print(f"Click at ({x1}, {y1}) and ({x2}, {y2})")

Selenium Integration

from selenium import webdriver
from captchasolved.selenium import SeleniumSolver

driver = webdriver.Chrome()
driver.get("https://www.tiktok.com/login")

# Create solver
solver = SeleniumSolver(driver, "your-api-key")

# Fill login form...
# Then solve any captcha that appears
solver.solve_captcha_if_present()

Playwright Integration (Sync)

from playwright.sync_api import sync_playwright
from captchasolved.playwright import PlaywrightSolver

with sync_playwright() as p:
    browser = p.chromium.launch(headless=False)
    page = browser.new_page()
    page.goto("https://www.tiktok.com/login")
    
    solver = PlaywrightSolver(page, "your-api-key")
    solver.solve_captcha_if_present()

Playwright Integration (Async)

import asyncio
from playwright.async_api import async_playwright
from captchasolved.playwright import AsyncPlaywrightSolver

async def main():
    async with async_playwright() as p:
        browser = await p.chromium.launch(headless=False)
        page = await browser.new_page()
        await page.goto("https://www.tiktok.com/login")
        
        solver = AsyncPlaywrightSolver(page, "your-api-key")
        await solver.solve_captcha_if_present()

asyncio.run(main())

API Response Format

Puzzle Result

result = client.puzzle(puzzle_image, piece_image)

# slide_x_proportion is 0.0 to 1.0
result.slide_x_proportion  # e.g., 0.65

# Get pixels for a specific width
result.get_slide_pixels(puzzle_width=300)  # e.g., 195

Rotate Result

result = client.rotate(outer_image, inner_image)

# Angle in degrees (0-360)
result.angle  # e.g., 127.5

# Get slider position for a specific width
result.get_slider_position(slider_width=280)  # e.g., 99

Shapes Result

result = client.shapes(captcha_image)

# Proportions (0.0 to 1.0)
result.point_one_proportion_x  # e.g., 0.25
result.point_one_proportion_y  # e.g., 0.5

# Get pixel coordinates
(x1, y1), (x2, y2) = result.get_click_points(width=300, height=200)

Image Input Formats

The API accepts images in multiple formats:

# File path
result = client.puzzle("path/to/puzzle.png", "path/to/piece.png")

# Base64 string
result = client.puzzle(base64_puzzle, base64_piece)

# Raw bytes
result = client.puzzle(puzzle_bytes, piece_bytes)

# NumPy array (OpenCV)
result = client.puzzle(cv2_image, cv2_piece)

# PIL Image
result = client.puzzle(pil_image, pil_piece)

Error Handling

from captchasolved import ApiClient, InvalidApiKeyError, NoCreditsError

client = ApiClient("your-api-key")

try:
    result = client.puzzle(puzzle, piece)
except InvalidApiKeyError:
    print("Invalid API key - get one at https://captchasolved.com")
except NoCreditsError:
    print("No credits remaining - buy more at https://captchasolved.com")
except CaptchaSolvedError as e:
    print(f"Error: {e}")

Pricing

Plan Solves Price Per Solve
Starter 1,000 $9 $0.009
Pro 10,000 $49 $0.0049
Enterprise 100,000 $299 $0.003

Get your API key at: https://captchasolved.com

Support

License

MIT License - see LICENSE file for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ttcaptchasolved-1.0.1.tar.gz (11.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ttcaptchasolved-1.0.1-py3-none-any.whl (14.3 kB view details)

Uploaded Python 3

File details

Details for the file ttcaptchasolved-1.0.1.tar.gz.

File metadata

  • Download URL: ttcaptchasolved-1.0.1.tar.gz
  • Upload date:
  • Size: 11.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for ttcaptchasolved-1.0.1.tar.gz
Algorithm Hash digest
SHA256 385cc96d7fb47a53d560d23e2b523127b651a2921aff6c5024908f81e00cbe2a
MD5 b70db9c90f9f292ef77de1c203ea5024
BLAKE2b-256 f9e74a9e3177b2ac90a672bc08efb8c42459433784919ccfaa6dec2a85d9d09c

See more details on using hashes here.

File details

Details for the file ttcaptchasolved-1.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for ttcaptchasolved-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d350cba8261725c61be33246642f52fe4729b35b89fb25a41a59ab3c0da1c8ae
MD5 87c1248c97c6608154fcb93769d97adb
BLAKE2b-256 e0bbb72aad61db3b347ecffeb9a1df7d11b70a2b5eff7cb8af2e62736a4e96f5

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page