LurkAPI
Docs · Scrape a page with your own steps

Scrape a page with your own steps

Your steps, in your order; you pay for the one that got the page.

1 credit per call; +3 if a browser renders it, +4 if it needs a residential IP, +13 if a browser renders it on a residential IP, +10 if a captcha is solvedMCP tool: web_custom
GEThttps://api.lurkapi.com/v1/web/custom

Example responseView as markdown

When to use this

Pass a url and steps, the strategies to try in order, comma-separated: fetch (1), render (4), unblock (4), residential (5), render-residential (14). We stop at the first that gets the page and you pay for that one.

We try them in turn and skip any a wall has already ruled out, so the most you can pay is the dearest step you listed (+10 when you allow a captcha solve and one happens). billing in the answer says what this call cost. For example steps=fetch,unblock never costs more than 4 credits and never runs JavaScript; steps=render,render-residential always returns the page as rendered. country applies to the residential steps; the others go out from the US. wait_for and wait apply to the rendering steps. A call walled at every step fails with 502 upstream_error and costs nothing. The web scraping guide explains each strategy.

Parameters

All parameters go in the query string.

ParameterDescription
url
stringrequired
The page to fetch: a full http(s) URL on a public host (ports 80 and 443 only).
Example
https://books.toscrape.com/
steps
stringrequired
The strategies to try, in order, comma-separated: fetch, render, unblock, residential, render-residential.
Example
fetch,render
format
stringoptional
What content holds: the page's html, markdown (best for LLMs) or plain text. Non-HTML pages (JSON, XML, plain text) come back as they are.
One of
htmlmarkdowntext
Default
html
Example
markdown
country
stringoptional
The residential IP's country, an ISO code like us, gb or de (default us).
captcha
booleanoptional
true: let a solver clear a captcha that blocks the browser (+10, only when one is solved). Off by default, so the price stays fixed.
One of
truefalse
Default
false
wait_for
stringoptional
A CSS selector to wait for before returning, like .price or #reviews.
wait
integeroptional
Milliseconds to let the page settle after it loads, up to 10000.

Example request

Replace YOUR_API_KEY with your key, or set LURKAPI_KEY for the code. Get a free key.

Language

Example response

A real response from this endpoint, captured from the live API and trimmed to a couple of items. Strings over 96 characters (mostly signed media URLs) are cut short and end in ….

Show the example response (1 KB)
{
  "success": true,
  "credits_remaining": 9999,
  "credits_charged": 1,
  "status": 200,
  "url": "https://books.toscrape.com/",
  "content_type": "text/html",
  "content": "[Books to Scrape](https://books.toscrape.com/index.html) We love being s…",
  "truncated": false,
  "via": "direct",
  "captcha": null,
  "attempts": [
    {
      "via": "direct",
      "ms": 369,
      "status": 200,
      "wall": null,
      "error": null
    }
  ],
  "billing": {
    "mode": "custom",
    "credits": 1,
    "breakdown": {
      "base": 1
    },
    "note": "Custom: you pay for the step that got the page (fetch 1, render 4, unblo…"
  }
}

Response fields

Every field of a successful response. [] marks a list: a[].b is the b of each item in a. nullable fields can be null; optional fields can be missing.

Show all 21 fields
FieldTypeDescription
successtrueAlways true here; errors have success: false.
credits_remainingnumberYour balance after this call. On anonymous playground calls: free tries left today.
credits_chargednumberCredits this call cost; 0 on free endpoints. On anonymous playground calls: tries used (1).
statusintegerThe page's HTTP status: 200, or the site's own 404, 410 and so on.
urlstringThe page's URL after redirects; the URL you asked for when via is unblocker, which doesn't say.
content_typestringnullableThe page's Content-Type, like text/html; charset=utf-8; null if the site sent none.
contentstringnullableThe page as format asks: HTML, markdown or plain text. Null for binary content (images, PDFs, archives).
truncatedbooleanThe page was over 2 MB and was cut there.
viastringThe strategy that got the page: direct or static (plain requests), browser (our browser), unblocker (a partner's browser and IPs), residential (a residential IP) or browser_residential (both).
captchastringnullableThe captcha solved to get the page (turnstile, datadome or recaptcha; charged); null if none was.
attemptsobject[]Every strategy tried, in order; the last one delivered the page.
attempts[].viastringThe strategy tried.
attempts[].msintegerHow long it took, in milliseconds.
attempts[].statusintegernullableThe HTTP status it got; null if it got no answer.
attempts[].wallstringnullableWhat walled it, like cloudflare challenge or datadome block; null if nothing did.
attempts[].errorstringnullableWhy it failed without an answer; null if it got one.
billingobjectWhat this call costs and why.
billing.modestringfixed: this endpoint's price. auto and custom: the price of the strategy that got the page.
billing.creditsintegerWhat this call costs: the sum of breakdown.
billing.breakdownobjectCredits by what they paid for: base, and on Auto or Custom render (a browser), premium (a residential IP) or premium_render (a browser on one); captcha when one was solved.
billing.notestringnullableWhy the price varies, on Auto and Custom; null on fixed-price endpoints.

Caching and freshness

Not cached: every call is answered fresh.

Errors

Errors return { success: false, error, code, docs } with the HTTP status below. Validation errors, 401/402/429 rejections and 5xx failures are free; not_found is charged (how charging works). All error codes.

StatusCodeMeaning
401missing_api_keyNo API key. Send it in the x-api-key header.
401invalid_api_keyThe key is unknown or was revoked.
402insufficient_creditsNot enough credits for this call. Buy a pack or wait for tomorrow's top-up.
403account_suspendedThis account is suspended. Contact support@lurkapi.com. Never charged.
405method_not_allowedEndpoints take GET with query params.
429rate_limitedToo many calls at once. Wait for the retry-after seconds, then retry.
500internal_errorSomething broke on our side. Retry; 5xx errors are free.
502upstream_errorThe platform didn't give a usable answer. Retry; 5xx errors are free.
503upstream_busyAll our connections to the platform are busy. Retry in a few seconds; 5xx errors are free.
504upstream_timeoutThe platform took over 30 seconds to answer (90 for web pages). Retry; timeouts are free.

Use it in Claude

Once LurkAPI is connected to Claude, this endpoint is the web_custom tool. Ask in plain English, for example:

Ask Claude
Use LurkAPI's web_custom with url "https://books.toscrape.com/", steps "fetch,render", format "markdown" and summarize what you find.

Claude calls web_custom with arguments like these, and each call costs 1 credit; +3 if a browser renders it, +4 if it needs a residential IP, +13 if a browser renders it on a residential IP, +10 if a captcha is solved:

Tool arguments
{
  "url": "https://books.toscrape.com/",
  "steps": "fetch,render",
  "format": "markdown"
}

Tool results skip nulls and empty lists to save tokens.