Logo of «2Captcha»To home page

Scraper API

Clean data from any web page. 2Captcha handles captchas, proxy rotation, browser rendering, and anti-bot blocks so you can focus on building your product instead of maintaining backend infrastructure. Fetch pages, use AI-powered extraction, or integrate with dedicated APIs for LLM, RAG, and analytics pipelines.

No risk. Pay only for successful requests.

  • Easy to integrate
  • Anti-detect built in
  • Scrape on demand via API
  • Handle captcha challenges inside browser workflows
  • Bulk request handling
  • Extract content into clean structured data

Contact sales

  • Support WhatsApp
  • Support Telegram
  • Support email
  • Support phone
Send message

A full scraping automation stack in one API

Browser fingerprinting

Manage browser fingerprints, headers, cookies, and session signals to make automation workflows more stable.

Automated captcha solving

Handle captcha challenges in the background, including reCAPTCHA, hCaptcha, Turnstile, and other common verification flows.

Integrated proxy management

Use residential and mobile proxies with IP rotation, geo-targeting, and sticky sessions for large-scale data collection.

Easy integration

Send standard HTTP requests from any backend, script, or data pipeline without managing WebSocket connections, CDP sessions, or browser processes.

Auto-scaling infrastructure

Run browser automation in the cloud without managing local Chrome instances, Docker containers, or browser servers.

JavaScript rendering and debugging

Render dynamic websites, wait for DOM selectors and network activity, and return fully loaded HTML or structured data.

How to work with the 2Captcha Scraping API

Scraping API Integration Workflow

  1. Send a request

    Send an HTTP request containing the target URL and extraction parameters like geolocation, JS rendering, and wait conditions.

  2. Allocate resources

    The API routes the connection through an optimized proxy network and instantiates an ephemeral headless browser environment.

  3. Execute DOM

    The remote instance navigates to the target, executes client-side JavaScript, and resolves network requests until the page is fully loaded.

  4. Mitigate defenses

    The system handles TLS fingerprinting and automatically bypasses WAFs (Cloudflare, Akamai, Imperva) and CAPTCHA challenges on the fly.

  5. Receive data

    Your application synchronously receives the serialized DOM, raw HTML, or parsed JSON directly in the HTTP response.

Scraping API vs direct scraping

Scraping API
Direct Scraping
Web Navigation & Data Extraction
Managed JavaScript Rendering
Automated Proxy Rotation
WAF Bypass
Captcha Bypass
TLS/JA3 Spoofing
Auto-scaling Infrastructure

How it works

Send a request to the API endpoint and extract data without managing backend infrastructure or headless browsers. The Scraping API automatically handles IP rotation, JS rendering, WAFs, and captcha bypass, returning clean HTML or structured data directly to your application or pipeline.

  • Send the API request

    Configure a single HTTP request. Pass the target URL along with optional extraction parameters. You can define specific geo-targeting, enable JavaScript rendering, set custom HTTP headers, or define strict wait conditions (e.g., waiting for a specific DOM selector) directly within the request payload.

  • Route and allocate

    The API dynamically assigns an optimal IP from a proxy pool based on your geo-targeting settings. Simultaneously, it instantiates an isolated, ephemeral headless browser environment on our servers, ensuring your local infrastructure remains unburdened.

  • Render the target website

    The remote instance navigates to the URL and executes all client-side JavaScript. It handles XHR/fetch requests, renders dynamic elements, and processes Single Page Applications (SPAs). This ensures that lazy-loaded content or data hidden behind JS-heavy logic is fully rendered.

  • Handle access challenges

    Anti-bot systems are neutralized automatically. The API manages TLS/JA3 fingerprint spoofing, session cookies, and headers. If a WAF (Cloudflare, Akamai) or a CAPTCHA intercepts the request, internal solvers clear the challenge on the fly without requiring custom retry logic in your code.

  • Extract the data

    Once the page is fully rendered and challenges are cleared, your application receives a synchronous HTTP response. This response contains the clean, serialized HTML or raw JSON data. You can immediately ingest this output into your parsers, LLM agents, or internal databases.

Easy-to-integrate

The Scraping API is a scalable extraction engine built for developers and AI agents alike.

SDK Libraries: Use native SDKs and ready-made wrappers for Python, Node.js, Go, and PHP to connect faster, manage requests, handle responses, and integrate scraping workflows.

AI-ready: Use MCP (Model Context Protocol) to integrate with Claude Desktop, Cursor, and autonomous AI agents. Built-in WAF, captcha, and IP-ban bypass keeps workflows running.

Test the API directly from your terminal using standard HTTP POST requests to verify extraction logic and payloads.

BASE_URL="https://scraper.2captcha.com"
API_KEY="<YOUR_API_KEY>"

