Skip to content
OSINTtools.io

WebScraping.AI API

Send a URL and get its HTML, text, chosen elements or AI-extracted fields, fetched through the provider's proxies and Chrome.

Base URL
https://api.webscraping.ai
Sign-in
API key
Pricing
Credits
Format
REST
Endpoints
7

Compiled by OSINTtools.io editors from webscraping.ai · updated Nov 29, 2026Work on this API? Claim it to keep these docs currentReport a mistake

Introduction

WebScraping.AI fetches a page for you through its proxies, optionally rendering JavaScript, and returns the HTML, text, selected elements, an AI answer or Google results. An investigator can use it to capture a page from another country or behind simple bot defences.

Pass your key as the api_key query parameter on every request. Requests cost credits by configuration: 1 for datacenter proxy without JS, 5 with JS rendering (the default), 10 for residential without JS, 25 residential with JS, 50 for stealth proxy; AI endpoints add 5 and /serp costs 15 per results page. Failed requests are free.

The docs state no per-second rate limit; exceeding concurrency returns 429, and /account reports remaining_concurrency. Requests can take up to 30 seconds. The multi-selector endpoint /selected-multiple and the /data endpoint are not described here.

Quick start

  1. Get a key

    Create an account with WebScraping.AI and copy your api key. Where to get it

  2. Make your first request

    Fetch a page and return its raw HTML.. Replace YOUR_API_KEY and run it in a terminal, or use Try it on the endpoint.

    curl 'https://api.webscraping.ai/html?url=https%3A%2F%2Fexample.com%2F&api_key=YOUR_API_KEY'
  3. Read the response

    A 200 response looks like this.

    <html><head><title>Example Domain</title></head><body></body></html>

Authentication

Send your API key in the api_key query parameter of every request.

Keep the key server-side

Get a key from WebScraping.AI

Try it on this page keeps your key in your browser; it is never sent to OSINTtools.io.

Rate limits and pricing

Concurrency limit (429 when exceeded); no per-second rate stated

Pricing: credits.

Errors

StatusMeaning
400Invalid parameters (not charged)
402Insufficient credits
403Invalid API key
429Too many concurrent requests
500Target blocked or errored, or internal error
503Workers busy (not charged; retry after Retry-After)
504Timeout; increase timeout

Scraping

  • Takes: URL
  • Active: contacts the target
  • Cost: 1 to 50 credits depending on proxy and JS

Fetches the URL through a proxy, with JavaScript rendering by default. The target is contacted.

Query parameters

urlstringrequiredtakes your url

Page to fetch

Example: https://example.com/
jsboolean

Render JavaScript

Example: trueDefault: true
proxystring

Proxy type

Example: datacenterDefault: datacenterOne of: datacenter, residential, stealth, auto
countrystring

Proxy country

Example: usDefault: us
devicestring

Device type

Example: desktopOne of: desktop, mobile, tablet
timeoutinteger

Timeout in ms, default 10000, max 25000

Example: 10000
Response fields · 1Show

(body)string

Raw HTML of the page

curl 'https://api.webscraping.ai/html?url=https%3A%2F%2Fexample.com%2F&api_key=YOUR_API_KEY'
Replace YOUR_API_KEY with your key
Response
<html><head><title>Example Domain</title></head><body></body></html>
  • Takes: URL
  • Active: contacts the target
  • Cost: 1 to 50 credits depending on proxy and JS

Markdown for text_format=plain; for json or xml an object with title, description and content.

Query parameters

urlstringrequiredtakes your url

Page to fetch

Example: https://example.com/
text_formatstring

Output format

Example: jsonDefault: plainOne of: plain, json, xml
return_linksboolean

Include links

Example: false
Response fields · 3Show

titlestring

Page title (json and xml formats)

descriptionstring

Page description (json and xml formats)

contentstring

Page text (json and xml formats)

