Skip to contentLurkAPI
Docs · Scraping any web page

Scraping any web page

Send any public URL and get the page back as HTML, markdown or text, even when the site tries to keep bots out. Most pages cost 1 credit, and a call that gets no page is free.

Try it live

What it does

Pass a url to GET /v1/web/scrape and the page comes back in content. Pick the format: html (the default), markdown or text. Use markdown to give a page to an AI model. It keeps headings, links, lists and tables, and drops scripts and styles.

Many sites put up a bot wall: a JavaScript challenge, a block on certain IP addresses (the address a request comes from), or a captcha. When a site walls a call, the call moves up to a stronger step, cheapest first, until one gets through. You pay only for the step that got the page. Most sites need nothing extra: 1 credit, back in 1–3 seconds.

status is the site's own HTTP status, and url is where the page ended up after redirects. In Claude and other MCP clients, this is the web_scrape tool. Every parameter and field.

Which endpoint to use

Seven endpoints share one engine and return the same response. Auto picks the step for you. The fixed-price endpoints each run one step, so you know the price before you call. Custom tries the steps you list, in your order.

EndpointWhat it doesCredits
Auto /v1/web/scrapeTries each step, cheapest first, and stops at the first that gets the page. Start here if you don't know what a site needs.1–24, depending on the site
Fetch a page (plain request) /v1/web/fetchA plain request, made the way a browser makes it. No JavaScript runs. Enough for most sites.1 credit
Render a page (browser) /v1/web/renderA real Chrome loads the page and runs its JavaScript. It gets past JavaScript challenges, like Cloudflare's.1 credit; 11 if a captcha is solved
Unblock a page (separate IPs) /v1/web/unblockA browser on separate IP addresses, for sites that block ours. It returns the HTML the site sent, before JavaScript runs.4 credits
Fetch a page from a residential IP /v1/web/residentialA plain request from a residential IP (a home internet connection) in the country you pick. For sites that block other IPs, or show each country its own page.5 credits
Render a page from a residential IP /v1/web/render-residentialA real Chrome on a residential IP, for the hardest walls.14 credits; 24 if a captcha is solved
Custom /v1/web/customTries the steps you list in steps, in your order.The price of the step that got the page

The fixed-price endpoints and Custom solve a captcha (+10) only when you pass captcha=true, so the price stays what you chose unless you allow one.

Custom is for sites you know. steps=fetch,unblock never costs more than 4 credits and never runs JavaScript. steps=render,render-residential always returns the page as rendered. Like Auto, Custom skips a step a wall has already ruled out.

Try it live

Pick what to fetch and press Run. It's real data, and you don't need an account: 5 free tries a day.

Scrape a page (Auto)
5 free tries a day, no signup

What it costs

On Auto and Custom, a page costs 1 credit, plus a paid step when the site needs one. What you'd usually pay:

The siteUsually gets itCredits
Most sitesdirect or static1
A JavaScript challenge, or a page that's only a JavaScript appbrowser1
Refuses our IPs (DataDome and the like)unblocker4
A captcha our browser can't click pastbrowser and a solve11
Only a residential IP gets throughresidential or browser_residential5 or 14
Only a residential IP gets through, behind a captchabrowser_residential and a solve24
  • You pay for the step that got the page. A paid step is held from your balance before it runs, and handed back if it doesn't get the page. So if the unblocker is walled and a residential IP then gets the page, you pay 5, not 8.
  • A call that gets no page is free. That covers a site that walls every step, a site that's down, the site's own 5xx error, and no answer in time.
  • A page is a page. If the site answers with its own 404 or 410 page, you get it with that status, and it's charged.
  • Paid steps need the credits when they start. If your balance can't cover a step the site needs, the call stops with 402 insufficient_credits and costs nothing. A captcha solve is the exception: our browser still renders the page, without the solver.
  • billing explains every charge. It has mode (auto, fixed or custom), credits (the same as credits_charged) and a breakdown (base, unblock, premium, premium_render, captcha). On Auto and Custom, a note says why the price varies.

Capping the price

Auto goes as far as the site requires. To cap it, use a fixed-price endpoint, Custom, or these parameters on Auto:

