{"openapi":"3.0.3","info":{"title":"UnblockingAPI","version":"1.0.0","description":"Web unblocking / scraping API. Fetch any URL and get clean HTML back — with\noptional JavaScript rendering, residential-proxy geo-targeting, and wait\nstrategies for dynamic pages.\n\n## Authentication\nEvery request needs your API key, sent any one of these ways:\n- `X-Api-Key: <key>` header\n- `Authorization: Bearer <key>` header\n- `?key=<key>` query parameter (handy for quick browser tests)\n\n## Plans and credits\nUsing the API needs a monthly plan (from $19 a month; see\nhttps://unblockingapi.com/pricing). Each plan gives a number of credits\nper billing month; they don't roll over. Without a plan, or once this\nmonth's credits are spent, the API returns `402`.\n\nOnly *successful* requests (a 2xx, or a delivered 404) are charged;\nfailed requests are free:\n- 1 credit for a non-rendered request (no browser needed)\n- 25 credits for a rendered request: a real browser had to run, because the\n  page is blocked, challenged or incomplete without JavaScript. Send\n  `render=false` to never use one\n- a `max_age` cache hit costs 1; `location` is free\nEvery response says what it cost: `credits_used` in the body and the\n`X-Credits-Used` header.\n\n## Concurrency\nEach plan allows a number of requests in flight at once (25 to 100,\ndepending on the plan). Browser-rendered requests run at about 10% of\nthat, depending on current capacity. Going over returns `429`; retry\nonce one of your in-flight requests finishes.\n"},"servers":[{"url":"https://api.unblockingapi.com"}],"tags":[{"name":"Unblock","description":"Fetch any URL — raw HTTP or full browser render."},{"name":"Account","description":"The account behind your API key."}],"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]},{"ApiKeyQuery":[]}],"paths":{"/unblock":{"get":{"tags":["Unblock"],"summary":"Fetch a URL","description":"Returns the page's HTML. Both GET and POST are supported; POST takes a JSON body.","responses":{"200":{"description":"Success — the target returned a 2xx. Body carries the fetched content.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnblockResponse"}}}},"401":{"description":"Missing or invalid API key"},"402":{"description":"No credits left: no active plan, or out of credits for this billing month (or the account is still provisioning). Subscribe, upgrade or renew early at https://app.unblockingapi.com/billing.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Target returned 404. Treated as a successful result (status is \"succeeded\"), not a failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnblockResponse"}}}},"422":{"description":"Invalid parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests in flight for this API key — over your plan's concurrency, or its browser capacity is busy. Retry shortly.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The target site failed — any non-2xx/404 status, a block, a captcha wall, or a render failure. `http_response_code` holds the target's own status when it refused us (e.g. 403, 429), or 502 when we could not get past a challenge or the fetch itself failed; `error` says why.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnblockResponse"}}}},"503":{"description":"Service temporarily unavailable — our proxy pool is exhausted or the render backend is unreachable/saturated. Retry shortly.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnblockResponse"}}}},"504":{"description":"Timed out waiting for the target or the render backend.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnblockResponse"}}}}},"operationId":"unblockGet","parameters":[{"name":"url","in":"query","required":true,"description":"URL to fetch. Must be http(s) and not point at a media/binary file.","schema":{"type":"string","format":"uri","example":"https://example.com"}},{"name":"render","in":"query","required":false,"description":"Whether to render with a real browser (executes JavaScript). Omit it and the API decides: a fast plain fetch first, and a browser instead when the plain fetch comes back blocked, as a challenge wall, as an empty JavaScript app shell, or missing a good part of its text or its prices until scripts run — learned per site, so a site that needs a browser is rendered straight away from then on. `render=true` always uses a browser (25 credits), `render=false` never does (so it never costs more than 1); any wait option asks for a browser by itself. The response says what was used in `render` and why in `render_reason`.","schema":{"type":"boolean"}},{"name":"location","in":"query","required":false,"description":"2-letter country code for residential-proxy geo-targeting.","schema":{"type":"string","enum":["ad","ae","af","ag","al","am","ao","ar","at","au","az","ba","bb","bd","be","bf","bg","bh","bi","bj","bn","bo","br","bs","bt","bw","by","bz","ca","cf","cg","ch","cl","cm","cn","co","cr","cu","cv","cz","de","dj","dk","dm","do","dz","ec","ee","eg","er","es","et","fi","fj","fm","fr","ga","gb","gd","ge","gh","gm","gn","gq","gr","gt","gw","hk","hn","hr","ht","hu","id","ie","il","in","iq","ir","is","it","jm","jo","jp","ke","kg","kh","ki","km","kn","kp","kr","kw","kz","la","lb","lc","li","lk","lr","ls","lt","lu","lv","ly","ma","md","me","mg","mk","ml","mm","mn","mr","mt","mu","mv","mw","mx","my","mz","na","ne","ng","ni","nl","no","np","nr","nz","om","pa","pe","pg","ph","pk","pl","pt","pw","py","qa","ro","rs","ru","rw","sa","sb","sc","sd","se","sg","si","sk","sl","sm","sn","so","sr","ss","st","sv","sy","td","tg","th","tj","tl","tm","tn","to","tr","tt","tv","tw","tz","ua","ug","us","uy","uz","vc","ve","vn","vu","ws","ye","za","zm","zw"],"example":"de"}},{"name":"wait_for","in":"query","required":false,"description":"When to capture the page (asks for a browser render by itself). One of `stable` (default — 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. `settle_ms` caps DOM settling; selector waits use the remaining render budget. Tip: on pages that update continuously (live scores, tickers, polling widgets) prefer a selector or `stable` — such pages never go network-quiet, so `networkidle` waits its 8s ceiling and then settles on the DOM, which only slows the response down.","schema":{"type":"string","default":"stable","example":"#results"}},{"name":"wait_min_ms","in":"query","required":false,"description":"Minimum delay after navigation, before scrolling or checking readiness. Useful for discovering content absent from the first capture. Requires a browser.","schema":{"type":"integer","minimum":0,"maximum":10000,"default":0}},{"name":"wait_state","in":"query","required":false,"description":"Condition for a CSS selector in wait_for: visible; nonempty (visible text, ignoring common loading placeholders); hidden (all matches hidden or absent); stable (visible text and match count unchanged for 750ms). Conditional wait_rules retain visible semantics. No condition guarantees a complete page.","schema":{"type":"string","enum":["visible","nonempty","hidden","stable"],"default":"visible"}},{"name":"scroll_steps","in":"query","required":false,"description":"Scroll down this many times before the readiness check, pausing between steps. Requires a browser. Bounded discovery for lazy content, not exhaustive collection of infinite or virtualized lists.","schema":{"type":"integer","minimum":0,"maximum":10,"default":0}},{"name":"settle_ms","in":"query","required":false,"description":"Ceiling on the settle wait — **not** a fixed delay. Settling watches the page for DOM changes and captures once nothing has changed for 500ms; every change restarts that 500ms window. A page that goes quiet after 900ms returns after 900ms. `settle_ms` only caps how long that can take: reaching it means the page never stopped changing, and it is captured as-is. Applies to `wait_for=stable` and to selector waits (which settle after the element appears), and after a networkidle timeout. Ignored for `domcontentloaded`. Use `wait_min_ms` for a minimum delay or `scroll_steps` to trigger lazy sections; lower it to cap the worst case on pages that never fully stop.","schema":{"type":"integer","minimum":0,"maximum":25000,"default":5000,"example":12000}},{"name":"wait_rules","in":"query","required":false,"description":"Conditional waits (a browser render, like `wait_for`). Each `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 this request. Nothing matching falls back to `wait_for`. Use this when a page has more than one possible layout — a consent gate, an interstitial, or an A/B variant — so one request handles all of them. On a GET, pass it as a JSON string.","schema":{"type":"array","maxItems":10,"items":{"type":"object","properties":{"if":{"type":"string","description":"CSS selector to probe for"},"then":{"type":"string","description":"What to wait for when it matches. Empty means capture immediately."}},"required":["if"]}}},{"name":"detect_ms","in":"query","required":false,"description":"How long to probe `wait_rules` guards before falling back to `wait_for`.","schema":{"type":"integer","minimum":0,"maximum":25000,"default":800,"example":800}},{"name":"max_age","in":"query","required":false,"description":"Opt-in response cache: accept a previously fetched copy of the same url/render/location and wait settings up to this many seconds old. Cache hits return in milliseconds (the response then carries `cached: true`) instead of re-fetching. 0 (default) always fetches fresh. Recommended when polling the same URLs on a fixed interval.","schema":{"type":"integer","minimum":0,"maximum":300,"default":0,"example":60}},{"name":"keep_styles","in":"query","required":false,"description":"Keep the page's `<style>` blocks, stylesheet links and `<svg>` icons, which are stripped by default. For looking at a page as it looks; parsing never needs it. Scripts are stripped either way.","schema":{"type":"boolean","default":false,"example":false}}]},"post":{"tags":["Unblock"],"summary":"Fetch a URL","description":"Returns the page's HTML. Both GET and POST are supported; POST takes a JSON body.","responses":{"200":{"description":"Success — the target returned a 2xx. Body carries the fetched content.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnblockResponse"}}}},"401":{"description":"Missing or invalid API key"},"402":{"description":"No credits left: no active plan, or out of credits for this billing month (or the account is still provisioning). Subscribe, upgrade or renew early at https://app.unblockingapi.com/billing.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Target returned 404. Treated as a successful result (status is \"succeeded\"), not a failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnblockResponse"}}}},"422":{"description":"Invalid parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests in flight for this API key — over your plan's concurrency, or its browser capacity is busy. Retry shortly.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The target site failed — any non-2xx/404 status, a block, a captcha wall, or a render failure. `http_response_code` holds the target's own status when it refused us (e.g. 403, 429), or 502 when we could not get past a challenge or the fetch itself failed; `error` says why.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnblockResponse"}}}},"503":{"description":"Service temporarily unavailable — our proxy pool is exhausted or the render backend is unreachable/saturated. Retry shortly.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnblockResponse"}}}},"504":{"description":"Timed out waiting for the target or the render backend.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnblockResponse"}}}}},"operationId":"unblockPost","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","format":"uri","example":"https://example.com","description":"URL to fetch. Must be http(s) and not point at a media/binary file."},"render":{"type":"boolean","description":"Whether to render with a real browser (executes JavaScript). Omit it and the API decides: a fast plain fetch first, and a browser instead when the plain fetch comes back blocked, as a challenge wall, as an empty JavaScript app shell, or missing a good part of its text or its prices until scripts run — learned per site, so a site that needs a browser is rendered straight away from then on. `render=true` always uses a browser (25 credits), `render=false` never does (so it never costs more than 1); any wait option asks for a browser by itself. The response says what was used in `render` and why in `render_reason`."},"location":{"type":"string","enum":["ad","ae","af","ag","al","am","ao","ar","at","au","az","ba","bb","bd","be","bf","bg","bh","bi","bj","bn","bo","br","bs","bt","bw","by","bz","ca","cf","cg","ch","cl","cm","cn","co","cr","cu","cv","cz","de","dj","dk","dm","do","dz","ec","ee","eg","er","es","et","fi","fj","fm","fr","ga","gb","gd","ge","gh","gm","gn","gq","gr","gt","gw","hk","hn","hr","ht","hu","id","ie","il","in","iq","ir","is","it","jm","jo","jp","ke","kg","kh","ki","km","kn","kp","kr","kw","kz","la","lb","lc","li","lk","lr","ls","lt","lu","lv","ly","ma","md","me","mg","mk","ml","mm","mn","mr","mt","mu","mv","mw","mx","my","mz","na","ne","ng","ni","nl","no","np","nr","nz","om","pa","pe","pg","ph","pk","pl","pt","pw","py","qa","ro","rs","ru","rw","sa","sb","sc","sd","se","sg","si","sk","sl","sm","sn","so","sr","ss","st","sv","sy","td","tg","th","tj","tl","tm","tn","to","tr","tt","tv","tw","tz","ua","ug","us","uy","uz","vc","ve","vn","vu","ws","ye","za","zm","zw"],"example":"de","description":"2-letter country code for residential-proxy geo-targeting."},"wait_for":{"type":"string","default":"stable","example":"#results","description":"When to capture the page (asks for a browser render by itself). One of `stable` (default — 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. `settle_ms` caps DOM settling; selector waits use the remaining render budget. Tip: on pages that update continuously (live scores, tickers, polling widgets) prefer a selector or `stable` — such pages never go network-quiet, so `networkidle` waits its 8s ceiling and then settles on the DOM, which only slows the response down."},"wait_min_ms":{"type":"integer","minimum":0,"maximum":10000,"default":0,"description":"Minimum delay after navigation, before scrolling or checking readiness. Useful for discovering content absent from the first capture. Requires a browser."},"wait_state":{"type":"string","enum":["visible","nonempty","hidden","stable"],"default":"visible","description":"Condition for a CSS selector in wait_for: visible; nonempty (visible text, ignoring common loading placeholders); hidden (all matches hidden or absent); stable (visible text and match count unchanged for 750ms). Conditional wait_rules retain visible semantics. No condition guarantees a complete page."},"scroll_steps":{"type":"integer","minimum":0,"maximum":10,"default":0,"description":"Scroll down this many times before the readiness check, pausing between steps. Requires a browser. Bounded discovery for lazy content, not exhaustive collection of infinite or virtualized lists."},"settle_ms":{"type":"integer","minimum":0,"maximum":25000,"default":5000,"example":12000,"description":"Ceiling on the settle wait — **not** a fixed delay. Settling watches the page for DOM changes and captures once nothing has changed for 500ms; every change restarts that 500ms window. A page that goes quiet after 900ms returns after 900ms. `settle_ms` only caps how long that can take: reaching it means the page never stopped changing, and it is captured as-is. Applies to `wait_for=stable` and to selector waits (which settle after the element appears), and after a networkidle timeout. Ignored for `domcontentloaded`. Use `wait_min_ms` for a minimum delay or `scroll_steps` to trigger lazy sections; lower it to cap the worst case on pages that never fully stop."},"wait_rules":{"type":"array","maxItems":10,"items":{"type":"object","properties":{"if":{"type":"string","description":"CSS selector to probe for"},"then":{"type":"string","description":"What to wait for when it matches. Empty means capture immediately."}},"required":["if"]},"description":"Conditional waits (a browser render, like `wait_for`). Each `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 this request. Nothing matching falls back to `wait_for`. Use this when a page has more than one possible layout — a consent gate, an interstitial, or an A/B variant — so one request handles all of them. On a GET, pass it as a JSON string."},"detect_ms":{"type":"integer","minimum":0,"maximum":25000,"default":800,"example":800,"description":"How long to probe `wait_rules` guards before falling back to `wait_for`."},"max_age":{"type":"integer","minimum":0,"maximum":300,"default":0,"example":60,"description":"Opt-in response cache: accept a previously fetched copy of the same url/render/location and wait settings up to this many seconds old. Cache hits return in milliseconds (the response then carries `cached: true`) instead of re-fetching. 0 (default) always fetches fresh. Recommended when polling the same URLs on a fixed interval."},"keep_styles":{"type":"boolean","default":false,"example":false,"description":"Keep the page's `<style>` blocks, stylesheet links and `<svg>` icons, which are stripped by default. For looking at a page as it looks; parsing never needs it. Scripts are stripped either way."}},"required":["url"]}}}}}},"/me":{"get":{"tags":["Account"],"summary":"Check your API key","operationId":"getMe","description":"The account behind the API key: use it to check a key before using it. Free (no credit charged) and answers 200 even when the account has no plan or no credits left.","responses":{"200":{"description":"The key is valid.","content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","nullable":true,"example":"you@example.com"},"plan":{"type":"string","nullable":true,"example":"starter","description":"The plan's key; null without a plan."},"plan_name":{"type":"string","nullable":true,"example":"Starter"},"subscribed":{"type":"boolean","example":true,"description":"Whether the account has a plan. Without one /unblock works while credits remain, then answers 402."},"renews_at":{"type":"string","format":"date-time","nullable":true,"description":"When the plan renews and the credits reset; null when it is set to end or its last payment failed."},"credits":{"type":"integer","nullable":true,"example":1000,"description":"Credits left; null while the balance is still provisioning."},"concurrent_requests":{"type":"integer","example":100,"description":"How many requests this key may have in flight."}}}}}},"401":{"description":"Missing or invalid API key."}}}}},"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"X-Api-Key"},"BearerAuth":{"type":"http","scheme":"bearer"},"ApiKeyQuery":{"type":"apiKey","in":"query","name":"key","description":"API key as a query parameter (?key=…)"}},"schemas":{"UnblockResponse":{"type":"object","properties":{"job_id":{"type":"string","description":"Unique id for this request."},"url":{"type":"string"},"status":{"type":"string","enum":["succeeded","failed"],"description":"\"succeeded\" for 2xx and 404 targets; \"failed\" otherwise."},"http_response_code":{"type":"integer","example":200,"description":"The target's status code. On an HTTP 500 response it is the target's own refusal (e.g. 403, 429), or 502 when no usable page came back: a challenge we could not get past, a failed render, or a connection error. `error` says which."},"response_time_ms":{"type":"integer"},"credits_used":{"type":"integer","example":1,"description":"Credits this request cost (0 when it failed). Also in the X-Credits-Used header."},"wait_timed_out":{"type":"boolean","description":"A requested browser wait reached its limit; delivered HTML may still be useful. A wait_for selector is waited for at most 20 seconds; one that never appears is reported here, and the request still succeeds and is charged as usual."},"readiness":{"type":"object","properties":{"status":{"type":"string","enum":["satisfied","timeout","unavailable"]},"reason":{"type":"string"},"waited_ms":{"type":"integer"},"scroll_steps":{"type":"integer"},"verification":{"type":"object","nullable":true,"properties":{"vendor":{"type":"string","enum":["turnstile","cloudflare","recaptcha","hcaptcha","datadome","perimeterx","google"]},"status":{"type":"string","enum":["solved","interactive","pending"]},"waited_ms":{"type":"integer"}},"description":"A site verification widget or interstitial on the page (Cloudflare Turnstile or challenge page, reCAPTCHA, hCaptcha, DataDome, PerimeterX, Google's unusual-traffic page). \"interactive\": it needs a click or a puzzle, so a longer wait will not help. \"pending\": still verifying after 15 seconds."}},"description":"Browser wait outcome, when supported by the worker. Satisfied describes the chosen condition, not completeness of the page."},"render":{"type":"boolean","description":"Whether a browser rendered the page."},"render_reason":{"type":"string","nullable":true,"description":"Why: plain | replay (a plain fetch carrying the session a browser established for this site) | fallback:challenge | fallback:blocked | fallback:shell | fallback:hydrated (the page was incomplete without JavaScript) | fallback:replay | fallback:proxy (our proxy gateway failed the plain fetch; charged as non-rendered) | fallback:upstream (the site answered 5xx to the plain fetch) | fallback:render_failed (a browser site whose render failed: the plain page instead) | site:<why> | wait | requested."},"location":{"type":"string","nullable":true},"response_format":{"type":"string","enum":["html","json"],"description":"`json` when the target itself answered JSON, `html` otherwise."},"cached":{"type":"boolean","description":"Present (true) only when served from the `max_age` cache."},"error":{"type":"string","description":"Present only when status is failed."},"response":{"description":"The page: an HTML string, or the target's own JSON when it answered JSON."}}},"Error":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}