curl -i -X POST "$BASE_URL/tasks/sync" \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "task_type": "scrape",
    "url": "https://example.com",
    "data_format": "raw",
    "format": "json"
  }'

Integrate data extraction into your data science, ML, or backend pipelines using our SDK or the standard requests library.

import os
import requests

base_url = "https://scraper.2captcha.com"
api_key = os.environ["SCRAPER_API_KEY"]

response = requests.post(
    f"{base_url}/tasks/sync",
    headers={
        "Authorization": f"Bearer {api_key}",
        "Content-Type": "application/json",
    },
    json={
        "task_type": "scrape",
        "url": "https://example.com",
        "data_format": "raw",
        "format": "json",
    },
    timeout=120,
)
response.raise_for_status()

result = response.json()
print(result["body"])
print(response.headers.get("x-debug"))

Fetch dynamic content and bypass protections in your JavaScript/TypeScript applications natively or via our npm package.

const baseUrl = 'https://scraper.2captcha.com';
const apiKey = process.env.SCRAPER_API_KEY;

const response = await fetch(baseUrl + '/tasks/sync', {
  method: 'POST',
  headers: {
    Authorization: 'Bearer ' + apiKey,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    task_type: 'scrape',
    url: 'https://example.com',
    data_format: 'raw',
    format: 'json',
  }),
});

if (!response.ok) {
  throw new Error('Scraper API error: ' + response.status);
}

const result = await response.json();
console.log(result.body);
console.log(response.headers.get('x-debug'));

Implement high-concurrency scraping workflows using our native module or standard net/http routines.

package main

import (
  "bytes"
  "encoding/json"
  "fmt"
  "io"
  "net/http"
  "os"
  "time"
)

func main() {
  payload, _ := json.Marshal(map[string]any{
    "task_type":  "scrape",
    "url":        "https://example.com",
    "data_format": "raw",
    "format":     "json",
  })

  req, _ := http.NewRequest(http.MethodPost, "https://scraper.2captcha.com/tasks/sync", bytes.NewReader(payload))
  req.Header.Set("Authorization", "Bearer "+os.Getenv("SCRAPER_API_KEY"))
  req.Header.Set("Content-Type", "application/json")

  client := &http.Client{Timeout: 120 * time.Second}
  response, err := client.Do(req)
  if err != nil {
    panic(err)
  }
  defer response.Body.Close()

  body, _ := io.ReadAll(response.Body)
  fmt.Println(string(body))
  fmt.Println("x-debug:", response.Header.Get("x-debug"))
}

Connect the API directly to LLM chains, RAG pipelines, or AI frameworks using native MCP support or specialized endpoints.

{
  "task_type": "scrape",
  "url": "https://example.com",
  "data_format": "markdown",
  "format": "json"
}

Pricing

Choose the number of requests you want to add to your balance. The price is $0.30 per 1,000 requests.

100,000 requests$0.30 / 1,000 requests

Top-up summary

Requests
100,000
Price per 1,000 requests
$0.30
Order total
$30.00
Top up balance

Use cases

The Scraping API handles access challenges so you can focus on the data.

Data Extraction & E-commerce

Data Extraction & E-commerce

Legitimate public data gathering to scale business processes and analytics without the risk of IP blocks.

Market & Price Intelligence

Extract competitor pricing and inventory from marketplaces (Amazon, Walmart) in real-time. Built-in proxies easily bypass aggressive retail WAFs.

SEO Monitoring & SERP

Bulk parse Google search results for rank tracking. Choose your exact geolocation (country/city) and forget about search engine captchas.

AI & LLM Data Training

AI & LLM Data Training

Provide your neural networks and AI agents with uninterrupted access to fresh internet data.

RAG & Agent Tooling

Integrate via Model Context Protocol (MCP). Enable your LLM agent to gather information from any protected website, receiving clean Markdown or JSON in return.

Dataset Gathering

Automated collection of large text and visual datasets for training ML models. The API handles Cloudflare and DataDome challenges during the scraping process.

QA & Security Testing

QA & Security Testing

Reliable tools for developers and QA engineers to automate routine tasks and validate system integrity.

End-to-End (E2E) Testing

Seamless testing of user flows (registration, checkout) in CI/CD pipelines using Playwright or Puppeteer without facing roadblocks in pre-production.

WAF & Bot-Protection Stress Test

Emulate complex traffic scenarios to test infrastructure resilience and validate the response of bot protection systems (Akamai, Imperva) under heavy load.

Social Media

Social Media

Interact with social media safely while maintaining high account trust scores.

Persistent Sessions

Utilize Sticky Sessions (IP retention) and persistent profiles (cookie storage). Your script will behave and look exactly like a regular user browsing from a specific mobile device.

Lead Generation

