api reference

The web unblocker REST API

Fetch any public URL and get clean HTML back - with optional JavaScript rendering, geo-routing and smart wait strategies for dynamic pages. One endpoint, one credit per successful request.

GETapi.unblockingapi.com/unblock

request

curl -H "X-Api-Key: YOUR_API_KEY" \
  "https://api.unblockingapi.com/unblock?url=https://example.com"

response

200 OK
{
  "job_id": "abc123",
  "status": "succeeded",
  "http_response_code": 200,
  "response_time_ms": 1250,
  "render": false,
  "render_reason": "plain",
  "response_format": "html",
  "response": "<!doctype html>..."
}
Base URL https://api.unblockingapi.comOpenAPI 3.0 at /openapi.jsonPrefer clicking? PlaygroundRun In Postman

01 / get your key

Grab your API key

Sign up and copy your key from the dashboard. Every request carries it.

02 / send a request

Call /unblock

One GET or POST with a url. Leave render out and the API picks plain or browser for you.

03 / read the response

Get clean content

HTML back, or JSON with parse=true where we have a parser. render_reason tells you how the page was fetched.

Prefer hands-on help?

Our developers can help integrate UnblockingAPI into your existing application or scraper.

Get setup help

Want a worked example?

Step-by-step guides for common targets - property listings, e-commerce pages and JS-rendered pages.

Browse guides

authentication

Authenticate every request

Every request needs your API key, sent any one of these ways:

X-Api-Key: <key>headerrecommended
Authorization: Bearer <key>header
?key=<key>query parameterhandy for quick browser tests
# Header (recommended)
curl -H "X-Api-Key: YOUR_API_KEY" \
  "https://api.unblockingapi.com/unblock?url=https://example.com"

# Bearer token
curl -H "Authorization: Bearer YOUR_API_KEY" \
  "https://api.unblockingapi.com/unblock?url=https://example.com"

# Query parameter
curl "https://api.unblockingapi.com/unblock?url=https://example.com&key=YOUR_API_KEY"

Call the API from your server. It doesn't send CORS headers to your site, so browsers block requests from your web pages, and keeping it server-side also keeps your API key out of client code.

rate limits

Rate limits

The same limits apply to every account:

  • your credit balance - credits come from one-time packs that never expire, and one successful request costs 1 credit
  • 25 concurrent requests in flight
  • fair use and abuse prevention controls

Exceeding your concurrency limit returns 429; running out of credits returns 402. See Pricing for credit packs, or talk to us if you need more concurrency.

Short-window burst limits may also apply to protect reliability.

endpoint

/unblock

Fetch a public URL and get clean HTML back. Both GET and POST are supported - POST takes a JSON body with the same fields.

GETPOST/unblock
# GET request
curl -H "X-Api-Key: YOUR_API_KEY" \
  "https://api.unblockingapi.com/unblock?url=https://example.com"

# POST request
curl -X POST \
  -H "X-Api-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url": "https://example.com"}' \
  "https://api.unblockingapi.com/unblock"

parameters

Parameters

urlstringrequired

URL to fetch. Must be http(s) and not point at a media/binary file.

renderbooleandefault: automatic

Whether to render with a real browser (executes JavaScript). Leave it out and the API decides: a fast plain fetch first, and a browser render instead when the plain fetch comes back blocked, as a captcha or challenge wall, or as an empty JavaScript app shell. What it learns sticks per site: a site that needs a browser is rendered straight away from the second request on, and a site that only needs a browser once, to establish a session, is served by fast plain fetches that carry that session from then on. Pass render=true to always use a browser or render=false to never use one; any wait option asks for a browser by itself. Renders fetch the document and the scripts that build it; CSS, images and fonts are always skipped, since they only add transfer time for bytes that never reach your response. The response says which mode was used in render and why in render_reason.

locationstring

2-letter country code for geo-routing where supported. Examples: us, gb, de.

wait_forstringdefault: stable

When to capture the page (asks for a browser render by itself). One of stable - capture once the DOM stops changing, domcontentloaded - capture immediately, networkidle - wait for the network to go quiet, or any CSS selector, which waits for that element to become visible and then settles. See Waiting for content.

settle_msintegerdefault: 5000

Ceiling on the settle wait - not a fixed delay. Max 25000. Applies to stable and selector waits.

