scrapa.app

v1.0.1
app.scrapa/scrapa Checked 3 days ago Published 9 days ago

Read web pages as markdown, search the web, list a site's URLs and run a real Chrome.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

scrape Scrape a page

Read one web page and hand it back as markdown, HTML, plain text, its links, a screenshot, a PDF, or the fields you ask for, read off the page by a model. `engine: "auto"` (the default) makes a plain HTTP request first and re-reads the page in a real Chromium when the body turns out to be a JavaScript shell, so you pay for a browser only when the page needed one. To send a search form or a JSON query, use `method: "POST"` with a `body`; to download a file exactly as the site sent it, ask for `formats: ["raw"]`. A link to a PDF or a Word file is read into text too, headings and paragraphs inclu…

quote_scrape Price a scrape

What the same request would cost, without making it. Free, and refused by the same guards a real call meets, so a quote is never a price for a call that would be denied. `maxCost` is the ceiling: for `auto` it is the browser's price, which is only charged if the page turns out to need one. With `maxAge`, the quote is the price of reading the page now; if a copy is there, the page costs nothing and only `extract` is charged.

map_site List a site's URLs

Hand back every URL a site lists, without reading the pages: what its robots.txt and sitemaps name (gzipped ones too, and indexes of sitemaps), plus the links on the page you named. Each URL comes back once, without tracking parameters or a trailing slash, with `lastmod` when the sitemap gives one. Only the host you named is kept unless you set `includeSubdomains`, and `search` keeps the URLs that contain a word. To read a page, pass its URL to `scrape`.

ParameterTypeDescription
url *stringThe site to map, as any http(s) URL on it. Private and loopback hosts are refused.
includeSubdomainsbooleanAlso keep URLs on other hosts of the same domain, like `blog.example.com` for `example.com`. Off by default: only the host you named, with or without `www.`.
limitintegerHow many URLs to hand back at most, 1 to 30,000. The price is the same whatever you ask for.
proxyobjectWhere the map's requests leave from. Every file it reads goes through the same exit.
searchstringOnly URLs that contain this text, upper or lower case alike: `blog` keeps `/blog/` and `/Blog-post`.
sitemapstringWhere to look. "include" reads the site's sitemaps and the links on the page you named; "only" reads the sitemaps alone; "skip" reads the page's links alone.

quote_map Price a map

What the same map would cost, without making it. Free, and refused by the same guards a real call meets. Bandwidth is priced per megabyte because nobody knows a site's sitemap size before reading it.

ParameterTypeDescription
url *stringThe site to map, as any http(s) URL on it. Private and loopback hosts are refused.
includeSubdomainsbooleanAlso keep URLs on other hosts of the same domain, like `blog.example.com` for `example.com`. Off by default: only the host you named, with or without `www.`.
limitintegerHow many URLs to hand back at most, 1 to 30,000. The price is the same whatever you ask for.
proxyobjectWhere the map's requests leave from. Every file it reads goes through the same exit.
searchstringOnly URLs that contain this text, upper or lower case alike: `blog` keeps `/blog/` and `/Blog-post`.
sitemapstringWhere to look. "include" reads the site's sitemaps and the links on the page you named; "only" reads the sitemaps alone; "skip" reads the page's links alone.

create_batch Start a batch

Hand us a list of URLs and stop holding a connection open. Every one is read with the options you pass here. It uses the same engines, the same exit and the same meter as a single `scrape`, and a page the site blocked costs nothing here too, unless your own `browser.actions` script ran in the page first. Nothing is charged when you submit: a batch spends as it goes, so use `quote` for the ceiling. Poll `get` for progress, or pass a `webhook` and we will call you instead. Results are readable for 24 hours from when you submit. A batch still running then stops, and the URLs it has not read are `…

quote_batch Price a batch

What that submission would cost at most, without submitting it. `maxCost` prices every URL at the ceiling one page could reach. The real bill comes in lower by every page that never needed a browser and by every outcome that costs nothing: a page the site blocked or our policy refused (unless your own `browser.actions` script ran in it first) and anything we broke. Bandwidth is on top and cannot be quoted, because it depends on what the pages weigh.

get_batch Read one batch

Where a batch got to: whether it is still running, how many of its URLs now have a verdict, how many of those the web or our policy refused, how many were never attempted, and what it has spent so far. Ask for `items` to get the results themselves: the pages and the refusals, in the order you submitted them, each one the same answer a single `scrape` would have given. You get up to 200 at a time, from wherever `from` says. A batch whose results have expired still answers with everything else, because somebody who paid for those pages must never be told the batch does not exist.

ParameterTypeDescription
id *stringThe batch's id, as create returned it.
fromintegerStart the results at this position. Up to 200 come back at a time, so read the next page with `from` plus however many you just got, and stop when you reach `total`.
itemsbooleanAlso return the results themselves, in the order you submitted them. Off by default: most polls only want to know whether the batch has finished.

list_batches List your batches

Your most recent batches, newest first, with what each one is doing, how far it has got and what it has cost. Results are not included; ask `get` for one batch's pages.

ParameterTypeDescription
limitintegerHow many to return, newest first. Up to 100; 20 by default.

cancel_batch Cancel a batch

Stop a batch. A URL already being read finishes and is charged, because it is a page we are already paying for. Every URL not yet started becomes `skipped`, which costs nothing and is not a verdict about the URL: submit those positions again whenever you like. Safe to repeat; a batch that has already ended answers with how it ended.

ParameterTypeDescription
id *stringThe batch's id, as create returned it.

create_session Start a browser session

Hold a real Chromium for as long as you asked for and answer with a CDP URL your own tools connect to: `chromium.connectOverCDP(connectUrl)` in Playwright, `puppeteer.connect({ browserWSEndpoint: connectUrl })` in Puppeteer. The browser is yours alone for the whole window, every byte it pulls leaves through the exit you picked, and the socket survives our deploys. The URL carries the session's token and is shown once. It cannot be rebuilt from the id.

ParameterTypeDescription
proxyobjectWhere the session leaves from, fixed for its whole life. Defaults to the managed residential pool.
timeoutMinintegerHow long to hold the browser, in minutes. Credits for the whole window are reserved when the session starts and the unused minutes are handed back when it closes, so asking for longer than you need co…

quote_session Price a session

What holding a browser for that long would cost, without holding one. `maxCost` is the whole window at the per-minute rate. It is a ceiling, not a bill, because the minutes you do not use come back when the session closes.

ParameterTypeDescription
proxyobjectWhere the session leaves from, fixed for its whole life. Defaults to the managed residential pool.
timeoutMinintegerHow long to hold the browser, in minutes. Credits for the whole window are reserved when the session starts and the unused minutes are handed back when it closes, so asking for longer than you need co…

get_session Read one session

Where a session got to: whether it is still live, when it expires, what it has pulled and, once it has ended, what it finally cost. The connect URL is not repeated here; it is shown once, when the session starts.

ParameterTypeDescription
id *stringThe session's id, as create returned it.

list_sessions List your sessions

Your most recent sessions, newest first: the live ones and the ones that have ended, with what each of them cost.

ParameterTypeDescription
limitintegerHow many to return, newest first. Up to 100; 20 by default.

close_session Close a session

Stop the browser and settle the bill: the minutes you held it are kept and the rest of the reservation goes back. Safe to repeat: a session that has already ended answers with how it ended.

ParameterTypeDescription
id *stringThe session's id, as create returned it.

get_usage Usage this month

Credits spent this billing month against the plan's grant, the purchased balance on top of it, managed-proxy megabytes against the plan's ceiling, when the month rolls over, and the same split per API key. Free, and worth reading before a bulk run.