Collect public contacts and profiles for outreach campaigns, avoiding shadowbans and account restrictions thanks to flawless kernel-level browser fingerprinting.

Compliance and Responsible Use

We are committed to ensuring that our technology is used lawfully, responsibly, and for legitimate purposes. We do not support, authorize, or tolerate any illegal activity, abuse, or misuse of our products and services.

Our services are intended to support lawful access to publicly available information, including use cases that contribute to research, transparency, innovation, and the development of useful data-driven solutions. We strictly oppose the collection, processing, or use of unauthorized, restricted, confidential, or sensitive information without proper legal basis or permission.

Users are solely responsible for ensuring that their use of our services complies with all applicable laws, regulations, contractual obligations, website terms, privacy requirements, and third-party rights.

If you believe that our services are being used in violation of applicable law, our policies, or the rights of others, please contact us and provide relevant details. We review abuse reports carefully and may take appropriate action, including restricting or terminating access to our services where necessary.

To strengthen transparency, user control, and privacy protection, we maintain a dedicated Privacy Center where users can access information about data practices, privacy rights, and available control options.

FAQ

What is 2Captcha Scraping API?
2Captcha Scraping API is a web scraping API for collecting data from public web pages without building and maintaining your own scraping infrastructure. You send a request with the target URL, and the API handles page access, rendering, retries, proxy usage, and captcha challenges when they appear.
What can I use 2Captcha Scraping API for?
You can use it to collect public web data for e-commerce monitoring, price tracking, search results analysis, market research, lead enrichment, travel data, job listings, real estate listings, AI datasets, and internal analytics tools.
Why use a scraping API instead of building my own scraper?
Building your own scraper usually means managing proxies, browser instances, JavaScript rendering, headers, cookies, retries, captcha solving, and infrastructure scaling. 2Captcha Scraping API moves this work to a managed API, so your team can focus on the data you need instead of maintaining scraping logic for every target website.
What type of data can the API return?
The API can return page HTML, rendered content, or structured extracted data depending on the request mode and configuration. This makes it suitable both for developers who want to parse pages themselves and for teams that need ready-to-use data for analytics, dashboards, or pipelines.
Does 2Captcha Scraping API support JavaScript-rendered websites?
Yes. Many modern websites load content dynamically with JavaScript. 2Captcha Scraping API can work with rendered pages, which helps collect data that is not available in the initial HTML response.
How does the API handle captcha challenges?
2Captcha Scraping API is built around 2Captcha's captcha-solving expertise. When a target page shows a captcha challenge, the API can process it as part of the scraping workflow, reducing the need to build a separate captcha-solving layer into your scraper.
Do I need to manage proxies myself?
No. The API is designed to reduce proxy management work. Depending on the selected configuration, requests can use suitable proxy routing, IP rotation, sessions, and location settings. If your workflow requires a specific proxy setup, this can be configured separately.
Can I automate recurring scraping jobs?
Yes. You can call the API from backend services, cron jobs, scripts, data pipelines, no-code tools, or internal applications. Your automation controls when requests are sent, which URLs are processed, and where the results are stored.
How fast does the API return results?
Response time depends on the target website and enabled features. Simple pages usually return faster. Requests that require JavaScript rendering, proxy routing, retries, or captcha solving may take longer because the API needs to complete additional steps before returning the result.
Can I use 2Captcha Scraping API at scale?
Yes. The API is suitable for high-volume scraping workflows where many URLs need to be processed automatically. For larger workloads, you can organize requests in batches, use queues, and adjust concurrency based on your account limits and target website behavior.
Does the API work with my existing stack?
Yes. You can integrate it with any backend or script that can send HTTP requests. It can be used from Python, Node.js, PHP, Go, Java, C#, Ruby, and other languages commonly used for web automation and data collection.
Do I need to rewrite my existing scraper?
Not necessarily. In many cases, you can keep your existing parsing, storage, and business logic, and replace only the page-fetching layer with 2Captcha Scraping API. Instead of sending requests directly to the target website, your application sends them to the API and processes the returned result.
What happens if a request fails?
Failed requests can happen when the target website is unavailable, blocks access, changes its structure, or takes too long to respond. In these cases, your application should handle the response status, retry if appropriate, and log failed URLs for review.
Is web scraping legal?
Web scraping may be legal when it is done responsibly and in compliance with applicable laws, website terms, privacy rules, and data usage restrictions. You should collect only data you are allowed to access and consult legal advice for sensitive or regulated use cases.
How do I get started?
Create a 2Captcha account, get your API key, choose the scraping mode you need, and send your first request with a target URL. From there, you can connect the API to your application, scripts, scheduled jobs, or data pipeline.
  • «GDPR» logo
  • «SSL secured» logo
  • «Google privacy policy» logo
  • «S/MIME» logo
  • «CCPA» logo