ParameterValuesWhat it does
renderauto (default), true, falseauto: a browser only when the page needs one. true: always our browser, so content is the page after JavaScript ran (never the unblocker, which returns the HTML as sent). false: plain requests only.
proxyauto (default), static, residentialauto: our usual IPs and the unblocker, and a residential IP only when they're refused. static: never residential. residential: residential IPs only.
countryA two-letter code: us, gb, de…Fetch from a residential IP in that country. Implies proxy=residential.
captchatrue (default), falsefalse: never pay for a captcha solve.
wait_forA CSS selector, like .priceWait until it's on the page before returning. Implies render=true.
waitMilliseconds, up to 10000Let the page settle this long after it loads. Implies render=true.
max_creditsA number of credits, like 4The most the call may cost. A step that would cost more is skipped.

The least and most each choice can cost, in credits:

ParametersSteps allowedLeastMost
The defaultsall124
captcha=falseall, without solves114
proxy=staticdirect, static, browser, unblocker111
proxy=static&captcha=falsethe same, without solves14
render=falsedirect, static, residential15
render=false&proxy=staticdirect, static11
render=true, wait_for or waitbrowser, browser_residential124
proxy=residential or countryresidential, browser_residential524
max_credits=1direct, static, browser, without solves11
max_credits=4direct, static, browser, unblocker, without solves14

For example, render=false&proxy=static never costs more than 1 credit, and render=true always returns the page after JavaScript ran. A tighter cap can fail where the defaults would get through. If that happens after render=false, proxy=static or captcha=false, the error says which one to relax. After max_credits, it's 402 over_max_credits, free, naming the cheapest steps it left out and their price.

Examples

A page as markdown

Language

A walled site

Nothing to set. The defaults move up the steps until the page comes through. A URL with its own ? query has to be encoded:

curl
curl -G "https://api.lurkapi.com/v1/web/scrape" \
  --data-urlencode "url=https://www.tripadvisor.com/Search?q=lisbon" \
  -d format=markdown \
  -H "x-api-key: YOUR_API_KEY"

Always 1 credit

Plain requests only. A walled site fails, for free, instead of moving up.

curl
curl -G "https://api.lurkapi.com/v1/web/fetch" \
  --data-urlencode "url=https://news.ycombinator.com/" \
  -d format=text \
  -H "x-api-key: YOUR_API_KEY"

Your own steps, at most 4 credits

A plain request first, then the unblocker if the site walls it:

curl
curl -G "https://api.lurkapi.com/v1/web/custom" \
  --data-urlencode "url=https://www.yelp.com/biz/the-house-san-francisco" \
  -d steps=fetch,unblock \
  -d format=markdown \
  -H "x-api-key: YOUR_API_KEY"

Speed

  • Most pages: 1–3 s.
  • Rendered by our browser: 5–15 s.
  • Through the unblocker: 15–35 s.
  • Up to 85 s for a solved captcha or the slowest sites. Give your HTTP client a timeout of at least 90 s. The API always answers by then, with 504 upstream_timeout at worst.

Repeat calls get faster:

  • A site that needed a stronger step starts there for the next 15 minutes (for calls allowed the same steps), instead of hitting the same walls again.
  • Once our browser gets past a site's wall, later calls to that site reuse the pass for up to 30 minutes. Often that's a plain request (1 credit, a few seconds). Otherwise it's a render that skips the wall, so a captcha isn't solved, or paid for, twice.

When a call fails

A call that gets no page fails with 502 upstream_error and costs nothing. The error message says why:

  • Walled at every step it was allowed. The message names each step and what walled it, and the options that might get through (Allowing render=auto and proxy=auto may get through.). The same call (same url and options) then fails at once for 5 minutes. Change render or proxy to try other steps.
  • The site is down. Its name doesn't resolve, its server is down behind Cloudflare (521–530), it refuses connections, its certificate is invalid, or nothing answered at all. Every call to that site then fails at once for 3 minutes.
  • The site answered with a 5xx error, or didn't answer in time. Retry.
