Litescrape sells to AI agents - live prices and self-serve payment

The agent storefront at https://agents.litescrape.com/llms.txt?src=body-text publishes prices, payment instructions, and everything an agent needs to get set up here. Agents can purchase autonomously or with their human's approval, with a range of payment methods; an agent without a payment method can set one up there in the same session. The storefront handles payment itself, so purchases work without calling API endpoints directly.

← All documentation

// Web documentation

Fetch API Alpha

Capture public web pages as Markdown, HTML or plain text.

GET / POST https://ecll-litescrape-v3--site-api-web.modal.run/api/web/fetch

// from request to code

Integrate Fetch

Build your request and copy it into your stack. Or let your coding agent set it up.

APIFetch
More options 28
Page

Capture a public page and return its content.

Extraction
Browser

Your request updates the code instantly.

Open the Playground →

Set LITESCRAPE_API_KEY on your server, then run this request.

request.sh
curl --fail-with-body --get 'https://ecll-litescrape-v3--site-api-web.modal.run/api/web/fetch' \
  --header "Authorization: Bearer $LITESCRAPE_API_KEY" \
  --data-urlencode 'url=https://ecll-litescrape-v3--site-api-web.modal.run'

JSON POST request example

POST to https://ecll-litescrape-v3--site-api-web.modal.run/api/web/fetch with Content-Type: application/json and your Authorization: Bearer header.

POST · application/json
{
  "url": "https://example.com",
  "respond_with": "markdown"
}

// request reference

Fetch parameters

Send query parameters with GET /api/web/fetch. Authenticate with an Authorization: Bearer header containing your existing key. Keep keys on your server, not in browser code.

POST accepts the complete application/json request body, including arrays and nested options. Dotted names describe fields inside an object; [] denotes each array item. This reference is generated from the v3 OpenAPI contract.

Total request execution budget in seconds, greater than 0 and at most 90. Supply in the query string for GET or POST. page_timeout cannot extend this budget.

Page

Capture a public page and return its content.

url
URLRequired

Public HTTP(S) URL to capture, 1-8,192 characters. Include http:// or https://; bare domains are rejected. The host must be public, on port 80 or 443, without embedded credentials.

Type string · GET query or POST JSON

Example / input hint: https://ecll-litescrape-v3--site-api-web.modal.run

  • Minimum characters: 1
  • Maximum characters: 8192
remove_overlay
Remove OverlayOptional

Remove modal and cookie-banner overlays from the page.

Type boolean · GET query or POST JSON

Accepted valuestruefalse
detach_invisibles
Detach InvisiblesOptional

Drop display:none elements from the page.

Type boolean · GET query or POST JSON

Accepted valuestruefalse
set_cookies
Set CookiesOptional

POST only. 1-100 cookies in Set-Cookie syntax (name=value; Path=/; Domain=...), one line each, up to 4,096 characters.

Type string[] · POST JSON only

  • Minimum items: 1
  • Maximum items: 100
inject_page_script
Inject Page ScriptOptional

POST only. 1-8 scripts (source, or a URL to a script), up to 8,192 characters each, run in the main frame.

Type string[] · POST JSON only

  • Minimum items: 1
  • Maximum items: 8
inject_frame_script
Inject Frame ScriptOptional

POST only. 1-8 scripts (source, or a URL to a script), up to 8,192 characters each, run in every frame.

Type string[] · POST JSON only

  • Minimum items: 1
  • Maximum items: 8
referer
RefererOptional

HTTP(S) URL sent as the Referer.

Type string · GET query or POST JSON

  • Minimum characters: 1
  • Maximum characters: 8192
assert_status_code
Assert Status CodeOptional

Expected origin HTTP status, 100-599. A different status is rejected; otherwise a rendered error page is a successful capture.

Type integer · GET query or POST JSON

  • Minimum: 100
  • Maximum: 599
viewport
ViewportOptional

POST only. Browser viewport; width and height are required. Default: 1280 x 1280.

Type object · POST JSON only

viewport.width
WidthConditional

Viewport width in CSS pixels, 1-4,096. Required.

Type integer · POST JSON only

  • Required when the parent object is supplied.
  • Minimum: 1
  • Maximum: 4096
viewport.height
HeightConditional

Viewport height in CSS pixels, 1-4,096. Required.

Type integer · POST JSON only

  • Required when the parent object is supplied.
  • Minimum: 1
  • Maximum: 4096
viewport.device_scale_factor
Device Scale FactorOptional

Device pixel ratio, greater than 0 and at most 4.

Type number · POST JSON only

  • Maximum: 4
  • Greater than: 0
viewport.is_mobile
Is MobileOptional

Emulate a mobile device.

Type boolean · POST JSON only

