Fetch rendered web content
litescrape.web.fetchFetch a public HTTP(S) page and return LLM-ready content
- Price
- $0.00015/successPelo preço do provedor
- Success rate
- 73,1%Last 30 days · 21.047 calls
- Latency p50
- 7.8 sp95 28 s
- Last verified
- 29 de set. de 2026Verified working
GEThttps://toolswitch.dev/v1/tools/litescrape.web.fetch?url=https%3A%2F%2Fexample.com&respond_with=markdownPreview- Uses platform quota
- Synchronous response
- Reads public data
Parâmetros
| Parâmetro | Tipo | Obrigatório | Descrição | Exemplo |
|---|---|---|---|---|
| Parâmetros de consulta | ||||
url | string | Obrigatório | 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. | https://example.com |
base | string | Opcional | Resolve relative links against the requested URL (initial, default) or the final URL after redirects (final). | |
engine | string | Opcional | auto (default; lightweight HTTP first, a browser when needed), browser, or curl (no JavaScript). | |
locale | string | Opcional | Browser locale as a language tag, 2-64 characters. Defaults to the browser's own. | en-US |
no_gfm | string | Opcional | true, false or table: disable GitHub-flavored Markdown, or only its tables. | |
preset | string | Opcional | Option preset. Fills only the options the request leaves unset. | |
referer | string | Opcional | HTTP(S) URL sent as the Referer. | https://example.com |
timeout | número | Opcional | Optional budget for the entire request in seconds, measured from gateway receipt until the response is ready to send. Includes admission, queueing and settlement. Must be greater than 0 and at most 90. On expiry, the call is not billed and returns 503 request_deadline_exceeded with retryable=true and a request ID. Omit to retain the standard server deadline. | |
max_tokens | inteiro | Opcional | Integer 500-10,000,000. Trim content to this many tokens. | |
robots_txt | string | Opcional | User agent, 1-256 characters, to check against the site's robots.txt; disallowed URLs are rejected. | MyBot |
user_agent | string | Opcional | User-Agent for the page request, 1-1,024 characters without control characters. Defaults to the browser's own. | |
with_iframe | string | Opcional | true, false or quoted: include iframe content before extraction. | |
page_timeout | inteiro | Opcional | Seconds from 1 through 180 for page loading and browser operations. Cannot extend the total request budget set by timeout. | 30 |
respond_with | string | Opcional | 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. | markdown |
retain_links | string | Opcional | Links to keep: all (default), text (link text only), none, or gpt-oss (citation format with a links summary). | |
retain_media | string | Opcional | How video, audio and embedded video appear: none, text, link (default), image or html. | |
token_budget | inteiro | Opcional | Integer 1-10,000,000. Reject the page when its token count exceeds the budget. | |
retain_images | string | Opcional | Images to keep: all (default), alt (alt text only) or none. | alt |
remove_overlay | booleano | Opcional | Remove modal and cookie-banner overlays from the page. | |
respond_timing | string | Opcional | Page readiness condition to reach before responding. | network-idle |
remove_selector | string | Opcional | CSS selector removed before extraction, 1-2,048 characters; POST also accepts a list of 1-16 selectors. | nav, footer |
target_selector | string | Opcional | 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. | article |
with_shadow_dom | booleano | Opcional | Include open shadow DOM content before extraction. | |
detach_invisibles | booleano | Opcional | Drop display:none elements from the page. | |
keep_img_data_url | booleano | Opcional | Keep inline data: images in Markdown. | |
markdown_chunking | string | Opcional | true, h1-h5, structured or s1-s5: split the Markdown and return chunks. | |
wait_for_selector | string | Opcional | CSS selector to wait for after navigation, 1-2,048 characters. POST also accepts a list of 1-16 selectors. | main |
assert_status_code | inteiro | Opcional | Expected origin HTTP status, 100-599. A different status is rejected; otherwise a rendered error page is a successful capture. | 200 |
with_links_summary | string | Opcional | true, false or all: add a links list to the response. | |
with_images_summary | booleano | Opcional | Add an images list to the response. | |
- Parâmetros de consulta
urlstringObrigatórioPublic 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.
Exemplo:
https://example.combasestringOpcionalResolve relative links against the requested URL (initial, default) or the final URL after redirects (final).
enginestringOpcionalauto (default; lightweight HTTP first, a browser when needed), browser, or curl (no JavaScript).
localestringOpcionalBrowser locale as a language tag, 2-64 characters. Defaults to the browser's own.
Exemplo:
en-USno_gfmstringOpcionaltrue, false or table: disable GitHub-flavored Markdown, or only its tables.
presetstringOpcionalOption preset. Fills only the options the request leaves unset.
refererstringOpcionalHTTP(S) URL sent as the Referer.
Exemplo:
https://example.comtimeoutnúmeroOpcionalOptional budget for the entire request in seconds, measured from gateway receipt until the response is ready to send. Includes admission, queueing and settlement. Must be greater than 0 and at most 90. On expiry, the call is not billed and returns 503 request_deadline_exceeded with retryable=true and a request ID. Omit to retain the standard server deadline.
max_tokensinteiroOpcionalInteger 500-10,000,000. Trim content to this many tokens.
robots_txtstringOpcionalUser agent, 1-256 characters, to check against the site's robots.txt; disallowed URLs are rejected.
Exemplo:
MyBotuser_agentstringOpcionalUser-Agent for the page request, 1-1,024 characters without control characters. Defaults to the browser's own.
with_iframestringOpcionaltrue, false or quoted: include iframe content before extraction.
page_timeoutinteiroOpcionalSeconds from 1 through 180 for page loading and browser operations. Cannot extend the total request budget set by timeout.
Exemplo:
30respond_withstringOpcionalOutput 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.
Exemplo:
markdownretain_linksstringOpcionalLinks to keep: all (default), text (link text only), none, or gpt-oss (citation format with a links summary).
retain_mediastringOpcionalHow video, audio and embedded video appear: none, text, link (default), image or html.
token_budgetinteiroOpcionalInteger 1-10,000,000. Reject the page when its token count exceeds the budget.
retain_imagesstringOpcionalImages to keep: all (default), alt (alt text only) or none.
Exemplo:
altremove_overlaybooleanoOpcionalRemove modal and cookie-banner overlays from the page.
respond_timingstringOpcionalPage readiness condition to reach before responding.
Exemplo:
network-idleremove_selectorstringOpcionalCSS selector removed before extraction, 1-2,048 characters; POST also accepts a list of 1-16 selectors.
Exemplo:
nav, footertarget_selectorstringOpcionalCSS 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.
Exemplo:
articlewith_shadow_dombooleanoOpcionalInclude open shadow DOM content before extraction.
detach_invisiblesbooleanoOpcionalDrop display:none elements from the page.
keep_img_data_urlbooleanoOpcionalKeep inline data: images in Markdown.
markdown_chunkingstringOpcionaltrue, h1-h5, structured or s1-s5: split the Markdown and return chunks.
wait_for_selectorstringOpcionalCSS selector to wait for after navigation, 1-2,048 characters. POST also accepts a list of 1-16 selectors.
Exemplo:
mainassert_status_codeinteiroOpcionalExpected origin HTTP status, 100-599. A different status is rejected; otherwise a rendered error page is a successful capture.
Exemplo:
200with_links_summarystringOpcionaltrue, false or all: add a links list to the response.
with_images_summarybooleanoOpcionalAdd an images list to the response.
Exemplos de código
Substitua $TOOLSWITCH_KEY pela chave criada no console.
curl -X GET 'https://toolswitch.dev/v1/tools/litescrape.web.fetch?url=https%3A%2F%2Fexample.com&respond_with=markdown' \
-H "X-Toolswitch-Key: $TOOLSWITCH_KEY"import os
import requests
response = requests.request(
"GET",
"https://toolswitch.dev/v1/tools/litescrape.web.fetch?url=https%3A%2F%2Fexample.com&respond_with=markdown",
headers={"X-Toolswitch-Key": os.environ["TOOLSWITCH_KEY"]},
)
response.raise_for_status()
print(response.text)const response = await fetch("https://toolswitch.dev/v1/tools/litescrape.web.fetch?url=https%3A%2F%2Fexample.com&respond_with=markdown", {
method: "GET",
headers: {
"X-Toolswitch-Key": process.env.TOOLSWITCH_KEY ?? "",
},
});
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
console.log(await response.text());Esta API de gateway está em prévia; a URL e a autenticação podem mudar. Os parâmetros do exemplo são dados de amostra. As chamadas são cobradas a $0.00015/success, incluindo a taxa de serviço.