### Shopee Image Crawl POST Body Example Source: https://www.sadcaptcha.com/api/v1/v3/api-docs This example demonstrates the structure of the POST body for the Shopee Image Crawl endpoint, including base64 encoded puzzle and piece images, along with trajectory data. ```json {"puzzle_image_b64": "iVBORw0KGgoAAAANSUhEUgA..." "piece_image_b64": "iVBORw0KGgoAAAA ``` -------------------------------- ### Solve Icon Captcha with Python Source: https://www.sadcaptcha.com/api/v1/v3/api-docs Use this Python script to solve the Icon captcha by uploading an image and receiving click coordinates. Ensure you have the 'requests' and 'base64' libraries installed. Replace 'YOUR_API_KEY_HERE' with your actual SadCaptcha license key. ```python import requests import base64 BASE_URL = 'https://www.sadcaptcha.com/api/v1' LICENSE_KEY = 'YOUR_API_KEY_HERE' # Build the icon URL icon_url = f'{BASE_URL}/icon?licenseKey={LICENSE_KEY}' # Convert the images to base64 encoding with open('images/icon.png', 'rb') as f: icon = base64.b64encode(f.read()).decode() # Prepare the request data = { 'challenge': 'Which of these objects has a brim?', 'imageB64': icon } # Get the answer as point ratios r = requests.post(icon_url, json=data) print(r.json()) ``` -------------------------------- ### Check License Credits Source: https://www.sadcaptcha.com/api/v1/v3/api-docs Retrieves the remaining credits associated with a given license key. ```APIDOC ## GET /license/credits ### Description Checks the number of available credits for your SadCaptcha license key. ### Method GET ### Endpoint /license/credits ### Parameters #### Query Parameters - **licenseKey** (string) - Required - Your SadCaptcha license key. ### Response #### Success Response (200) - **credits** (integer) - The number of remaining credits. #### Response Example ```json { "credits": 1500 } ``` ``` -------------------------------- ### Shopee Image Crawl Solver Source: https://www.sadcaptcha.com/api/v1/v3/api-docs This endpoint solves Shopee's image crawl captcha, which is encountered during login. It requires both the puzzle and piece images, along with trajectory data for the slider piece. For non-Python applications, it's recommended to replicate the logic from the `shopee-captcha-solver` Python client. ```APIDOC ## POST /shopee-image-crawl ### Description Solves Shopee's image crawl captcha. ### Method POST ### Endpoint /shopee-image-crawl ### Parameters #### Request Body - **puzzle_image_b64** (string) - Required - Base64 encoded string of the puzzle image. - **piece_image_b64** (string) - Required - Base64 encoded string of the slide piece image. - **trajectory_data** (object) - Required - Data about the slide piece's trajectory. - **slide_bar_x_proportion** (number) - Required - The x location of the slide button as a proportion of the total slide bar width. - **piece_x_proportion** (number) - Required - The x location of the slide piece's center as a proportion of the puzzle image width. - **piece_y_proportion** (number) - Required - The y location of the slide piece's center as a proportion of the puzzle image height. - **rotation_degrees** (number) - Required - The rotation angle of the slide piece. ### Request Example ```json { "puzzle_image_b64": "iVBORw0KGgoAAAANSUhEUgA...", "piece_image_b64": "iVBORw0KGgoAAAA...", "trajectory_data": { "slide_bar_x_proportion": 0.75, "piece_x_proportion": 0.6, "piece_y_proportion": 0.5, "rotation_degrees": 15 } } ``` ### Response #### Success Response (200) - **solution** (string) - The solution to the captcha. - **accuracy** (number) - The confidence score of the solution. #### Response Example ```json { "solution": "slide_distance_pixels: 120", "accuracy": 0.95 } ``` ``` -------------------------------- ### Image Semantics Captcha Solver Source: https://www.sadcaptcha.com/api/v1/v3/api-docs Solves image semantics captchas by identifying specific elements within an image. Requires a license key and image data. ```APIDOC ## POST /image ### Description Solves image semantics captchas. This endpoint requires a license key and image data in the request body. ### Method POST ### Endpoint /image ### Parameters #### Query Parameters - **licenseKey** (string) - Required - Your SadCaptcha license key. #### Request Body - **imageB64** (string) - Required - The captcha image encoded in base64. - **challenge** (string) - Required - The challenge text associated with the captcha. ### Request Example ```json { "imageB64": "base64_encoded_image_string", "challenge": "Identify the object with a brim." } ``` ### Response #### Success Response (200) - **pointOneProportionX** (number) - The X proportion of the first point. - **pointOneProportionY** (number) - The Y proportion of the first point. - **pointTwoProportionX** (number) - The X proportion of the second point. - **pointTwoProportionY** (number) - The Y proportion of the second point. #### Response Example ```json { "pointOneProportionX": 0.5, "pointOneProportionY": 0.5, "pointTwoProportionX": 0.7, "pointTwoProportionY": 0.7 } ``` ``` -------------------------------- ### Icon Captcha Solver Source: https://www.sadcaptcha.com/api/v1/v3/api-docs Solves icon-based captchas, typically used in scenarios like TikTok video uploads. Requires a license key and image data. ```APIDOC ## POST /icon ### Description Solves icon captchas, often presented in a TikTok video upload context. The API identifies the object matching the provided text challenge. ### Method POST ### Endpoint /icon ### Parameters #### Query Parameters - **licenseKey** (string) - Required - Your SadCaptcha license key. #### Request Body - **imageB64** (string) - Required - The captcha image encoded in base64. - **challenge** (string) - Required - The challenge text, e.g., 'Which of these objects has a brim?'. ### Request Example ```json { "imageB64": "base64_encoded_icon_image_string", "challenge": "Which of these objects has a brim?" } ``` ### Response #### Success Response (200) - **pointOneProportionX** (number) - The X proportion of the first point. - **pointOneProportionY** (number) - The Y proportion of the first point. - **pointTwoProportionX** (number) - The X proportion of the second point. - **pointTwoProportionY** (number) - The Y proportion of the second point. #### Response Example ```json { "pointOneProportionX": 0.2, "pointOneProportionY": 0.3, "pointTwoProportionX": 0.8, "pointTwoProportionY": 0.9 } ``` ``` -------------------------------- ### Solve Image Semantics Captcha Source: https://www.sadcaptcha.com/api/v1/v3/api-docs Use this endpoint for image semantics challenges, including shapes, items, and click-in-order. It requires an image encoded in base64 and a text challenge. The solution is a point ratio for clicking on the image. ```python import requests import base64 BASE_URL = 'https://www.sadcaptcha.com/api/v1' LICENSE_KEY = 'YOUR_API_KEY_HERE' # Build the icon URL shapes_url = f'{BASE_URL}/semantic-shapes?licenseKey={LICENSE_KEY}' # Convert the images to base64 encoding with open('images/shapes.png', 'rb') as f: shapes = base64.b64encode(f.read()).decode() # Prepare the request data = { 'challenge': 'Please click the unique object.', 'imageB64': shapes } # Get the answer as point ratios r = requests.post(shapes_url, json=data) print(r.json()) ``` -------------------------------- ### Shopee Image Crawl Captcha Solver Source: https://www.sadcaptcha.com/api/v1/v3/api-docs Solves Shopee image crawl captchas by analyzing puzzle and piece images to determine the correct slide trajectory. ```APIDOC ## POST /shopee-image-crawl ### Description Solves Shopee image crawl captchas. Requires puzzle and piece images, and a calculated slide trajectory. ### Method POST ### Endpoint /shopee-image-crawl?licenseKey={licenseKey} ### Parameters #### Query Parameters - **licenseKey** (string) - Required - Your SadCaptcha license key. #### Request Body - **puzzleImageB64** (string) - Required - Base64 encoded puzzle image. - **pieceImageB64** (string) - Required - Base64 encoded slide piece image. - **slidePieceTrajectory** (array) - Required - An array of objects detailing the piece's movement. ### Request Example ```json { "puzzleImageB64": "puzzle_base64_encoded_string", "pieceImageB64": "piece_base64_encoded_string", "slidePieceTrajectory": [ { "pixels_from_slider_origin": 0, "piece_rotation_angle": 0.0, "piece_center": { "proportion_x": 0.08695652173913043, "proportion_y": 0.6826086956521739 } } ] } ``` ### Response #### Success Response (200) - **solution** (integer) - The number of pixels to slide the piece. #### Response Example ```json { "solution": 150 } ``` ``` -------------------------------- ### Solve Rotate Captcha Source: https://www.sadcaptcha.com/api/v1/v3/api-docs Use this endpoint to solve rotate captchas. It requires outer and inner images encoded in base64. The solution is an angle to rotate the image. ```python import requests import base64 rotate_url = 'https://www.sadcaptcha.com/api/v1/rotate?licenseKey=YOUR_API_KEY_HERE' # Convert the images to base64 encoding with open('images/outer_tt.png', 'rb') as f: outer = base64.b64encode(f.read()).decode() with open('images/inner_tt.png', 'rb') as f: inner = base64.b64encode(f.read()).decode() # Prepare the request data = { 'outerImageB64': outer, 'innerImageB64': inner } # Get the answer as the solution angle r = requests.post(rotate_url, json=data) print(r.json()) ``` -------------------------------- ### Image Semantics Captcha Source: https://www.sadcaptcha.com/api/v1/v3/api-docs Solves image semantics captchas (including shapes, items, click in order) by providing a base64 encoded image and a text challenge. The API returns coordinates for the click location. ```APIDOC ## POST /semantic-shapes ### Description Solves image semantics captchas. Requires a base64 encoded image and a text challenge. ### Method POST ### Endpoint `/semantic-shapes` ### Parameters #### Query Parameters - **licenseKey** (string) - Required - Your SadCaptcha license key. #### Request Body - **challenge** (string) - Required - The text challenge associated with the image. - **imageB64** (string) - Required - Base64 encoded string of the image. ### Request Example ```json { "challenge": "Please click the unique object.", "imageB64": "base64_encoded_image" } ``` ### Response #### Success Response (200) - **point** (object) - An object containing the x and y ratios for the click location. - **x** (number) - The x-coordinate ratio. - **y** (number) - The y-coordinate ratio. #### Response Example ```json { "point": { "x": 0.5, "y": 0.7 } } ``` ``` -------------------------------- ### Solve Puzzle Captcha Source: https://www.sadcaptcha.com/api/v1/v3/api-docs Use this endpoint to solve puzzle captchas. It requires a puzzle image and a piece image, both encoded in base64. The solution is the ratio of the slide distance to the total distance. ```python import requests import base64 BASE_URL = 'https://www.sadcaptcha.com/api/v1' LICENSE_KEY = 'YOUR_API_KEY_HERE' # Build the puzzle URL puzzle_url = f'{BASE_URL}/puzzle?licenseKey={LICENSE_KEY}' # Convert the images to base64 encoding with open('images/puzzle.png', 'rb') as f: puzzle = base64.b64encode(f.read()).decode() with open('images/piece.png', 'rb') as f: piece = base64.b64encode(f.read()).decode() # Prepare the request data = { 'puzzleImageB64': puzzle, 'pieceImageB64': piece } # Get the answer as the solution the ratio of solution distance to total distance of the puzzle r = requests.post(puzzle_url, json=data) print(r.json()) ``` -------------------------------- ### Solve Shopee Image Crawl Captcha Source: https://www.sadcaptcha.com/api/v1/v3/api-docs Use this endpoint to solve the Shopee Image Crawl captcha. It requires base64 encoded puzzle and piece images, along with the slide piece trajectory. The solution is the distance to slide the piece. ```python import requests import base64 BASE_URL = 'https://www.sadcaptcha.com/api/v1' LICENSE_KEY = 'YOUR_API_KEY_HERE' # Build the puzzle URL puzzle_url = f'{BASE_URL}/shopee-image-crawl?licenseKey={LICENSE_KEY}' # Convert the images to base64 encoding with open('images/puzzle.png', 'rb') as f: puzzle = base64.b64encode(f.read()).decode() with open('images/piece.png', 'rb') as f: piece = base64.b64encode(f.read()).decode() # Find the slide piece trajectory # For the full implementation of finding the slide trajectory, please see the code in the github repo: https://www.github.com/gbiz123/shopee-captcha-solver trajectory = [...] # Prepare the request data = { 'puzzleImageB64': puzzle, 'pieceImageB64': piece 'slidePieceTrajectory': trajectory } # Get the answer as the solution the ratio of solution distance to total distance of the puzzle r = requests.post(puzzle_url, json=data) print(r.json()) ``` -------------------------------- ### Puzzle Captcha Source: https://www.sadcaptcha.com/api/v1/v3/api-docs Solves a puzzle captcha by providing base64 encoded images of the puzzle and the piece. The API returns a ratio representing the solution distance. ```APIDOC ## POST /puzzle ### Description Solves a puzzle captcha. Requires base64 encoded puzzle and piece images. ### Method POST ### Endpoint `/puzzle` ### Parameters #### Query Parameters - **licenseKey** (string) - Required - Your SadCaptcha license key. #### Request Body - **puzzleImageB64** (string) - Required - Base64 encoded string of the puzzle image. - **pieceImageB64** (string) - Required - Base64 encoded string of the piece image. ### Request Example ```json { "puzzleImageB64": "base64_encoded_puzzle_image", "pieceImageB64": "base64_encoded_piece_image" } ``` ### Response #### Success Response (200) - **ratio** (number) - The ratio of the solution distance to the total distance of the puzzle. #### Response Example ```json { "ratio": 0.75 } ``` ``` -------------------------------- ### Solve TikTok Rotate Captcha Source: https://www.sadcaptcha.com/api/v1/v3/api-docs Endpoint for solving the TikTok Rotate captcha. Requires base64 encoded image. The solution indicates the rotation angle needed. ```python import requests import base64 BASE_URL = 'https://www.sadcaptcha.com/api/v1' LICENSE_KEY = 'YOUR_API_KEY_HERE' # Build the rotate URL rotate_url = f'{BASE_URL}/rotate?licenseKey={LICENSE_KEY}' # Convert the images to base64 encoding with o ``` -------------------------------- ### Rotate Captcha Source: https://www.sadcaptcha.com/api/v1/v3/api-docs Solves a rotate captcha by providing base64 encoded images of the outer and inner parts of the captcha. The API returns the angle required to solve the captcha. ```APIDOC ## POST /rotate ### Description Solves a rotate captcha. Requires base64 encoded outer and inner images. ### Method POST ### Endpoint `/rotate` ### Parameters #### Query Parameters - **licenseKey** (string) - Required - Your SadCaptcha license key. #### Request Body - **outerImageB64** (string) - Required - Base64 encoded string of the outer image. - **innerImageB64** (string) - Required - Base64 encoded string of the inner image. ### Request Example ```json { "outerImageB64": "base64_encoded_outer_image", "innerImageB64": "base64_encoded_inner_image" } ``` ### Response #### Success Response (200) - **angle** (number) - The angle (0-360) to rotate the image to solve the captcha. #### Response Example ```json { "angle": 180 } ``` ``` -------------------------------- ### TikTok Rotate Captcha Solver Source: https://www.sadcaptcha.com/api/v1/v3/api-docs Solves TikTok rotate captchas by determining the correct rotation angle for an image. ```APIDOC ## POST /rotate ### Description Solves TikTok rotate captchas. Requires an image that needs to be rotated to the correct orientation. ### Method POST ### Endpoint /rotate?licenseKey={licenseKey} ### Parameters #### Query Parameters - **licenseKey** (string) - Required - Your SadCaptcha license key. #### Request Body - **imageB64** (string) - Required - Base64 encoded image to be rotated. ### Request Example ```json { "imageB64": "rotate_image_base64_encoded_string" } ``` ### Response #### Success Response (200) - **solution** (number) - The degree to rotate the image. #### Response Example ```json { "solution": 90 } ``` ``` -------------------------------- ### Solve TikTok Shapes Captcha Source: https://www.sadcaptcha.com/api/v1/v3/api-docs This endpoint solves the TikTok 3D Shapes captcha. Provide the image in base64 format. The solution is returned as two points (ratios) representing click coordinates. ```python import requests import base64 BASE_URL = 'https://www.sadcaptcha.com/api/v1' LICENSE_KEY = 'YOUR_API_KEY_HERE' # Build the shapes captcha URL shapes_url = f'{BASE_URL}/shapes?licenseKey={LICENSE_KEY}' # Convert the images to base64 encoding with open('images/shapes.png', 'rb') as f: shapes = base64.b64encode(f.read()).decode() # Prepare the request data = { 'imageB64': shapes } # Get the answer as point ratios r = requests.post(shapes_url, json=data) print(r.json()) ``` -------------------------------- ### TikTok 3D Shapes Captcha Solver Source: https://www.sadcaptcha.com/api/v1/v3/api-docs Solves TikTok 3D shapes captchas by identifying points to click on the image. ```APIDOC ## POST /shapes ### Description Solves TikTok 3D shapes captchas. Requires an image of the 3D shapes puzzle. ### Method POST ### Endpoint /shapes?licenseKey={licenseKey} ### Parameters #### Query Parameters - **licenseKey** (string) - Required - Your SadCaptcha license key. #### Request Body - **imageB64** (string) - Required - Base64 encoded image of the shapes puzzle. ### Request Example ```json { "imageB64": "shapes_base64_encoded_string" } ``` ### Response #### Success Response (200) - **solution** (object) - An object containing two points (x, y ratios) to click. - **x** (float) - The x-coordinate ratio. - **y** (float) - The y-coordinate ratio. #### Response Example ```json { "solution": { "x": 0.5, "y": 0.3 } } ``` ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.