Solve PerimeterX Task

Python ExamplesUpdated 12/25/2025

Use PerimeterX tasks to solve PerimeterX captchas and retrieve cookies/useragent.

NOTE: The proxy and user-agent should be same for both solver and your request code

Create a PerimeterX task

task_id = api.solve_perimeterx(
  site_url="https://example.com",
  website_key="PXHYx10rg3",
  proxy_type="http",
  proxy_address="1.1.1.1",
  proxy_port="80",
  proxy_login="username",      # optional
  proxy_password="password"    # optional
)

print(f"PerimeterX Task ID: {task_id}")

Parameters

  • site_url — The full URL of target web page where the captcha is loaded
  • website_key — PerimeterX pxAppId (search pxAppId in the HTML of the website)
  • proxy_type — Proxy type (allowed: http)
  • proxy_address — Proxy IP address or hostname
  • proxy_port — Proxy port
  • proxy_login — Login for proxy (optional)
  • proxy_password — Password for proxy (optional)

Get PerimeterX task result

result = api.get_task_result(task_id)
print(result)

Example response

{
  "errorId": 0,
  "status": "completed",
  "solution": {
    "value": "",
    "cookies": {
      "_px3": "37624",
      "_pxvid": "254"
    },
    "useragent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/142.0.0.0 Safari/537.36"
  },
  "errorCode": null,
  "errorDescription": null
}