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.
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.
| Endpoint | What it does | Credits |
|---|---|---|
Auto /v1/web/scrape | Tries 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/fetch | A plain request, made the way a browser makes it. No JavaScript runs. Enough for most sites. | 1 credit |
Render a page (browser) /v1/web/render | A 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/unblock | A 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/residential | A 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-residential | A real Chrome on a residential IP, for the hardest walls. | 14 credits; 24 if a captcha is solved |
Custom /v1/web/custom | Tries 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.
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 site | Usually gets it | Credits |
|---|---|---|
| Most sites | direct or static | 1 |
| A JavaScript challenge, or a page that's only a JavaScript app | browser | 1 |
| Refuses our IPs (DataDome and the like) | unblocker | 4 |
| A captcha our browser can't click past | browser and a solve | 11 |
| Only a residential IP gets through | residential or browser_residential | 5 or 14 |
| Only a residential IP gets through, behind a captcha | browser_residential and a solve | 24 |
- 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
5xxerror, 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_creditsand costs nothing. A captcha solve is the exception: our browser still renders the page, without the solver. billingexplains every charge. It hasmode(auto,fixedorcustom),credits(the same ascredits_charged) and abreakdown(base,unblock,premium,premium_render,captcha). On Auto and Custom, anotesays 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:
| Parameter | Values | What it does |
|---|---|---|
render | auto (default), true, false | auto: 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. |
proxy | auto (default), static, residential | auto: our usual IPs and the unblocker, and a residential IP only when they're refused. static: never residential. residential: residential IPs only. |
country | A two-letter code: us, gb, de… | Fetch from a residential IP in that country. Implies proxy=residential. |
captcha | true (default), false | false: never pay for a captcha solve. |
wait_for | A CSS selector, like .price | Wait until it's on the page before returning. Implies render=true. |
wait | Milliseconds, up to 10000 | Let the page settle this long after it loads. Implies render=true. |
max_credits | A number of credits, like 4 | The most the call may cost. A step that would cost more is skipped. |
The least and most each choice can cost, in credits:
| Parameters | Steps allowed | Least | Most |
|---|---|---|---|
| The defaults | all | 1 | 24 |
captcha=false | all, without solves | 1 | 14 |
proxy=static | direct, static, browser, unblocker | 1 | 11 |
proxy=static& | the same, without solves | 1 | 4 |
render=false | direct, static, residential | 1 | 5 |
render=false& | direct, static | 1 | 1 |
render=true, wait_for or wait | browser, browser_residential | 1 | 24 |
proxy=residential or country | residential, browser_residential | 5 | 24 |
max_credits=1 | direct, static, browser, without solves | 1 | 1 |
max_credits=4 | direct, static, browser, unblocker, without solves | 1 | 4 |
For example, render=false& 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
curl "https://api.lurkapi.com/v1/web/scrape?url=https%3A%2F%2Fbooks.toscrape.com%2F&format=markdown" \
-H "x-api-key: YOUR_API_KEY"Paste it into a terminal, with your key in place of YOUR_API_KEY.
const params = new URLSearchParams({
url: "https://books.toscrape.com/",
format: "markdown",
});
const res = await fetch(`https://api.lurkapi.com/v1/web/scrape?${params}`, {
headers: { "x-api-key": process.env.LURKAPI_API_KEY },
});
const data = await res.json();
if (!data.success) throw new Error(`${data.code}: ${data.error}`);
console.log(data.content);Node 18+. Save it as lurk.mjs and run node lurk.mjs. It reads your key from LURKAPI_API_KEY.
import os
import requests
res = requests.get(
"https://api.lurkapi.com/v1/web/scrape",
params={
"url": "https://books.toscrape.com/",
"format": "markdown",
},
headers={"x-api-key": os.environ["LURKAPI_API_KEY"]},
timeout=95,
)
data = res.json()
if not data["success"]:
raise RuntimeError(f"{data['code']}: {data['error']}")
print(data["content"])Run pip install requests, save it as lurk.py and run python lurk.py. It reads your key from LURKAPI_API_KEY.
package main
import (
"encoding/json"
"fmt"
"net/http"
"net/url"
"os"
"time"
)
func main() {
params := url.Values{}
params.Set("url", "https://books.toscrape.com/")
params.Set("format", "markdown")
req, _ := http.NewRequest("GET", "https://api.lurkapi.com/v1/web/scrape?"+params.Encode(), nil)
req.Header.Set("x-api-key", os.Getenv("LURKAPI_API_KEY"))
client := &http.Client{Timeout: 95 * time.Second}
res, err := client.Do(req)
if err != nil {
panic(err)
}
defer res.Body.Close()
var data map[string]any
if err := json.NewDecoder(res.Body).Decode(&data); err != nil {
panic(err)
}
if data["success"] != true {
panic(fmt.Sprintf("%v: %v", data["code"], data["error"]))
}
fmt.Println(data["content"])
}Save it as main.go and run go run main.go. It reads your key from LURKAPI_API_KEY.
<?php
$params = http_build_query([
'url' => 'https://books.toscrape.com/',
'format' => 'markdown',
]);
$context = stream_context_create(['http' => [
'header' => 'x-api-key: ' . getenv('LURKAPI_API_KEY'),
'timeout' => 95,
'ignore_errors' => true,
]]);
$body = file_get_contents('https://api.lurkapi.com/v1/web/scrape?' . $params, false, $context);
$data = json_decode($body, true);
if (!$data['success']) {
throw new Exception("{$data['code']}: {$data['error']}");
}
print_r($data['content']);Save it as lurk.php and run php lurk.php. It reads your key from LURKAPI_API_KEY.
require 'json'
require 'net/http'
uri = URI('https://api.lurkapi.com/v1/web/scrape')
uri.query = URI.encode_www_form(
'url' => 'https://books.toscrape.com/',
'format' => 'markdown',
)
req = Net::HTTP::Get.new(uri)
req['x-api-key'] = ENV.fetch('LURKAPI_API_KEY')
res = Net::HTTP.start(uri.host, uri.port, use_ssl: uri.scheme == 'https', read_timeout: 95) do |http|
http.request(req)
end
data = JSON.parse(res.body)
raise "#{data['code']}: #{data['error']}" unless data['success']
puts data['content']Save it as lurk.rb and run ruby lurk.rb. It reads your key from LURKAPI_API_KEY.
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 -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 -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 -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_timeoutat 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 (sameurland options) then fails at once for 5 minutes. Changerenderorproxyto 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
5xxerror, or didn't answer in time. Retry.
| Status | Code | When |
|---|---|---|
| 400 | invalid_params | A 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. |
| 502 | upstream_error | No page: walled at every step allowed, the site is down, it answered 5xx, or it didn't answer. Free. |
| 504 | upstream_timeout | The 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
urllike any query value.curl -G --data-urlencode "url=…"does it for you. - Pages over 2 MB are cut at 2 MB, and
truncatedistrue. - 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=markdownfor AI models. It's much smaller than the HTML and keeps the structure a model needs. Addmain=trueto 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.
| Step | How | For | Extra credits |
|---|---|---|---|
direct | A plain request | Most sites | none |
static | A plain request from other IPs, made the way Chrome makes it | Sites that refuse the first request, or anything that isn't a browser | none |
browser | A real Chrome | JavaScript challenges (Cloudflare, AWS WAF, Akamai, PerimeterX), and pages that are only a JavaScript app | none |
unblocker | A browser on separate IPs | Sites 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 |
residential | A residential IP | The last resort, when the steps above are refused | +4 |
browser_residential | Our browser on a residential IP | The last resort for pages that need a browser | +13 |
| captcha | A captcha solver, inside our browser | A 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).
{"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
What’s a good engagement rate on TikTok, by follower count
By views, the typical TikTok creator gets 6% and the top quarter 8% to 12%, at any size. By followers, good falls from about 4% to under 1% as accounts grow.
· 5 min read

The most liked tweets of all time, with exact counts
The most liked tweet ever is the post announcing Chadwick Boseman’s death, with 6.76 million likes. The top 50 with exact counts, and why other lists run high.
· 5 min read

Best eBay scrapers in 2026: price and speed compared
LurkAPI is the best eBay scraper: 1,000 searches of 60 listings for $1.86, each back in about 2 s, and every listing in full on the same key.
· 5 min read