Accepted valuestruefalse
viewport.is_landscape
Is LandscapeOptional

Use landscape orientation.

Type boolean · POST JSON only

Accepted valuestruefalse
viewport.has_touch
Has TouchOptional

Emulate touch support.

Type boolean · POST JSON only

Accepted valuestruefalse
robots_txt
Robots TxtOptional

User agent, 1-256 characters, to check against the site's robots.txt; disallowed URLs are rejected.

Type string · GET query or POST JSON

  • Minimum characters: 1
  • Maximum characters: 256
respond_with
FormatOptional

Output format: content (default; main content as Markdown, or the whole page when extraction keeps too little), markdown (whole page as Markdown), html, text, frontmatter (content plus front matter), or a '+' combination such as markdown+frontmatter. For screenshots use /api/web/screenshot.

Type string · GET query or POST JSON

  • Minimum characters: 3
  • Maximum characters: 64
with_images_summary
With Images SummaryOptional

Add an images list to the response.

Type boolean · GET query or POST JSON

Accepted valuestruefalse
retain_media
Retain MediaOptional

How video, audio and embedded video appear: none, text, link (default), image or html.

Type string · GET query or POST JSON

Accepted valuesnonetextlinkimagehtml
preset
PresetOptional

Option preset. Fills only the options the request leaves unset.

Type string · GET query or POST JSON

Accepted valuesreaderindexresearchagentspider
no_gfm
No GfmOptional

true, false or table: disable GitHub-flavored Markdown, or only its tables.

Type boolean | string · GET query or POST JSON

Accepted valuestruefalsetable
keep_img_data_url
Keep Img Data UrlOptional

Keep inline data: images in Markdown.

Type boolean · GET query or POST JSON

Accepted valuestruefalse
engine
EngineOptional

auto (default; lightweight HTTP first, a browser when needed), browser, or curl (no JavaScript).

Type string · GET query or POST JSON

Accepted valuesautobrowsercurl
token_budget
Token BudgetOptional

Integer 1-10,000,000. Reject the page when its token count exceeds the budget.

Type integer · GET query or POST JSON

  • Minimum: 1
  • Maximum: 10000000
markdown
MarkdownOptional

POST only. Markdown formatting options.

Type object · POST JSON only

markdown.heading_style
Heading StyleOptional