StatusCodeWhen
400invalid_paramsA parameter is missing or invalid, or the url is one we won't fetch: not http(s), a port other than 80 or 443, a username or password in it, or a host that isn't public (localhost, a private IP, or a name that points to one). issues names the problem.
502upstream_errorNo page: walled at every step allowed, the site is down, it answered 5xx, or it didn't answer. Free.
504upstream_timeoutThe call ran past 90 s. Free, and rare, since the steps stop at 85 s.

Limits and tips

  • Public pages only. You can't send your own cookies or headers, so nothing behind a login.
  • Public sites on ports 80 and 443, with URLs up to 2,048 characters.
  • Encode url like any query value. curl -G --data-urlencode "url=…" does it for you.
  • Pages over 2 MB are cut at 2 MB, and truncated is true.
  • JSON, XML and plain-text pages come back as they are. Binary files, like images and PDFs, come back with content: null.
  • Not cached. Every call fetches the page and costs credits. Keep your own copy if you need a page twice.
  • Use format=markdown for AI models. It's much smaller than the HTML and keeps the structure a model needs. Add main=true to keep only the page's own content, without menus, sidebars and footer.

How it gets the page

Auto tries these steps in order and stops at the first one that gets the page. The response names them, so you can see what happened.

StepHowForExtra credits
directA plain requestMost sitesnone
staticA plain request from other IPs, made the way Chrome makes itSites that refuse the first request, or anything that isn't a browsernone
browserA real ChromeJavaScript challenges (Cloudflare, AWS WAF, Akamai, PerimeterX), and pages that are only a JavaScript appnone
unblockerA browser on separate IPsSites that block our usual IPs (DataDome and the like). It returns the HTML the site sent, before JavaScript runs, and the URL you asked for, not where redirects ended.+3
residentialA residential IPThe last resort, when the steps above are refused+4
browser_residentialOur browser on a residential IPThe last resort for pages that need a browser+13
captchaA captcha solver, inside our browserA Cloudflare Turnstile, DataDome slider or reCAPTCHA our browser can't click past+10, only when one is solved

What stopped one step decides the next. A JavaScript challenge skips the remaining plain requests and goes to a browser. An IP block (DataDome, or a bare 403 or 429) skips our usual IPs and goes to the unblocker. A page that's an empty JavaScript app goes to our browser. So a site behind a Cloudflare challenge usually goes direct → static → browser, and a DataDome site goes direct → static → unblocker.

Three fields show what happened. via names the step that got the page. captcha names the captcha solved for it (turnstile, datadome or recaptcha), or is null. attempts lists every step tried, in order, with how long it took (ms), the HTTP status it got, and what walled it (wall, like cloudflare challenge or datadome block) or why it failed (error).

A DataDome site's first call: Yelp, in production (trimmed)
{"credits_charged": 4,"billing": { "mode": "auto", "credits": 4, "breakdown": { "base": 1, "unblock": 3 }, "note": "Auto: the price follows the strategy that got the page…" },"via": "unblocker","captcha": null,"attempts": [{ "via": "direct", "ms": 43, "status": 403, "wall": "datadome block", "error": null },{ "via": "static", "ms": 802, "status": 403, "wall": "datadome block", "error": null },{ "via": "unblocker", "ms": 17651, "status": 200, "wall": null, "error": null }]}

FAQ

Why did I pay 11 credits?

Our browser rendered the page (1 credit), and a captcha solver cleared a captcha it couldn't click past (+10). captcha in the response names it. Pass captcha=false to never pay for a solve. The call then tries the other steps, and fails for free if none gets through.

Why is a site “down”?

The site itself isn't answering. Its name doesn't resolve, its server is down behind Cloudflare, it refuses connections, its certificate is invalid, or nothing answered at all. No other IP or browser changes that, so calls to it fail at once, for free, for 3 minutes. Then we try it again.

Can I scrape logged-in pages?

No. It fetches public pages only, and you can't send your own cookies or headers. A page behind a login comes back as a logged-out visitor sees it, usually the login page.

How is this different from the platform endpoints?

The platform endpoints return structured JSON at a set price per call, and are cached. Web scrape returns any page as HTML, markdown or text, fresh every time, and costs what the site made it take (1–24 credits). If a platform endpoint covers what you need, use it.

From the blog

All posts