wait_rulesarray

Conditional waits for pages with more than one possible layout. Each if selector is probed in order; the first visible one wins and its then replaces wait_for.

detect_msintegerdefault: 800

How long to probe wait_rules guards before falling back to wait_for. Max 25000.

max_ageintegerdefault: 0

Opt-in response cache. Accept a previously fetched copy of the same page, up to this many seconds old, instead of fetching again. Max 300. A hit returns in milliseconds and carries cached: true. Worth it when you poll the same URLs on a fixed interval. Leave it at 0 and every request fetches fresh - nothing is cached, read or written unless you ask.

parsebooleandefault: false

Return structured JSON instead of HTML when we keep a parser for the URL’s site (search engines, marketplaces, property portals and more, growing). It never changes how the page is fetched or what it costs. Where no parser covers the URL you get the page as usual plus "parse": "unavailable". See Structured data.

remove_scriptsbooleandefault: true

Strip <script> tags. On by default. Scripts are removed in the render worker before the page is sent back, so this also cuts transfer time.

remove_stylesheetsbooleandefault: true

Strip <style> tags and stylesheet links. On by default, and removed in the render worker. Inline style attributes are always kept.

remove_svgsbooleandefault: true

Strip <svg> tags from the returned HTML. On by default.

response

Response format

Every response follows the same envelope:

{
  "job_id": "abc123",
  "url": "https://example.com",
  "status": "succeeded",
  "http_response_code": 200,
  "response_time_ms": 1250,
  "render": false,
  "render_reason": "plain",
  "location": "de",
  "response_format": "html",
  "response": "<!doctype html>..."
}
job_idstring

Unique ID for this request.

urlstring

The URL that was fetched.

status"succeeded" | "failed"

"succeeded" for 2xx and 404 targets; "failed" otherwise.

http_response_codeinteger

The target's actual HTTP status code. On a 500 response, this holds the real upstream code (e.g. 403, 429).

response_time_msinteger

Time taken in milliseconds.

renderboolean

Whether browser rendering was used.

render_reasonstring