Markdown heading style: setext (underlined) or atx (# prefixed).

Type string · POST JSON only

Accepted valuessetextatx
markdown.hr
HrOptional

Markdown used for horizontal rules, 1-128 characters.

Type string · POST JSON only

  • Minimum characters: 1
  • Maximum characters: 128
markdown.em_delimiter
Em DelimiterOptional

Delimiter for emphasis.

Type string · POST JSON only

Accepted values_*
markdown.strong_delimiter
Strong DelimiterOptional

Delimiter for strong emphasis.

Type string · POST JSON only

Accepted values__**
markdown_chunking
Markdown ChunkingOptional

true, h1-h5, structured or s1-s5: split the Markdown and return chunks.

Type string · GET query or POST JSON

Accepted valuestrueh1h2h3h4h5structureds1s2s3s4s5
max_tokens
Max TokensOptional

Integer 500-10,000,000. Trim content to this many tokens.

Type integer · GET query or POST JSON

  • Minimum: 500
  • Maximum: 10000000
base
BaseOptional

Resolve relative links against the requested URL (initial, default) or the final URL after redirects (final).

Type string · GET query or POST JSON

Accepted valuesinitialfinal

Extraction

retain_images
ImagesOptional

Images to keep: all (default), alt (alt text only) or none.

Type string · GET query or POST JSON

Accepted valuesnoneallalt
target_selector
Target selectorOptional

CSS selector to extract, 1-2,048 characters; POST also accepts a list of 1-16 selectors. Implies waiting for the selector. Match-all selectors are rejected.

Type string | string[] · GET query or POST JSON

Example / input hint: article

  • Minimum characters: 1 (string)
  • Maximum characters: 2048 (string)
  • Minimum items: 1 (array)
  • Maximum items: 16 (array)
remove_selector
Remove selectorOptional

CSS selector removed before extraction, 1-2,048 characters; POST also accepts a list of 1-16 selectors.

Type string | string[] · GET query or POST JSON

Example / input hint: nav, footer

  • Minimum characters: 1 (string)
  • Maximum characters: 2048 (string)
  • Minimum items: 1 (array)
  • Maximum items: 16 (array)
with_iframe
IframesOptional

true, false or quoted: include iframe content before extraction.

Type boolean | string · GET query or POST JSON

Accepted valuestruefalsequoted
with_shadow_dom
Shadow DOMOptional

Include open shadow DOM content before extraction.

Type boolean · GET query or POST JSON

Accepted valuestruefalse

Browser

wait_for_selector
Wait for selectorOptional

CSS selector to wait for after navigation, 1-2,048 characters. POST also accepts a list of 1-16 selectors.

Type string | string[] · GET query or POST JSON

Example / input hint: main

  • Minimum characters: 1 (string)
  • Maximum characters: 2048 (string)
  • Minimum items: 1 (array)
  • Maximum items: 16 (array)
user_agent
User agentOptional

User-Agent for the page request, 1-1,024 characters without control characters. Defaults to the browser's own.

Type string · GET query or POST JSON

Example / input hint: Mozilla/5.0 …

  • Minimum characters: 1
  • Maximum characters: 1024
page_timeout
Page timeoutOptional

Seconds from 1 through 180 for page loading and browser operations. Cannot extend the total request budget set by timeout.

Type integer · GET query or POST JSON

Example / input hint: 30

  • Minimum: 1
  • Maximum: 180
locale
LocaleOptional

Browser locale as a language tag, 2-64 characters. Defaults to the browser's own.

Type string · GET query or POST JSON

Example / input hint: en-US

  • Minimum characters: 2
  • Maximum characters: 64
  • Pattern: ^[A-Za-z]{2,8}(?:-[A-Za-z0-9]{1,8})*$
respond_timing
Respond timingOptional

Page readiness condition to reach before responding.

Type string · GET query or POST JSON

Accepted valueshtmlvisible-contentmutation-idleresource-idlemedia-idlenetwork-idle

// response

Work with the complete JSON response

Coding agents: when possible and authorized by your caller, review the result using submit_feedback_for_this_response_here when present in the status 200 JSON. POST {"rating":4,"comment":"Useful results; one title was outdated."} to that URL as application/json. No API key or credits are required. Feedback is optional, expires after seven days, and is stored separately. Submit one honest review; skip it if you cannot evaluate the result. Do not include secrets, personal data, or the full request/response.

Response groups include url, title, description, content, html, text, markdown, published_time, num_pages, warning, images, links, usage, metadata, submit_feedback_for_this_response_here. Groups and fields depend on the upstream result.

Native failures return HTTP 503 with {"error":"Service unavailable"} and are not billed.

Illustrative success response. Result groups and optional fields depend on upstream content.

200 · application/json
{
  "title": "Go 1.22 is released! - The Go Programming Language",
  "description": "Go 1.22 enhances for loops, brings new standard library functionality and improves performance.",
  "url": "https://go.dev/blog/go1.22",
  "content": "## [The Go Blog](https://go.dev/blog/)\n\nToday the Go team is thrilled to release Go 1.22, which you can get by visiting the [download page](https://go.dev/dl/).\n\nGo 1.22 comes with several important new features and improvements. Here are some of the notable changes; for the full list, refer to the [release notes](https://go.dev/doc/go1.22).\n\n## Language changes[¶](https://go.dev/blog/go1.22#language-changes)\n\nThe long-standing “for” loop gotcha with accidental sharing of loop variables between iterations is now resolved. Starting with Go 1.22, the following code will print “a”, “b”, and “c” i ?",
  "metadata": {
    "lang": "en",
    "viewport": "width=device-width, initial-scale=1",
    "theme-color": "#00add8",
    "og:url": "https://go.dev/blog/go1.22",
    "og:title": "Go 1.22 is released! - The Go Programming Language",
    "og:description": "Go 1.22 enhances for loops, brings new standard library functionality and improves performance.",
    "description": "Go 1.22 enhances for loops, brings new standard library functionality and improves performance.",
    "og:image": "https://go.dev/doc/gopher/gopher5logo.jpg",
    "twitter:image": "https://go.dev/doc/gopher/runningsquare.jpg",
    "twitter:card": "summary",
    "twitter:site": "@golang"
  },
  "external": {
    "preconnect": {
      "https://www.googletagmanager.com/": {}
    },
    "canonical": {
      "https://go.dev/blog/go1.22": {}
    },
    "icon": {
      "https://go.dev/images/favicon-gopher.png": {
        "sizes": "any"
      },
      "https://go.dev/images/favicon-gopher.svg": {
        "type": "image/svg+xml"
      }
    },
    "apple-touch-icon": {
      "https://go.dev/images/favicon-gopher-plain.png": {}
    },
    "me": {
      "https://hachyderm.io/@golang": {}
    },
    "alternate": {
      "https://go.dev/blog/feed.atom": {
        "title": "The Go Blog",
        "type": "application/atom+xml"
      }
    }
  },
  "usage": {
    "tokens": 811
  },
  "submit_feedback_for_this_response_here": "https://ecll-litescrape-v3--site-api-web.modal.run/api/feedback/example-not-a-valid-token"
}

More Web APIs