curl 'https://api.webscraping.ai/text?url=https%3A%2F%2Fexample.com%2F&api_key=YOUR_API_KEY'
Replace YOUR_API_KEY with your key
Response
{
  "title": "Example Domain",
  "description": "An example page",
  "content": "Example text."
}
  • Takes: URL
  • Active: contacts the target
  • Cost: 1 to 50 credits depending on proxy and JS

Returns the HTML of the matched element.

Query parameters

urlstringrequiredtakes your url

Page to fetch

Example: https://example.com/
selectorstringrequired

CSS selector

Example: h1
Response fields · 1Show

(body)string

HTML of the matched element

curl 'https://api.webscraping.ai/selected?url=https%3A%2F%2Fexample.com%2F&selector=h1&api_key=YOUR_API_KEY'
Replace YOUR_API_KEY with your key
Response
<h1>Example Domain</h1>

AI

  • Takes: URL
  • Active: contacts the target
  • Cost: Page cost plus 5 credits

AI endpoints add 5 credits to the page cost.

Query parameters

urlstringrequiredtakes your url

Page to read

Example: https://example.com/
questionstringrequired

Question about the page

Example: What is this page about?
Response fields · 1Show

(body)string

Plain-text answer

curl 'https://api.webscraping.ai/ai/question?url=https%3A%2F%2Fexample.com%2F&question=What%20is%20this%20page%20about%3F&api_key=YOUR_API_KEY'
Replace YOUR_API_KEY with your key
Response
This page is an example domain used in documentation.
  • Takes: URL
  • Active: contacts the target
  • Cost: Page cost plus 5 credits

fields is an object mapping field names to extraction instructions. Fields not found are null.

Query parameters

urlstringrequiredtakes your url

Page to read

Example: https://example.com/
fieldsstringrequired

Object of field name to extraction instruction

Example: fields[title]=page title
Response fields · 1Show

resultobject

Extracted values by field name; null if not found

curl 'https://api.webscraping.ai/ai/fields?url=https%3A%2F%2Fexample.com%2F&fields=fields%5Btitle%5D%3Dpage%20title&api_key=YOUR_API_KEY'
Replace YOUR_API_KEY with your key
Response
{
  "result": {
    "title": "Example Domain"
  }
}
  • Passive: the target is not contacted
  • Cost: 15 credits per results page

Google only. pages (1 to 5) is billed per page.

Query parameters

qstringrequired

Search query

Example: example domain
glstring

Country

Example: us
hlstring

Language

Example: enDefault: en
pageinteger

Results page, 1 to 100

Example: 1
pagesinteger

Number of pages, 1 to 5

Example: 1
Response fields · 6Show

positioninteger

Rank

titlestring

Result title

linkstring

Result URL

domainstring

Result domain

snippetstring

Result snippet

related_searchesarray

Related searches

curl 'https://api.webscraping.ai/serp?q=example%20domain&api_key=YOUR_API_KEY'
Replace YOUR_API_KEY with your key
Response
{
  "organic_results": [
    {
      "position": 1,
      "title": "Example Domain",
      "link": "https://example.com/",
      "domain": "example.com",
      "snippet": "An example page."
    }
  ]
}

Account

  • Passive: the target is not contacted

Reports remaining credits, the reset time and remaining concurrency.

Response fields · 7Show

emailstring

Account email

remaining_api_callsinteger

Remaining API calls

remaining_monthly_creditsinteger

Remaining monthly credits

remaining_payg_creditsinteger

Remaining pay-as-you-go credits

remaining_total_creditsinteger

Remaining total credits

resets_atstring

When monthly credits reset

remaining_concurrencyinteger

Remaining concurrent requests

curl 'https://api.webscraping.ai/account?api_key=YOUR_API_KEY'
Replace YOUR_API_KEY with your key
Response
{
  "email": "jane@example.org",
  "remaining_api_calls": 900,
  "remaining_monthly_credits": 4500,
  "remaining_payg_credits": 0,
  "remaining_total_credits": 4500,
  "resets_at": "2026-12-01T00:00:00Z",
  "remaining_concurrency": 5
}