Why: plain (the plain fetch delivered), replay (a plain fetch carrying the session a browser established for the site), fallback:challenge / fallback:blocked / fallback:shell (the plain fetch came back as that, so a browser rendered it), fallback:replay (the site's saved session no longer worked, so a browser established a new one), site:… (the site is known to need a browser), wait, template or requested.

locationstring | null

Country code used, or null.

response_format"html" | "json"

"html" normally, "json" when you sent parse=true and a parser ran.

responsestring | object

The HTML as a string, or the parsed object when a parser ran.

api_namestring

Present only when a parser ran. The parser that answered.

parse_errorboolean

Present (true) only when a parser failed and you got raw HTML instead. See Structured data.

parse"unavailable"

Present only when you sent parse=true and no parser covers the URL: response is the page as usual.

cachedboolean

Present (true) only when max_age was set and the response came from the cache. A hit still costs one credit.

errorstring

Present only when status is "failed".

dynamic pages

Waiting for content

Dynamic pages finish loading long after the HTML arrives. These options say when to capture. Any of them asks for a browser render by itself, so render=true is implied (and render=false is refused alongside them).

wait_for

stabledefault

Capture once the DOM stops changing. Best default for most pages - it adapts to whatever the page is doing instead of guessing a duration.

domcontentloadedfastest

Capture immediately. Use when the content you want is in the initial HTML.

networkidlestring

Wait for the network to go quiet. Avoid on pages that poll - see the note below.

<css selector>string

Any other value is treated as a CSS selector: wait for that element to become visible, then settle. The most precise option when you know what you are looking for. The selector is waited for at most 20 seconds; if it never appears, the page is returned as it was with wait_timed_out: true. That is still a successful request (1 credit): the page was fetched and rendered.

On pages that never go quiet - live scores, tickers, chat, polling widgets - networkidle will wait its 8-second ceiling and then settle on the DOM, which only slows the response down. Prefer stable or a selector.

settle_ms - a ceiling, not a delay

Settling watches the page and captures as soon as nothing in the DOM has changed for 500 ms; every change restarts that window. A page that goes quiet after 900 ms comes back after 900 ms - settle_ms only caps how long that can take. Reaching it means the page never stopped changing, and it is captured as it is.

Raise it for pages that keep streaming content in (infinite scroll, lazily loaded sections); lower it to bound the worst case. It applies to stable and to selector waits, and is ignored for domcontentloaded and networkidle.

wait_rules - one request, several layouts

Some pages serve more than one layout: a consent gate, an interstitial, an A/B variant, a logged-out fallback. Rather than guessing which you will get, describe each one. Every if selector is probed in list order for up to detect_ms; the first one that is visible wins, and its then replaces wait_for for that request. If nothing matches, wait_for is used as normal.

An empty then means “this layout matched, capture it now”.

Examples

// Wait for results to become visible, then settle
{ "url": "https://example.com/search?q=shoes", "wait_for": "#results" }

// A page that keeps loading content in - allow longer to go quiet
{ "url": "https://example.com/feed",
  "wait_for": "stable", "settle_ms": 12000 }

// Two possible layouts: a consent gate, or the results directly
{ "url": "https://example.com/search?q=shoes",
  "wait_for": "#results",
  "wait_rules": [{ "if": "#consent-gate", "then": "#results" }],
  "detect_ms": 800 }

On a GET, pass wait_rules as a JSON string.

errors

Error codes

200

Success - the target returned a 2xx. Body carries the fetched content.

401

Missing or invalid API key.

404

Either the target returned 404, which is a successful result (status is "succeeded"), or the template you named does not exist or is private to another account (error is "Unknown template: …", or "Unknown template version: …" for a version above the latest). An unknown template fetches nothing and costs no credit.

402

Out of credits. Top up with a credit pack to resume.

422

Invalid parameters - check the error message for details.

429

Concurrency limit exceeded. Back off and retry.

500

Request failed due to an upstream error, block, captcha challenge or render failure. Check http_response_code and error for details.

503

Service temporarily unavailable - proxy pool exhausted, render backend saturated, or the template catalogue is warming up after a restart ("Template catalogue is warming up, retry in a few seconds"). Retry after a few seconds.

504

Timed out waiting for the target or render backend.

Working on a tricky target? Talk to us - we can help tune routing, rendering and request strategy for your use case.

advanced

Structured data

Add parse=true and, where we keep a parser for the site, you get clean JSON fields back instead of HTML, from the same /unblock endpoint, with the same key and the same cost. We keep parsers for popular sites (Google and Bing results, marketplaces, property portals, business directories and more), and coverage grows.

Asking never changes the fetch. The mode stays automatic, so a site we can read without a browser is still read without one, and a request costs one credit whether or not a parser ran.

curl -H "X-Api-Key: YOUR_API_KEY" \
  "https://api.unblockingapi.com/unblock?url=https://www.google.com/search?q=coffee&parse=true"

When a parser ran, response_format is json, response is an object and api_name names the parser. Check one real response before you write types: the fields are the site’s own.

{
  "job_id": 86,
  "url": "https://www.google.com/search?q=coffee",
  "status": "succeeded",
  "http_response_code": 200,
  "response_time_ms": 645,
  "render": false,
  "render_reason": "replay",
  "response_format": "json",
  "api_name": "google-search",
  "template_version": 2,
  "response": {
    "query": "coffee",
    "results": [
      { "position": 1, "title": "…", "url": "https://…", "description": "…" }
    ],
    "related_searches": ["…"]
  }
}

When there is no parser, or it breaks

No parser for the URL: you get the page exactly as without parse, plus "parse": "unavailable". Parse it yourself, or tell us the site.

A parser is a reading of someone else’s markup, and markup changes. So a parser that breaks never costs you the response: you get the raw HTML back with parse_error: true and response_format back to html, rather than an error. Check those two fields and keep a fallback if you parse strictly.

Named templates

A few guides name a template directly with template=handle/slug, such as the Domain Rating guide. A named template also forces the fetch settings its parser needs (a browser, a country), its response looks like the one above, a name that does not resolve is a 404, and @N pins a version. For anything else, use parse=true.

Use must comply with the Acceptable Use Policy.

MCP server

AI apps can use this API over MCP: connect to https://mcp.unblockingapi.com/mcp and sign in, or send Authorization: Bearer <key>. Or run the open-source @unblockingapi/mcp locally. Setup and tools.

Ready to start?

Get your API key and make your first request in seconds.

Get API key