UnblockingAPI

v0.8.4
io.github.unblockingapi/mcp Checked 8 hours ago Published 21 days ago

Fetch bot-protected and JavaScript-heavy pages for AI agents, or parse them to JSON with templates.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

unblock_fetch Fetch a URL through UnblockingAPI

Fetch a web page through UnblockingAPI's rotating residential proxies and a real browser. Useful for pages a plain HTTP fetch can't read: pages that need JavaScript, refuse automated requests, or show different content by country. Returns the page as Markdown (or cleaned HTML with format: 'html'); select narrows it to the part you need. If content is missing, fetch again with scroll_steps or wait_for. Picks the mode itself by default: a plain HTTP fetch first, and a real browser when the site blocks it or needs JavaScript. Pass a template reference to get structured JSON instead of HTML — ca…

ParameterTypeDescription
url *stringThe HTTP/HTTPS URL to fetch. Media and binary files are rejected.
detect_msintegerImplies a browser. How long to probe wait_rules guards before falling back to wait_for. Default 800.
formatstringHow the page comes back (template results are always JSON). "markdown" (default): text, headings, links and lists, a fraction of the size. "html": the cleaned markup, for attributes, custom elements a…
freshbooleanFetch again even if this exact fetch was made in the last 10 minutes (by default that copy is reused for free).
locationstring2-letter country code to proxy through (e.g. 'us', 'gb', 'de'). Most countries are supported; an unsupported one is refused with the list.
max_ageintegerAccept a cached copy of the same request up to this many seconds old (0–300). Cache hits return in milliseconds and still cost 1 credit. Default 0 = always fetch fresh.
max_charsintegerCap on returned body characters (default 80000, max 140000). Longer bodies are cut with a note; select narrows a page to the part you need instead.
renderbooleanOmit to let the API decide (plain fetch first, a browser when blocked or when the page is an empty JavaScript shell; learned per site). true always renders with a real browser (slower, up to ~2 min wo…
scroll_stepsintegerImplies a browser. Scroll down this many times before the readiness check, to trigger lazy-loaded sections. Bounded discovery, not a way to collect an infinite list.
selectstringCSS selector: return only the matching elements (e.g. 'article', 'table tr', 'shreddit-post'), in the chosen format. Re-reading a fetch with another select or format reuses the page already fetched -…
settle_msintegerImplies a browser. Ceiling (not a delay) on the settle wait, default 5000. Capture happens as soon as the DOM has been quiet for 500ms. Use wait_min_ms for a minimum delay; lower this to cap the worst…
templatestringParse the page with a published template and return JSON instead of HTML. Takes a template reference like 'handle/name' — call find_templates with this url first to see whether one covers the site.…
wait_forstringImplies a browser. When to capture: 'stable' (default — once the DOM stops changing), 'domcontentloaded' (immediately), 'networkidle', or any CSS selector (wait until it is visible, then settle). Pr…
wait_min_msintegerImplies a browser. Minimum delay after navigation before scrolling or checking readiness, for content that is absent from the first capture.
wait_rulesarrayImplies a browser. Conditional waits for pages with several possible layouts (consent gate, interstitial, A/B variant). Each 'if' selector is probed in order for detect_ms; the first visible one wins…
wait_statestringCondition for a CSS selector in wait_for (requires one): 'visible' (default), 'nonempty' (visible text, ignoring loading placeholders), 'hidden' (all matches hidden or gone — e.g. a spinner), 'stabl…

find_templates Find a structured-data template

Find published templates that parse a site into structured JSON instead of HTML. Pass the url you are about to fetch to see whether one already covers it — do this before writing your own extraction for a well-known site. Also searches by keyword or category. Each result shows the fields it returns and an example call; pass its reference as unblock_fetch's template argument. Free — no credit is charged.

ParameterTypeDescription
categorystringCategory slug, e.g. 'search-results', 'real-estate', 'business-directories'. Omit all filters to see the categories.
limitintegerMaximum templates to return (default 25).
pageintegerWhich page of `limit` results to return, from 1, when more templates match than fit.
searchstringKeyword matched against a template's name, reference, host and description (e.g. 'property', 'company').
urlstringA URL you intend to fetch. Returns the templates built for that site, if any.

get_build_guide How to build an app on UnblockingAPI

Read this before writing code that uses UnblockingAPI - an app, script, scheduled job or backend that fetches web pages (a rank tracker, a listings aggregator, a price monitor, …). Returns the REST API reference for calling it with plain HTTP (no SDK), how to keep the key server-side on platforms like Lovable, Replit and Next.js, how to use templates, and complete recipes. Free. Start with topic 'api', then the recipe that fits.

ParameterTypeDescription
topic *string'api': the REST API for apps: request, response, errors, timeouts, keeping the key server-side. 'fetch-tuning': getting complete pages: scrolling, waiting for content, consent walls, locations. 'templ…