Every change Wellknown observed on this MCP server, newest first, with what it was before and what it became. Tool-surface changes carry the definition diff. Nothing here is edited after the fact.
Certificate changed, valid to 2027-02-24
Changed the definition of "stophy_map", "stophy_parse", "stophy_scrape" and 1 more
⟨9 unchanged words⟩ takes ignoreQueryParameters, deduplicateSimilarURLs, ignoreCache, timeout, location.Free without aUsekey,stophy_signupwithintolimits;getwithanaAPIkey,key. $0.50 per 1,000 calls.
{"properties":{"costUsd":{"type":"number"},"creditsUsed":{"type":"number"},"requestId":{"type":"string"},"success":{"const":true,"type":"boolean"}},"required":["creditsUsed","costUsd","requestId"],"type":"object"}
{"destructiveHint":false,"idempotentHint":true,"openWorldHint":true,"readOnlyHint":true,"title":"Web Map"}
⟨17 unchanged words⟩ takes onlyMainContent, includeTags, excludeTags, removeBase64Images, zeroDataRetention.Free without aUsekey,stophy_signupwithintolimits;getwithanaAPIkey,key. $0.50 per 1,000 pages with a text ⟨10 unchanged words⟩
{"properties":{"costUsd":{"type":"number"},"creditsUsed":{"type":"number"},"requestId":{"type":"string"},"success":{"const":true,"type":"boolean"}},"required":["creditsUsed","costUsd","requestId"],"type":"object"}
Scrape any publicReadwebapageURL asmarkdownMarkdown, HTML, links, a screenshot or JSON.For fields from any page, send formats [{"type":"json","prompt":"..."}] or a schema; this needs an API key.KnownForsitesareturnsite'stheir own data,send its page URL with formats [{"type":"json","parser":"<name>"}] and the parser's inputs,such aspage, in options. Some sites can only be read this way. Parsers: google: maps, maps-place, maps-reviews, trends, patents, ads, flights, hotels, play-app, play-search, play-reviews; upwork: search, job; craigslist: search, listing; careers: jobs, job; indeed: search, job; realtor: search, property; zillow: search, property; expedia: hotels; booking: search, hotel, reviews; airbnb: search, listing, reviews; youtube: search,a video,
⟨16 unchanged words⟩ , country, lang, safe, timeout, ignoreInvalidURLs.Free without aUsekey,stophy_signupwithintolimits;getwithanaAPIkey,key.$0.001$0.0005 per 10 results from each source; pages it ⟨5 unchanged words⟩
{"properties":{"costUsd":{"type":"number"},"creditsUsed":{"type":"number"},"requestId":{"type":"string"},"success":{"const":true,"type":"boolean"}},"required":[
Certificate changed, valid to 2027-02-24
Authorization required, Bearer, issuer https://api.stophy.dev/api/auth
Authorization required, Bearer, issuer https://api.stophy.dev/api/auth
Changed the definition of "stophy_scrape"
⟨206 unchanged words⟩ profile, post; link: in-bio; twitch: profile,clips.clips; faa: airport-status; airport: security-waits; flightstats: flight, airport, airport-delays. Also takes onlyCleanContent, minAge, headers, skipTlsVerification, ⟨39 unchanged words⟩
Authorization required, Bearer, issuer https://api.stophy.dev/api/auth
Changed the definition of "stophy_map" and "stophy_search"
⟨52 unchanged words⟩ of the site.","type":"string"},"zeroDataRetention":{"description":"true skips saved copies. Some asynchronous features keep temporary state.","type":"boolean"}},"required":["url"],"type":"object"}
⟨175 unchanged words⟩ sorts newest first.","type":"string"},"zeroDataRetention":{"description":"true skips saved copies. Some asynchronous features keep temporary state.","type":"boolean"}},"required":["query"],"type":"object"}
Authorization required, Bearer, issuer https://api.stophy.dev/api/auth
Changed the definition of "stophy_scrape"
⟨215 unchanged words⟩ onlyCleanContent, minAge, headers, skipTlsVerification, removeBase64Images, imageUrls, allMetaTags, blockAds, fastMode, storeInCache, lockdown, checkPromptInjection, redactPII ⟨30 unchanged words⟩
Changed the definition of "stophy_map", "stophy_parse", "stophy_scrape" and 2 more
FreeScrapewithouttheauthentication,listwithinoflimits.pagesTheonpricesabelowwebsite.applyAlsototakes
Authorization required, Bearer, issuer https://api.stophy.dev/api/auth
Changed the definition of "stophy_map" and "stophy_scrape"
{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"deduplicateSimilarURLs":{"description":"Send false to list distinct addresses such as /docs/a, /docs/a/ and...","type":"boolean"},"ignoreCache":{"description":"Send true to build ⟨160 unchanged words⟩
⟨194 unchanged words⟩ 1,000 scraped URLs, not per PDF page. A page,oncethatpercomes
Changed the definition of "stophy_map", "stophy_parse", "stophy_scrape" and 1 more
Free without authentication, within limits. The prices below apply to authenticated calls. Scrape the list of pages on a website. ⟨5 unchanged words⟩
Free without authentication, within limits. The prices below apply to authenticated calls. Turn a PDF, Word, Excel, PowerPoint or ⟨54 unchanged words⟩ data retention adds $2 per 1,000 calls.costUsdmetadata.costUsd shows what the callcost.cost in dollars.
Changed the definition of "stophy_scrape" and "stophy_search"
⟨151 unchanged words⟩ status, or cannot be read, costs nothing.creditsUsedzeroDataRetention adds $2 per 1,000 scraped URLs, not per PDF page. costUsd shows what the call cost. To pull fields ⟨147 unchanged words⟩ search, pin, board, profile; facebook: page, group, post, comments, marketplace; tiktok: video, ⟨68 unchanged words⟩
⟨816 unchanged words⟩ is read or... Adds $2 per 1,000pages.scraped URLs, not per PDF page.","type":"boolean"}},"required": ⟨3 unchanged words⟩
Added "stophy_parse"; removed "stophy_call", "stophy_crawl", "stophy_describe_endpoint" and 2 more; changed the definition of "stophy_map", "stophy_scrape" and "stophy_search" (9 tools before, 5 now)
Scrape the list of pages on a website.$2$0.50 per 1,000 calls.Input: url, search, sitemap, includeSubdomains, ignoreQuer...
⟨3 unchanged words⟩ additionalProperties":false,"properties":{"ignoreCache":{"default":false,"description":"Send true to build the list again instead of reusing one made inthe last 6 hours.the...","type":"boolean"},"ignoreQueryParameters":{"default":true,"description":"List each page once, without its ?query part.","type":"boolean"},"includeSubdomains":{"default":true,"
Hidden text is gone from the tool definitions
Changed the definition of "stophy_crawl", "stophy_extract", "stophy_scrape" and 1 more
⟨1249 unchanged words⟩ : \"...\" } to get answer,nullleft out with a warning when the page does not state one), ⟨8 unchanged words⟩ with price, sale, availability and images,orleftnullout with a warning when there is none) and menu (merchant, currency and sections of items with prices,orleftnullout with a warning when there is none) network (the JSON the page loaded while ⟨2632 unchanged words⟩
Authorization required, Bearer, issuer https://api.stophy.dev/api/auth
Changed the definition of "stophy_call", "stophy_crawl", "stophy_extract" and 3 more
{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":{},"properties":{"costUsd":{"type":"number"},"creditsUsed":{"type":"number"},"requestId" ⟨5 unchanged words⟩ type":"boolean"}},"required":["creditsUsed","costUsd","requestId"],"type":"object"}
Crawl a website in the background.1$2creditpera1,000
Changed the definition of "stophy_scrape" and "stophy_search"
⟨278 unchanged words⟩ crunchbase-company, g2-reviews, luma-events, luma-event, emails,phone-numbers, company.phone-numbers. GET /v1/parsers lists what each one takes.
Search the web, news, images, scholarly papers,companies, peopleand YouTube videos in one call. 2 credits per 10re...results from each sou...
Changed the definition of "stophy_scrape" and "stophy_search"
⟨273 unchanged words⟩ tripadvisor-place, tripadvisor-reviews, glassdoor-company, glassdoor-reviews, glassdoor-salaries, crunchbase-company, g2-reviews, luma-events, luma-event, emails, phone-numbers, company. ⟨7 unchanged words⟩
⟨4 unchanged words⟩ images, scholarly papers, companies, people andgovernmentYouTubedocumentsvideos in one call. 2 creditsper...
Authorization required, Bearer, issuer https://api.stophy.dev/api/auth
Authorization required, Bearer, issuer https://api.stophy.dev/api/auth
Changed the definition of "stophy_search"
before
{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"definitions":{"__schema0":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"items":{"allOf":[{"$ref":"#/definitions/__schema0"}]},"type":"array"},{"additionalProperties":{"allOf":[{"$ref":"#/definitions/__schema0"}]},"propertyNames":{"type":"string"},"type":"object"}]},"__schema1":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"items":{"allOf":[{"$ref":"#/definitions/__schema1"}]},"type":"array"},{"additionalProperties":{"allOf":[{"$ref":"#/definitions/__schema1"}]},"propertyNames":{"type":"string"},"type":"object"}]},"__schema2":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"items":{"allOf":[{"$ref":"#/definitions/__schema2"}]},"type":"array"},{"additionalProperties":{"allOf":[{"$ref":"#/definitions/__schema2"}]},"propertyNames":{"type":"string"},"type":"object"}]}},"properties":{"categories":{"description":"pdf: web results that are PDF files. research: scholarly papers, in a research list, ranked by relevance then citations. companies: companies that match the query, in a companies list, best matches first. The query can name a place, industry, employee count, founding year and funding stage, like fintech startups in Berlin, 50-200 employees. people: people that match the query, in a people list, best matches first. The query can name a role, company, place or research topic, like CFO of Stripe, founders of fintech startups in Berlin, or researchers on CRISPR base editing. Each person has roles, affiliations and public profile links, never contact details. developer: passages from GitHub READMEs, issues, merged pull requests, releases, developer docs and API operations, in a developer list; send it as an object to filter by repos, types, language and minStars. gov: statutes, regulations, register notices and bills from government sources, in the web group with category gov and the kind, jurisdiction and citation of each. videos: passages from what is said in YouTube videos shared under a Creative Commons license, in a videos list, one result per video, with the channel, the license and the watch link; the link carries &t= only when the passage's start is exact. The index is a June 2024 snapshot of English videos, so a link may be dead.","items":{"anyOf":[{"enum":["developer","gov","research","pdf","companies","people","videos"],"type":"string"},{"additionalProperties":false,"properties":{"type":{"enum":["developer","gov","research","pdf","companies","people","videos"],"type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"language":{"description":"Only repositories whose main language is this, like TypeScript.","minLength":1,"type":"string"},"minStars":{"description":"Only repositories with at least this many GitHub stars.","maximum":9007199254740991,"minimum":0,"type":"integer"},"repos":{"default":[],"description":"Only results from these GitHub repositories, as owner/name.","items":{"pattern":"^[\\w.-]+\\/[\\w.-]+$","type":"string"},"maxItems":5,"type":"array"},"type":{"const":"developer","type":"string"},"types":{"default":[],"description":"Only these result types: readme, issue, pull_request, release, operation, doc.","items":{"enum":["readme","issue","pull_request","release","operation","doc"],"type":"string"},"type":"array"}},"required":["type"],"type":"object"}]},"type":"array"},"country":{"description":"Two-letter country to search from, like us. uk is read as gb. Image results are always US.","pattern":"^[A-Za-z]{2}$","type":"string"},"excludeDomains":{"items":{"type":"string"},"maxItems":10,"type":"array"},"highlights":{"default":true,"description":"On by default. Each web result's description is the part of its page that best matches the query, in markdown, up to about 2,000 characters. A result whose page cannot be read in time keeps the search engine's snippet. Send false for snippets only.","type":"boolean"},"ignoreInvalidURLs":{"default":false,"description":"Leave out results whose address cannot be read as a page.","type":"boolean"},"includeDomains":{"items":{"type":"string"},"maxItems":10,"type":"array"},"lang":{"description":"Two-letter language for web results, like de. It steers which pages come back; some results can still be in other languages.","pattern":"^[A-Za-z]{2}$","type":"string"},"limit":{"description":"Most results to return for each source. Default 10, or 5 when scrapeOptions has formats, which reads every web and news result returned. News returns at most 50.","maximum":100,"minimum":1,"type":"integer"},"location":{"description":"Where to search from, like Germany or San Francisco,California,United States. The last part is the country and replaces country. A city before it narrows web results to that place.","minLength":1,"type":"string"},"maxAge":{"description":"Accept a stored answer up to this many milliseconds old, at most 30 days. Without it, 15 minutes for news and 1 hour for web and images. 0 always searches live.","maximum":9007199254740991,"minimum":0,"type":"integer"},"query":{"description":"What to search for, up to 500 characters. Search operators work in web results: quotes for an exact phrase, -word, site:, -site:, filetype:, inurl:, allinurl:, intitle: and allintitle:. In image results, imagesize:WIDTHxHEIGHT keeps images of exactly that size and larger:WIDTHxHEIGHT keeps images at least that large.","maxLength":500,"minLength":1,"type":"string"},"safe":{"description":"Hide explicit web, news and image results when true.","type":"boolean"},"scrapeOptions":{"additionalProperties":false,"description":"With formats, reads each web and news result, as many as limit asks for, within timeout, and fills each web result's description from it. Without formats no page is read and nothing more is charged. Takes the options of scrape: formats (markdown, html, rawHtml, links, images, summary, screenshot, json and the rest), onlyMainContent, includeTags, excludeTags, maxAge, minAge, waitFor, mobile, timeout (per page), headers, actions, location, parsers, profile and zeroDataRetention. Costs what scrape costs for each page read: 1 credit, plus 4 for each summary or json with a schema or prompt that returns something.","properties":{"actions":{"description":"Up to 50 steps to run on the page, in order, before reading it: { \"type\": \"wait\", \"milliseconds\": 500 } (up to 60 seconds), { \"type\": \"wait\", \"selector\": \".results\" }, { \"type\": \"click\", \"selector\": \"button.more\" }, { \"type\": \"write\", \"text\": \"tides\" }, { \"type\": \"press\", \"key\": \"Enter\" }, { \"type\": \"scroll\", \"direction\": \"down\" } (also up, left or right; amount is pixels, \"viewport\" or \"max\"; maxScrolls 1 to 50; selector scrolls an inner container; \"max\" keeps scrolling until the page stops growing, for feeds that load as you go), { \"type\": \"screenshot\", \"fullPage\": true } (links come back in actions.screenshots), { \"type\": \"scrape\" } (the page at that point, in actions.scrapes), { \"type\": \"executeJavascript\", \"script\": \"document.title\" } (results in actions.javascriptReturns), { \"type\": \"pdf\", \"format\": \"A4\" } (links in actions.pdfs) or { \"type\": \"perform\", \"action\": \"Click the Load more button\" } (a step in plain words, up to 5 browser steps on this page, never leaving the site; at most 5 per call). A read with actions costs 1 credit, the same as any page; the actions themselves add nothing. If an action fails, you still get the page as it stood, with a warning that names the action and says why.","items":{"anyOf":[{"additionalProperties":false,"properties":{"milliseconds":{"maximum":60000,"minimum":1,"type":"integer"},"type":{"const":"wait","type":"string"}},"required":["type","milliseconds"],"type":"object"},{"additionalProperties":false,"properties":{"selector":{"minLength":1,"type":"string"},"type":{"const":"wait","type":"string"}},"required":["type","selector"],"type":"object"},{"additionalProperties":false,"properties":{"all":{"const":false,"type":"boolean"},"selector":{"minLength":1,"type":"string"},"type":{"const":"click","type":"string"}},"required":["type","selector"],"type":"object"},{"additionalProperties":false,"properties":{"text":{"minLength":1,"type":"string"},"type":{"const":"write","type":"string"}},"required":["type","text"],"type":"object"},{"additionalProperties":false,"properties":{"key":{"maxLength":40,"minLength":1,"type":"string"},"type":{"const":"press","type":"string"}},"required":["type","key"],"type":"object"},{"additionalProperties":false,"properties":{"amount":{"anyOf":[{"maximum":100000,"minimum":1,"type":"integer"},{"enum":["viewport","max"],"type":"string"}]},"direction":{"default":"down","enum":["up","down","left","right"],"type":"string"},"maxScrolls":{"maximum":50,"minimum":1,"type":"integer"},"selector":{"minLength":1,"type":"string"},"type":{"const":"scroll","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"fullPage":{"type":"boolean"},"quality":{"maximum":100,"minimum":1,"type":"integer"},"type":{"const":"screenshot","type":"string"},"viewport":{"additionalProperties":false,"properties":{"height":{"maximum":2160,"minimum":200,"type":"integer"},"width":{"maximum":3840,"minimum":200,"type":"integer"}},"required":["width","height"],"type":"object"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"type":{"const":"scrape","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"script":{"maxLength":20000,"minLength":1,"type":"string"},"type":{"const":"executeJavascript","type":"string"}},"required":["type","script"],"type":"object"},{"additionalProperties":false,"properties":{"format":{"enum":["Letter","Legal","Tabloid","Ledger","A0","A1","A2","A3","A4","A5","A6"],"type":"string"},"landscape":{"type":"boolean"},"scale":{"maximum":2,"minimum":0.1,"type":"number"},"type":{"const":"pdf","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"action":{"maxLength":500,"minLength":1,"type":"string"},"type":{"const":"perform","type":"string"}},"required":["type","action"],"type":"object"}]},"maxItems":50,"minItems":1,"type":"array"},"blockAds":{"description":"Ads and trackers are not loaded when a page runs in a browser. Send false to load them.","type":"boolean"},"checkPromptInjection":{"description":"Send true to scan the page text for instructions aimed at an AI model before anything is built from it. A page that has them is refused with 403 promptInjectionDetected and costs nothing. The scan adds 4 credits when it runs; a page it cannot scan fully comes back with a warning and no charge.","type":"boolean"},"excludeTags":{"description":"Remove the parts of the page that match these CSS selectors, such as .comments.","items":{"minLength":1,"type":"string"},"minItems":1,"type":"array"},"fastMode":{"description":"Send true to read the page without opening a browser: the answer comes sooner, but a page that needs a browser, or that refuses a plain request, comes back as an error instead of being retried. Ignored when the call needs a browser (actions, screenshot, waitFor, mobile, profile, network, branding).","type":"boolean"},"formats":{"default":["markdown"],"description":"What to return: markdown (clean page text), summary (a short summary of the page), html (the cleaned page), rawHtml (the page as sent), audio and video (for a YouTube link: the audio track as an M4A file, or the video as an MP4 file, as a link that works for 1 hour), rawBase64 (the bytes the site sent, Base64 encoded, from a live read; metadata.contentType says what they are), links (every link on the page), images (every image address), screenshot (a link to a JPEG of the visible page, kept for 7 days), changeTracking (what changed in the markdown since your key last read this page with the same options, kept 30 days; add modes [\"git-diff\",\"json\"] with a schema or prompt to compare fields too), question (send { \"type\": \"question\", \"question\": \"...\" } to get answer, null when the page does not state one), product (title, brand, category, url, description and variants with price, sale, availability and images, or null) and menu (merchant, currency and sections of items with prices, or null) network (the JSON the page loaded while it rendered, up to 30 responses) and branding (the page's colors, fonts, typography, spacing, button and input styles, logo and brand images, read from how the page looks, with a field left out when the page does not show it). Send { \"type\": \"screenshot\", \"fullPage\": true } for the whole page. Send { \"type\": \"highlights\", \"query\": \"refund policy\" } for the passages that best match a query. Send { \"type\": \"json\", \"schema\": { \"type\": \"object\", \"properties\": { \"price\": { \"type\": \"number\" } } } } or { \"type\": \"json\", \"prompt\": \"the price and the stock\" } for fields filled from the page, each checked against it. Send { \"type\": \"json\", \"parser\": \"amazon-product\" } to get a site's own data as json instead of reading the page; GET /v1/parsers lists the parsers. Send { \"type\": \"json\", \"rules\": { \"title\": \"h1\", \"links\": { \"selector\": \"a\", \"type\": \"list\", \"output\": \"@href\" } } } to read the page with CSS rules and no model, at the page's own price. Send { \"type\": \"attributes\", \"selectors\": [{ \"selector\": \"a\", \"attribute\": \"href\" }] } for attribute values, returned in attributes. Without a parser or rules, json needs a schema or a prompt and is filled from the page. json with a schema or a prompt, summary, highlights, question, product, menu and changeTracking in json mode cost 4 credits more each when they return something. json with rules or a parser, and attributes, cost nothing more. A screenshot, network or branding read costs 1 credit, the same as any page. A PDF comes back as markdown only, and costs 1 credit more for each page of text that comes back. A CSV or an Excel .xlsx file comes back as markdown tables.","items":{"anyOf":[{"enum":["markdown","summary","html","rawHtml","rawBase64","links","images","network","branding","audio","video","screenshot","changeTracking","product","menu"],"type":"string"},{"additionalProperties":false,"properties":{"type":{"enum":["markdown","summary","html","rawHtml","rawBase64","links","images","network","branding","audio","video"],"type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"modes":{"description":"git-diff returns a unified diff of the markdown. json compares the fields in schema or prompt between this read and the last one. Without modes you get git-diff.","items":{"enum":["git-diff","json"],"type":"string"},"maxItems":2,"type":"array"},"prompt":{"description":"With json mode: what to compare, in plain words, such as the price and stock.","maxLength":10000,"minLength":1,"type":"string"},"schema":{"additionalProperties":{"$ref":"#/definitions/__schema0"},"description":"The fields to fill, as a JSON Schema (draft-07 or 2020-12) object with properties. Pydantic's model_json_schema() and zod's toJSONSchema() output work as they are. enum, const, anyOf, oneOf, nullable types, $ref with $defs, required, descriptions and any key names are read. Up to 100 top-level fields and 32 KB. A field the page does not state comes back null.","propertyNames":{"type":"string"},"type":"object"},"tag":{"type":"null"},"type":{"const":"changeTracking","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"question":{"description":"A question to answer from the page, such as what the refund window is.","maxLength":10000,"minLength":1,"type":"string"},"type":{"const":"question","type":"string"}},"required":["type","question"],"type":"object"},{"additionalProperties":false,"properties":{"type":{"const":"product","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"type":{"const":"menu","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"fullPage":{"default":false,"description":"Capture the whole page from top to bottom instead of the visible part.","type":"boolean"},"quality":{"description":"JPEG quality from 1 to 100. The default is 70.","maximum":100,"minimum":1,"type":"integer"},"type":{"const":"screenshot","type":"string"},"viewport":{"additionalProperties":false,"description":"The window size in pixels, such as { width: 390, height: 844 }.","properties":{"height":{"maximum":2160,"minimum":200,"type":"integer"},"width":{"maximum":3840,"minimum":200,"type":"integer"}},"required":["width","height"],"type":"object"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"count":{"default":5,"description":"How many passages to return, best match first.","maximum":20,"minimum":1,"type":"integer"},"query":{"description":"What you are looking for on the page, such as refund policy.","maxLength":10000,"minLength":1,"type":"string"},"type":{"const":"highlights","type":"string"}},"required":["type","query"],"type":"object"},{"additionalProperties":false,"properties":{"checkPromptInjection":{"description":"Deprecated: send checkPromptInjection at the top level of the call.","type":"boolean"},"options":{"additionalProperties":{"$ref":"#/definitions/__schema1"},"description":"Only with parser: extra inputs for it, such as { \"page\": 2 } for the next page of results or { \"minRating\": 4.5 } for a filter. GET /v1/parsers lists what each parser accepts.","propertyNames":{"type":"string"},"type":"object"},"parser":{"description":"Read the page with a named parser, which gives the site's own data as json. The url must be the kind of page the parser reads. Parsers are the only way to read some sites. GET /v1/parsers lists them.","type":"string"},"prompt":{"description":"What to pull from the page in plain words, such as the version and the release date.","maxLength":10000,"minLength":1,"type":"string"},"rules":{"additionalProperties":{"$ref":"#/definitions/__schema2"},"description":"Read the page with CSS rules instead of a model, no extra fee. Each field is a selector such as \"h1\" (the first match's text), \"a@href\" (an attribute) or { \"selector\": \"li\", \"type\": \"list\", \"output\": \"text\" | \"html\" | \"@attribute\" | { nested fields } }. A missing item is null and an unmatched list is []. Relative links become absolute. Up to 100 fields, 5 levels deep. Not with schema, prompt or parser.","propertyNames":{"type":"string"},"type":"object"},"schema":{"additionalProperties":{"$ref":"#/definitions/__schema0"},"description":"The fields to fill, as a JSON Schema (draft-07 or 2020-12) object with properties. Pydantic's model_json_schema() and zod's toJSONSchema() output work as they are. enum, const, anyOf, oneOf, nullable types, $ref with $defs, required, descriptions and any key names are read. Up to 100 top-level fields and 32 KB. A field the page does not state comes back null.","propertyNames":{"type":"string"},"type":"object"},"type":{"const":"json","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"selectors":{"description":"The elements and attributes to read, such as { selector: 'a.buy', attribute: 'href' }.","items":{"additionalProperties":false,"properties":{"attribute":{"maxLength":100,"minLength":1,"type":"string"},"selector":{"minLength":1,"type":"string"}},"required":["selector","attribute"],"type":"object"},"maxItems":50,"minItems":1,"type":"array"},"type":{"const":"attributes","type":"string"}},"required":["type","selectors"],"type":"object"}]},"maxItems":20,"minItems":1,"type":"array"},"headers":{"additionalProperties":{"maxLength":2000,"pattern":"^[\\t\\x20-\\x7e]*$","type":"string"},"description":"Extra request headers to send to the site, such as { \"x-plan\": \"pro\" }. A read with headers is never answered from or saved to a stored copy.","propertyNames":{"pattern":"^[A-Za-z0-9-]{1,64}$","type":"string"},"type":"object"},"includeTags":{"description":"Keep only the parts of the page that match these CSS selectors, such as article or .price. When set, onlyMainContent is not applied.","items":{"minLength":1,"type":"string"},"minItems":1,"type":"array"},"location":{"additionalProperties":false,"description":"Where to read the page from. The default is the United States.","properties":{"country":{"description":"Two-letter country code to read the page from, such as DE or JP.","type":"string"},"languages":{"description":"Languages to ask the site for, best first, such as [\"de\", \"en\"]. Sent as Accept-Language. A read with languages is never answered from or saved to a stored copy.","items":{"pattern":"^[A-Za-z]{2,3}(?:-[A-Za-z0-9]{2,8})*$","type":"string"},"maxItems":5,"minItems":1,"type":"array"}},"type":"object"},"lockdown":{"description":"Send true to answer only from a stored copy of the page and never read it live, whatever its age. A page with no stored copy is notFound. The same as minAge 0.","type":"boolean"},"maxAge":{"description":"Accept a stored answer up to this many milliseconds old, at most 30 days. Without it, 2 days, or less for a site whose pages change often, and a copy up to twice that age (at most 7 days) comes back at once as stale while a fresh read runs. 0 always reads the page live. metadata.cacheState says which one you got.","maximum":9007199254740991,"minimum":0,"type":"integer"},"minAge":{"description":"Answer only from a stored copy that is at least this many milliseconds old, and never read the page live. 0 accepts any stored copy. A page with no such copy is notFound.","maximum":9007199254740991,"minimum":0,"type":"integer"},"mobile":{"description":"Read the page as a phone would: a phone-sized screen and the mobile version of the site. The page loads in a browser.","type":"boolean"},"onlyCleanContent":{"description":"Send true to have a model remove what onlyMainContent leaves behind in the markdown: cookie banners, ads, share widgets, breadcrumbs, sign-up prompts, comment prompts and related-article lists. It only removes whole paragraphs and lists; it never rewrites or adds text, and code blocks are always kept. Skipped with a warning when the page is too long to clean or the model does not answer. Not with zeroDataRetention. Summary, answers and highlights are made from the cleaned markdown.","type":"boolean"},"onlyMainContent":{"default":true,"description":"Keep only the page's main content, without menus, headers, footers and ads.","type":"boolean"},"parsers":{"description":"Only the pdf parser exists. Send \"pdf\" or { \"type\": \"pdf\", mode, maxPages, pages, blocks, pageMarkers } with the same meaning as in parse. Without mode a PDF is read as auto: from its text layer, and from the picture of any page that has no text. fast reads the text layer only, and ocr reads the picture of every page, up to 20 pages. Each page of text that comes back costs 1 credit. Pictures are read only with an API key.","items":{"anyOf":[{"const":"pdf","type":"string"},{"additionalProperties":false,"properties":{"blocks":{"description":"Send true to also get the page's layout in blocks: each title, section header or run of text, with its page, reading order, position on the page (bbox as left, top, right, bottom from 0 to 1) and where its text sits in that page's markdown (span, as in pages). Tables, figures and formulas are not told apart. A page read from its picture is one block. No extra charge.","type":"boolean"},"maxPages":{"description":"Read at most this many pages, up to 500, which is also the default.","maximum":500,"minimum":1,"type":"integer"},"mode":{"description":"fast reads the text layer only. auto (the default) reads the text layer and reads the picture of any page that has none. ocr reads the picture of every page.","enum":["fast","auto","ocr"],"type":"string"},"pageMarkers":{"description":"Send true to mark page breaks in the markdown: pages are joined with \"---\" and a line, where N is the page that follows. No extra charge.","type":"boolean"},"pages":{"description":"Send true to also get each page's markdown in pages, as { pageNumber, markdown }. No extra charge.","type":"boolean"},"type":{"const":"pdf","type":"string"}},"required":["type"],"type":"object"}]},"minItems":1,"type":"array"},"profile":{"additionalProperties":false,"description":"Read the page with the cookies and local storage that earlier calls saved under this name, kept for your account for 30 days after the last use. A call with a profile always loads the page in a browser, costs 1 credit, the same as any page, and is never answered from a stored copy. Only one call at a time can save to a profile.","properties":{"name":{"description":"A name you choose, such as shop-login. Calls with the same name share state.","maxLength":128,"minLength":1,"type":"string"},"saveChanges":{"default":true,"description":"Keep the cookies and local storage this read leaves behind for the next call with this name. Send false to read with the profile without changing it.","type":"boolean"}},"required":["name"],"type":"object"},"proxy":{"description":"auto: basic first, enhanced once if the site refuses. basic: one plain attempt. enhanced: the stronger read from the start. stealth is the same as enhanced. Same price.","enum":["auto","basic","enhanced","stealth"],"type":"string"},"redactPII":{"anyOf":[{"type":"boolean"},{"additionalProperties":false,"description":"Options for redactPII.","properties":{"entities":{"default":["PERSON","EMAIL","PHONE","LOCATION","FINANCIAL","SECRET"],"description":"What to hide: PERSON, EMAIL, PHONE, LOCATION, FINANCIAL, SECRET. All by default.","items":{"enum":["PERSON","EMAIL","PHONE","LOCATION","FINANCIAL","SECRET"],"type":"string"},"minItems":1,"type":"array"},"mode":{"default":"accurate","description":"accurate finds names and places with the model and the rest by pattern. aggressive adds guesses that catch more and may hide a little too much. fast uses patterns only, so it finds no ordinary names or places.","enum":["accurate","aggressive","fast"],"type":"string"},"replaceStyle":{"default":"tag","description":"tag writes <EMAIL>, mask writes * for each character, remove deletes it.","enum":["tag","mask","remove"],"type":"string"}},"type":"object"}],"description":"Send true, or an object, to hide personal data in the markdown and in everything made from it (summary, answers, highlights, json). Links, html and rawHtml are not changed. A page the model cannot scan is refused rather than returned unredacted."},"removeBase64Images":{"description":"Images inside the page that carry their data in the address (data:image) are dropped by default. Send false to keep them in markdown and html.","type":"boolean"},"skipTlsVerification":{"description":"Send true to read a page whose certificate is expired, self-signed or for another name. The read is not private against someone between us and the site.","type":"boolean"},"storeInCache":{"default":true,"description":"Send false to neither read nor keep a stored copy of this page.","type":"boolean"},"timeout":{"default":30000,"description":"How long to keep trying, in milliseconds, from 1 second to 5 minutes; 30 seconds by default. A page that needs a browser needs at least 5 seconds, and pages behind a bot check can need 10 to 30 seconds the first time. A read that runs out of time is an error and costs nothing.","maximum":300000,"minimum":1000,"type":"integer"},"waitFor":{"description":"Extra milliseconds to wait before reading, up to 60000, for pages that load their content late. To wait for an element, add a wait action with a selector. A read that waits costs 1 credit, the same as any page.","maximum":60000,"minimum":0,"type":"integer"},"zeroDataRetention":{"default":false,"description":"Send true to keep nothing from this call: no stored copy is read or made, and nothing from it is logged. Costs 1 credit more per page. Not with a screenshot.","type":"boolean"}},"type":"object"},"sources":{"description":"What to search: web, news, images. Each is a string or {type}. Default web, or none when categories asks for research, companies, people, developer, gov or videos.","items":{"anyOf":[{"enum":["web","news","images"],"type":"string"},{"additionalProperties":false,"properties":{"country":{"description":"ISO 3166-1 alpha-2 country code, e.g. us. Any case is accepted.","pattern":"^[A-Za-z]{2}$","type":"string"},"lang":{"description":"Two-letter language for web results, like de. It steers which pages come back; some results can still be in other languages.","pattern":"^[A-Za-z]{2}$","type":"string"},"location":{"type":"string"},"tbs":{"type":"string"},"type":{"const":"web","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"type":{"enum":["news","images"],"type":"string"}},"required":["type"],"type":"object"}]},"maxItems":5,"minItems":1,"type":"array"},"tbs":{"description":"Time filter: qdr:d, qdr:w, qdr:m or qdr:y, or cdr:1,cd_min:MM/DD/YYYY,cd_max:MM/DD/YYYY, plus sbd:1, like sbd:1,qdr:w. sbd:1 sorts newest first; results without a date come last. Web takes all of them; news takes qdr and sbd; images take none.","minLength":1,"type":"string"},"timeout":{"default":60000,"description":"Milliseconds to wait for the sources, from 1,000 to 120,000; more is read as 120,000. Default 60,000. A source that has not answered by then is left out with a warning. When none has, the call fails and costs nothing.","maximum":9007199254740991,"minimum":1000,"type":"integer"}},"required":["query"],"type":"object"}Changed the definition of "stophy_search"
⟨465 unchanged words⟩ default":true,"description":"On by default.Adds highlights to aEach webresult when itsresult'spagedescriptioncanisbethereadpartquickly:oftheitspassagespage that bestmatch
Changed the definition of "stophy_crawl", "stophy_extract", "stophy_scrape" and 1 more
before
{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"definitions":{"__schema0":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"items":{"allOf":[{"$ref":"#/definitions/__schema0"}]},"type":"array"},{"additionalProperties":{"allOf":[{"$ref":"#/definitions/__schema0"}]},"propertyNames":{"type":"string"},"type":"object"}]},"__schema1":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"items":{"allOf":[{"$ref":"#/definitions/__schema1"}]},"type":"array"},{"additionalProperties":{"allOf":[{"$ref":"#/definitions/__schema1"}]},"propertyNames":{"type":"string"},"type":"object"}]},"__schema2":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"items":{"allOf":[{"$ref":"#/definitions/__schema2"}]},"type":"array"},{"additionalProperties":{"allOf":[{"$ref":"#/definitions/__schema2"}]},"propertyNames":{"type":"string"},"type":"object"}]}},"properties":{"allowExternalLinks":{"default":false,"description":"Also follow links to other sites. They count toward limit and maxDiscoveryDepth. Only the start site's robots.txt is read.","type":"boolean"},"allowSubdomains":{"default":false,"description":"Also read pages on subdomains, such as docs.bun.com for bun.com.","type":"boolean"},"crawlEntireDomain":{"default":false,"description":"Read the whole site, not only pages under the start page's path.","type":"boolean"},"deduplicateSimilarURLs":{"default":true,"description":"Read one page when addresses differ only by www, a trailing slash, a #fragment, tracking parameters such as utm_source, or the order of the ?query. Send false to read each address.","type":"boolean"},"delay":{"description":"Seconds to wait between pages. With delay the crawl reads one page at a time. At most 30.","maximum":30,"minimum":0,"type":"number"},"excludePaths":{"default":[],"description":"Skip pages whose path matches one of these regular expressions, such as tag/.*.","items":{"maxLength":200,"minLength":1,"type":"string"},"maxItems":100,"type":"array"},"ignoreQueryParameters":{"default":false,"description":"Treat addresses that differ only in their ?query part as one page.","type":"boolean"},"includePaths":{"default":[],"description":"Read only pages whose path matches one of these regular expressions, such as blog/.*.","items":{"maxLength":200,"minLength":1,"type":"string"},"maxItems":100,"type":"array"},"limit":{"default":10000,"description":"Stop after reading this many pages in total.","maximum":10000,"minimum":1,"type":"integer"},"maxConcurrency":{"description":"Most pages read at once. We read at most 4 at once, so a larger number gives the same speed.","maximum":100,"minimum":1,"type":"integer"},"maxDiscoveryDepth":{"default":3,"description":"How many links away from the start page to go, up to 10.","maximum":10,"minimum":0,"type":"integer"},"prompt":{"description":"What you are looking for, such as sqlite performance. Pages about it are read first, and the crawl stops once new pages stop mentioning it.","maxLength":1000,"minLength":1,"type":"string"},"regexOnFullURL":{"default":false,"description":"Match includePaths and excludePaths against the whole address, not only the path.","type":"boolean"},"scrapeOptions":{"additionalProperties":{},"description":"How to read each page, the same options and formats as scrape. Without formats, each page comes back as markdown.","properties":{"actions":{"description":"Up to 50 steps to run on the page, in order, before reading it: { \"type\": \"wait\", \"milliseconds\": 500 } (up to 30 seconds), { \"type\": \"wait\", \"selector\": \".results\" }, { \"type\": \"click\", \"selector\": \"button.more\" }, { \"type\": \"write\", \"text\": \"tides\" }, { \"type\": \"press\", \"key\": \"Enter\" }, { \"type\": \"scroll\", \"direction\": \"down\" } (also up, left or right; amount is pixels, \"viewport\" or \"max\"; maxScrolls 1 to 50; selector scrolls an inner container; \"max\" keeps scrolling until the page stops growing, for feeds that load as you go), { \"type\": \"screenshot\", \"fullPage\": true } (links come back in actions.screenshots), { \"type\": \"scrape\" } (the page at that point, in actions.scrapes), { \"type\": \"executeJavascript\", \"script\": \"document.title\" } (results in actions.javascriptReturns), { \"type\": \"pdf\", \"format\": \"A4\" } (links in actions.pdfs) or { \"type\": \"perform\", \"action\": \"Click the Load more button\" } (a step in plain words, up to 5 browser steps on this page, never leaving the site; at most 5 per call). A read with actions costs 1 credit, the same as any page; the actions themselves add nothing. If an action fails, you still get the page as it stood, with a warning that names the action and says why.","items":{"anyOf":[{"additionalProperties":false,"properties":{"milliseconds":{"maximum":30000,"minimum":1,"type":"integer"},"type":{"const":"wait","type":"string"}},"required":["type","milliseconds"],"type":"object"},{"additionalProperties":false,"properties":{"selector":{"minLength":1,"type":"string"},"type":{"const":"wait","type":"string"}},"required":["type","selector"],"type":"object"},{"additionalProperties":false,"properties":{"all":{"const":false,"type":"boolean"},"selector":{"minLength":1,"type":"string"},"type":{"const":"click","type":"string"}},"required":["type","selector"],"type":"object"},{"additionalProperties":false,"properties":{"text":{"minLength":1,"type":"string"},"type":{"const":"write","type":"string"}},"required":["type","text"],"type":"object"},{"additionalProperties":false,"properties":{"key":{"maxLength":40,"minLength":1,"type":"string"},"type":{"const":"press","type":"string"}},"required":["type","key"],"type":"object"},{"additionalProperties":false,"properties":{"amount":{"anyOf":[{"maximum":100000,"minimum":1,"type":"integer"},{"enum":["viewport","max"],"type":"string"}]},"direction":{"default":"down","enum":["up","down","left","right"],"type":"string"},"maxScrolls":{"maximum":50,"minimum":1,"type":"integer"},"selector":{"minLength":1,"type":"string"},"type":{"const":"scroll","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"fullPage":{"type":"boolean"},"quality":{"maximum":100,"minimum":1,"type":"integer"},"type":{"const":"screenshot","type":"string"},"viewport":{"additionalProperties":false,"properties":{"height":{"maximum":2160,"minimum":200,"type":"integer"},"width":{"maximum":3840,"minimum":200,"type":"integer"}},"required":["width","height"],"type":"object"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"type":{"const":"scrape","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"script":{"maxLength":20000,"minLength":1,"type":"string"},"type":{"const":"executeJavascript","type":"string"}},"required":["type","script"],"type":"object"},{"additionalProperties":false,"properties":{"format":{"enum":["Letter","Legal","Tabloid","Ledger","A0","A1","A2","A3","A4","A5","A6"],"type":"string"},"landscape":{"type":"boolean"},"scale":{"maximum":2,"minimum":0.1,"type":"number"},"type":{"const":"pdf","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"action":{"maxLength":500,"minLength":1,"type":"string"},"type":{"const":"perform","type":"string"}},"required":["type","action"],"type":"object"}]},"maxItems":50,"minItems":1,"type":"array"},"blockAds":{"description":"Ads and trackers are not loaded when a page runs in a browser. Send false to load them.","type":"boolean"},"checkPromptInjection":{"description":"Send true to scan the page text for instructions aimed at an AI model before anything is built from it. A page that has them is refused with 403 promptInjectionDetected and costs nothing. The scan adds 4 credits when it runs; a page it cannot scan fully comes back with a warning and no charge.","type":"boolean"},"excludeTags":{"description":"Remove the parts of the page that match these CSS selectors, such as .comments.","items":{"minLength":1,"type":"string"},"minItems":1,"type":"array"},"fastMode":{"description":"Send true to read the page without opening a browser: the answer comes sooner, but a page that needs a browser, or that refuses a plain request, comes back as an error instead of being retried. Ignored when the call needs a browser (actions, screenshot, waitFor, mobile, profile, network, branding).","type":"boolean"},"formats":{"default":["markdown"],"description":"What to return: markdown (clean page text), summary (a short summary of the page), html (the cleaned page), rawHtml (the page as sent), audio and video (for a YouTube link: the audio track as an M4A file, or the video as an MP4 file, as a link that works for 1 hour), rawBase64 (the bytes the site sent, Base64 encoded, from a live read; metadata.contentType says what they are), links (every link on the page), images (every image address), screenshot (a link to a JPEG of the visible page, kept for 7 days), changeTracking (what changed in the markdown since your key last read this page with the same options, kept 30 days; add modes [\"git-diff\",\"json\"] with a schema or prompt to compare fields too), question (send { \"type\": \"question\", \"question\": \"...\" } to get answer, null when the page does not state one), product (title, brand, category, url, description and variants with price, sale, availability and images, or null) and menu (merchant, currency and sections of items with prices, or null) network (the JSON the page loaded while it rendered, up to 30 responses) and branding (the page's colors, fonts, typography, spacing, button and input styles, logo and brand images, read from how the page looks, with a field left out when the page does not show it). Send { \"type\": \"screenshot\", \"fullPage\": true } for the whole page. Send { \"type\": \"highlights\", \"query\": \"refund policy\" } for the passages that best match a query. Send { \"type\": \"json\", \"schema\": { \"type\": \"object\", \"properties\": { \"price\": { \"type\": \"number\" } } } } or { \"type\": \"json\", \"prompt\": \"the price and the stock\" } for fields filled from the page, each checked against it. Send { \"type\": \"json\", \"parser\": \"amazon-product\" } to get a site's own data as json instead of reading the page; GET /v1/parsers lists the parsers. Send { \"type\": \"json\", \"rules\": { \"title\": \"h1\", \"links\": { \"selector\": \"a\", \"type\": \"list\", \"output\": \"@href\" } } } to read the page with CSS rules and no model, at the page's own price. Send { \"type\": \"attributes\", \"selectors\": [{ \"selector\": \"a\", \"attribute\": \"href\" }] } for attribute values, returned in attributes. Without a parser or rules, json needs a schema or a prompt and is filled from the page. json with a schema or a prompt, summary, highlights, question, product, menu and changeTracking in json mode cost 4 credits more each when they return something. json with rules or a parser, and attributes, cost nothing more. A screenshot, network or branding read costs 1 credit, the same as any page. A PDF comes back as markdown only, and costs 1 credit more for each page of text that comes back. A CSV or an Excel .xlsx file comes back as markdown tables.","items":{"anyOf":[{"enum":["markdown","summary","html","rawHtml","rawBase64","links","images","network","branding","audio","video","screenshot","changeTracking","product","menu"],"type":"string"},{"additionalProperties":false,"properties":{"type":{"enum":["markdown","summary","html","rawHtml","rawBase64","links","images","network","branding","audio","video"],"type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"modes":{"description":"git-diff returns a unified diff of the markdown. json compares the fields in schema or prompt between this read and the last one. Without modes you get git-diff.","items":{"enum":["git-diff","json"],"type":"string"},"maxItems":2,"type":"array"},"prompt":{"description":"With json mode: what to compare, in plain words, such as the price and stock.","maxLength":10000,"minLength":1,"type":"string"},"schema":{"additionalProperties":{"$ref":"#/definitions/__schema0"},"description":"The fields to fill, as a JSON Schema (draft-07 or 2020-12) object with properties. Pydantic's model_json_schema() and zod's toJSONSchema() output work as they are. enum, const, anyOf, oneOf, nullable types, $ref with $defs, required, descriptions and any key names are read. Up to 100 top-level fields and 32 KB. A field the page does not state comes back null.","propertyNames":{"type":"string"},"type":"object"},"tag":{"type":"null"},"type":{"const":"changeTracking","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"question":{"description":"A question to answer from the page, such as what the refund window is.","maxLength":10000,"minLength":1,"type":"string"},"type":{"const":"question","type":"string"}},"required":["type","question"],"type":"object"},{"additionalProperties":false,"properties":{"type":{"const":"product","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"type":{"const":"menu","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"fullPage":{"default":false,"description":"Capture the whole page from top to bottom instead of the visible part.","type":"boolean"},"quality":{"description":"JPEG quality from 1 to 100. The default is 70.","maximum":100,"minimum":1,"type":"integer"},"type":{"const":"screenshot","type":"string"},"viewport":{"additionalProperties":false,"description":"The window size in pixels, such as { width: 390, height: 844 }.","properties":{"height":{"maximum":2160,"minimum":200,"type":"integer"},"width":{"maximum":3840,"minimum":200,"type":"integer"}},"required":["width","height"],"type":"object"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"count":{"default":5,"description":"How many passages to return, best match first.","maximum":20,"minimum":1,"type":"integer"},"query":{"description":"What you are looking for on the page, such as refund policy.","maxLength":10000,"minLength":1,"type":"string"},"type":{"const":"highlights","type":"string"}},"required":["type","query"],"type":"object"},{"additionalProperties":false,"properties":{"checkPromptInjection":{"description":"Deprecated: send checkPromptInjection at the top level of the call.","type":"boolean"},"options":{"additionalProperties":{"$ref":"#/definitions/__schema1"},"description":"Only with parser: extra inputs for it, such as { \"page\": 2 } for the next page of results or { \"minRating\": 4.5 } for a filter. GET /v1/parsers lists what each parser accepts.","propertyNames":{"type":"string"},"type":"object"},"parser":{"description":"Read the page with a named parser, which gives the site's own data as json. The url must be the kind of page the parser reads. Parsers are the only way to read some sites. GET /v1/parsers lists them.","type":"string"},"prompt":{"description":"What to pull from the page in plain words, such as the version and the release date.","maxLength":10000,"minLength":1,"type":"string"},"rules":{"additionalProperties":{"$ref":"#/definitions/__schema2"},"description":"Read the page with CSS rules instead of a model, no extra fee. Each field is a selector such as \"h1\" (the first match's text), \"a@href\" (an attribute) or { \"selector\": \"li\", \"type\": \"list\", \"output\": \"text\" | \"html\" | \"@attribute\" | { nested fields } }. A missing item is null and an unmatched list is []. Relative links become absolute. Up to 100 fields, 5 levels deep. Not with schema, prompt or parser.","propertyNames":{"type":"string"},"type":"object"},"schema":{"additionalProperties":{"$ref":"#/definitions/__schema0"},"description":"The fields to fill, as a JSON Schema (draft-07 or 2020-12) object with properties. Pydantic's model_json_schema() and zod's toJSONSchema() output work as they are. enum, const, anyOf, oneOf, nullable types, $ref with $defs, required, descriptions and any key names are read. Up to 100 top-level fields and 32 KB. A field the page does not state comes back null.","propertyNames":{"type":"string"},"type":"object"},"type":{"const":"json","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"selectors":{"description":"The elements and attributes to read, such as { selector: 'a.buy', attribute: 'href' }.","items":{"additionalProperties":false,"properties":{"attribute":{"maxLength":100,"minLength":1,"type":"string"},"selector":{"minLength":1,"type":"string"}},"required":["selector","attribute"],"type":"object"},"maxItems":50,"minItems":1,"type":"array"},"type":{"const":"attributes","type":"string"}},"required":["type","selectors"],"type":"object"}]},"maxItems":20,"minItems":1,"type":"array"},"headers":{"additionalProperties":{"maxLength":2000,"pattern":"^[\\t\\x20-\\x7e]*$","type":"string"},"description":"Extra request headers to send to the site, such as { \"x-plan\": \"pro\" }. A read with headers is never answered from or saved to a stored copy.","propertyNames":{"pattern":"^[A-Za-z0-9-]{1,64}$","type":"string"},"type":"object"},"includeTags":{"description":"Keep only the parts of the page that match these CSS selectors, such as article or .price. When set, onlyMainContent is not applied.","items":{"minLength":1,"type":"string"},"minItems":1,"type":"array"},"location":{"additionalProperties":false,"description":"Where to read the page from. The default is the United States.","properties":{"country":{"description":"Two-letter country code to read the page from, such as DE or JP.","type":"string"},"languages":{"description":"Languages to ask the site for, best first, such as [\"de\", \"en\"]. Sent as Accept-Language. A read with languages is never answered from or saved to a stored copy.","items":{"pattern":"^[A-Za-z]{2,3}(?:-[A-Za-z0-9]{2,8})*$","type":"string"},"maxItems":5,"minItems":1,"type":"array"}},"type":"object"},"lockdown":{"description":"Send true to answer only from a stored copy of the page and never read it live, whatever its age. A page with no stored copy is notFound. The same as minAge 0.","type":"boolean"},"maxAge":{"description":"Accept a stored answer up to this many milliseconds old, at most 30 days. Without it, 2 days, or less for a site whose pages change often, and a copy up to twice that age (at most 7 days) comes back at once as stale while a fresh read runs. 0 always reads the page live. metadata.cacheState says which one you got.","maximum":9007199254740991,"minimum":0,"type":"integer"},"minAge":{"description":"Answer only from a stored copy that is at least this many milliseconds old, and never read the page live. 0 accepts any stored copy. A page with no such copy is notFound.","maximum":9007199254740991,"minimum":0,"type":"integer"},"mobile":{"description":"Read the page as a phone would: a phone-sized screen and the mobile version of the site. The page loads in a browser.","type":"boolean"},"onlyCleanContent":{"description":"Send true to have a model remove what onlyMainContent leaves behind in the markdown: cookie banners, ads, share widgets, breadcrumbs, sign-up prompts, comment prompts and related-article lists. It only removes whole paragraphs and lists; it never rewrites or adds text, and code blocks are always kept. Skipped with a warning when the page is too long to clean or the model does not answer. Not with zeroDataRetention. Summary, answers and highlights are made from the cleaned markdown.","type":"boolean"},"onlyMainContent":{"default":true,"description":"Keep only the page's main content, without menus, headers, footers and ads.","type":"boolean"},"parsers":{"description":"Only the pdf parser exists. Send \"pdf\" or { \"type\": \"pdf\", mode, maxPages, pages, blocks, pageMarkers } with the same meaning as in parse. Without mode a PDF is read from its text layer only; auto reads the picture of a page that has no text, and ocr reads the picture of every page, up to 20 pages. Each page of text that comes back costs 1 credit.","items":{"anyOf":[{"const":"pdf","type":"string"},{"additionalProperties":false,"properties":{"blocks":{"description":"Send true to also get the page's layout in blocks: each title, section header or run of text, with its page, reading order, position on the page (bbox as left, top, right, bottom from 0 to 1) and where its text sits in that page's markdown (span, as in pages). Tables, figures and formulas are not told apart. A page read from its picture is one block. No extra charge.","type":"boolean"},"maxPages":{"description":"Read at most this many pages, up to 100.","maximum":100,"minimum":1,"type":"integer"},"mode":{"description":"fast reads the text layer only. auto (the default) reads the text layer and reads the picture of any page that has none. ocr reads the picture of every page.","enum":["fast","auto","ocr"],"type":"string"},"pageMarkers":{"description":"Send true to mark page breaks in the markdown: pages are joined with \"---\" and a line, where N is the page that follows. No extra charge.","type":"boolean"},"pages":{"description":"Send true to also get each page's markdown in pages, as { pageNumber, markdown }. No extra charge.","type":"boolean"},"type":{"const":"pdf","type":"string"}},"required":["type"],"type":"object"}]},"minItems":1,"type":"array"},"profile":{"additionalProperties":false,"description":"Read the page with the cookies and local storage that earlier calls saved under this name, kept for your account for 30 days after the last use. A call with a profile always loads the page in a browser, costs 1 credit, the same as any page, and is never answered from a stored copy. Only one call at a time can save to a profile.","properties":{"name":{"description":"A name you choose, such as shop-login. Calls with the same name share state.","maxLength":128,"minLength":1,"type":"string"},"saveChanges":{"default":true,"description":"Keep the cookies and local storage this read leaves behind for the next call with this name. Send false to read with the profile without changing it.","type":"boolean"}},"required":["name"],"type":"object"},"proxy":{"description":"auto: basic first, enhanced once if the site refuses. basic: one plain attempt. enhanced: the stronger read from the start. Same price.","enum":["auto","basic","enhanced"],"type":"string"},"redactPII":{"anyOf":[{"type":"boolean"},{"additionalProperties":false,"description":"Options for redactPII.","properties":{"entities":{"default":["PERSON","EMAIL","PHONE","LOCATION","FINANCIAL","SECRET"],"description":"What to hide: PERSON, EMAIL, PHONE, LOCATION, FINANCIAL, SECRET. All by default.","items":{"enum":["PERSON","EMAIL","PHONE","LOCATION","FINANCIAL","SECRET"],"type":"string"},"minItems":1,"type":"array"},"mode":{"default":"accurate","description":"accurate finds names and places with the model and the rest by pattern. aggressive adds guesses that catch more and may hide a little too much. fast uses patterns only, so it finds no ordinary names or places.","enum":["accurate","aggressive","fast"],"type":"string"},"replaceStyle":{"default":"tag","description":"tag writes <EMAIL>, mask writes * for each character, remove deletes it.","enum":["tag","mask","remove"],"type":"string"}},"type":"object"}],"description":"Send true, or an object, to hide personal data in the markdown and in everything made from it (summary, answers, highlights, json). Links, html and rawHtml are not changed. A page the model cannot scan is refused rather than returned unredacted."},"removeBase64Images":{"description":"Images inside the page that carry their data in the address (data:image) are dropped by default. Send false to keep them in markdown and html.","type":"boolean"},"skipTlsVerification":{"description":"Send true to read a page whose certificate is expired, self-signed or for another name. The read is not private against someone between us and the site.","type":"boolean"},"storeInCache":{"default":true,"description":"Send false to neither read nor keep a stored copy of this page.","type":"boolean"},"timeout":{"description":"How long to keep trying, in milliseconds, between 10 seconds and 2 minutes. Pages behind a bot check can need 10 to 30 seconds the first time.","maximum":300000,"minimum":1000,"type":"integer"},"waitFor":{"description":"Extra milliseconds to wait before reading, up to 60000, for pages that load their content late. To wait for an element, add a wait action with a selector. A read that waits costs 1 credit, the same as any page.","maximum":60000,"minimum":0,"type":"integer"},"zeroDataRetention":{"default":false,"description":"Send true to keep nothing from this call: no stored copy is read or made, and nothing from it is logged. Costs 1 credit more per page. Not with a screenshot.","type":"boolean"}},"type":"object"},"sitemap":{"default":"include","description":"include also uses the site's sitemaps. only reads just the pages the sitemaps name. skip ignores them.","enum":["skip","include","only"],"type":"string"},"url":{"description":"The page to start from, such as https://bun.com/docs.","type":"string"},"webhook":{"anyOf":[{"type":"string"},{"additionalProperties":false,"properties":{"events":{"items":{"enum":["started","page","action","completed","failed","cancelled"],"type":"string"},"minItems":1,"type":"array"},"headers":{"additionalProperties":{"maxLength":1000,"type":"string"},"propertyNames":{"pattern":"^[A-Za-z0-9-]{1,64}$","type":"string"},"type":"object"},"metadata":{"additionalProperties":{"$ref":"#/definitions/__schema0"},"propertyNames":{"type":"string"},"type":"object"},"url":{"type":"string"}},"required":["url"],"type":"object"}],"description":"Where to be told about the job: a plain address, or { url } which gets a JSON POST when the job starts, for each finished page, and when the job ends. headers are sent with every call, metadata comes back in every call, and events picks which of started, page, action, completed, failed and cancelled to send (all by default). An agent run sends action for each step it takes, and page too. Every call is signed: read Stophy-Signature (t=<unix seconds>,v1=<hex>), where v1 is the HMAC-SHA256 of \"<t>.<body>\" with your webhook secret from webhook.secret. A call that gets no 2xx is sent again, up to 3 times. If your address answers slowly, a page event can carry only the page url. Read that page with the status call."},"zeroDataRetention":{"default":false,"description":"Send true to keep nothing from this crawl: no stored copy is read or made, page results are held for one hour at most, and nothing is logged. Costs 1 credit more per page.","type":"boolean"}},"required":["url"],"type":"object"}Changed the definition of "stophy_crawl", "stophy_extract", "stophy_map" and 2 more
before
{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"definitions":{"__schema0":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"items":{"allOf":[{"$ref":"#/definitions/__schema0"}]},"type":"array"},{"additionalProperties":{"allOf":[{"$ref":"#/definitions/__schema0"}]},"propertyNames":{"type":"string"},"type":"object"}]},"__schema1":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"items":{"allOf":[{"$ref":"#/definitions/__schema1"}]},"type":"array"},{"additionalProperties":{"allOf":[{"$ref":"#/definitions/__schema1"}]},"propertyNames":{"type":"string"},"type":"object"}]},"__schema2":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"items":{"allOf":[{"$ref":"#/definitions/__schema2"}]},"type":"array"},{"additionalProperties":{"allOf":[{"$ref":"#/definitions/__schema2"}]},"propertyNames":{"type":"string"},"type":"object"}]}},"properties":{"alexandria":{"not":{}},"allowExternalLinks":{"default":false,"description":"Also follow links to other sites. They count toward limit and maxDiscoveryDepth. Only the start site's robots.txt is read.","type":"boolean"},"allowSubdomains":{"default":false,"description":"Also read pages on subdomains, such as docs.bun.com for bun.com.","type":"boolean"},"auditMetadata":{"not":{}},"crawlEntireDomain":{"default":false,"description":"Read the whole site, not only pages under the start page's path.","type":"boolean"},"deduplicateSimilarURLs":{"default":true,"description":"Read one page when addresses differ only by www, a trailing slash, a #fragment, tracking parameters such as utm_source, or the order of the ?query. Send false to read each address.","type":"boolean"},"delay":{"description":"Seconds to wait between pages. With delay the crawl reads one page at a time. At most 30.","maximum":30,"minimum":0,"type":"number"},"domainTools":{"const":false,"type":"boolean"},"excludePaths":{"default":[],"description":"Skip pages whose path matches one of these regular expressions, such as tag/.*.","items":{"maxLength":200,"minLength":1,"type":"string"},"maxItems":100,"type":"array"},"ignoreQueryParameters":{"default":false,"description":"Treat addresses that differ only in their ?query part as one page.","type":"boolean"},"ignoreRobotsTxt":{"const":false,"type":"boolean"},"includePaths":{"default":[],"description":"Read only pages whose path matches one of these regular expressions, such as blog/.*.","items":{"maxLength":200,"minLength":1,"type":"string"},"maxItems":100,"type":"array"},"limit":{"default":10000,"description":"Stop after reading this many pages in total.","maximum":10000,"minimum":1,"type":"integer"},"maxConcurrency":{"description":"Most pages read at once. We read at most 4 at once, so a larger number gives the same speed.","maximum":100,"minimum":1,"type":"integer"},"maxDiscoveryDepth":{"default":3,"description":"How many links away from the start page to go, up to 10.","maximum":10,"minimum":0,"type":"integer"},"prompt":{"description":"What you are looking for, such as sqlite performance. Pages about it are read first, and the crawl stops once new pages stop mentioning it.","maxLength":1000,"minLength":1,"type":"string"},"regexOnFullURL":{"default":false,"description":"Match includePaths and excludePaths against the whole address, not only the path.","type":"boolean"},"robotsUserAgent":{"not":{}},"scrapeOptions":{"additionalProperties":{},"description":"How to read each page, the same options and formats as scrape. Without formats, each page comes back as markdown.","properties":{"actions":{"description":"Up to 50 steps to run on the page, in order, before reading it: { \"type\": \"wait\", \"milliseconds\": 500 } (up to 30 seconds), { \"type\": \"wait\", \"selector\": \".results\" }, { \"type\": \"click\", \"selector\": \"button.more\" }, { \"type\": \"write\", \"text\": \"tides\" }, { \"type\": \"press\", \"key\": \"Enter\" }, { \"type\": \"scroll\", \"direction\": \"down\" } (also up, left or right; amount is pixels, \"viewport\" or \"max\"; maxScrolls 1 to 50; selector scrolls an inner container; \"max\" keeps scrolling until the page stops growing, for feeds that load as you go), { \"type\": \"screenshot\", \"fullPage\": true } (links come back in actions.screenshots), { \"type\": \"scrape\" } (the page at that point, in actions.scrapes), { \"type\": \"executeJavascript\", \"script\": \"document.title\" } (results in actions.javascriptReturns), { \"type\": \"pdf\", \"format\": \"A4\" } (links in actions.pdfs) or { \"type\": \"perform\", \"action\": \"Click the Load more button\" } (a step in plain words, up to 5 browser steps on this page, never leaving the site; at most 5 per call). A read with actions costs 1 credit, the same as any page; the actions themselves add nothing. If an action fails, you still get the page as it stood, with a warning that names the action and says why.","items":{"anyOf":[{"additionalProperties":false,"properties":{"milliseconds":{"maximum":30000,"minimum":1,"type":"integer"},"type":{"const":"wait","type":"string"}},"required":["type","milliseconds"],"type":"object"},{"additionalProperties":false,"properties":{"selector":{"minLength":1,"type":"string"},"type":{"const":"wait","type":"string"}},"required":["type","selector"],"type":"object"},{"additionalProperties":false,"properties":{"all":{"const":false,"type":"boolean"},"selector":{"minLength":1,"type":"string"},"type":{"const":"click","type":"string"}},"required":["type","selector"],"type":"object"},{"additionalProperties":false,"properties":{"text":{"minLength":1,"type":"string"},"type":{"const":"write","type":"string"}},"required":["type","text"],"type":"object"},{"additionalProperties":false,"properties":{"key":{"maxLength":40,"minLength":1,"type":"string"},"type":{"const":"press","type":"string"}},"required":["type","key"],"type":"object"},{"additionalProperties":false,"properties":{"amount":{"anyOf":[{"maximum":100000,"minimum":1,"type":"integer"},{"enum":["viewport","max"],"type":"string"}]},"direction":{"default":"down","enum":["up","down","left","right"],"type":"string"},"maxScrolls":{"maximum":50,"minimum":1,"type":"integer"},"selector":{"minLength":1,"type":"string"},"type":{"const":"scroll","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"fullPage":{"type":"boolean"},"quality":{"maximum":100,"minimum":1,"type":"integer"},"type":{"const":"screenshot","type":"string"},"viewport":{"additionalProperties":false,"properties":{"height":{"maximum":2160,"minimum":200,"type":"integer"},"width":{"maximum":3840,"minimum":200,"type":"integer"}},"required":["width","height"],"type":"object"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"type":{"const":"scrape","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"script":{"maxLength":20000,"minLength":1,"type":"string"},"type":{"const":"executeJavascript","type":"string"}},"required":["type","script"],"type":"object"},{"additionalProperties":false,"properties":{"format":{"enum":["Letter","Legal","Tabloid","Ledger","A0","A1","A2","A3","A4","A5","A6"],"type":"string"},"landscape":{"type":"boolean"},"scale":{"maximum":2,"minimum":0.1,"type":"number"},"type":{"const":"pdf","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"action":{"maxLength":500,"minLength":1,"type":"string"},"type":{"const":"perform","type":"string"}},"required":["type","action"],"type":"object"}]},"maxItems":50,"minItems":1,"type":"array"},"alexandria":{"not":{}},"auditMetadata":{"not":{}},"blockAds":{"description":"Ads and trackers are not loaded when a page runs in a browser. Send false to load them.","type":"boolean"},"checkPromptInjection":{"description":"Send true to scan the page text for instructions aimed at an AI model before anything is built from it. A page that has them is refused with 403 promptInjectionDetected and costs nothing. The scan adds 4 credits when it runs; a page it cannot scan fully comes back with a warning and no charge.","type":"boolean"},"domainTools":{"const":false,"type":"boolean"},"excludeTags":{"description":"Remove the parts of the page that match these CSS selectors, such as .comments.","items":{"minLength":1,"type":"string"},"minItems":1,"type":"array"},"fastMode":{"description":"Send true to read the page without opening a browser: the answer comes sooner, but a page that needs a browser, or that refuses a plain request, comes back as an error instead of being retried. Ignored when the call needs a browser (actions, screenshot, waitFor, mobile, profile, network, branding).","type":"boolean"},"formats":{"default":["markdown"],"description":"What to return: markdown (clean page text), summary (a short summary of the page), html (the cleaned page), rawHtml (the page as sent), audio and video (for a YouTube link: the audio track as an M4A file, or the video as an MP4 file, as a link that works for 1 hour), rawBase64 (the bytes the site sent, Base64 encoded, from a live read; metadata.contentType says what they are), links (every link on the page), images (every image address), screenshot (a link to a JPEG of the visible page, kept for 7 days), changeTracking (what changed in the markdown since your key last read this page with the same options, kept 30 days; add modes [\"git-diff\",\"json\"] with a schema or prompt to compare fields too), question (send { \"type\": \"question\", \"question\": \"...\" } to get answer, null when the page does not state one), product (title, brand, category, url, description and variants with price, sale, availability and images, or null) and menu (merchant, currency and sections of items with prices, or null) network (the JSON the page loaded while it rendered, up to 30 responses) and branding (the page's colors, fonts, typography, spacing, button and input styles, logo and brand images, read from how the page looks, with a field left out when the page does not show it). Send { \"type\": \"screenshot\", \"fullPage\": true } for the whole page. Send { \"type\": \"highlights\", \"query\": \"refund policy\" } for the passages that best match a query. Send { \"type\": \"json\", \"schema\": { \"type\": \"object\", \"properties\": { \"price\": { \"type\": \"number\" } } } } or { \"type\": \"json\", \"prompt\": \"the price and the stock\" } for fields filled from the page, each checked against it. Send { \"type\": \"json\", \"parser\": \"amazon-product\" } to get a site's own data as json instead of reading the page; GET /v1/parsers lists the parsers. Send { \"type\": \"json\", \"rules\": { \"title\": \"h1\", \"links\": { \"selector\": \"a\", \"type\": \"list\", \"output\": \"@href\" } } } to read the page with CSS rules and no model, at the page's own price. Send { \"type\": \"attributes\", \"selectors\": [{ \"selector\": \"a\", \"attribute\": \"href\" }] } for attribute values, returned in attributes. Without a parser or rules, json needs a schema or a prompt and is filled from the page. json with a schema or a prompt, summary, highlights, question, product, menu and changeTracking in json mode cost 4 credits more each when they return something. json with rules or a parser, and attributes, cost nothing more. A screenshot, network or branding read costs 1 credit, the same as any page. A PDF comes back as markdown only, and costs 1 credit more for each page of text that comes back. A CSV or an Excel .xlsx file comes back as markdown tables.","items":{"anyOf":[{"enum":["markdown","summary","html","rawHtml","rawBase64","links","images","network","branding","audio","video","screenshot","changeTracking","product","menu"],"type":"string"},{"additionalProperties":false,"properties":{"type":{"enum":["markdown","summary","html","rawHtml","rawBase64","links","images","network","branding","audio","video"],"type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"modes":{"description":"git-diff returns a unified diff of the markdown. json compares the fields in schema or prompt between this read and the last one. Without modes you get git-diff.","items":{"enum":["git-diff","json"],"type":"string"},"maxItems":2,"type":"array"},"prompt":{"description":"With json mode: what to compare, in plain words, such as the price and stock.","maxLength":10000,"minLength":1,"type":"string"},"schema":{"additionalProperties":{"$ref":"#/definitions/__schema0"},"description":"The fields to fill, as a JSON Schema (draft-07 or 2020-12) object with properties. Pydantic's model_json_schema() and zod's toJSONSchema() output work as they are. enum, const, anyOf, oneOf, nullable types, $ref with $defs, required, descriptions and any key names are read. Up to 100 top-level fields and 32 KB. A field the page does not state comes back null.","propertyNames":{"type":"string"},"type":"object"},"tag":{"type":"null"},"type":{"const":"changeTracking","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"question":{"description":"A question to answer from the page, such as what the refund window is.","maxLength":10000,"minLength":1,"type":"string"},"type":{"const":"question","type":"string"}},"required":["type","question"],"type":"object"},{"additionalProperties":false,"properties":{"type":{"const":"product","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"type":{"const":"menu","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"fullPage":{"default":false,"description":"Capture the whole page from top to bottom instead of the visible part.","type":"boolean"},"quality":{"description":"JPEG quality from 1 to 100. The default is 70.","maximum":100,"minimum":1,"type":"integer"},"type":{"const":"screenshot","type":"string"},"viewport":{"additionalProperties":false,"description":"The window size in pixels, such as { width: 390, height: 844 }.","properties":{"height":{"maximum":2160,"minimum":200,"type":"integer"},"width":{"maximum":3840,"minimum":200,"type":"integer"}},"required":["width","height"],"type":"object"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"count":{"default":5,"description":"How many passages to return, best match first.","maximum":20,"minimum":1,"type":"integer"},"query":{"description":"What you are looking for on the page, such as refund policy.","maxLength":10000,"minLength":1,"type":"string"},"type":{"const":"highlights","type":"string"}},"required":["type","query"],"type":"object"},{"additionalProperties":false,"properties":{"checkPromptInjection":{"description":"Deprecated: send checkPromptInjection at the top level of the call.","type":"boolean"},"options":{"additionalProperties":{"$ref":"#/definitions/__schema1"},"description":"Only with parser: extra inputs for it, such as { \"page\": 2 } for the next page of results or { \"minRating\": 4.5 } for a filter. GET /v1/parsers lists what each parser accepts.","propertyNames":{"type":"string"},"type":"object"},"parser":{"description":"Read the page with a named parser, which gives the site's own data as json. The url must be the kind of page the parser reads. Parsers are the only way to read some sites. GET /v1/parsers lists them.","type":"string"},"prompt":{"description":"What to pull from the page in plain words, such as the version and the release date.","maxLength":10000,"minLength":1,"type":"string"},"rules":{"additionalProperties":{"$ref":"#/definitions/__schema2"},"description":"Read the page with CSS rules instead of a model, no extra fee. Each field is a selector such as \"h1\" (the first match's text), \"a@href\" (an attribute) or { \"selector\": \"li\", \"type\": \"list\", \"output\": \"text\" | \"html\" | \"@attribute\" | { nested fields } }. A missing item is null and an unmatched list is []. Relative links become absolute. Up to 100 fields, 5 levels deep. Not with schema, prompt or parser.","propertyNames":{"type":"string"},"type":"object"},"schema":{"additionalProperties":{"$ref":"#/definitions/__schema0"},"description":"The fields to fill, as a JSON Schema (draft-07 or 2020-12) object with properties. Pydantic's model_json_schema() and zod's toJSONSchema() output work as they are. enum, const, anyOf, oneOf, nullable types, $ref with $defs, required, descriptions and any key names are read. Up to 100 top-level fields and 32 KB. A field the page does not state comes back null.","propertyNames":{"type":"string"},"type":"object"},"type":{"const":"json","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"selectors":{"description":"The elements and attributes to read, such as { selector: 'a.buy', attribute: 'href' }.","items":{"additionalProperties":false,"properties":{"attribute":{"maxLength":100,"minLength":1,"type":"string"},"selector":{"minLength":1,"type":"string"}},"required":["selector","attribute"],"type":"object"},"maxItems":50,"minItems":1,"type":"array"},"type":{"const":"attributes","type":"string"}},"required":["type","selectors"],"type":"object"}]},"maxItems":20,"minItems":1,"type":"array"},"headers":{"additionalProperties":{"maxLength":2000,"pattern":"^[\\t\\x20-\\x7e]*$","type":"string"},"description":"Extra request headers to send to the site, such as { \"x-plan\": \"pro\" }. A read with headers is never answered from or saved to a stored copy.","propertyNames":{"pattern":"^[A-Za-z0-9-]{1,64}$","type":"string"},"type":"object"},"ignoreRobotsTxt":{"const":false,"type":"boolean"},"includeTags":{"description":"Keep only the parts of the page that match these CSS selectors, such as article or .price. When set, onlyMainContent is not applied.","items":{"minLength":1,"type":"string"},"minItems":1,"type":"array"},"location":{"additionalProperties":false,"description":"Where to read the page from. The default is the United States.","properties":{"country":{"description":"Two-letter country code to read the page from, such as DE or JP.","type":"string"},"languages":{"description":"Languages to ask the site for, best first, such as [\"de\", \"en\"]. Sent as Accept-Language. A read with languages is never answered from or saved to a stored copy.","items":{"pattern":"^[A-Za-z]{2,3}(?:-[A-Za-z0-9]{2,8})*$","type":"string"},"maxItems":5,"minItems":1,"type":"array"}},"type":"object"},"lockdown":{"description":"Send true to answer only from a stored copy of the page and never read it live, whatever its age. A page with no stored copy is notFound. The same as minAge 0.","type":"boolean"},"maxAge":{"description":"Accept a stored answer up to this many milliseconds old, at most 30 days. Without it, 2 days, or less for a site whose pages change often, and a copy up to twice that age (at most 7 days) comes back at once as stale while a fresh read runs. 0 always reads the page live. metadata.cacheState says which one you got.","maximum":9007199254740991,"minimum":0,"type":"integer"},"minAge":{"description":"Answer only from a stored copy that is at least this many milliseconds old, and never read the page live. 0 accepts any stored copy. A page with no such copy is notFound.","maximum":9007199254740991,"minimum":0,"type":"integer"},"mobile":{"description":"Read the page as a phone would: a phone-sized screen and the mobile version of the site. The page loads in a browser.","type":"boolean"},"onlyCleanContent":{"description":"Send true to have a model remove what onlyMainContent leaves behind in the markdown: cookie banners, ads, share widgets, breadcrumbs, sign-up prompts, comment prompts and related-article lists. It only removes whole paragraphs and lists; it never rewrites or adds text, and code blocks are always kept. Skipped with a warning when the page is too long to clean or the model does not answer. Not with zeroDataRetention. Summary, answers and highlights are made from the cleaned markdown.","type":"boolean"},"onlyMainContent":{"default":true,"description":"Keep only the page's main content, without menus, headers, footers and ads.","type":"boolean"},"parsers":{"description":"Only the pdf parser exists. Send \"pdf\" or { \"type\": \"pdf\", mode, maxPages, pages, blocks, pageMarkers } with the same meaning as in parse. Without mode a PDF is read from its text layer only; auto reads the picture of a page that has no text, and ocr reads the picture of every page, up to 20 pages. Each page of text that comes back costs 1 credit.","items":{"anyOf":[{"const":"pdf","type":"string"},{"additionalProperties":false,"properties":{"blocks":{"description":"Send true to also get the page's layout in blocks: each title, section header or run of text, with its page, reading order, position on the page (bbox as left, top, right, bottom from 0 to 1) and where its text sits in that page's markdown (span, as in pages). Tables, figures and formulas are not told apart. A page read from its picture is one block. No extra charge.","type":"boolean"},"maxPages":{"description":"Read at most this many pages, up to 100.","maximum":100,"minimum":1,"type":"integer"},"mode":{"description":"fast reads the text layer only. auto (the default) reads the text layer and reads the picture of any page that has none. ocr reads the picture of every page.","enum":["fast","auto","ocr"],"type":"string"},"pageMarkers":{"description":"Send true to mark page breaks in the markdown: pages are joined with \"---\" and a line, where N is the page that follows. No extra charge.","type":"boolean"},"pages":{"description":"Send true to also get each page's markdown in pages, as { pageNumber, markdown }. No extra charge.","type":"boolean"},"type":{"const":"pdf","type":"string"}},"required":["type"],"type":"object"}]},"minItems":1,"type":"array"},"profile":{"additionalProperties":false,"description":"Read the page with the cookies and local storage that earlier calls saved under this name, kept for your account for 30 days after the last use. A call with a profile always loads the page in a browser, costs 1 credit, the same as any page, and is never answered from a stored copy. Only one call at a time can save to a profile.","properties":{"name":{"description":"A name you choose, such as shop-login. Calls with the same name share state.","maxLength":128,"minLength":1,"type":"string"},"saveChanges":{"default":true,"description":"Keep the cookies and local storage this read leaves behind for the next call with this name. Send false to read with the profile without changing it.","type":"boolean"}},"required":["name"],"type":"object"},"proxy":{"description":"auto: basic first, enhanced once if the site refuses. basic: one plain attempt. enhanced: the stronger read from the start. Same price.","enum":["auto","basic","enhanced"],"type":"string"},"redactPII":{"anyOf":[{"type":"boolean"},{"additionalProperties":false,"description":"Options for redactPII.","properties":{"entities":{"default":["PERSON","EMAIL","PHONE","LOCATION","FINANCIAL","SECRET"],"description":"What to hide: PERSON, EMAIL, PHONE, LOCATION, FINANCIAL, SECRET. All by default.","items":{"enum":["PERSON","EMAIL","PHONE","LOCATION","FINANCIAL","SECRET"],"type":"string"},"minItems":1,"type":"array"},"mode":{"default":"accurate","description":"accurate finds names and places with the model and the rest by pattern. aggressive adds guesses that catch more and may hide a little too much. fast uses patterns only, so it finds no ordinary names or places.","enum":["accurate","aggressive","fast"],"type":"string"},"replaceStyle":{"default":"tag","description":"tag writes <EMAIL>, mask writes * for each character, remove deletes it.","enum":["tag","mask","remove"],"type":"string"}},"type":"object"}],"description":"Send true, or an object, to hide personal data in the markdown and in everything made from it (summary, answers, highlights, json). Links, html and rawHtml are not changed. A page the model cannot scan is refused rather than returned unredacted."},"removeBase64Images":{"description":"Images inside the page that carry their data in the address (data:image) are dropped by default. Send false to keep them in markdown and html.","type":"boolean"},"robotsUserAgent":{"not":{}},"skipTlsVerification":{"description":"Send true to read a page whose certificate is expired, self-signed or for another name. The read is not private against someone between us and the site.","type":"boolean"},"storeInCache":{"default":true,"description":"Send false to neither read nor keep a stored copy of this page.","type":"boolean"},"threatProtection":{"not":{}},"timeout":{"description":"How long to keep trying, in milliseconds, between 10 seconds and 2 minutes. Pages behind a bot check can need 10 to 30 seconds the first time.","maximum":300000,"minimum":1000,"type":"integer"},"toolDetail":{"not":{}},"waitFor":{"description":"Extra milliseconds to wait before reading, up to 60000, for pages that load their content late. To wait for an element, add a wait action with a selector. A read that waits costs 1 credit, the same as any page.","maximum":60000,"minimum":0,"type":"integer"},"zeroDataRetention":{"default":false,"description":"Send true to keep nothing from this call: no stored copy is read or made, and nothing from it is logged. Costs 1 credit more per page. Not with a screenshot.","type":"boolean"}},"type":"object"},"sitemap":{"default":"include","description":"include also uses the site's sitemaps. only reads just the pages the sitemaps name. skip ignores them.","enum":["skip","include","only"],"type":"string"},"threatProtection":{"not":{}},"url":{"description":"The page to start from, such as https://bun.com/docs.","type":"string"},"webhook":{"anyOf":[{"type":"string"},{"additionalProperties":false,"properties":{"events":{"items":{"enum":["started","page","action","completed","failed","cancelled"],"type":"string"},"minItems":1,"type":"array"},"headers":{"additionalProperties":{"maxLength":1000,"type":"string"},"propertyNames":{"pattern":"^[A-Za-z0-9-]{1,64}$","type":"string"},"type":"object"},"metadata":{"additionalProperties":{"$ref":"#/definitions/__schema0"},"propertyNames":{"type":"string"},"type":"object"},"url":{"type":"string"}},"required":["url"],"type":"object"}],"description":"Where to be told about the job: a plain address, or { url } which gets a JSON POST when the job starts, for each finished page, and when the job ends. headers are sent with every call, metadata comes back in every call, and events picks which of started, page, action, completed, failed and cancelled to send (all by default). An agent run sends action for each step it takes, and page too. Every call is signed: read Stophy-Signature (t=<unix seconds>,v1=<hex>), where v1 is the HMAC-SHA256 of \"<t>.<body>\" with your webhook secret from webhook.secret. A call that gets no 2xx is sent again, up to 3 times. If your address answers slowly, a page event can carry only the page url. Read that page with the status call."},"zeroDataRetention":{"default":false,"description":"Send true to keep nothing from this crawl: no stored copy is read or made, page results are held for one hour at most, and nothing is logged. Costs 1 credit more per page.","type":"boolean"}},"required":["url"],"type":"object"}Authorization required, Bearer, issuer https://api.stophy.dev/api/auth
Changed the definition of "stophy_crawl", "stophy_extract", "stophy_scrape" and 1 more
before
{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"definitions":{"__schema0":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"items":{"allOf":[{"$ref":"#/definitions/__schema0"}]},"type":"array"},{"additionalProperties":{"allOf":[{"$ref":"#/definitions/__schema0"}]},"propertyNames":{"type":"string"},"type":"object"}]},"__schema1":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"items":{"allOf":[{"$ref":"#/definitions/__schema1"}]},"type":"array"},{"additionalProperties":{"allOf":[{"$ref":"#/definitions/__schema1"}]},"propertyNames":{"type":"string"},"type":"object"}]},"__schema2":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"items":{"allOf":[{"$ref":"#/definitions/__schema2"}]},"type":"array"},{"additionalProperties":{"allOf":[{"$ref":"#/definitions/__schema2"}]},"propertyNames":{"type":"string"},"type":"object"}]}},"properties":{"alexandria":{"not":{}},"allowExternalLinks":{"default":false,"description":"Also follow links to other sites. They count toward limit and maxDiscoveryDepth. Only the start site's robots.txt is read.","type":"boolean"},"allowSubdomains":{"default":false,"description":"Also read pages on subdomains, such as docs.bun.com for bun.com.","type":"boolean"},"auditMetadata":{"not":{}},"crawlEntireDomain":{"default":false,"description":"Read the whole site, not only pages under the start page's path.","type":"boolean"},"deduplicateSimilarURLs":{"default":true,"description":"Read one page when addresses differ only by www, a trailing slash, a #fragment, tracking parameters such as utm_source, or the order of the ?query. Send false to read each address.","type":"boolean"},"delay":{"description":"Seconds to wait between pages. With delay the crawl reads one page at a time. At most 30.","maximum":30,"minimum":0,"type":"number"},"domainTools":{"const":false,"type":"boolean"},"excludePaths":{"default":[],"description":"Skip pages whose path matches one of these regular expressions, such as tag/.*.","items":{"maxLength":200,"minLength":1,"type":"string"},"maxItems":100,"type":"array"},"ignoreQueryParameters":{"default":false,"description":"Treat addresses that differ only in their ?query part as one page.","type":"boolean"},"ignoreRobotsTxt":{"const":false,"type":"boolean"},"includePaths":{"default":[],"description":"Read only pages whose path matches one of these regular expressions, such as blog/.*.","items":{"maxLength":200,"minLength":1,"type":"string"},"maxItems":100,"type":"array"},"limit":{"default":10000,"description":"Stop after reading this many pages in total.","maximum":10000,"minimum":1,"type":"integer"},"maxConcurrency":{"description":"Most pages read at once. We read at most 4 at once, so a larger number gives the same speed.","maximum":100,"minimum":1,"type":"integer"},"maxDiscoveryDepth":{"default":3,"description":"How many links away from the start page to go, up to 10.","maximum":10,"minimum":0,"type":"integer"},"prompt":{"description":"What you are looking for, such as sqlite performance. Pages about it are read first, and the crawl stops once new pages stop mentioning it.","maxLength":1000,"minLength":1,"type":"string"},"regexOnFullURL":{"default":false,"description":"Match includePaths and excludePaths against the whole address, not only the path.","type":"boolean"},"robotsUserAgent":{"not":{}},"scrapeOptions":{"additionalProperties":{},"description":"How to read each page, the same options and formats as scrape. Without formats, each page comes back as markdown.","properties":{"actions":{"description":"Up to 50 steps to run on the page, in order, before reading it: { \"type\": \"wait\", \"milliseconds\": 500 } (up to 30 seconds), { \"type\": \"wait\", \"selector\": \".results\" }, { \"type\": \"click\", \"selector\": \"button.more\" }, { \"type\": \"write\", \"text\": \"tides\" }, { \"type\": \"press\", \"key\": \"Enter\" }, { \"type\": \"scroll\", \"direction\": \"down\" } (also up, left or right; amount is pixels, \"viewport\" or \"max\"; maxScrolls 1 to 50; selector scrolls an inner container; \"max\" keeps scrolling until the page stops growing, for feeds that load as you go), { \"type\": \"screenshot\", \"fullPage\": true } (links come back in actions.screenshots), { \"type\": \"scrape\" } (the page at that point, in actions.scrapes), { \"type\": \"executeJavascript\", \"script\": \"document.title\" } (results in actions.javascriptReturns), { \"type\": \"pdf\", \"format\": \"A4\" } (links in actions.pdfs) or { \"type\": \"perform\", \"action\": \"Click the Load more button\" } (a step in plain words, up to 5 browser steps on this page, never leaving the site; at most 5 per call). A read with actions costs 1 credit, the same as any page; the actions themselves add nothing. If an action fails, you still get the page as it stood, with a warning that names the action and says why.","items":{"anyOf":[{"additionalProperties":false,"properties":{"milliseconds":{"maximum":30000,"minimum":1,"type":"integer"},"type":{"const":"wait","type":"string"}},"required":["type","milliseconds"],"type":"object"},{"additionalProperties":false,"properties":{"selector":{"minLength":1,"type":"string"},"type":{"const":"wait","type":"string"}},"required":["type","selector"],"type":"object"},{"additionalProperties":false,"properties":{"all":{"const":false,"type":"boolean"},"selector":{"minLength":1,"type":"string"},"type":{"const":"click","type":"string"}},"required":["type","selector"],"type":"object"},{"additionalProperties":false,"properties":{"text":{"minLength":1,"type":"string"},"type":{"const":"write","type":"string"}},"required":["type","text"],"type":"object"},{"additionalProperties":false,"properties":{"key":{"maxLength":40,"minLength":1,"type":"string"},"type":{"const":"press","type":"string"}},"required":["type","key"],"type":"object"},{"additionalProperties":false,"properties":{"amount":{"anyOf":[{"maximum":100000,"minimum":1,"type":"integer"},{"enum":["viewport","max"],"type":"string"}]},"direction":{"default":"down","enum":["up","down","left","right"],"type":"string"},"maxScrolls":{"maximum":50,"minimum":1,"type":"integer"},"selector":{"minLength":1,"type":"string"},"type":{"const":"scroll","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"fullPage":{"type":"boolean"},"quality":{"maximum":100,"minimum":1,"type":"integer"},"type":{"const":"screenshot","type":"string"},"viewport":{"additionalProperties":false,"properties":{"height":{"maximum":2160,"minimum":200,"type":"integer"},"width":{"maximum":3840,"minimum":200,"type":"integer"}},"required":["width","height"],"type":"object"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"type":{"const":"scrape","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"script":{"maxLength":20000,"minLength":1,"type":"string"},"type":{"const":"executeJavascript","type":"string"}},"required":["type","script"],"type":"object"},{"additionalProperties":false,"properties":{"format":{"enum":["Letter","Legal","Tabloid","Ledger","A0","A1","A2","A3","A4","A5","A6"],"type":"string"},"landscape":{"type":"boolean"},"scale":{"maximum":2,"minimum":0.1,"type":"number"},"type":{"const":"pdf","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"action":{"maxLength":500,"minLength":1,"type":"string"},"type":{"const":"perform","type":"string"}},"required":["type","action"],"type":"object"}]},"maxItems":50,"minItems":1,"type":"array"},"alexandria":{"not":{}},"auditMetadata":{"not":{}},"blockAds":{"description":"Ads and trackers are not loaded when a page runs in a browser. Send false to load them.","type":"boolean"},"checkPromptInjection":{"description":"Send true to scan the page text for instructions aimed at an AI model before anything is built from it. A page that has them is refused with 403 promptInjectionDetected and costs nothing. The scan adds 4 credits when it runs; a page it cannot scan fully comes back with a warning and no charge.","type":"boolean"},"domainTools":{"const":false,"type":"boolean"},"excludeTags":{"description":"Remove the parts of the page that match these CSS selectors, such as .comments.","items":{"minLength":1,"type":"string"},"minItems":1,"type":"array"},"fastMode":{"description":"Send true to read the page without opening a browser: the answer comes sooner, but a page that needs a browser, or that refuses a plain request, comes back as an error instead of being retried. Ignored when the call needs a browser (actions, screenshot, waitFor, mobile, profile, network, branding).","type":"boolean"},"formats":{"default":["markdown"],"description":"What to return: markdown (clean page text), summary (a short summary of the page), html (the cleaned page), rawHtml (the page as sent), audio and video (for a YouTube link: the audio track as an M4A file, or the video as an MP4 file, as a link that works for 1 hour), rawBase64 (the bytes the site sent, Base64 encoded, from a live read; metadata.contentType says what they are), links (every link on the page), images (every image address), screenshot (a link to a JPEG of the visible page, kept for 7 days), changeTracking (what changed in the markdown since your key last read this page with the same options, kept 30 days; add modes [\"git-diff\",\"json\"] with a schema or prompt to compare fields too), question (send { \"type\": \"question\", \"question\": \"...\" } to get answer, null when the page does not state one), product (title, brand, category, url, description and variants with price, sale, availability and images, or null) and menu (merchant, currency and sections of items with prices, or null) network (the JSON the page loaded while it rendered, up to 30 responses) and branding (the page's colors, fonts, typography, spacing, button and input styles, logo and brand images, read from how the page looks, with a field left out when the page does not show it). Send { \"type\": \"screenshot\", \"fullPage\": true } for the whole page. Send { \"type\": \"highlights\", \"query\": \"refund policy\" } for the passages that best match a query. Send { \"type\": \"json\", \"schema\": { \"type\": \"object\", \"properties\": { \"price\": { \"type\": \"number\" } } } } or { \"type\": \"json\", \"prompt\": \"the price and the stock\" } for fields filled from the page, each checked against it. Send { \"type\": \"json\", \"parser\": \"amazon-product\" } to get a site's own data as json instead of reading the page; GET /v1/parsers lists the parsers. Send { \"type\": \"json\", \"rules\": { \"title\": \"h1\", \"links\": { \"selector\": \"a\", \"type\": \"list\", \"output\": \"@href\" } } } to read the page with CSS rules and no model, at the page's own price. Send { \"type\": \"attributes\", \"selectors\": [{ \"selector\": \"a\", \"attribute\": \"href\" }] } for attribute values, returned in attributes. Without a parser or rules, json needs a schema or a prompt and is filled from the page. json with a schema or a prompt, summary, highlights, question, product, menu and changeTracking in json mode cost 4 credits more each when they return something. json with rules or a parser, and attributes, cost nothing more. A screenshot, network or branding read costs 1 credit, the same as any page. A PDF comes back as markdown only, and costs 1 credit more for each page read.","items":{"anyOf":[{"enum":["markdown","summary","html","rawHtml","rawBase64","links","images","network","branding","audio","video","screenshot","changeTracking","product","menu"],"type":"string"},{"additionalProperties":false,"properties":{"type":{"enum":["markdown","summary","html","rawHtml","rawBase64","links","images","network","branding","audio","video"],"type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"modes":{"description":"git-diff returns a unified diff of the markdown. json compares the fields in schema or prompt between this read and the last one. Without modes you get git-diff.","items":{"enum":["git-diff","json"],"type":"string"},"maxItems":2,"type":"array"},"prompt":{"description":"With json mode: what to compare, in plain words, such as the price and stock.","maxLength":10000,"minLength":1,"type":"string"},"schema":{"additionalProperties":{"$ref":"#/definitions/__schema0"},"description":"The fields to fill, as a JSON Schema (draft-07 or 2020-12) object with properties. Pydantic's model_json_schema() and zod's toJSONSchema() output work as they are. enum, const, anyOf, oneOf, nullable types, $ref with $defs, required, descriptions and any key names are read. Up to 100 top-level fields and 32 KB. A field the page does not state comes back null.","propertyNames":{"type":"string"},"type":"object"},"tag":{"type":"null"},"type":{"const":"changeTracking","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"question":{"description":"A question to answer from the page, such as what the refund window is.","maxLength":10000,"minLength":1,"type":"string"},"type":{"const":"question","type":"string"}},"required":["type","question"],"type":"object"},{"additionalProperties":false,"properties":{"type":{"const":"product","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"type":{"const":"menu","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"fullPage":{"default":false,"description":"Capture the whole page from top to bottom instead of the visible part.","type":"boolean"},"quality":{"description":"JPEG quality from 1 to 100. The default is 70.","maximum":100,"minimum":1,"type":"integer"},"type":{"const":"screenshot","type":"string"},"viewport":{"additionalProperties":false,"description":"The window size in pixels, such as { width: 390, height: 844 }.","properties":{"height":{"maximum":2160,"minimum":200,"type":"integer"},"width":{"maximum":3840,"minimum":200,"type":"integer"}},"required":["width","height"],"type":"object"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"count":{"default":5,"description":"How many passages to return, best match first.","maximum":20,"minimum":1,"type":"integer"},"query":{"description":"What you are looking for on the page, such as refund policy.","maxLength":10000,"minLength":1,"type":"string"},"type":{"const":"highlights","type":"string"}},"required":["type","query"],"type":"object"},{"additionalProperties":false,"properties":{"checkPromptInjection":{"description":"Deprecated: send checkPromptInjection at the top level of the call.","type":"boolean"},"options":{"additionalProperties":{"$ref":"#/definitions/__schema1"},"description":"Only with parser: extra inputs for it, such as { \"page\": 2 } for the next page of results or { \"minRating\": 4.5 } for a filter. GET /v1/parsers lists what each parser accepts.","propertyNames":{"type":"string"},"type":"object"},"parser":{"description":"Read the page with a named parser, which gives the site's own data as json. The url must be the kind of page the parser reads. Parsers are the only way to read some sites. GET /v1/parsers lists them.","type":"string"},"prompt":{"description":"What to pull from the page in plain words, such as the version and the release date.","maxLength":10000,"minLength":1,"type":"string"},"rules":{"additionalProperties":{"$ref":"#/definitions/__schema2"},"description":"Read the page with CSS rules instead of a model, no extra fee. Each field is a selector such as \"h1\" (the first match's text), \"a@href\" (an attribute) or { \"selector\": \"li\", \"type\": \"list\", \"output\": \"text\" | \"html\" | \"@attribute\" | { nested fields } }. A missing item is null and an unmatched list is []. Relative links become absolute. Up to 100 fields, 5 levels deep. Not with schema, prompt or parser.","propertyNames":{"type":"string"},"type":"object"},"schema":{"additionalProperties":{"$ref":"#/definitions/__schema0"},"description":"The fields to fill, as a JSON Schema (draft-07 or 2020-12) object with properties. Pydantic's model_json_schema() and zod's toJSONSchema() output work as they are. enum, const, anyOf, oneOf, nullable types, $ref with $defs, required, descriptions and any key names are read. Up to 100 top-level fields and 32 KB. A field the page does not state comes back null.","propertyNames":{"type":"string"},"type":"object"},"type":{"const":"json","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"selectors":{"description":"The elements and attributes to read, such as { selector: 'a.buy', attribute: 'href' }.","items":{"additionalProperties":false,"properties":{"attribute":{"maxLength":100,"minLength":1,"type":"string"},"selector":{"minLength":1,"type":"string"}},"required":["selector","attribute"],"type":"object"},"maxItems":50,"minItems":1,"type":"array"},"type":{"const":"attributes","type":"string"}},"required":["type","selectors"],"type":"object"}]},"maxItems":20,"minItems":1,"type":"array"},"headers":{"additionalProperties":{"maxLength":2000,"pattern":"^[\\t\\x20-\\x7e]*$","type":"string"},"description":"Extra request headers to send to the site, such as { \"x-plan\": \"pro\" }. A read with headers is never answered from or saved to a stored copy.","propertyNames":{"pattern":"^[A-Za-z0-9-]{1,64}$","type":"string"},"type":"object"},"ignoreRobotsTxt":{"const":false,"type":"boolean"},"includeTags":{"description":"Keep only the parts of the page that match these CSS selectors, such as article or .price. When set, onlyMainContent is not applied.","items":{"minLength":1,"type":"string"},"minItems":1,"type":"array"},"location":{"additionalProperties":false,"description":"Where to read the page from. The default is the United States.","properties":{"country":{"description":"Two-letter country code to read the page from, such as DE or JP.","type":"string"},"languages":{"description":"Languages to ask the site for, best first, such as [\"de\", \"en\"]. Sent as Accept-Language. A read with languages is never answered from or saved to a stored copy.","items":{"pattern":"^[A-Za-z]{2,3}(?:-[A-Za-z0-9]{2,8})*$","type":"string"},"maxItems":5,"minItems":1,"type":"array"}},"type":"object"},"lockdown":{"description":"Send true to answer only from a stored copy of the page and never read it live, whatever its age. A page with no stored copy is notFound. The same as minAge 0.","type":"boolean"},"maxAge":{"description":"Accept a stored answer up to this many milliseconds old, at most 30 days. Without it, 2 days, or less for a site whose pages change often, and a copy up to twice that age (at most 7 days) comes back at once as stale while a fresh read runs. 0 always reads the page live. metadata.cacheState says which one you got.","maximum":9007199254740991,"minimum":0,"type":"integer"},"minAge":{"description":"Answer only from a stored copy that is at least this many milliseconds old, and never read the page live. 0 accepts any stored copy. A page with no such copy is notFound.","maximum":9007199254740991,"minimum":0,"type":"integer"},"mobile":{"description":"Read the page as a phone would: a phone-sized screen and the mobile version of the site. The page loads in a browser.","type":"boolean"},"onlyCleanContent":{"description":"Send true to have a model remove what onlyMainContent leaves behind in the markdown: cookie banners, ads, share widgets, breadcrumbs, sign-up prompts, comment prompts and related-article lists. It only removes whole paragraphs and lists; it never rewrites or adds text, and code blocks are always kept. Skipped with a warning when the page is too long to clean or the model does not answer. Not with zeroDataRetention. Summary, answers and highlights are made from the cleaned markdown.","type":"boolean"},"onlyMainContent":{"default":true,"description":"Keep only the page's main content, without menus, headers, footers and ads.","type":"boolean"},"parsers":{"description":"Only the pdf parser exists. Send \"pdf\" or { \"type\": \"pdf\", mode, maxPages, pages, blocks, pageMarkers } with the same meaning as in parse. Without mode a PDF is read from its text layer only; auto reads the picture of a page that has no text, and ocr reads the picture of every page, up to 20 pages. Each page read costs 1 credit.","items":{"anyOf":[{"const":"pdf","type":"string"},{"additionalProperties":false,"properties":{"blocks":{"description":"Send true to also get the page's layout in blocks: each title, section header or run of text, with its page, reading order, position on the page (bbox as left, top, right, bottom from 0 to 1) and where its text sits in that page's markdown (span, as in pages). Tables, figures and formulas are not told apart. A page read from its picture is one block. No extra charge.","type":"boolean"},"maxPages":{"description":"Read at most this many pages, up to 100.","maximum":100,"minimum":1,"type":"integer"},"mode":{"description":"fast reads the text layer only. auto (the default) reads the text layer and reads the picture of any page that has none. ocr reads the picture of every page.","enum":["fast","auto","ocr"],"type":"string"},"pageMarkers":{"description":"Send true to mark page breaks in the markdown: pages are joined with \"---\" and a line, where N is the page that follows. No extra charge.","type":"boolean"},"pages":{"description":"Send true to also get each page's markdown in pages, as { pageNumber, markdown }. No extra charge.","type":"boolean"},"type":{"const":"pdf","type":"string"}},"required":["type"],"type":"object"}]},"minItems":1,"type":"array"},"profile":{"additionalProperties":false,"description":"Read the page with the cookies and local storage that earlier calls saved under this name, kept for your account for 30 days after the last use. A call with a profile always loads the page in a browser, costs 1 credit, the same as any page, and is never answered from a stored copy. Only one call at a time can save to a profile.","properties":{"name":{"description":"A name you choose, such as shop-login. Calls with the same name share state.","maxLength":128,"minLength":1,"type":"string"},"saveChanges":{"default":true,"description":"Keep the cookies and local storage this read leaves behind for the next call with this name. Send false to read with the profile without changing it.","type":"boolean"}},"required":["name"],"type":"object"},"proxy":{"description":"auto: basic first, enhanced once if the site refuses. basic: one plain attempt. enhanced: the stronger read from the start. Same price.","enum":["auto","basic","enhanced"],"type":"string"},"redactPII":{"anyOf":[{"type":"boolean"},{"additionalProperties":false,"description":"Options for redactPII.","properties":{"entities":{"default":["PERSON","EMAIL","PHONE","LOCATION","FINANCIAL","SECRET"],"description":"What to hide: PERSON, EMAIL, PHONE, LOCATION, FINANCIAL, SECRET. All by default.","items":{"enum":["PERSON","EMAIL","PHONE","LOCATION","FINANCIAL","SECRET"],"type":"string"},"minItems":1,"type":"array"},"mode":{"default":"accurate","description":"accurate finds names and places with the model and the rest by pattern. aggressive adds guesses that catch more and may hide a little too much. fast uses patterns only, so it finds no ordinary names or places.","enum":["accurate","aggressive","fast"],"type":"string"},"replaceStyle":{"default":"tag","description":"tag writes <EMAIL>, mask writes * for each character, remove deletes it.","enum":["tag","mask","remove"],"type":"string"}},"type":"object"}],"description":"Send true, or an object, to hide personal data in the markdown and in everything made from it (summary, answers, highlights, json). Links, html and rawHtml are not changed. A page the model cannot scan is refused rather than returned unredacted."},"removeBase64Images":{"description":"Images inside the page that carry their data in the address (data:image) are dropped by default. Send false to keep them in markdown and html.","type":"boolean"},"robotsUserAgent":{"not":{}},"skipTlsVerification":{"description":"Send true to read a page whose certificate is expired, self-signed or for another name. The read is not private against someone between us and the site.","type":"boolean"},"storeInCache":{"default":true,"description":"Send false to neither read nor keep a stored copy of this page.","type":"boolean"},"threatProtection":{"not":{}},"timeout":{"description":"How long to keep trying, in milliseconds, between 10 seconds and 2 minutes. Pages behind a bot check can need 10 to 30 seconds the first time.","maximum":300000,"minimum":1000,"type":"integer"},"toolDetail":{"not":{}},"waitFor":{"description":"Extra milliseconds to wait before reading, up to 60000, for pages that load their content late. To wait for an element, add a wait action with a selector. A read that waits costs 1 credit, the same as any page.","maximum":60000,"minimum":0,"type":"integer"},"zeroDataRetention":{"default":false,"description":"Send true to keep nothing from this call: no stored copy is read or made, and nothing from it is logged. Costs 1 credit more per page. Not with a screenshot.","type":"boolean"}},"type":"object"},"sitemap":{"default":"include","description":"include also uses the site's sitemaps. only reads just the pages the sitemaps name. skip ignores them.","enum":["skip","include","only"],"type":"string"},"threatProtection":{"not":{}},"url":{"description":"The page to start from, such as https://bun.com/docs.","type":"string"},"webhook":{"anyOf":[{"type":"string"},{"additionalProperties":false,"properties":{"events":{"items":{"enum":["started","page","action","completed","failed","cancelled"],"type":"string"},"minItems":1,"type":"array"},"headers":{"additionalProperties":{"maxLength":1000,"type":"string"},"propertyNames":{"pattern":"^[A-Za-z0-9-]{1,64}$","type":"string"},"type":"object"},"metadata":{"additionalProperties":{"$ref":"#/definitions/__schema0"},"propertyNames":{"type":"string"},"type":"object"},"url":{"type":"string"}},"required":["url"],"type":"object"}],"description":"Where to be told about the job: a plain address, or { url } which gets a JSON POST when the job starts, for each finished page, and when the job ends. headers are sent with every call, metadata comes back in every call, and events picks which of started, page, action, completed, failed and cancelled to send (all by default). An agent run sends action for each step it takes, and page too. Every call is signed: read Stophy-Signature (t=<unix seconds>,v1=<hex>), where v1 is the HMAC-SHA256 of \"<t>.<body>\" with your webhook secret from webhook.secret. A call that gets no 2xx is sent again, up to 3 times. If your address answers slowly, a page event can carry only the page url. Read that page with the status call."},"zeroDataRetention":{"default":false,"description":"Send true to keep nothing from this crawl: no stored copy is read or made, page results are held for one hour at most, and nothing is logged. Costs 1 credit more per page.","type":"boolean"}},"required":["url"],"type":"object"}Changed the definition of "stophy_search"
⟨3991 unchanged words⟩ Each is a string or {type}.The catalogue names alexandria and exchange are accepted and left out: they name a source we do not have.Default web, or none when categories asks for ⟨72 unchanged words⟩ tbs":{"description":"Time filter: qdr:h, qdr:d, qdr:w, qdr:m or qdr: ⟨8 unchanged words⟩ plus sbd:1, like sbd:1,qdr:w.qdr:h keeps only results known to be from the past hour, so the answer can be short or empty.sbd:1 sorts newest first; results without a ⟨88 unchanged words⟩
Changed the definition of "stophy_crawl" and "stophy_search"
⟨295 unchanged words⟩ :"Stop after reading this many pages intotal, across every call.total.","maximum":10000,"minimum":1,"type ⟨3555 unchanged words⟩
Search the web, news, images, scholarly papers, companies, people andpeoplegovernment documents in one call. 2 creditsper 10 results from each ...
Changed the definition of "stophy_extract"
before
{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"definitions":{"__schema0":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"items":{"allOf":[{"$ref":"#/definitions/__schema0"}]},"type":"array"},{"additionalProperties":{"allOf":[{"$ref":"#/definitions/__schema0"}]},"propertyNames":{"type":"string"},"type":"object"}]},"__schema1":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"items":{"allOf":[{"$ref":"#/definitions/__schema1"}]},"type":"array"},{"additionalProperties":{"allOf":[{"$ref":"#/definitions/__schema1"}]},"propertyNames":{"type":"string"},"type":"object"}]},"__schema2":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"items":{"allOf":[{"$ref":"#/definitions/__schema2"}]},"type":"array"},{"additionalProperties":{"allOf":[{"$ref":"#/definitions/__schema2"}]},"propertyNames":{"type":"string"},"type":"object"}]}},"properties":{"alexandria":{"not":{}},"auditMetadata":{"not":{}},"domainTools":{"const":false,"type":"boolean"},"enableWebSearch":{"default":false,"description":"Send true to also search the web for your prompt and read the best pages it finds, up to 3 more. Needs a prompt. Costs 2 credits for the search.","type":"boolean"},"ignoreInvalidURLs":{"default":true,"description":"Skip addresses that are not public website URLs. Send false to refuse the call instead.","type":"boolean"},"ignoreRobotsTxt":{"const":false,"type":"boolean"},"ignoreSitemap":{"default":false,"description":"For an address ending in /*: skip the site's sitemaps and find pages by links.","type":"boolean"},"includeSubdomains":{"default":false,"description":"For an address ending in /*: also read pages on subdomains of the site.","type":"boolean"},"prompt":{"description":"What to pull from the pages in plain words, such as the version and the release date.","maxLength":500,"minLength":1,"type":"string"},"robotsUserAgent":{"not":{}},"schema":{"additionalProperties":{"$ref":"#/definitions/__schema0"},"description":"The fields to fill, as a JSON Schema (draft-07 or 2020-12) object with properties. Pydantic's model_json_schema() and zod's toJSONSchema() output work as they are. enum, const, anyOf, oneOf, nullable types, $ref with $defs, required, descriptions and any key names are read. Up to 100 top-level fields and 32 KB. A field the page does not state comes back null.","propertyNames":{"type":"string"},"type":"object"},"scrapeOptions":{"additionalProperties":{},"description":"How to read each page, the same options as scrape.","properties":{"actions":{"description":"Up to 50 steps to run on the page, in order, before reading it: { \"type\": \"wait\", \"milliseconds\": 500 } (up to 30 seconds), { \"type\": \"wait\", \"selector\": \".results\" }, { \"type\": \"click\", \"selector\": \"button.more\" }, { \"type\": \"write\", \"text\": \"tides\" }, { \"type\": \"press\", \"key\": \"Enter\" }, { \"type\": \"scroll\", \"direction\": \"down\" } (also up, left or right; amount is pixels, \"viewport\" or \"max\"; maxScrolls 1 to 50; selector scrolls an inner container; \"max\" keeps scrolling until the page stops growing, for feeds that load as you go), { \"type\": \"screenshot\", \"fullPage\": true } (links come back in actions.screenshots), { \"type\": \"scrape\" } (the page at that point, in actions.scrapes), { \"type\": \"executeJavascript\", \"script\": \"document.title\" } (results in actions.javascriptReturns), { \"type\": \"pdf\", \"format\": \"A4\" } (links in actions.pdfs) or { \"type\": \"perform\", \"action\": \"Click the Load more button\" } (a step in plain words, up to 5 browser steps on this page, never leaving the site; at most 5 per call). A read with actions costs 1 credit, the same as any page; the actions themselves add nothing. If an action fails, you still get the page as it stood, with a warning that names the action and says why.","items":{"anyOf":[{"additionalProperties":false,"properties":{"milliseconds":{"maximum":30000,"minimum":1,"type":"integer"},"type":{"const":"wait","type":"string"}},"required":["type","milliseconds"],"type":"object"},{"additionalProperties":false,"properties":{"selector":{"minLength":1,"type":"string"},"type":{"const":"wait","type":"string"}},"required":["type","selector"],"type":"object"},{"additionalProperties":false,"properties":{"all":{"const":false,"type":"boolean"},"selector":{"minLength":1,"type":"string"},"type":{"const":"click","type":"string"}},"required":["type","selector"],"type":"object"},{"additionalProperties":false,"properties":{"text":{"minLength":1,"type":"string"},"type":{"const":"write","type":"string"}},"required":["type","text"],"type":"object"},{"additionalProperties":false,"properties":{"key":{"maxLength":40,"minLength":1,"type":"string"},"type":{"const":"press","type":"string"}},"required":["type","key"],"type":"object"},{"additionalProperties":false,"properties":{"amount":{"anyOf":[{"maximum":100000,"minimum":1,"type":"integer"},{"enum":["viewport","max"],"type":"string"}]},"direction":{"default":"down","enum":["up","down","left","right"],"type":"string"},"maxScrolls":{"maximum":50,"minimum":1,"type":"integer"},"selector":{"minLength":1,"type":"string"},"type":{"const":"scroll","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"fullPage":{"type":"boolean"},"quality":{"maximum":100,"minimum":1,"type":"integer"},"type":{"const":"screenshot","type":"string"},"viewport":{"additionalProperties":false,"properties":{"height":{"maximum":2160,"minimum":200,"type":"integer"},"width":{"maximum":3840,"minimum":200,"type":"integer"}},"required":["width","height"],"type":"object"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"type":{"const":"scrape","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"script":{"maxLength":20000,"minLength":1,"type":"string"},"type":{"const":"executeJavascript","type":"string"}},"required":["type","script"],"type":"object"},{"additionalProperties":false,"properties":{"format":{"enum":["Letter","Legal","Tabloid","Ledger","A0","A1","A2","A3","A4","A5","A6"],"type":"string"},"landscape":{"type":"boolean"},"scale":{"maximum":2,"minimum":0.1,"type":"number"},"type":{"const":"pdf","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"action":{"maxLength":500,"minLength":1,"type":"string"},"type":{"const":"perform","type":"string"}},"required":["type","action"],"type":"object"}]},"maxItems":50,"minItems":1,"type":"array"},"alexandria":{"not":{}},"auditMetadata":{"not":{}},"blockAds":{"description":"Ads and trackers are not loaded when a page runs in a browser. Send false to load them.","type":"boolean"},"checkPromptInjection":{"description":"Send true to scan the page text for instructions aimed at an AI model before anything is built from it. A page that has them is refused with 403 promptInjectionDetected and costs nothing. The scan adds 4 credits when it runs; a page it cannot scan fully comes back with a warning and no charge.","type":"boolean"},"domainTools":{"const":false,"type":"boolean"},"excludeTags":{"description":"Remove the parts of the page that match these CSS selectors, such as .comments.","items":{"minLength":1,"type":"string"},"minItems":1,"type":"array"},"fastMode":{"description":"Send true to read the page without opening a browser: the answer comes sooner, but a page that needs a browser, or that refuses a plain request, comes back as an error instead of being retried. Ignored when the call needs a browser (actions, screenshot, waitFor, mobile, profile, network, branding).","type":"boolean"},"formats":{"default":["markdown"],"description":"What to return: markdown (clean page text), summary (a short summary of the page), html (the cleaned page), rawHtml (the page as sent), audio and video (for a YouTube link: the audio track as an M4A file, or the video as an MP4 file, as a link that works for 1 hour), rawBase64 (the bytes the site sent, Base64 encoded, from a live read; metadata.contentType says what they are), links (every link on the page), images (every image address), screenshot (a link to a JPEG of the visible page, kept for 7 days), changeTracking (what changed in the markdown since your key last read this page with the same options, kept 30 days; add modes [\"git-diff\",\"json\"] with a schema or prompt to compare fields too), question (send { \"type\": \"question\", \"question\": \"...\" } to get answer, null when the page does not state one), product (title, brand, category, url, description and variants with price, sale, availability and images, or null) and menu (merchant, currency and sections of items with prices, or null) network (the JSON the page loaded while it rendered, up to 30 responses) and branding (the page's colors, fonts, typography, spacing, button and input styles, logo and brand images, read from how the page looks, with a field left out when the page does not show it). Send { \"type\": \"screenshot\", \"fullPage\": true } for the whole page. Send { \"type\": \"highlights\", \"query\": \"refund policy\" } for the passages that best match a query. Send { \"type\": \"json\", \"schema\": { \"type\": \"object\", \"properties\": { \"price\": { \"type\": \"number\" } } } } or { \"type\": \"json\", \"prompt\": \"the price and the stock\" } for fields filled from the page, each checked against it. Send { \"type\": \"json\", \"parser\": \"amazon-product\" } to get a site's own data as json instead of reading the page; GET /v1/parsers lists the parsers. Send { \"type\": \"json\", \"rules\": { \"title\": \"h1\", \"links\": { \"selector\": \"a\", \"type\": \"list\", \"output\": \"@href\" } } } to read the page with CSS rules and no model, at the page's own price. Send { \"type\": \"attributes\", \"selectors\": [{ \"selector\": \"a\", \"attribute\": \"href\" }] } for attribute values, returned in attributes. Without a parser or rules, json needs a schema or a prompt and is filled from the page. json with a schema or a prompt, summary, highlights, question, product, menu and changeTracking in json mode cost 4 credits more each when they return something. json with rules or a parser, and attributes, cost nothing more. A screenshot, network or branding read costs 1 credit, the same as any page. A PDF comes back as markdown only, and costs 1 credit more for each page read.","items":{"anyOf":[{"enum":["markdown","summary","html","rawHtml","rawBase64","links","images","network","branding","audio","video","screenshot","changeTracking","product","menu"],"type":"string"},{"additionalProperties":false,"properties":{"type":{"enum":["markdown","summary","html","rawHtml","rawBase64","links","images","network","branding","audio","video"],"type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"modes":{"description":"git-diff returns a unified diff of the markdown. json compares the fields in schema or prompt between this read and the last one. Without modes you get git-diff.","items":{"enum":["git-diff","json"],"type":"string"},"maxItems":2,"type":"array"},"prompt":{"description":"With json mode: what to compare, in plain words, such as the price and stock.","maxLength":10000,"minLength":1,"type":"string"},"schema":{"additionalProperties":{"$ref":"#/definitions/__schema0"},"description":"The fields to fill, as a JSON Schema (draft-07 or 2020-12) object with properties. Pydantic's model_json_schema() and zod's toJSONSchema() output work as they are. enum, const, anyOf, oneOf, nullable types, $ref with $defs, required, descriptions and any key names are read. Up to 100 top-level fields and 32 KB. A field the page does not state comes back null.","propertyNames":{"type":"string"},"type":"object"},"tag":{"type":"null"},"type":{"const":"changeTracking","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"question":{"description":"A question to answer from the page, such as what the refund window is.","maxLength":10000,"minLength":1,"type":"string"},"type":{"const":"question","type":"string"}},"required":["type","question"],"type":"object"},{"additionalProperties":false,"properties":{"type":{"const":"product","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"type":{"const":"menu","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"fullPage":{"default":false,"description":"Capture the whole page from top to bottom instead of the visible part.","type":"boolean"},"quality":{"description":"JPEG quality from 1 to 100. The default is 70.","maximum":100,"minimum":1,"type":"integer"},"type":{"const":"screenshot","type":"string"},"viewport":{"additionalProperties":false,"description":"The window size in pixels, such as { width: 390, height: 844 }.","properties":{"height":{"maximum":2160,"minimum":200,"type":"integer"},"width":{"maximum":3840,"minimum":200,"type":"integer"}},"required":["width","height"],"type":"object"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"count":{"default":5,"description":"How many passages to return, best match first.","maximum":20,"minimum":1,"type":"integer"},"query":{"description":"What you are looking for on the page, such as refund policy.","maxLength":10000,"minLength":1,"type":"string"},"type":{"const":"highlights","type":"string"}},"required":["type","query"],"type":"object"},{"additionalProperties":false,"properties":{"checkPromptInjection":{"description":"Deprecated: send checkPromptInjection at the top level of the call.","type":"boolean"},"options":{"additionalProperties":{"$ref":"#/definitions/__schema1"},"description":"Only with parser: extra inputs for it, such as { \"page\": 2 } for the next page of results or { \"minRating\": 4.5 } for a filter. GET /v1/parsers lists what each parser accepts.","propertyNames":{"type":"string"},"type":"object"},"parser":{"description":"Read the page with a named parser, which gives the site's own data as json. The url must be the kind of page the parser reads. Parsers are the only way to read some sites. GET /v1/parsers lists them.","type":"string"},"prompt":{"description":"What to pull from the page in plain words, such as the version and the release date.","maxLength":10000,"minLength":1,"type":"string"},"rules":{"additionalProperties":{"$ref":"#/definitions/__schema2"},"description":"Read the page with CSS rules instead of a model, no extra fee. Each field is a selector such as \"h1\" (the first match's text), \"a@href\" (an attribute) or { \"selector\": \"li\", \"type\": \"list\", \"output\": \"text\" | \"html\" | \"@attribute\" | { nested fields } }. A missing item is null and an unmatched list is []. Relative links become absolute. Up to 100 fields, 5 levels deep. Not with schema, prompt or parser.","propertyNames":{"type":"string"},"type":"object"},"schema":{"additionalProperties":{"$ref":"#/definitions/__schema0"},"description":"The fields to fill, as a JSON Schema (draft-07 or 2020-12) object with properties. Pydantic's model_json_schema() and zod's toJSONSchema() output work as they are. enum, const, anyOf, oneOf, nullable types, $ref with $defs, required, descriptions and any key names are read. Up to 100 top-level fields and 32 KB. A field the page does not state comes back null.","propertyNames":{"type":"string"},"type":"object"},"type":{"const":"json","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"selectors":{"description":"The elements and attributes to read, such as { selector: 'a.buy', attribute: 'href' }.","items":{"additionalProperties":false,"properties":{"attribute":{"maxLength":100,"minLength":1,"type":"string"},"selector":{"minLength":1,"type":"string"}},"required":["selector","attribute"],"type":"object"},"maxItems":50,"minItems":1,"type":"array"},"type":{"const":"attributes","type":"string"}},"required":["type","selectors"],"type":"object"}]},"maxItems":20,"minItems":1,"type":"array"},"headers":{"additionalProperties":{"maxLength":2000,"pattern":"^[\\t\\x20-\\x7e]*$","type":"string"},"description":"Extra request headers to send to the site, such as { \"x-plan\": \"pro\" }. A read with headers is never answered from or saved to a stored copy.","propertyNames":{"pattern":"^[A-Za-z0-9-]{1,64}$","type":"string"},"type":"object"},"ignoreRobotsTxt":{"const":false,"type":"boolean"},"includeTags":{"description":"Keep only the parts of the page that match these CSS selectors, such as article or .price. When set, onlyMainContent is not applied.","items":{"minLength":1,"type":"string"},"minItems":1,"type":"array"},"location":{"additionalProperties":false,"description":"Where to read the page from. The default is the United States.","properties":{"country":{"description":"Two-letter country code to read the page from, such as DE or JP.","type":"string"},"languages":{"description":"Languages to ask the site for, best first, such as [\"de\", \"en\"]. Sent as Accept-Language. A read with languages is never answered from or saved to a stored copy.","items":{"pattern":"^[A-Za-z]{2,3}(?:-[A-Za-z0-9]{2,8})*$","type":"string"},"maxItems":5,"minItems":1,"type":"array"}},"type":"object"},"lockdown":{"description":"Send true to answer only from a stored copy of the page and never read it live, whatever its age. A page with no stored copy is notFound. The same as minAge 0.","type":"boolean"},"maxAge":{"description":"Accept a stored answer up to this many milliseconds old, at most 30 days. Without it, 2 days, or less for a site whose pages change often, and a copy up to twice that age (at most 7 days) comes back at once as stale while a fresh read runs. 0 always reads the page live. metadata.cacheState says which one you got.","maximum":9007199254740991,"minimum":0,"type":"integer"},"minAge":{"description":"Answer only from a stored copy that is at least this many milliseconds old, and never read the page live. 0 accepts any stored copy. A page with no such copy is notFound.","maximum":9007199254740991,"minimum":0,"type":"integer"},"mobile":{"description":"Read the page as a phone would: a phone-sized screen and the mobile version of the site. The page loads in a browser.","type":"boolean"},"onlyCleanContent":{"description":"Send true to have a model remove what onlyMainContent leaves behind in the markdown: cookie banners, ads, share widgets, breadcrumbs, sign-up prompts, comment prompts and related-article lists. It only removes whole paragraphs and lists; it never rewrites or adds text, and code blocks are always kept. Skipped with a warning when the page is too long to clean or the model does not answer. Not with zeroDataRetention. Summary, answers and highlights are made from the cleaned markdown.","type":"boolean"},"onlyMainContent":{"default":true,"description":"Keep only the page's main content, without menus, headers, footers and ads.","type":"boolean"},"parsers":{"description":"Only the pdf parser exists. Send \"pdf\" or { \"type\": \"pdf\", mode, maxPages, pages, blocks, pageMarkers } with the same meaning as in parse. Without mode a PDF is read from its text layer only; auto reads the picture of a page that has no text, and ocr reads the picture of every page, up to 20 pages. Each page read costs 1 credit.","items":{"anyOf":[{"const":"pdf","type":"string"},{"additionalProperties":false,"properties":{"blocks":{"description":"Send true to also get the page's layout in blocks: each title, section header or run of text, with its page, reading order, position on the page (bbox as left, top, right, bottom from 0 to 1) and where its text sits in that page's markdown (span, as in pages). Tables, figures and formulas are not told apart. A page read from its picture is one block. No extra charge.","type":"boolean"},"maxPages":{"description":"Read at most this many pages, up to 100.","maximum":100,"minimum":1,"type":"integer"},"mode":{"description":"fast reads the text layer only. auto (the default) reads the text layer and reads the picture of any page that has none. ocr reads the picture of every page.","enum":["fast","auto","ocr"],"type":"string"},"pageMarkers":{"description":"Send true to mark page breaks in the markdown: pages are joined with \"---\" and a line, where N is the page that follows. No extra charge.","type":"boolean"},"pages":{"description":"Send true to also get each page's markdown in pages, as { pageNumber, markdown }. No extra charge.","type":"boolean"},"type":{"const":"pdf","type":"string"}},"required":["type"],"type":"object"}]},"minItems":1,"type":"array"},"profile":{"additionalProperties":false,"description":"Read the page with the cookies and local storage that earlier calls saved under this name, kept for your account for 30 days after the last use. A call with a profile always loads the page in a browser, costs 1 credit, the same as any page, and is never answered from a stored copy. Only one call at a time can save to a profile.","properties":{"name":{"description":"A name you choose, such as shop-login. Calls with the same name share state.","maxLength":128,"minLength":1,"type":"string"},"saveChanges":{"default":true,"description":"Keep the cookies and local storage this read leaves behind for the next call with this name. Send false to read with the profile without changing it.","type":"boolean"}},"required":["name"],"type":"object"},"proxy":{"description":"auto: basic first, enhanced once if the site refuses. basic: one plain attempt. enhanced: the stronger read from the start. Same price.","enum":["auto","basic","enhanced"],"type":"string"},"redactPII":{"anyOf":[{"type":"boolean"},{"additionalProperties":false,"description":"Options for redactPII.","properties":{"entities":{"default":["PERSON","EMAIL","PHONE","LOCATION","FINANCIAL","SECRET"],"description":"What to hide: PERSON, EMAIL, PHONE, LOCATION, FINANCIAL, SECRET. All by default.","items":{"enum":["PERSON","EMAIL","PHONE","LOCATION","FINANCIAL","SECRET"],"type":"string"},"minItems":1,"type":"array"},"mode":{"default":"accurate","description":"accurate finds names and places with the model and the rest by pattern. aggressive adds guesses that catch more and may hide a little too much. fast uses patterns only, so it finds no ordinary names or places.","enum":["accurate","aggressive","fast"],"type":"string"},"replaceStyle":{"default":"tag","description":"tag writes <EMAIL>, mask writes * for each character, remove deletes it.","enum":["tag","mask","remove"],"type":"string"}},"type":"object"}],"description":"Send true, or an object, to hide personal data in the markdown and in everything made from it (summary, answers, highlights, json). Links, html and rawHtml are not changed. A page the model cannot scan is refused rather than returned unredacted."},"removeBase64Images":{"description":"Images inside the page that carry their data in the address (data:image) are dropped by default. Send false to keep them in markdown and html.","type":"boolean"},"robotsUserAgent":{"not":{}},"skipTlsVerification":{"description":"Send true to read a page whose certificate is expired, self-signed or for another name. The read is not private against someone between us and the site.","type":"boolean"},"storeInCache":{"default":true,"description":"Send false to neither read nor keep a stored copy of this page.","type":"boolean"},"threatProtection":{"not":{}},"timeout":{"description":"How long to keep trying, in milliseconds, between 10 seconds and 2 minutes. Pages behind a bot check can need 10 to 30 seconds the first time.","maximum":300000,"minimum":1000,"type":"integer"},"toolDetail":{"not":{}},"waitFor":{"description":"Extra milliseconds to wait before reading, up to 60000, for pages that load their content late. To wait for an element, add a wait action with a selector. A read that waits costs 1 credit, the same as any page.","maximum":60000,"minimum":0,"type":"integer"},"zeroDataRetention":{"default":false,"description":"Send true to keep nothing from this call: no stored copy is read or made, and nothing from it is logged. Costs 1 credit more per page. Not with a screenshot.","type":"boolean"}},"type":"object"},"showSources":{"default":false,"description":"Send true to get sources: for each field, the pages that state its value.","type":"boolean"},"threatProtection":{"not":{}},"urls":{"default":[],"description":"The pages to read, up to 10, such as [\"https://bun.com/blog/bun-v1.3\"]. An address ending in /* reads pages under it, found through the site's sitemap. With more than one, the fields are filled from all of them together. A page that cannot be read is skipped and named in warning, and costs nothing. The call fails only when no page can be read.","items":{"maxLength":2048,"type":"string"},"maxItems":10,"type":"array"},"zeroDataRetention":{"default":false,"description":"Send true to keep nothing from this call: pages are read live, the result is held for one hour at most, and nothing is logged. Costs 1 credit more per page.","type":"boolean"}},"type":"object"}Changed the definition of "stophy_crawl", "stophy_extract", "stophy_scrape" and 1 more
⟨3194 unchanged words⟩ :"object"},"proxy":{"description":"Which route reads the page.autoand: basicstart with the cheapest route andfirst,moveenhanceduponcewhenif the site refuses.enhancedbasic:startsoneonplaina
Changed the definition of "stophy_crawl", "stophy_extract", "stophy_map" and 3 more
⟨7 unchanged words⟩ credit a page, however it is reached.json with a schemacheckPromptInjectionoraddsa4prompt,creditssummarywhenan...t...
before
{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"definitions":{"__schema0":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"items":{"allOf":[{"$ref":"#/definitions/__schema0"}]},"type":"array"},{"additionalProperties":{"allOf":[{"$ref":"#/definitions/__schema0"}]},"propertyNames":{"type":"string"},"type":"object"}]},"__schema1":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"items":{"allOf":[{"$ref":"#/definitions/__schema1"}]},"type":"array"},{"additionalProperties":{"allOf":[{"$ref":"#/definitions/__schema1"}]},"propertyNames":{"type":"string"},"type":"object"}]},"__schema2":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"items":{"allOf":[{"$ref":"#/definitions/__schema2"}]},"type":"array"},{"additionalProperties":{"allOf":[{"$ref":"#/definitions/__schema2"}]},"propertyNames":{"type":"string"},"type":"object"}]}},"properties":{"allowExternalLinks":{"const":false,"type":"boolean"},"allowSubdomains":{"default":false,"description":"Also read pages on subdomains, such as docs.bun.com for bun.com.","type":"boolean"},"crawlEntireDomain":{"default":false,"description":"Read the whole site, not only pages under the start page's path.","type":"boolean"},"delay":{"not":{}},"excludePaths":{"default":[],"description":"Skip pages whose path matches one of these regular expressions, such as tag/.*.","items":{"maxLength":200,"minLength":1,"type":"string"},"maxItems":100,"type":"array"},"ignoreQueryParameters":{"default":false,"description":"Treat addresses that differ only in their ?query part as one page.","type":"boolean"},"ignoreRobotsTxt":{"const":false,"type":"boolean"},"includePaths":{"default":[],"description":"Read only pages whose path matches one of these regular expressions, such as blog/.*.","items":{"maxLength":200,"minLength":1,"type":"string"},"maxItems":100,"type":"array"},"limit":{"default":10000,"description":"Stop after reading this many pages in total, across every call.","maximum":10000,"minimum":1,"type":"integer"},"maxConcurrency":{"not":{}},"maxDiscoveryDepth":{"default":3,"description":"How many links away from the start page to go, up to 10.","maximum":10,"minimum":0,"type":"integer"},"prompt":{"description":"What you are looking for, such as sqlite performance. Pages about it are read first, and the crawl stops once new pages stop mentioning it.","maxLength":1000,"minLength":1,"type":"string"},"regexOnFullURL":{"default":false,"description":"Match includePaths and excludePaths against the whole address, not only the path.","type":"boolean"},"robotsUserAgent":{"not":{}},"scrapeOptions":{"additionalProperties":{},"description":"How to read each page, the same options and formats as scrape. Without formats, each page comes back as markdown.","properties":{"actions":{"description":"Up to 50 steps to run on the page, in order, before reading it: { \"type\": \"wait\", \"milliseconds\": 500 } (up to 30 seconds), { \"type\": \"wait\", \"selector\": \".results\" }, { \"type\": \"click\", \"selector\": \"button.more\" }, { \"type\": \"write\", \"text\": \"tides\" }, { \"type\": \"press\", \"key\": \"Enter\" }, { \"type\": \"scroll\", \"direction\": \"down\" } (also up, left or right; amount is pixels, \"viewport\" or \"max\"; maxScrolls 1 to 50; selector scrolls an inner container; \"max\" keeps scrolling until the page stops growing, for feeds that load as you go), { \"type\": \"screenshot\", \"fullPage\": true } (links come back in actions.screenshots), { \"type\": \"scrape\" } (the page at that point, in actions.scrapes), { \"type\": \"executeJavascript\", \"script\": \"document.title\" } (results in actions.javascriptReturns), { \"type\": \"pdf\", \"format\": \"A4\" } (links in actions.pdfs) or { \"type\": \"perform\", \"action\": \"Click the Load more button\" } (a step in plain words, up to 5 browser steps on this page, never leaving the site; at most 5 per call). A read with actions costs 1 credit, the same as any page, and each perform action costs 2 credits more. If an action fails, you still get the page as it stood, with a warning that names the action and says why.","items":{"anyOf":[{"additionalProperties":false,"properties":{"milliseconds":{"maximum":30000,"minimum":1,"type":"integer"},"type":{"const":"wait","type":"string"}},"required":["type","milliseconds"],"type":"object"},{"additionalProperties":false,"properties":{"selector":{"minLength":1,"type":"string"},"type":{"const":"wait","type":"string"}},"required":["type","selector"],"type":"object"},{"additionalProperties":false,"properties":{"all":{"const":false,"type":"boolean"},"selector":{"minLength":1,"type":"string"},"type":{"const":"click","type":"string"}},"required":["type","selector"],"type":"object"},{"additionalProperties":false,"properties":{"text":{"minLength":1,"type":"string"},"type":{"const":"write","type":"string"}},"required":["type","text"],"type":"object"},{"additionalProperties":false,"properties":{"key":{"maxLength":40,"minLength":1,"type":"string"},"type":{"const":"press","type":"string"}},"required":["type","key"],"type":"object"},{"additionalProperties":false,"properties":{"amount":{"anyOf":[{"maximum":100000,"minimum":1,"type":"integer"},{"enum":["viewport","max"],"type":"string"}]},"direction":{"default":"down","enum":["up","down","left","right"],"type":"string"},"maxScrolls":{"maximum":50,"minimum":1,"type":"integer"},"selector":{"minLength":1,"type":"string"},"type":{"const":"scroll","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"fullPage":{"type":"boolean"},"quality":{"maximum":100,"minimum":1,"type":"integer"},"type":{"const":"screenshot","type":"string"},"viewport":{"additionalProperties":false,"properties":{"height":{"maximum":2160,"minimum":200,"type":"integer"},"width":{"maximum":3840,"minimum":200,"type":"integer"}},"required":["width","height"],"type":"object"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"type":{"const":"scrape","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"script":{"maxLength":20000,"minLength":1,"type":"string"},"type":{"const":"executeJavascript","type":"string"}},"required":["type","script"],"type":"object"},{"additionalProperties":false,"properties":{"format":{"enum":["Letter","Legal","Tabloid","Ledger","A0","A1","A2","A3","A4","A5","A6"],"type":"string"},"landscape":{"type":"boolean"},"scale":{"maximum":2,"minimum":0.1,"type":"number"},"type":{"const":"pdf","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"action":{"maxLength":500,"minLength":1,"type":"string"},"type":{"const":"perform","type":"string"}},"required":["type","action"],"type":"object"}]},"maxItems":50,"minItems":1,"type":"array"},"alexandria":{"not":{}},"auditMetadata":{"not":{}},"blockAds":{"const":true,"type":"boolean"},"checkPromptInjection":{"const":false,"type":"boolean"},"domainTools":{"const":false,"type":"boolean"},"excludeTags":{"description":"Remove the parts of the page that match these CSS selectors, such as .comments.","items":{"minLength":1,"type":"string"},"minItems":1,"type":"array"},"formats":{"default":["markdown"],"description":"What to return: markdown (clean page text), summary (a short summary of the page), html (the cleaned page), rawHtml (the page as sent), links (every link on the page), images (every image address), screenshot (a link to a JPEG of the visible page, kept for 7 days), changeTracking (what changed in the markdown since your key last read this page with the same options, kept 30 days) network (the JSON the page loaded while it rendered, up to 30 responses) and branding (the page's colors, fonts, typography, spacing, button and input styles, logo and brand images, read from how the page looks, with a field left out when the page does not show it). Send { \"type\": \"screenshot\", \"fullPage\": true } for the whole page. Send { \"type\": \"highlights\", \"query\": \"refund policy\" } for the passages that best match a query. Send { \"type\": \"json\", \"schema\": { \"type\": \"object\", \"properties\": { \"price\": { \"type\": \"number\" } } } } or { \"type\": \"json\", \"prompt\": \"the price and the stock\" } for fields filled from the page, each checked against it. Send { \"type\": \"json\", \"parser\": \"amazon-product\" } to get a site's own data as json instead of reading the page; GET /v1/parsers lists the parsers. Send { \"type\": \"json\", \"rules\": { \"title\": \"h1\", \"links\": { \"selector\": \"a\", \"type\": \"list\", \"output\": \"@href\" } } } to read the page with CSS rules and no model, at the page's own price. Send { \"type\": \"attributes\", \"selectors\": [{ \"selector\": \"a\", \"attribute\": \"href\" }] } for attribute values, returned in attributes. Without a parser or rules, json needs a schema or a prompt and is filled from the page. json with a schema or a prompt, summary and highlights cost 4 credits more each when they return something. json with rules or a parser, and attributes, cost nothing more. A screenshot, network or branding read costs 1 credit, the same as any page. A PDF comes back as markdown only, and costs 1 credit more for each page read.","items":{"anyOf":[{"enum":["markdown","summary","html","rawHtml","links","images","network","branding","screenshot","changeTracking"],"type":"string"},{"additionalProperties":false,"properties":{"type":{"enum":["markdown","summary","html","rawHtml","links","images","network","branding"],"type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"modes":{"items":{"const":"git-diff","type":"string"},"type":"array"},"prompt":{"not":{}},"schema":{"not":{}},"tag":{"type":"null"},"type":{"const":"changeTracking","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"fullPage":{"default":false,"description":"Capture the whole page from top to bottom instead of the visible part.","type":"boolean"},"quality":{"description":"JPEG quality from 1 to 100. The default is 70.","maximum":100,"minimum":1,"type":"integer"},"type":{"const":"screenshot","type":"string"},"viewport":{"additionalProperties":false,"description":"The window size in pixels, such as { width: 390, height: 844 }.","properties":{"height":{"maximum":2160,"minimum":200,"type":"integer"},"width":{"maximum":3840,"minimum":200,"type":"integer"}},"required":["width","height"],"type":"object"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"count":{"default":5,"description":"How many passages to return, best match first.","maximum":20,"minimum":1,"type":"integer"},"query":{"description":"What you are looking for on the page, such as refund policy.","maxLength":10000,"minLength":1,"type":"string"},"type":{"const":"highlights","type":"string"}},"required":["type","query"],"type":"object"},{"additionalProperties":false,"properties":{"checkPromptInjection":{"const":false,"type":"boolean"},"options":{"additionalProperties":{"$ref":"#/definitions/__schema0"},"description":"Only with parser: extra inputs for it, such as { \"page\": 2 } for the next page of results or { \"minRating\": 4.5 } for a filter. GET /v1/parsers lists what each parser accepts.","propertyNames":{"type":"string"},"type":"object"},"parser":{"description":"Read the page with a named parser, which gives the site's own data as json. The url must be the kind of page the parser reads. Parsers are the only way to read some sites. GET /v1/parsers lists them.","type":"string"},"prompt":{"description":"What to pull from the page in plain words, such as the version and the release date.","maxLength":10000,"minLength":1,"type":"string"},"rules":{"additionalProperties":{"$ref":"#/definitions/__schema2"},"description":"Read the page with CSS rules instead of a model, no extra fee. Each field is a selector such as \"h1\" (the first match's text), \"a@href\" (an attribute) or { \"selector\": \"li\", \"type\": \"list\", \"output\": \"text\" | \"html\" | \"@attribute\" | { nested fields } }. A missing item is null and an unmatched list is []. Relative links become absolute. Up to 100 fields, 5 levels deep. Not with schema, prompt or parser.","propertyNames":{"type":"string"},"type":"object"},"schema":{"additionalProperties":{"$ref":"#/definitions/__schema1"},"description":"The fields to fill, as a JSON Schema (draft-07 or 2020-12) object with properties. Pydantic's model_json_schema() and zod's toJSONSchema() output work as they are. enum, const, anyOf, oneOf, nullable types, $ref with $defs, required, descriptions and any key names are read. Up to 100 top-level fields and 32 KB. A field the page does not state comes back null.","propertyNames":{"type":"string"},"type":"object"},"type":{"const":"json","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"selectors":{"description":"The elements and attributes to read, such as { selector: 'a.buy', attribute: 'href' }.","items":{"additionalProperties":false,"properties":{"attribute":{"maxLength":100,"minLength":1,"type":"string"},"selector":{"minLength":1,"type":"string"}},"required":["selector","attribute"],"type":"object"},"maxItems":50,"minItems":1,"type":"array"},"type":{"const":"attributes","type":"string"}},"required":["type","selectors"],"type":"object"}]},"maxItems":20,"minItems":1,"type":"array"},"headers":{"additionalProperties":{"maxLength":2000,"pattern":"^[\\t\\x20-\\x7e]*$","type":"string"},"description":"Extra request headers to send to the site, such as { \"x-plan\": \"pro\" }. A read with headers is never answered from or saved to a stored copy.","propertyNames":{"pattern":"^[A-Za-z0-9-]{1,64}$","type":"string"},"type":"object"},"includeTags":{"description":"Keep only the parts of the page that match these CSS selectors, such as article or .price. When set, onlyMainContent is not applied.","items":{"minLength":1,"type":"string"},"minItems":1,"type":"array"},"location":{"additionalProperties":false,"description":"Where to read the page from. The default is the United States.","properties":{"country":{"description":"Two-letter country code to read the page from, such as DE or JP.","type":"string"},"languages":{"description":"Languages to ask the site for, best first, such as [\"de\", \"en\"]. Sent as Accept-Language. A read with languages is never answered from or saved to a stored copy.","items":{"pattern":"^[A-Za-z]{2,3}(?:-[A-Za-z0-9]{2,8})*$","type":"string"},"maxItems":5,"minItems":1,"type":"array"}},"type":"object"},"lockdown":{"const":false,"type":"boolean"},"maxAge":{"description":"Accept a stored answer up to this many milliseconds old, at most 30 days. Without it, 2 days, or less for a site whose pages change often, and a copy up to twice that age (at most 7 days) comes back at once as stale while a fresh read runs. 0 always reads the page live. metadata.cacheState says which one you got.","maximum":9007199254740991,"minimum":0,"type":"integer"},"minAge":{"description":"Answer only from a stored copy that is at least this many milliseconds old, and never read the page live. 0 accepts any stored copy. A page with no such copy is notFound.","maximum":9007199254740991,"minimum":0,"type":"integer"},"mobile":{"description":"Read the page as a phone would: a phone-sized screen and the mobile version of the site. The page loads in a browser.","type":"boolean"},"onlyCleanContent":{"const":false,"type":"boolean"},"onlyMainContent":{"default":true,"description":"Keep only the page's main content, without menus, headers, footers and ads.","type":"boolean"},"parsers":{"description":"Only [\"pdf\"] is supported: PDFs are read as markdown.","items":{"anyOf":[{"const":"pdf","type":"string"},{"additionalProperties":false,"properties":{"blocks":{"const":false,"type":"boolean"},"maxPages":{"not":{}},"mode":{"const":"auto","type":"string"},"pageMarkers":{"const":false,"type":"boolean"},"pages":{"const":false,"type":"boolean"},"type":{"const":"pdf","type":"string"}},"required":["type"],"type":"object"}]},"minItems":1,"type":"array"},"profile":{"additionalProperties":false,"description":"Read the page with the cookies and local storage that earlier calls saved under this name, kept for your account for 30 days after the last use. A call with a profile always loads the page in a browser, costs 1 credit, the same as any page, and is never answered from a stored copy. Only one call at a time can save to a profile.","properties":{"name":{"description":"A name you choose, such as shop-login. Calls with the same name share state.","maxLength":128,"minLength":1,"type":"string"},"saveChanges":{"default":true,"description":"Keep the cookies and local storage this read leaves behind for the next call with this name. Send false to read with the profile without changing it.","type":"boolean"}},"required":["name"],"type":"object"},"proxy":{"const":"auto","type":"string"},"redactPII":{"const":false,"type":"boolean"},"removeBase64Images":{"const":true,"type":"boolean"},"skipTlsVerification":{"const":false,"type":"boolean"},"storeInCache":{"default":true,"description":"Send false to neither read nor keep a stored copy of this page.","type":"boolean"},"threatProtection":{"not":{}},"timeout":{"description":"How long to keep trying, in milliseconds, between 10 seconds and 2 minutes. Pages behind a bot check can need 10 to 30 seconds the first time.","maximum":300000,"minimum":1000,"type":"integer"},"toolDetail":{"not":{}},"waitFor":{"description":"Extra milliseconds to wait before reading, up to 60000, for pages that load their content late. To wait for an element, add a wait action with a selector. A read that waits costs 1 credit, the same as any page.","maximum":60000,"minimum":0,"type":"integer"},"zeroDataRetention":{"default":false,"description":"Send true to keep nothing from this call: no stored copy is read or made, and nothing from it is logged. Costs 1 credit more per page. Not with a screenshot.","type":"boolean"}},"type":"object"},"sitemap":{"default":"include","description":"include also uses the site's sitemaps. only reads just the pages the sitemaps name. skip ignores them.","enum":["skip","include","only"],"type":"string"},"url":{"description":"The page to start from, such as https://bun.com/docs.","type":"string"},"webhook":{"additionalProperties":false,"description":"Where to be told about the job: { url } gets a JSON POST when the job starts, for each finished page, and when the job ends. headers are sent with every call, metadata comes back in every call, and events picks which of started, page, completed, failed and cancelled to send (all by default). Every call is signed: read Stophy-Signature (t=<unix seconds>,v1=<hex>), where v1 is the HMAC-SHA256 of \"<t>.<body>\" with your webhook secret from webhook.secret. A call that gets no 2xx is sent again, up to 4 times. If your address answers slowly, a page event can carry only the page url. Read that page with the status call.","properties":{"events":{"items":{"enum":["started","page","completed","failed","cancelled"],"type":"string"},"minItems":1,"type":"array"},"headers":{"additionalProperties":{"maxLength":1000,"type":"string"},"propertyNames":{"pattern":"^[A-Za-z0-9-]{1,64}$","type":"string"},"type":"object"},"metadata":{"additionalProperties":{"$ref":"#/definitions/__schema1"},"propertyNames":{"type":"string"},"type":"object"},"url":{"type":"string"}},"required":["url"],"type":"object"},"zeroDataRetention":{"default":false,"description":"Send true to keep nothing from this crawl: no stored copy is read or made, page results are held for one hour at most, and nothing is logged. Costs 1 credit more per page.","type":"boolean"}},"required":["url"],"type":"object"}Hidden text in 4 tools: HTML comments
Changed the definition of "stophy_crawl", "stophy_extract", "stophy_scrape" and 1 more
⟨7 unchanged words⟩ credit a page, however it is reached.Ajsonpagewiththatacannotschemabeorreadacostsprompt,nothing.summary...an...
Changed the definition of "stophy_crawl", "stophy_extract", "stophy_scrape" and 1 more
⟨1878 unchanged words⟩ or less for a site whose pages changeoften.often, and a copy up to twice that age (at most 7 days) comes back at once as stale while a fresh read runs. 0 always reads the page live. metadata.cacheState says ⟨578 unchanged words⟩
⟨9 unchanged words⟩ as JSON, each checked against the page.$0.015 credits for most pages: thepage'...
Changed the definition of "stophy_extract", "stophy_scrape" and "stophy_search"
⟨2251 unchanged words⟩ fields are filled from all of them together. A page that cannot be read is skipped and named in warning, and costs nothing. The call fails only when no page can be read.","items":{"maxLength":2048,"type" ⟨48 unchanged words⟩
⟨246 unchanged words⟩ craigslist-search, luma-events, luma-event, emails, phone-numbers, company, instagram-feed, tiktok-followers, tiktok-following. GET /v1/parsers lists what each one takes.
Added "stophy_crawl", "stophy_extract", "stophy_map" and 2 more; changed the definition of "stophy_call", "stophy_describe_endpoint" and "stophy_search_endpoints" (4 tools before, 9 now)
{"$schema":"http://json-schema.org/draft-07/schema#","examples":[{"fields":["titleurl","urltitle"],"id":"redditSearchmap","input":{"querylimit":20,"bun runtimeurl":"https://bun.com"}}],"properties":{"fields":{" ⟨101 unchanged words⟩
Added "stophy_signup" (3 tools before, 4 now)
Get a Stophy API key — Needs no key. Returns a claimUrl for your person to approve and a secret code. Call it again with the code to collect the key once they approve. Returns at once, so call again later.
Authorization required, Bearer, issuer https://api.stophy.dev/api/auth
Changed the definition of "stophy_call", "stophy_describe_endpoint" and "stophy_search_endpoints"
GetSendtheandataendpointfromidtheandendpointitsyouinput.chose,Returnswiththe data and what thecredits
Authorization required, Bearer, issuer https://api.stophy.dev/api/auth
Authorization required, Bearer, issuer https://api.stophy.dev/api/auth
Authorization required, Bearer, issuer https://api.stophy.dev/api/auth
Authorization required, Bearer, issuer https://api.stophy.dev/api/auth
Authorization required, Bearer, issuer https://api.stophy.dev/api/auth
Authorization required, Bearer, issuer https://api.stophy.dev/api/auth
Authorization required, Bearer, issuer https://api.stophy.dev/api/auth
Authorization required, Bearer, issuer https://api.stophy.dev/api/auth
Authorization required, Bearer, issuer https://api.stophy.dev/api/auth
Authorization required, Bearer, issuer https://api.stophy.dev/api/auth
Authorization required, Bearer, issuer https://api.stophy.dev/api/auth
Authorization required, Bearer, issuer https://api.stophy.dev/api/auth
Authorization required, Bearer, issuer https://api.stophy.dev/api/auth
Authorization required, Bearer, issuer https://api.stophy.dev/api/auth
Authorization required, Bearer, issuer https://api.stophy.dev/api/auth
Changed the definition of "stophy_call"
⟨87 unchanged words⟩ type":"string"},"type":"object"},"maxTextLength":{"description":"Cut each text value to this many characters. Omit it for full text.","maximum":9007199254740991,"minimum":1,"type":"integer"}},"required":["id"],"type":"object"}
Certificate recorded, valid to 2026-12-24
Authorization not required
Changed the definition of "stophy_search_endpoints"
⟨33 unchanged words⟩ as \"restaurant reviews in Austin\".","maxLength":200,"type":"string"}},"type":"object"}
Authorization required, Bearer, issuer https://api.stophy.dev/api/auth
Authorization required, Bearer, issuer https://api.stophy.dev/api/auth
Certificate recorded, valid to 2026-12-31
Authorization required, Bearer, issuer https://api.stophy.dev/api/auth
Changed the definition of "stophy_describe_endpoint" and "stophy_search_endpoints"
See what anOptional:endpointfullneedsinputs,itsfilterfiltersnotes,and what it returns,anbeforeexampleyouandcalloutputit.fields.
Changed the definition of "stophy_call", "stophy_describe_endpoint" and "stophy_search_endpoints"
Get the data from the endpoint youchose. Returns structured resultschose,andwith the credits used.
{"$schema":"http://json-schema.org/draft-07/schema#","definitions":{"__schema0":{"anyOfexamples":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"items":{"$reffields":["#/definitions/__schema0title"}
https://mcp.stophy.dev/mcp (mcp_streamable_http) — from mcp_registry
Authorization required, Bearer, issuer https://api.stophy.dev/api/auth
Changed the definition of "stophy_search_endpoints"
Use this first when the user wants live data from the web.Covers 40+Itsitescovers: web(search,news)·findYouTube,verifytranscripts) · social (Reddit,X,TikTok, Instagram,LinkedIn) · video (YouTubePinterest,transcriptsLinkedIn
Changed the definition of "stophy_call"
⟨77 unchanged words⟩ to each item, such as \"comments.author\". Every name must exist in that endpoint's output (see stophy_describe_endpoint); an unknown name is rejected rather than silently dropped.","items":{"minLength":1,"type" ⟨43 unchanged words⟩
Changed the definition of "stophy_call" and "stophy_search_endpoints"
⟨28 unchanged words⟩ fields":{"description":"Keep only these keyson each result row, such as [\"title\", \"url\"]. When the response has a results list, the keys apply to each row and other top-level keys such as cursor stay. Otherwise they apply to the response itself. Dot paths reach inside objects, and through lists to each item, such asauthor.name.\"comments.author\".","items":{"minLength":1,"type":"string"},"maxItems":50,"type":"array"},"format":{"description":"markdown (default) is a short preview. json returns the full data as text.","enum":["markdown","json"],"type":"string"},"id":{"description":"Endpoint id ⟨34 unchanged words⟩
Certificate recorded, valid to 2026-12-24
Authorization required, Bearer, issuer https://api.stophy.dev/api/auth
Unknown → Live
First tool surface recorded: 3 tools (server version 1.0.0)
https://api.stophy.dev/mcp-oauth (mcp_streamable_http) — from mcp_registry
https://api.stophy.dev/mcp (mcp_streamable_http) — from mcp_registry
Showing the latest 79 events. The API returns up to 500 and filters by kind: ?kind=tool_surface_changed
{"destructiveHint":false,"idempotentHint":true,"openWorldHint":true,"readOnlyHint":true,"title":"Web Parse"}
⟨66 unchanged words⟩ :"string"},"type":"array"},"fields":{"description":"Add details to the site answer.","items":{"type":"string"},"type":"array"},"formats":{"description":"What to return: ⟨9 unchanged words⟩ "anyOf":[{"enum":["markdown","json","summary","html","rawHtml","rawBase64"," ⟨10 unchanged words⟩ ,"type":"string"},{"description":"ObjectsFormat witha type: changeTracking (modes, schema, prompt, tag), questionoptions.(question),ForproductJSON,menu,usescreenshota(fullPage,schemaquality,orviewport),prompthighlightsto(query,extractcount)data,jsonor(parser,options,forschema,anotherprompt,viewrules,ofcheckPromptInjection),aattributesknown(selectors).site.","type":"object"}]},"maxItems" ⟨203 unchanged words⟩
{"properties":{"costUsd":{"type":"number"},"creditsUsed":{"type":"number"},"requestId":{"type":"string"},"success":{"const":true,"type":"boolean"}},"required":["creditsUsed","costUsd","requestId"],"type":"object"}
{"destructiveHint":false,"idempotentHint":true,"openWorldHint":true,"readOnlyHint":true,"title":"Web Scrape"}
{"destructiveHint":false,"idempotentHint":true,"openWorldHint":true,"readOnlyHint":true,"title":"Search"}
{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"deduplicateSimilarURLs":{"description":"Send false to list distinct addresses such as /docs/a, /docs/a/ and...","type":"boolean"},"ignoreCache":{"description":"Send true to build the list again instead of reusing one made in the...","type":"boolean"},"ignoreQueryParameters":{"description":"List each page once, without its ?query part.","type":"boolean"},"includeSubdomains":{"description":"Also list pages on subdomains, such as docs.bun.com for bun.com.","type":"boolean"},"limit":{"description":"The mostMost addressesto return, up to 100000.","maximum":100000,"minimum":1,"type":"integer"},"location":{"additionalProperties":false,"description":"Where to read the page from. The default is the United States.","properties":{"country":{"type":"string"},"languages":{"items":{"type":"string"},"maxItems":5,"minItems":1,"type":"array"}},"type":"object"},"search":{"description":"Keeponlyaddresses that mention these words, bestmatches first...","minLengthfirst.":1,"type":"string"},"sitemap":{"description":"includeuses the(default)site'suses sitemaps andits pages.links, onlylistsusesjustsitemaps,what...skip links.","enum":["skip","include","only"],"type":"string"},"timeout":{"description":"Stop looking after this many milliseconds and return what was found.","maximum":9007199254740991,"minimum":1000,"type":"integer"},"url":{"description":"Any page of thesite to map, such as https://bun.com.site.","type":"string"}},"required": ⟨3 unchanged words⟩
{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":{},"properties":{"costUsd":{"type":"number" ⟨17 unchanged words⟩
Free without authentication, within limits. The prices below apply to authenticated calls.Turn a PDF, Word, Excel, PowerPoint or HTML file, or a picture of text, into markdown.$0.50Alsopertakes1onlyMainContent,000pages or files whose text comes from a text layerincludeTags,and $2.50 per 1excludeTags,000pages orremoveBase64Images,pictureszeroDataRetention.readFreefromwithouttheirapicturekey,up to maxPages; summary andwithinjsonlimits; with aschema or a prompt addkey,$3$0.50 per 1,000each;pageszerowithdataaretentiontextaddslayer,$2$2.50 per 1,000calls. metadata.costUsd shows what thepagescallreadcostfrominadollars.picture.
{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"blockAds":{"description":"Ad blocking. Accepted so a client that always sends it works; a file..."},"excludeTags":{"description":"For an HTMLfile: drop what these CSS selectors match.","items":{"minLength":1,"type":"string"},"maxItems":50,"type":"array"},"fastMode":{"description":"Page-read speed. Accepted so a client that always sends it works; a..."},"file":{"description":"Thefile's bytesfile as base64, up to 36 MB:aPDF,a WordDOCX,.docxXLSX,an..."PPTX,"minLengthHTML or a picture.":1,"type":"string"},"filename":{"description":"The file'sIts name, such as report.docx.","maxLength":255,"minLength":1,"type":"string"},"formats":{"description":"What to
{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":{},"properties":{"costUsd":{"type":"number" ⟨17 unchanged words⟩
Free without authentication, within limits. The prices below apply to authenticated calls.Scrape any public web page as markdown, HTML, links, a screenshot or JSON.$1 per 1,000 pages, however they are reached. checkPromptInjection adds $2.50 per 1,000 pages when the scan runs, json with a schema or a prompt, summary, highlights, question, product, menu and changeTracking in json mode add $3 per 1,000 pages each when they return something. CSS rules and attributes add nothing. A named parser uses its own price. Any page read or other paid format you ask for is charged separately. A PDF adds $0.50 per 1,000 pages of text from its text layer and $2.50 per 1,000 pages of text read from its picture that come back, so a PDF read with maxChars, offset or query is charged for the share of its pages that it returns, at least 1 page. Browser actions add nothing. An answer from a stored copy within maxAge costs $1 per 1,000 pages like any page. An unreadable page costs nothing. The base page price is waived for a readable 404 or 410. zeroDataRetention adds $2 per 1,000 scraped URLs, not per PDF page. A page that comes back with an error status does not incur the zeroDataRetention surcharge. metadata.costUsd shows what the call cost in dollars. To pullFor fields from any page, send formats [{"type":"json","schema":{...}}] or [{"type":"json","prompt":"..."}];a schemaor apromptschema; this needs an API key.To getFor a site's own dataas JSON, sendthe site'sits page URL with formats [{"type":"json","parser":"<name>"}],where the parser is named for the siteand thething, as in amazon-product, and put extraparser's inputs, such as pageor filters, in options. Some sites can only be read this way. Parsersby site: google: maps, maps-place, maps-reviews, trends, ⟨137 unchanged words⟩ , post; link: in-bio; twitch: profile, clips. Also takes onlyCleanContent, minAge, headers, skipTlsVerification, removeBase64Images, blockAds, fastMode, storeInCache, lockdown, checkPromptInjection, redactPII, profile, zeroDataRetention. Free without a key, within limits; with a key, $1 per 1,000 pages; JSON, summaries and PDF text cost more, and a parser has its own price.
{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"actions":{"description":"Steps ⟨6 unchanged words⟩ reading it, in order.","items":{"additionalProperties":{},"description":"Objects with a type: wait ( ⟨23 unchanged words⟩ landscape, scale), perform (action).","properties":{},"type":"object"},"maxItems":50,"minItems":1,"type":"array"},"blockAds":{"description":"Ads and trackers are not loaded when a page runs in a browser.","type":"boolean"},"checkPromptInjection":{"description":"Send true to scan the page text for instructions aimed at an AI model... The scan adds $2.50 per 1,000 pages when it runs; a page it cannot scan fully comes back with a warning and no charge.","type":"boolean"},"excludeTags":{"description":"Remove the parts of the page that match theseCSS selectors to drop, suchas...as .comments.","items":{"minLength":1,"type":"string"},"minItems":1,"type":"array"},"fastMode":{"description":"Send true to read the page without opening a browser: the answer...","type":"boolean"},"formats":{"description":"What toreturn. Each entry is areturn:namenames, oran
{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":{},"properties":{"costUsd":{"type":"number" ⟨17 unchanged words⟩
Free without authentication, within limits. The prices below apply to authenticated calls.Search the web, news, images, scholarly papers and YouTube videos in one call.$0.001 per block of up to 10AlsoreturnedtakesresultsmaxAge,countedcountry,separatelylang,forsafe,eachtimeout,sourceignoreInvalidURLs.andFreeeachwithoutresearchaorkey,videoswithinlistlimits;($1withpera1key,000single-source searches returning 1$0.001toper 10 results).With scrapeOptions.formats, page reads and their add-ons use scrape pricing, startingfromateach$1source;perpages1,000itpagesreadsforcostaasstandardinread.stophy_scrape.
{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"categories":{"description":"pdf: web results that are PDF files., research:scholarly(papers,)inora...videos (YouTube).","items":{"anyOf":[{"enum" ⟨2 unchanged words⟩ "videos"],"type":"string"},{"additionalProperties":{},"properties":{},"type":"object"}]},"type":"array"},"country":{"description":"Two-letter country to search from, like us. uk is read as gb.","type":"string"},"excludeDomains":{"items":{"type":"string" ⟨3 unchanged words⟩ :"array"},"highlights":{"description":"Off by default. Withtrue,a web result whose page we alreadymakeshold...","type":"boolean"},"ignoreInvalidURLs":{"description":"Leaveout results
{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":{},"properties":{"costUsd":{"type":"number" ⟨17 unchanged words⟩
{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"code":{"description":"The ⟨17 unchanged words⟩
Free without authentication, within limits. The prices below apply to authenticated calls. Scrape any public web page as markdown, HTML ⟨52 unchanged words⟩ something. CSS rules and attributes add nothing. A named parser uses its own price. Any page read or other paid format you ask for is charged separately. A PDF adds $0.50 per 1,000 pages of ⟨57 unchanged words⟩ $1 per 1,000 pages like any page.AAnpageunreadablethatpagecomescostsbacknothing.withTheabase404pageorprice410isstatus,waivedorforcannotabereadableread,404costsornothing.410. zeroDataRetention adds $2 per 1,000 scraped URLs, not per PDFpage.page,costUsdonce per call, even for readable 404 or 410 pages. metadata.costUsd shows what the callcost.cost in dollars. To pull fields from any page, send ⟨223 unchanged words⟩
Free without authentication, within limits. The prices below apply to authenticated calls. Search the web, news, images, scholarly papers and YouTube videos in one call. $0.001forpereachblock of up to 10 returned results,fromcounted separately for each source and each research or videos list ($1 per 1,000 single-source searchesofreturningup1 to 10 results), plus $1.perWith1scrapeOptions.formats,000web or news results that comepagebackreadswithand theirpage text whenadd-onsscrapeOptionsusehasscrapeformatspricing,andstarting$3at $1 per 1,000morepages foreach summary or json withaschema or prompt that returnsstandardsomething.read.
⟨216 unchanged words⟩ and news result, as many as scrapeLimit...Costs whatWithscrapeformats,costspageforreadseachandpagetheirread:add-ons$1useperscrape1pricing,000pages,startingplusat$3$1 per 1,000 pages foreach summary or json with
⟨98 unchanged words⟩ },"lang":{"description":"Two-letter languagefor web resultspreference, like de.","type":"string"}, ⟨78 unchanged words⟩ when true.","type":"boolean"},"scrapeLimit":{"description":"With scrapeOptions formats: read only the top this many web results...","maximum":100,"minimum":1,"type":"integer"},"scrapeOptions":{"additionalProperties":{},"description":"With formats, reads each web and news result, as many aslimit asks...scrapeLimit... Costs what scrape costs for each page read ⟨187 unchanged words⟩
⟨7 unchanged words⟩ , HTML, links, a screenshot or JSON.$2$1 per 1,000 pages, however they are reached. checkPromptInjection adds$8$2.50 per 1,000 pages when the scan runs ⟨11 unchanged words⟩ , menu and changeTracking in json mode add$8$3 per 1,000 pages each when they return something. CSS rules and attributes add nothing. A PDF adds$2$0.50 per 1,000 pages of text from its text layer and $2.50 per 1,000 pages of text read from its picture that come back, so a PDF read with ⟨24 unchanged words⟩ answer from a stored copy within maxAge costs$2$1 per 1,000 pages like any page. A ⟨15 unchanged words⟩ nothing. creditsUsed shows what the call cost. To pull fields from any page, send formats [{"type":"json","schema":{...}}] or [{"type":"json","prompt":"..."}]; a schema or a prompt needs an API key. To get a site's own data as JSON, send ⟨6 unchanged words⟩ type":"json","parser":"<name>"}], where the parser is named for the site and the thing, as in amazon-product, and put extra inputs such as page or filters in options. Some sites can only be read this way. Parsers by site:google-maps,google:google-maps-placemaps,google-maps-reviewsmaps-place,google-trendsmaps-reviews,google-patentstrends,google-adspatents,google-flightsads,google-hotelsflights,google-play-apphotels,google-play-searchplay-app,google-play-reviewsplay-search,upwork-search,play-reviews;upwork-job,upwork:craigslist-searchsearch,craigslist-listing,job;careers-jobs,craigslist:careers-jobsearch,indeed-search,listing;indeed-job,careers:realtor-searchjobs,realtor-property,job;zillow-search,indeed:zillow-propertysearch,expedia-hotels,job;booking-search,realtor:booking-hotelsearch,booking-reviews,property;airbnb-search,zillow:airbnb-listingsearch,airbnb-reviews,property;youtube-search,expedia:youtube-video,hotels;youtube-transcript,booking:youtube-commentssearch,youtube-channelhotel,youtube-post,reviews;youtube-playlist,airbnb:reddit-searchsearch,reddit-postlisting,reddit-subreddit,reviews;reddit-user,youtube:reddit-subredditssearch,instagram-postvideo,instagram-profiletranscript,instagram-commentscomments,instagram-transcriptchannel,instagram-feedpost,x-profile,playlist;x-post,reddit:threads-profilesearch,threads-postpost,pinterest-searchsubreddit,pinterest-pinuser,pinterest-board,subreddits;pinterest-profile,instagram:facebook-pagepost,facebook-postprofile,facebook-commentscomments,facebook-marketplacetranscript,tiktok-video,feed;tiktok-comments,x:tiktok-transcriptprofile,tiktok-profilecommunity,tiktok-hashtag,post;tiktok-soundthreads: profile,tiktok-searchpost; pinterest: search,tiktok-adspin,tiktok-shopboard,tiktok-followersprofile; facebook: page,tiktok-followingpost,linkedin-jobscomments,linkedin-jobmarketplace; tiktok: video,linkedin-companycomments,linkedin-profiletranscript,linkedin-postsprofile,linkedin-adshashtag,meta-adssound,amazon-productsearch,amazon-reviewsads,amazon-searchshop,amazon-bestsellersfollowers,ebay-searchfollowing,ebay-itemtrending,appstore-applive; linkedin: jobs,appstore-reviewsjob,appstore-searchcompany,appstore-topprofile,trustpilot-companyposts,trustpilot-reviewsads; meta: ads; amazon: product,trustpilot-searchreviews,yelp-businesssearch,yelp-reviewsbestsellers; ebay: search,yelp-searchitem; appstore: app,tripadvisor-searchreviews,tripadvisor-placesearch,tripadvisor-reviewstop; trustpilot: company,glassdoor-companyreviews,glassdoor-reviewssearch; yelp: business,glassdoor-salariesreviews,crunchbase-companysearch; tripadvisor: search,g2-reviewsplace,luma-eventsreviews; glassdoor: company,luma-eventreviews,emailssalaries; crunchbase: company; g2: reviews; luma: events,phone-numbers.event;GETemails;/v1/parsersphone:listsnumbers;whatbsky:eachprofile,onepost;takes.link: in-bio; twitch: profile, clips.
before
{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"definitions":{"__schema0":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"items":{"allOf":[{"$ref":"#/definitions/__schema0"}]},"type":"array"},{"additionalProperties":{"allOf":[{"$ref":"#/definitions/__schema0"}]},"propertyNames":{"type":"string"},"type":"object"}]},"__schema1":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"items":{"allOf":[{"$ref":"#/definitions/__schema1"}]},"type":"array"},{"additionalProperties":{"allOf":[{"$ref":"#/definitions/__schema1"}]},"propertyNames":{"type":"string"},"type":"object"}]},"__schema2":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"items":{"allOf":[{"$ref":"#/definitions/__schema2"}]},"type":"array"},{"additionalProperties":{"allOf":[{"$ref":"#/definitions/__schema2"}]},"propertyNames":{"type":"string"},"type":"object"}]}},"properties":{"actions":{"description":"Up to 50 steps to run on the page, in order, before reading it: { \"type\": \"wait\", \"milliseconds\": 500 } (up to 60 seconds), { \"type\": \"wait\", \"selector\": \".results\" }, { \"type\": \"click\", \"selector\": \"button.more\" }, { \"type\": \"write\", \"text\": \"tides\" }, { \"type\": \"press\", \"key\": \"Enter\" }, { \"type\": \"scroll\", \"direction\": \"down\" } (also up, left or right; amount is pixels, \"viewport\" or \"max\"; maxScrolls 1 to 50; selector scrolls an inner container; \"max\" keeps scrolling until the page stops growing, for feeds that load as you go), { \"type\": \"screenshot\", \"fullPage\": true } (links come back in actions.screenshots), { \"type\": \"scrape\" } (the page at that point, in actions.scrapes), { \"type\": \"executeJavascript\", \"script\": \"document.title\" } (results in actions.javascriptReturns), { \"type\": \"pdf\", \"format\": \"A4\" } (links in actions.pdfs) or { \"type\": \"perform\", \"action\": \"Click the Load more button\" } (a step in plain words, up to 5 browser steps on this page, never leaving the site; at most 5 per call). A read with actions costs $2 per 1,000 pages, the same as any page; the actions themselves add nothing. If an action fails, you still get the page as it stood, with a warning that names the action and says why.","items":{"anyOf":[{"additionalProperties":false,"properties":{"milliseconds":{"maximum":60000,"minimum":1,"type":"integer"},"type":{"const":"wait","type":"string"}},"required":["type","milliseconds"],"type":"object"},{"additionalProperties":false,"properties":{"selector":{"minLength":1,"type":"string"},"type":{"const":"wait","type":"string"}},"required":["type","selector"],"type":"object"},{"additionalProperties":false,"properties":{"all":{"const":false,"type":"boolean"},"selector":{"minLength":1,"type":"string"},"type":{"const":"click","type":"string"}},"required":["type","selector"],"type":"object"},{"additionalProperties":false,"properties":{"text":{"minLength":1,"type":"string"},"type":{"const":"write","type":"string"}},"required":["type","text"],"type":"object"},{"additionalProperties":false,"properties":{"key":{"maxLength":40,"minLength":1,"type":"string"},"type":{"const":"press","type":"string"}},"required":["type","key"],"type":"object"},{"additionalProperties":false,"properties":{"amount":{"anyOf":[{"maximum":100000,"minimum":1,"type":"integer"},{"enum":["viewport","max"],"type":"string"}]},"direction":{"default":"down","enum":["up","down","left","right"],"type":"string"},"maxScrolls":{"maximum":50,"minimum":1,"type":"integer"},"selector":{"minLength":1,"type":"string"},"type":{"const":"scroll","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"fullPage":{"type":"boolean"},"quality":{"maximum":100,"minimum":1,"type":"integer"},"type":{"const":"screenshot","type":"string"},"viewport":{"additionalProperties":false,"properties":{"height":{"maximum":2160,"minimum":200,"type":"integer"},"width":{"maximum":3840,"minimum":200,"type":"integer"}},"required":["width","height"],"type":"object"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"type":{"const":"scrape","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"script":{"maxLength":20000,"minLength":1,"type":"string"},"type":{"const":"executeJavascript","type":"string"}},"required":["type","script"],"type":"object"},{"additionalProperties":false,"properties":{"format":{"enum":["Letter","Legal","Tabloid","Ledger","A0","A1","A2","A3","A4","A5","A6"],"type":"string"},"landscape":{"type":"boolean"},"scale":{"maximum":2,"minimum":0.1,"type":"number"},"type":{"const":"pdf","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"action":{"maxLength":500,"minLength":1,"type":"string"},"type":{"const":"perform","type":"string"}},"required":["type","action"],"type":"object"}]},"maxItems":50,"minItems":1,"type":"array"},"blockAds":{"description":"Ads and trackers are not loaded when a page runs in a browser. Send false to load them.","type":"boolean"},"checkPromptInjection":{"description":"Send true to scan the page text for instructions aimed at an AI model before anything is built from it. A page that has them is refused with 403 promptInjectionDetected and costs nothing. The scan adds $8 per 1,000 pages when it runs; a page it cannot scan fully comes back with a warning and no charge.","type":"boolean"},"excludeTags":{"description":"Remove the parts of the page that match these CSS selectors, such as .comments.","items":{"minLength":1,"type":"string"},"minItems":1,"type":"array"},"fastMode":{"description":"Send true to read the page without opening a browser: the answer comes sooner, but a page that needs a browser, or that refuses a plain request, comes back as an error instead of being retried. Ignored when the call needs a browser (actions, screenshot, waitFor, mobile, profile, network, branding).","type":"boolean"},"formats":{"default":["markdown"],"description":"What to return: markdown (clean page text), summary (a short summary of the page), html (the cleaned page), rawHtml (the page as sent), audio and video (for a YouTube link: the audio track as an M4A file, or the video as an MP4 file, as a link that works for 1 hour), rawBase64 (the bytes the site sent, Base64 encoded, from a live read; metadata.contentType says what they are), links (every link on the page), images (every image address), screenshot (a link to a JPEG of the visible page, kept for 7 days), changeTracking (what changed in the markdown since your key last read this page with the same options, kept 30 days; add modes [\"git-diff\",\"json\"] with a schema or prompt to compare fields too), question (send { \"type\": \"question\", \"question\": \"...\" } to get answer, left out with a warning when the page does not state one), product (title, brand, category, url, description and variants with price, sale, availability and images, left out with a warning when there is none) and menu (merchant, currency and sections of items with prices, left out with a warning when there is none) network (the JSON the page loaded while it rendered, up to 30 responses) and branding (the page's colors, fonts, typography, spacing, button and input styles, logo and brand images, read from how the page looks, with a field left out when the page does not show it). Send { \"type\": \"screenshot\", \"fullPage\": true } for the whole page. Send { \"type\": \"highlights\", \"query\": \"refund policy\" } for the passages that best match a query. Send { \"type\": \"json\", \"schema\": { \"type\": \"object\", \"properties\": { \"price\": { \"type\": \"number\" } } } } or { \"type\": \"json\", \"prompt\": \"the price and the stock\" } for fields filled from the page, each checked against it. Send { \"type\": \"json\", \"parser\": \"amazon-product\" } to get a site's own data as json instead of reading the page; GET /v1/parsers lists the parsers. Send { \"type\": \"json\", \"rules\": { \"title\": \"h1\", \"links\": { \"selector\": \"a\", \"type\": \"list\", \"output\": \"@href\" } } } to read the page with CSS rules and no model, at the page's own price. Send { \"type\": \"attributes\", \"selectors\": [{ \"selector\": \"a\", \"attribute\": \"href\" }] } for attribute values, returned in attributes. Without a parser or rules, json needs a schema or a prompt and is filled from the page. json with a schema or a prompt, summary, highlights, question, product, menu and changeTracking in json mode add $8 per 1,000 pages each when they return something. json with rules or a parser, and attributes, cost nothing more. A screenshot, network or branding read costs $2 per 1,000 pages, the same as any page. A PDF comes back as markdown only, and adds $2 per 1,000 pages of text that comes back. A CSV or an Excel .xlsx file comes back as markdown tables.","items":{"anyOf":[{"enum":["markdown","summary","html","rawHtml","rawBase64","links","images","network","branding","audio","video","screenshot","changeTracking","product","menu"],"type":"string"},{"additionalProperties":false,"properties":{"type":{"enum":["markdown","summary","html","rawHtml","rawBase64","links","images","network","branding","audio","video"],"type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"modes":{"description":"git-diff returns a unified diff of the markdown. json compares the fields in schema or prompt between this read and the last one. Without modes you get git-diff.","items":{"enum":["git-diff","json"],"type":"string"},"maxItems":2,"type":"array"},"prompt":{"description":"With json mode: what to compare, in plain words, such as the price and stock.","maxLength":10000,"minLength":1,"type":"string"},"schema":{"additionalProperties":{"$ref":"#/definitions/__schema0"},"description":"The fields to fill, as a JSON Schema (draft-07 or 2020-12) object with properties. Pydantic's model_json_schema() and zod's toJSONSchema() output work as they are. enum, const, anyOf, oneOf, nullable types, $ref with $defs, required, descriptions and any key names are read. Up to 100 top-level fields and 32 KB. A field the page does not state comes back null.","propertyNames":{"type":"string"},"type":"object"},"tag":{"type":"null"},"type":{"const":"changeTracking","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"question":{"description":"A question to answer from the page, such as what the refund window is.","maxLength":10000,"minLength":1,"type":"string"},"type":{"const":"question","type":"string"}},"required":["type","question"],"type":"object"},{"additionalProperties":false,"properties":{"type":{"const":"product","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"type":{"const":"menu","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"fullPage":{"default":false,"description":"Capture the whole page from top to bottom instead of the visible part.","type":"boolean"},"quality":{"description":"JPEG quality from 1 to 100. The default is 70.","maximum":100,"minimum":1,"type":"integer"},"type":{"const":"screenshot","type":"string"},"viewport":{"additionalProperties":false,"description":"The window size in pixels, such as { width: 390, height: 844 }.","properties":{"height":{"maximum":2160,"minimum":200,"type":"integer"},"width":{"maximum":3840,"minimum":200,"type":"integer"}},"required":["width","height"],"type":"object"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"count":{"default":5,"description":"How many passages to return, best match first.","maximum":20,"minimum":1,"type":"integer"},"query":{"description":"What you are looking for on the page, such as refund policy.","maxLength":10000,"minLength":1,"type":"string"},"type":{"const":"highlights","type":"string"}},"required":["type","query"],"type":"object"},{"additionalProperties":false,"properties":{"checkPromptInjection":{"description":"Deprecated: send checkPromptInjection at the top level of the call.","type":"boolean"},"options":{"additionalProperties":{"$ref":"#/definitions/__schema1"},"description":"Only with parser: extra inputs for it, such as { \"page\": 2 } for the next page of results or { \"minRating\": 4.5 } for a filter. GET /v1/parsers lists what each parser accepts.","propertyNames":{"type":"string"},"type":"object"},"parser":{"description":"Read the page with a named parser, which gives the site's own data as json. The url must be the kind of page the parser reads. Parsers are the only way to read some sites. GET /v1/parsers lists them.","type":"string"},"prompt":{"description":"What to pull from the page in plain words, such as the version and the release date.","maxLength":10000,"minLength":1,"type":"string"},"rules":{"additionalProperties":{"$ref":"#/definitions/__schema2"},"description":"Read the page with CSS rules instead of a model, no extra fee. Each field is a selector such as \"h1\" (the first match's text), \"a@href\" (an attribute) or { \"selector\": \"li\", \"type\": \"list\", \"output\": \"text\" | \"html\" | \"@attribute\" | { nested fields } }. A missing item is null and an unmatched list is []. Relative links become absolute. Up to 100 fields, 5 levels deep. Not with schema, prompt or parser.","propertyNames":{"type":"string"},"type":"object"},"schema":{"additionalProperties":{"$ref":"#/definitions/__schema0"},"description":"The fields to fill, as a JSON Schema (draft-07 or 2020-12) object with properties. Pydantic's model_json_schema() and zod's toJSONSchema() output work as they are. enum, const, anyOf, oneOf, nullable types, $ref with $defs, required, descriptions and any key names are read. Up to 100 top-level fields and 32 KB. A field the page does not state comes back null.","propertyNames":{"type":"string"},"type":"object"},"type":{"const":"json","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"selectors":{"description":"The elements and attributes to read, such as { selector: 'a.buy', attribute: 'href' }.","items":{"additionalProperties":false,"properties":{"attribute":{"maxLength":100,"minLength":1,"type":"string"},"selector":{"minLength":1,"type":"string"}},"required":["selector","attribute"],"type":"object"},"maxItems":50,"minItems":1,"type":"array"},"type":{"const":"attributes","type":"string"}},"required":["type","selectors"],"type":"object"}]},"maxItems":20,"minItems":1,"type":"array"},"headers":{"additionalProperties":{"maxLength":2000,"pattern":"^[\\t\\x20-\\x7e]*$","type":"string"},"description":"Extra request headers to send to the site, such as { \"x-plan\": \"pro\" }. A read with headers is never answered from or saved to a stored copy.","propertyNames":{"pattern":"^[A-Za-z0-9-]{1,64}$","type":"string"},"type":"object"},"includeTags":{"description":"Keep only the parts of the page that match these CSS selectors, such as article or .price. When set, onlyMainContent is not applied.","items":{"minLength":1,"type":"string"},"minItems":1,"type":"array"},"linkStyle":{"default":"inline","description":"How links appear in the markdown. inline keeps [text](address). numbered writes Pricing⟨3⟩ and lists each address once at the end. none keeps only the link text, which makes link-heavy pages 10 to 70% shorter; ask for the links format to get the addresses.","enum":["inline","numbered","none"],"type":"string"},"location":{"additionalProperties":false,"description":"Where to read the page from. The default is the United States.","properties":{"country":{"description":"Two-letter country code to read the page from, such as DE or JP.","type":"string"},"languages":{"description":"Languages to ask the site for, best first, such as [\"de\", \"en\"]. Sent as Accept-Language. A read with languages is never answered from or saved to a stored copy.","items":{"pattern":"^[A-Za-z]{2,3}(?:-[A-Za-z0-9]{2,8})*$","type":"string"},"maxItems":5,"minItems":1,"type":"array"}},"type":"object"},"lockdown":{"description":"Send true to answer only from a stored copy of the page and never read it live, whatever its age. A page with no stored copy is notFound. The same as minAge 0.","type":"boolean"},"maxAge":{"description":"Accept a stored answer up to this many milliseconds old, at most 30 days. Without it, 2 days, or less for a site whose pages change often, and a copy up to twice that age (at most 7 days) comes back at once as stale while a fresh read runs. 0 always reads the page live. metadata.cacheState says which one you got.","maximum":9007199254740991,"minimum":0,"type":"integer"},"maxChars":{"description":"Cut the markdown at this many characters; isTruncated says when that happened and nextOffset where to read on. With query, how much of the page to keep, 8000 by default.","maximum":1000000,"minimum":500,"type":"integer"},"minAge":{"description":"Answer only from a stored copy that is at least this many milliseconds old, and never read the page live. 0 accepts any stored copy. A page with no such copy is notFound.","maximum":9007199254740991,"minimum":0,"type":"integer"},"mobile":{"description":"Read the page as a phone would: a phone-sized screen and the mobile version of the site. The page loads in a browser.","type":"boolean"},"offset":{"description":"Start the markdown this many characters into the page, PDF or file. Send the nextOffset of the last answer, with the same maxChars, to read on. Not with query.","maximum":9007199254740991,"minimum":0,"type":"integer"},"onlyCleanContent":{"description":"Send true to have a model remove what onlyMainContent leaves behind in the markdown: cookie banners, ads, share widgets, breadcrumbs, sign-up prompts, comment prompts and related-article lists. It only removes whole paragraphs and lists; it never rewrites or adds text, and code blocks are always kept. Skipped with a warning when the page is too long to clean or the model does not answer. Not with zeroDataRetention. Summary, answers and highlights are made from the cleaned markdown.","type":"boolean"},"onlyMainContent":{"default":true,"description":"Keep only the page's main content, without menus, headers, footers and ads.","type":"boolean"},"parsers":{"description":"Only the pdf parser exists. Send \"pdf\" or { \"type\": \"pdf\", mode, maxPages, pages, blocks, pageMarkers } with the same meaning as in parse. Without mode a PDF is read as auto: from its text layer, and from the picture of any page that has no text. fast reads the text layer only, and ocr reads the picture of every page, up to 20 pages. Each page of text that comes back costs $2 per 1,000 pages. Pictures are read only with an API key.","items":{"anyOf":[{"const":"pdf","type":"string"},{"additionalProperties":false,"properties":{"blocks":{"description":"Send true to also get the page's layout in blocks: each title, section header or run of text, with its page, reading order, position on the page (bbox as left, top, right, bottom from 0 to 1) and where its text sits in that page's markdown (span, as in pages). Tables, figures and formulas are not told apart. A page read from its picture is one block. No extra charge.","type":"boolean"},"maxPages":{"description":"Read at most this many pages, up to 500, which is also the default.","maximum":500,"minimum":1,"type":"integer"},"mode":{"description":"fast reads the text layer only. auto (the default) reads the text layer and reads the picture of any page that has none. ocr reads the picture of every page.","enum":["fast","auto","ocr"],"type":"string"},"pageMarkers":{"description":"Send true to mark page breaks in the markdown: pages are joined with \"---\" and a line, where N is the page that follows. No extra charge.","type":"boolean"},"pages":{"description":"Send true to also get each page's markdown in pages, as { pageNumber, markdown }. No extra charge.","type":"boolean"},"type":{"const":"pdf","type":"string"}},"required":["type"],"type":"object"}]},"minItems":1,"type":"array"},"profile":{"additionalProperties":false,"description":"Read the page with the cookies and local storage that earlier calls saved under this name, kept for your account for 30 days after the last use. A call with a profile always loads the page in a browser, costs $2 per 1,000 pages, the same as any page, and is never answered from a stored copy. Only one call at a time can save to a profile.","properties":{"name":{"description":"A name you choose, such as shop-login. Calls with the same name share state.","maxLength":128,"minLength":1,"type":"string"},"saveChanges":{"default":true,"description":"Keep the cookies and local storage this read leaves behind for the next call with this name. Send false to read with the profile without changing it.","type":"boolean"}},"required":["name"],"type":"object"},"proxy":{"description":"auto: basic first, enhanced once if the site refuses. basic: one plain attempt. enhanced: the stronger read from the start. stealth is the same as enhanced. Same price.","enum":["auto","basic","enhanced","stealth"],"type":"string"},"query":{"description":"What you are looking for on the page, such as refund window. A page longer than maxChars (8000 by default) comes back as the passages that match, in page order, each with the text around it and its table header; a shorter page comes back whole. Costs nothing extra, and a PDF is charged for the share of its pages that comes back. Not with offset.","maxLength":10000,"minLength":1,"type":"string"},"redactPII":{"anyOf":[{"type":"boolean"},{"additionalProperties":false,"description":"Options for redactPII.","properties":{"entities":{"default":["PERSON","EMAIL","PHONE","LOCATION","FINANCIAL","SECRET"],"description":"What to hide: PERSON, EMAIL, PHONE, LOCATION, FINANCIAL, SECRET. All by default.","items":{"enum":["PERSON","EMAIL","PHONE","LOCATION","FINANCIAL","SECRET"],"type":"string"},"minItems":1,"type":"array"},"mode":{"default":"accurate","description":"accurate finds names and places with the model and the rest by pattern. aggressive adds guesses that catch more and may hide a little too much. fast uses patterns only, so it finds no ordinary names or places.","enum":["accurate","aggressive","fast"],"type":"string"},"replaceStyle":{"default":"tag","description":"tag writes <EMAIL>, mask writes * for each character, remove deletes it.","enum":["tag","mask","remove"],"type":"string"}},"type":"object"}],"description":"Send true, or an object, to hide personal data in the markdown and in everything made from it (summary, answers, highlights, json). Links, html and rawHtml are not changed. A page the model cannot scan is refused rather than returned unredacted."},"removeBase64Images":{"description":"Images inside the page that carry their data in the address (data:image) are dropped by default. Send false to keep them in markdown and html.","type":"boolean"},"skipTlsVerification":{"description":"Send true to read a page whose certificate is expired, self-signed or for another name. The read is not private against someone between us and the site.","type":"boolean"},"storeInCache":{"default":true,"description":"Send false to neither read nor keep a stored copy of this page.","type":"boolean"},"timeout":{"default":60000,"description":"How long to keep trying, in milliseconds, from 1 second to 5 minutes; 60 seconds by default. A page that needs a browser needs at least 5 seconds, and pages behind a bot check can need 10 to 30 seconds the first time. A read that runs out of time is an error and costs nothing.","maximum":300000,"minimum":1000,"type":"integer"},"url":{"description":"The page or PDF to read, such as https://bun.com/docs.","type":"string"},"urls":{"not":{}},"waitFor":{"description":"Extra milliseconds to wait before reading, up to 60000, for pages that load their content late. To wait for an element, add a wait action with a selector. A read that waits costs $2 per 1,000 pages, the same as any page.","maximum":60000,"minimum":0,"type":"integer"},"zeroDataRetention":{"default":false,"description":"Send true to keep nothing from this call: no stored copy is read or made, and nothing from it is logged. Adds $2 per 1,000 pages. Not with a screenshot.","type":"boolean"}},"required":["url"],"type":"object"}⟨5 unchanged words⟩ scholarly papers and YouTube videos in one call.$0.004$0.001 for each 10 results from eachs...source and each research or videos list ($1 per 1,000 searches of up to 10 results), plus $1 per 1,000 web or news results that come back with their page text when scrapeOptions has formats, and $3 per 1,000 more for each summary or json with a schema or prompt that returns something.
before
{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"definitions":{"__schema0":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"items":{"allOf":[{"$ref":"#/definitions/__schema0"}]},"type":"array"},{"additionalProperties":{"allOf":[{"$ref":"#/definitions/__schema0"}]},"propertyNames":{"type":"string"},"type":"object"}]},"__schema1":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"items":{"allOf":[{"$ref":"#/definitions/__schema1"}]},"type":"array"},{"additionalProperties":{"allOf":[{"$ref":"#/definitions/__schema1"}]},"propertyNames":{"type":"string"},"type":"object"}]},"__schema2":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"items":{"allOf":[{"$ref":"#/definitions/__schema2"}]},"type":"array"},{"additionalProperties":{"allOf":[{"$ref":"#/definitions/__schema2"}]},"propertyNames":{"type":"string"},"type":"object"}]}},"properties":{"categories":{"description":"pdf: web results that are PDF files. research: scholarly papers, in a research list, ranked by relevance then citations. videos: YouTube videos for the query, in YouTube's order, in a videos list, with the channel, length, views and watch link; a video whose captions we hold also gets the passage that matches the query and where it starts.","items":{"anyOf":[{"enum":["research","pdf","videos"],"type":"string"},{"additionalProperties":false,"properties":{"type":{"enum":["research","pdf","videos"],"type":"string"}},"required":["type"],"type":"object"}]},"type":"array"},"country":{"description":"Two-letter country to search from, like us. uk is read as gb. Image results are always US.","pattern":"^[A-Za-z]{2}$","type":"string"},"excludeDomains":{"items":{"type":"string"},"maxItems":10,"type":"array"},"highlights":{"default":false,"description":"Off by default. With true, a web result whose page we already hold gets the passages that best match the query as its description, in markdown, up to about 2,000 characters; others keep the engine's snippet.","type":"boolean"},"ignoreInvalidURLs":{"default":false,"description":"Leave out results whose address cannot be read as a page.","type":"boolean"},"includeDomains":{"items":{"type":"string"},"maxItems":10,"type":"array"},"lang":{"description":"Two-letter language for web results, like de. It steers which pages come back; some results can still be in other languages.","pattern":"^[A-Za-z]{2}$","type":"string"},"limit":{"description":"Most results to return for each source. Default 10, or 5 when scrapeOptions has formats, which reads every web and news result returned. News returns at most 50.","maximum":100,"minimum":1,"type":"integer"},"location":{"description":"Where to search from, like Germany or San Francisco,California,United States. The last part is the country and replaces country. A city before it narrows web results to that place.","minLength":1,"type":"string"},"maxAge":{"description":"Accept a stored answer up to this many milliseconds old, at most 30 days. Without it, 15 minutes for news and 1 hour for web and images. 0 always searches live.","maximum":9007199254740991,"minimum":0,"type":"integer"},"query":{"description":"What to search for, up to 500 characters. Search operators work in web results: quotes for an exact phrase, -word, site:, -site:, filetype:, inurl:, allinurl:, intitle: and allintitle:. In image results, imagesize:WIDTHxHEIGHT keeps images of exactly that size and larger:WIDTHxHEIGHT keeps images at least that large.","maxLength":500,"minLength":1,"type":"string"},"safe":{"description":"Hide explicit web, news and image results when true.","type":"boolean"},"scrapeOptions":{"additionalProperties":false,"description":"With formats, reads each web and news result, as many as limit asks for, within timeout, and fills each web result's description from it. Without formats no page is read and nothing more is charged. Takes the options of scrape: formats (markdown, html, rawHtml, links, images, summary, screenshot, json and the rest), onlyMainContent, includeTags, excludeTags, maxAge, minAge, waitFor, mobile, timeout (per page), headers, actions, location, parsers, profile and zeroDataRetention. Costs what scrape costs for each page read: $2 per 1,000 pages, plus $8 per 1,000 pages for each summary or json with a schema or prompt that returns something.","properties":{"actions":{"description":"Up to 50 steps to run on the page, in order, before reading it: { \"type\": \"wait\", \"milliseconds\": 500 } (up to 60 seconds), { \"type\": \"wait\", \"selector\": \".results\" }, { \"type\": \"click\", \"selector\": \"button.more\" }, { \"type\": \"write\", \"text\": \"tides\" }, { \"type\": \"press\", \"key\": \"Enter\" }, { \"type\": \"scroll\", \"direction\": \"down\" } (also up, left or right; amount is pixels, \"viewport\" or \"max\"; maxScrolls 1 to 50; selector scrolls an inner container; \"max\" keeps scrolling until the page stops growing, for feeds that load as you go), { \"type\": \"screenshot\", \"fullPage\": true } (links come back in actions.screenshots), { \"type\": \"scrape\" } (the page at that point, in actions.scrapes), { \"type\": \"executeJavascript\", \"script\": \"document.title\" } (results in actions.javascriptReturns), { \"type\": \"pdf\", \"format\": \"A4\" } (links in actions.pdfs) or { \"type\": \"perform\", \"action\": \"Click the Load more button\" } (a step in plain words, up to 5 browser steps on this page, never leaving the site; at most 5 per call). A read with actions costs $2 per 1,000 pages, the same as any page; the actions themselves add nothing. If an action fails, you still get the page as it stood, with a warning that names the action and says why.","items":{"anyOf":[{"additionalProperties":false,"properties":{"milliseconds":{"maximum":60000,"minimum":1,"type":"integer"},"type":{"const":"wait","type":"string"}},"required":["type","milliseconds"],"type":"object"},{"additionalProperties":false,"properties":{"selector":{"minLength":1,"type":"string"},"type":{"const":"wait","type":"string"}},"required":["type","selector"],"type":"object"},{"additionalProperties":false,"properties":{"all":{"const":false,"type":"boolean"},"selector":{"minLength":1,"type":"string"},"type":{"const":"click","type":"string"}},"required":["type","selector"],"type":"object"},{"additionalProperties":false,"properties":{"text":{"minLength":1,"type":"string"},"type":{"const":"write","type":"string"}},"required":["type","text"],"type":"object"},{"additionalProperties":false,"properties":{"key":{"maxLength":40,"minLength":1,"type":"string"},"type":{"const":"press","type":"string"}},"required":["type","key"],"type":"object"},{"additionalProperties":false,"properties":{"amount":{"anyOf":[{"maximum":100000,"minimum":1,"type":"integer"},{"enum":["viewport","max"],"type":"string"}]},"direction":{"default":"down","enum":["up","down","left","right"],"type":"string"},"maxScrolls":{"maximum":50,"minimum":1,"type":"integer"},"selector":{"minLength":1,"type":"string"},"type":{"const":"scroll","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"fullPage":{"type":"boolean"},"quality":{"maximum":100,"minimum":1,"type":"integer"},"type":{"const":"screenshot","type":"string"},"viewport":{"additionalProperties":false,"properties":{"height":{"maximum":2160,"minimum":200,"type":"integer"},"width":{"maximum":3840,"minimum":200,"type":"integer"}},"required":["width","height"],"type":"object"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"type":{"const":"scrape","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"script":{"maxLength":20000,"minLength":1,"type":"string"},"type":{"const":"executeJavascript","type":"string"}},"required":["type","script"],"type":"object"},{"additionalProperties":false,"properties":{"format":{"enum":["Letter","Legal","Tabloid","Ledger","A0","A1","A2","A3","A4","A5","A6"],"type":"string"},"landscape":{"type":"boolean"},"scale":{"maximum":2,"minimum":0.1,"type":"number"},"type":{"const":"pdf","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"action":{"maxLength":500,"minLength":1,"type":"string"},"type":{"const":"perform","type":"string"}},"required":["type","action"],"type":"object"}]},"maxItems":50,"minItems":1,"type":"array"},"blockAds":{"description":"Ads and trackers are not loaded when a page runs in a browser. Send false to load them.","type":"boolean"},"checkPromptInjection":{"description":"Send true to scan the page text for instructions aimed at an AI model before anything is built from it. A page that has them is refused with 403 promptInjectionDetected and costs nothing. The scan adds $8 per 1,000 pages when it runs; a page it cannot scan fully comes back with a warning and no charge.","type":"boolean"},"excludeTags":{"description":"Remove the parts of the page that match these CSS selectors, such as .comments.","items":{"minLength":1,"type":"string"},"minItems":1,"type":"array"},"fastMode":{"description":"Send true to read the page without opening a browser: the answer comes sooner, but a page that needs a browser, or that refuses a plain request, comes back as an error instead of being retried. Ignored when the call needs a browser (actions, screenshot, waitFor, mobile, profile, network, branding).","type":"boolean"},"formats":{"default":["markdown"],"description":"What to return: markdown (clean page text), summary (a short summary of the page), html (the cleaned page), rawHtml (the page as sent), audio and video (for a YouTube link: the audio track as an M4A file, or the video as an MP4 file, as a link that works for 1 hour), rawBase64 (the bytes the site sent, Base64 encoded, from a live read; metadata.contentType says what they are), links (every link on the page), images (every image address), screenshot (a link to a JPEG of the visible page, kept for 7 days), changeTracking (what changed in the markdown since your key last read this page with the same options, kept 30 days; add modes [\"git-diff\",\"json\"] with a schema or prompt to compare fields too), question (send { \"type\": \"question\", \"question\": \"...\" } to get answer, left out with a warning when the page does not state one), product (title, brand, category, url, description and variants with price, sale, availability and images, left out with a warning when there is none) and menu (merchant, currency and sections of items with prices, left out with a warning when there is none) network (the JSON the page loaded while it rendered, up to 30 responses) and branding (the page's colors, fonts, typography, spacing, button and input styles, logo and brand images, read from how the page looks, with a field left out when the page does not show it). Send { \"type\": \"screenshot\", \"fullPage\": true } for the whole page. Send { \"type\": \"highlights\", \"query\": \"refund policy\" } for the passages that best match a query. Send { \"type\": \"json\", \"schema\": { \"type\": \"object\", \"properties\": { \"price\": { \"type\": \"number\" } } } } or { \"type\": \"json\", \"prompt\": \"the price and the stock\" } for fields filled from the page, each checked against it. Send { \"type\": \"json\", \"parser\": \"amazon-product\" } to get a site's own data as json instead of reading the page; GET /v1/parsers lists the parsers. Send { \"type\": \"json\", \"rules\": { \"title\": \"h1\", \"links\": { \"selector\": \"a\", \"type\": \"list\", \"output\": \"@href\" } } } to read the page with CSS rules and no model, at the page's own price. Send { \"type\": \"attributes\", \"selectors\": [{ \"selector\": \"a\", \"attribute\": \"href\" }] } for attribute values, returned in attributes. Without a parser or rules, json needs a schema or a prompt and is filled from the page. json with a schema or a prompt, summary, highlights, question, product, menu and changeTracking in json mode add $8 per 1,000 pages each when they return something. json with rules or a parser, and attributes, cost nothing more. A screenshot, network or branding read costs $2 per 1,000 pages, the same as any page. A PDF comes back as markdown only, and adds $2 per 1,000 pages of text that comes back. A CSV or an Excel .xlsx file comes back as markdown tables.","items":{"anyOf":[{"enum":["markdown","summary","html","rawHtml","rawBase64","links","images","network","branding","audio","video","screenshot","changeTracking","product","menu"],"type":"string"},{"additionalProperties":false,"properties":{"type":{"enum":["markdown","summary","html","rawHtml","rawBase64","links","images","network","branding","audio","video"],"type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"modes":{"description":"git-diff returns a unified diff of the markdown. json compares the fields in schema or prompt between this read and the last one. Without modes you get git-diff.","items":{"enum":["git-diff","json"],"type":"string"},"maxItems":2,"type":"array"},"prompt":{"description":"With json mode: what to compare, in plain words, such as the price and stock.","maxLength":10000,"minLength":1,"type":"string"},"schema":{"additionalProperties":{"$ref":"#/definitions/__schema0"},"description":"The fields to fill, as a JSON Schema (draft-07 or 2020-12) object with properties. Pydantic's model_json_schema() and zod's toJSONSchema() output work as they are. enum, const, anyOf, oneOf, nullable types, $ref with $defs, required, descriptions and any key names are read. Up to 100 top-level fields and 32 KB. A field the page does not state comes back null.","propertyNames":{"type":"string"},"type":"object"},"tag":{"type":"null"},"type":{"const":"changeTracking","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"question":{"description":"A question to answer from the page, such as what the refund window is.","maxLength":10000,"minLength":1,"type":"string"},"type":{"const":"question","type":"string"}},"required":["type","question"],"type":"object"},{"additionalProperties":false,"properties":{"type":{"const":"product","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"type":{"const":"menu","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"fullPage":{"default":false,"description":"Capture the whole page from top to bottom instead of the visible part.","type":"boolean"},"quality":{"description":"JPEG quality from 1 to 100. The default is 70.","maximum":100,"minimum":1,"type":"integer"},"type":{"const":"screenshot","type":"string"},"viewport":{"additionalProperties":false,"description":"The window size in pixels, such as { width: 390, height: 844 }.","properties":{"height":{"maximum":2160,"minimum":200,"type":"integer"},"width":{"maximum":3840,"minimum":200,"type":"integer"}},"required":["width","height"],"type":"object"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"count":{"default":5,"description":"How many passages to return, best match first.","maximum":20,"minimum":1,"type":"integer"},"query":{"description":"What you are looking for on the page, such as refund policy.","maxLength":10000,"minLength":1,"type":"string"},"type":{"const":"highlights","type":"string"}},"required":["type","query"],"type":"object"},{"additionalProperties":false,"properties":{"checkPromptInjection":{"description":"Deprecated: send checkPromptInjection at the top level of the call.","type":"boolean"},"options":{"additionalProperties":{"$ref":"#/definitions/__schema1"},"description":"Only with parser: extra inputs for it, such as { \"page\": 2 } for the next page of results or { \"minRating\": 4.5 } for a filter. GET /v1/parsers lists what each parser accepts.","propertyNames":{"type":"string"},"type":"object"},"parser":{"description":"Read the page with a named parser, which gives the site's own data as json. The url must be the kind of page the parser reads. Parsers are the only way to read some sites. GET /v1/parsers lists them.","type":"string"},"prompt":{"description":"What to pull from the page in plain words, such as the version and the release date.","maxLength":10000,"minLength":1,"type":"string"},"rules":{"additionalProperties":{"$ref":"#/definitions/__schema2"},"description":"Read the page with CSS rules instead of a model, no extra fee. Each field is a selector such as \"h1\" (the first match's text), \"a@href\" (an attribute) or { \"selector\": \"li\", \"type\": \"list\", \"output\": \"text\" | \"html\" | \"@attribute\" | { nested fields } }. A missing item is null and an unmatched list is []. Relative links become absolute. Up to 100 fields, 5 levels deep. Not with schema, prompt or parser.","propertyNames":{"type":"string"},"type":"object"},"schema":{"additionalProperties":{"$ref":"#/definitions/__schema0"},"description":"The fields to fill, as a JSON Schema (draft-07 or 2020-12) object with properties. Pydantic's model_json_schema() and zod's toJSONSchema() output work as they are. enum, const, anyOf, oneOf, nullable types, $ref with $defs, required, descriptions and any key names are read. Up to 100 top-level fields and 32 KB. A field the page does not state comes back null.","propertyNames":{"type":"string"},"type":"object"},"type":{"const":"json","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"selectors":{"description":"The elements and attributes to read, such as { selector: 'a.buy', attribute: 'href' }.","items":{"additionalProperties":false,"properties":{"attribute":{"maxLength":100,"minLength":1,"type":"string"},"selector":{"minLength":1,"type":"string"}},"required":["selector","attribute"],"type":"object"},"maxItems":50,"minItems":1,"type":"array"},"type":{"const":"attributes","type":"string"}},"required":["type","selectors"],"type":"object"}]},"maxItems":20,"minItems":1,"type":"array"},"headers":{"additionalProperties":{"maxLength":2000,"pattern":"^[\\t\\x20-\\x7e]*$","type":"string"},"description":"Extra request headers to send to the site, such as { \"x-plan\": \"pro\" }. A read with headers is never answered from or saved to a stored copy.","propertyNames":{"pattern":"^[A-Za-z0-9-]{1,64}$","type":"string"},"type":"object"},"includeTags":{"description":"Keep only the parts of the page that match these CSS selectors, such as article or .price. When set, onlyMainContent is not applied.","items":{"minLength":1,"type":"string"},"minItems":1,"type":"array"},"location":{"additionalProperties":false,"description":"Where to read the page from. The default is the United States.","properties":{"country":{"description":"Two-letter country code to read the page from, such as DE or JP.","type":"string"},"languages":{"description":"Languages to ask the site for, best first, such as [\"de\", \"en\"]. Sent as Accept-Language. A read with languages is never answered from or saved to a stored copy.","items":{"pattern":"^[A-Za-z]{2,3}(?:-[A-Za-z0-9]{2,8})*$","type":"string"},"maxItems":5,"minItems":1,"type":"array"}},"type":"object"},"lockdown":{"description":"Send true to answer only from a stored copy of the page and never read it live, whatever its age. A page with no stored copy is notFound. The same as minAge 0.","type":"boolean"},"maxAge":{"description":"Accept a stored answer up to this many milliseconds old, at most 30 days. Without it, 2 days, or less for a site whose pages change often, and a copy up to twice that age (at most 7 days) comes back at once as stale while a fresh read runs. 0 always reads the page live. metadata.cacheState says which one you got.","maximum":9007199254740991,"minimum":0,"type":"integer"},"minAge":{"description":"Answer only from a stored copy that is at least this many milliseconds old, and never read the page live. 0 accepts any stored copy. A page with no such copy is notFound.","maximum":9007199254740991,"minimum":0,"type":"integer"},"mobile":{"description":"Read the page as a phone would: a phone-sized screen and the mobile version of the site. The page loads in a browser.","type":"boolean"},"onlyCleanContent":{"description":"Send true to have a model remove what onlyMainContent leaves behind in the markdown: cookie banners, ads, share widgets, breadcrumbs, sign-up prompts, comment prompts and related-article lists. It only removes whole paragraphs and lists; it never rewrites or adds text, and code blocks are always kept. Skipped with a warning when the page is too long to clean or the model does not answer. Not with zeroDataRetention. Summary, answers and highlights are made from the cleaned markdown.","type":"boolean"},"onlyMainContent":{"default":true,"description":"Keep only the page's main content, without menus, headers, footers and ads.","type":"boolean"},"parsers":{"description":"Only the pdf parser exists. Send \"pdf\" or { \"type\": \"pdf\", mode, maxPages, pages, blocks, pageMarkers } with the same meaning as in parse. Without mode a PDF is read as auto: from its text layer, and from the picture of any page that has no text. fast reads the text layer only, and ocr reads the picture of every page, up to 20 pages. Each page of text that comes back costs $2 per 1,000 pages. Pictures are read only with an API key.","items":{"anyOf":[{"const":"pdf","type":"string"},{"additionalProperties":false,"properties":{"blocks":{"description":"Send true to also get the page's layout in blocks: each title, section header or run of text, with its page, reading order, position on the page (bbox as left, top, right, bottom from 0 to 1) and where its text sits in that page's markdown (span, as in pages). Tables, figures and formulas are not told apart. A page read from its picture is one block. No extra charge.","type":"boolean"},"maxPages":{"description":"Read at most this many pages, up to 500, which is also the default.","maximum":500,"minimum":1,"type":"integer"},"mode":{"description":"fast reads the text layer only. auto (the default) reads the text layer and reads the picture of any page that has none. ocr reads the picture of every page.","enum":["fast","auto","ocr"],"type":"string"},"pageMarkers":{"description":"Send true to mark page breaks in the markdown: pages are joined with \"---\" and a line, where N is the page that follows. No extra charge.","type":"boolean"},"pages":{"description":"Send true to also get each page's markdown in pages, as { pageNumber, markdown }. No extra charge.","type":"boolean"},"type":{"const":"pdf","type":"string"}},"required":["type"],"type":"object"}]},"minItems":1,"type":"array"},"profile":{"additionalProperties":false,"description":"Read the page with the cookies and local storage that earlier calls saved under this name, kept for your account for 30 days after the last use. A call with a profile always loads the page in a browser, costs $2 per 1,000 pages, the same as any page, and is never answered from a stored copy. Only one call at a time can save to a profile.","properties":{"name":{"description":"A name you choose, such as shop-login. Calls with the same name share state.","maxLength":128,"minLength":1,"type":"string"},"saveChanges":{"default":true,"description":"Keep the cookies and local storage this read leaves behind for the next call with this name. Send false to read with the profile without changing it.","type":"boolean"}},"required":["name"],"type":"object"},"proxy":{"description":"auto: basic first, enhanced once if the site refuses. basic: one plain attempt. enhanced: the stronger read from the start. stealth is the same as enhanced. Same price.","enum":["auto","basic","enhanced","stealth"],"type":"string"},"redactPII":{"anyOf":[{"type":"boolean"},{"additionalProperties":false,"description":"Options for redactPII.","properties":{"entities":{"default":["PERSON","EMAIL","PHONE","LOCATION","FINANCIAL","SECRET"],"description":"What to hide: PERSON, EMAIL, PHONE, LOCATION, FINANCIAL, SECRET. All by default.","items":{"enum":["PERSON","EMAIL","PHONE","LOCATION","FINANCIAL","SECRET"],"type":"string"},"minItems":1,"type":"array"},"mode":{"default":"accurate","description":"accurate finds names and places with the model and the rest by pattern. aggressive adds guesses that catch more and may hide a little too much. fast uses patterns only, so it finds no ordinary names or places.","enum":["accurate","aggressive","fast"],"type":"string"},"replaceStyle":{"default":"tag","description":"tag writes <EMAIL>, mask writes * for each character, remove deletes it.","enum":["tag","mask","remove"],"type":"string"}},"type":"object"}],"description":"Send true, or an object, to hide personal data in the markdown and in everything made from it (summary, answers, highlights, json). Links, html and rawHtml are not changed. A page the model cannot scan is refused rather than returned unredacted."},"removeBase64Images":{"description":"Images inside the page that carry their data in the address (data:image) are dropped by default. Send false to keep them in markdown and html.","type":"boolean"},"skipTlsVerification":{"description":"Send true to read a page whose certificate is expired, self-signed or for another name. The read is not private against someone between us and the site.","type":"boolean"},"storeInCache":{"default":true,"description":"Send false to neither read nor keep a stored copy of this page.","type":"boolean"},"timeout":{"default":30000,"description":"How long to keep trying, in milliseconds, from 1 second to 5 minutes; 30 seconds by default. A page that needs a browser needs at least 5 seconds, and pages behind a bot check can need 10 to 30 seconds the first time. A read that runs out of time is an error and costs nothing.","maximum":300000,"minimum":1000,"type":"integer"},"waitFor":{"description":"Extra milliseconds to wait before reading, up to 60000, for pages that load their content late. To wait for an element, add a wait action with a selector. A read that waits costs $2 per 1,000 pages, the same as any page.","maximum":60000,"minimum":0,"type":"integer"},"zeroDataRetention":{"default":false,"description":"Send true to keep nothing from this call: no stored copy is read or made, and nothing from it is logged. Adds $2 per 1,000 pages. Not with a screenshot.","type":"boolean"}},"type":"object"},"sources":{"description":"What to search: web, news, images. Each is a string or {type}. Default web, or none when categories asks for research or videos.","items":{"anyOf":[{"enum":["web","news","images"],"type":"string"},{"additionalProperties":false,"properties":{"country":{"description":"ISO 3166-1 alpha-2 country code, e.g. us. Any case is accepted.","pattern":"^[A-Za-z]{2}$","type":"string"},"lang":{"description":"Two-letter language for web results, like de. It steers which pages come back; some results can still be in other languages.","pattern":"^[A-Za-z]{2}$","type":"string"},"location":{"type":"string"},"tbs":{"type":"string"},"type":{"const":"web","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"type":{"enum":["news","images"],"type":"string"}},"required":["type"],"type":"object"}]},"maxItems":5,"minItems":1,"type":"array"},"tbs":{"description":"Time filter: qdr:d, qdr:w, qdr:m or qdr:y, or cdr:1,cd_min:MM/DD/YYYY,cd_max:MM/DD/YYYY, plus sbd:1, like sbd:1,qdr:w. sbd:1 sorts newest first; results without a date come last. Web takes all of them; news takes qdr and sbd; images take none.","minLength":1,"type":"string"},"timeout":{"description":"Milliseconds to wait for the sources, from 1,000 to 120,000; more is read as 120,000. Default 3,000, or 60,000 when scrapeOptions has formats and the search reads pages. A source that has not answered by then is left out with a warning. When none has, the call fails and costs nothing.","maximum":9007199254740991,"minimum":1000,"type":"integer"}},"required":["query"],"type":"object"}after
{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"categories":{"description":"pdf: web results that are PDF files. research: scholarly papers, in a...","items":{"anyOf":[{"enum":["research","pdf","videos"],"type":"string"},{"additionalProperties":{},"properties":{},"type":"object"}]},"type":"array"},"country":{"description":"Two-letter country to search from, like us. uk is read as gb.","type":"string"},"excludeDomains":{"items":{"type":"string"},"maxItems":10,"type":"array"},"highlights":{"description":"Off by default. With true, a web result whose page we already hold...","type":"boolean"},"ignoreInvalidURLs":{"description":"Leave out results whose address cannot be read as a page.","type":"boolean"},"includeDomains":{"items":{"type":"string"},"maxItems":10,"type":"array"},"lang":{"description":"Two-letter language for web results, like de.","type":"string"},"limit":{"description":"Most results to return for each source.","maximum":100,"minimum":1,"type":"integer"},"location":{"description":"Where to search from, like Germany or San Francisco,California,United...","minLength":1,"type":"string"},"maxAge":{"description":"Accept a stored answer up to this many milliseconds old, at most 30...","maximum":9007199254740991,"minimum":0,"type":"integer"},"query":{"description":"What to search for, up to 500 characters.","maxLength":500,"minLength":1,"type":"string"},"safe":{"description":"Hide explicit web, news and image results when true.","type":"boolean"},"scrapeOptions":{"additionalProperties":{},"description":"With formats, reads each web and news result, as many as limit asks... Costs what scrape costs for each page read: $1 per 1,000 pages, plus $3 per 1,000 pages for each summary or json with a schema or prompt that returns something.","properties":{"formats":{"items":{"anyOf":[{"enum":["markdown","summary","html","rawHtml","rawBase64","links","images","network","branding","audio","video","screenshot","changeTracking","product","menu"],"type":"string"},{"additionalProperties":{},"description":"Objects with a type: changeTracking (modes, schema, prompt, tag), question (question), product, menu, screenshot (fullPage, quality, viewport), highlights (query, count), json (parser, options, schema, prompt, rules, checkPromptInjection), attributes (selectors).","properties":{},"type":"object"}]},"maxItems":20,"minItems":1,"type":"array"},"maxAge":{"maximum":9007199254740991,"minimum":0,"type":"integer"},"onlyMainContent":{"type":"boolean"},"timeout":{"maximum":300000,"minimum":1000,"type":"integer"}},"type":"object"},"sources":{"description":"What to search: web, news, images.","items":{"anyOf":[{"enum":["web","news","images"],"type":"string"},{"additionalProperties":{},"description":"Objects with a type: web (tbs, location, country, lang).","properties":{},"type":"object"}]},"maxItems":5,"minItems":1,"type":"array"},"tbs":{"description":"Time filter: qdr:d, qdr:w, qdr:m or qdr:y, or...","minLength":1,"type":"string"},"timeout":{"description":"Milliseconds to wait for the sources, from 1,000 to 120,000; more is...","maximum":9007199254740991,"minimum":1000,"type":"integer"}},"required":["query"],"type":"object"}Web Parse — Turn a PDF, Word, Excel, PowerPoint or HTML file, or a picture of text, into markdown. $0.50 per 1,000 pages or files whose text comes from a text layer, and $2.50 per 1,000 pages or pictures read from their picture, up to maxPages; summary and json with a schema or a prompt add $3 per 1,000 each; zero data retention adds $2 per 1,000 calls. costUsd shows what the call cost.
Call a Stophy endpoint — Send an endpoint id and its input. Returns the data and what the call cost.
Web Crawl Start — Crawl a website in the background. $2 per 1,000 pages, however they are reached. checkPromptInjection adds $8 per 1,0...
Describe a Stophy endpoint — Optional. Returns an endpoint's full inputs, filter notes, an example and output fields. Costs nothing.
Web Extract — Pull the fields you name from any public page as JSON, each checked against the page. $10 per 1,000 pages for most pa...
Find Stophy endpoints — Start here. Send plain words for the data you want. Returns endpoints with their inputs, filters and cost, ready for stophy_call. Costs nothing.
⟨35 unchanged words⟩ description":"Accepted so a client that sends{an agent model:\"FIRE-1\"works.}Theworks.value is not used. An extract reads the pages it is given ⟨2765 unchanged words⟩
⟨186 unchanged words⟩ Parsers: google-maps, google-maps-place, google-maps-reviews, google-trends,google-scholar,google-patents, google-ads, google-flights, google-hotels, google-play-app, google-play-search ⟨102 unchanged words⟩
⟨903 unchanged words⟩ : \"...\" } to get answer,nullleft out with a warning when the page does not state one), ⟨8 unchanged words⟩ with price, sale, availability and images,orleftnullout with a warning when there is none) and menu (merchant, currency and sections of items with prices,orleftnullout with a warning when there is none) network (the JSON the page loaded while ⟨2584 unchanged words⟩
before
{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"definitions":{"__schema0":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"items":{"allOf":[{"$ref":"#/definitions/__schema0"}]},"type":"array"},{"additionalProperties":{"allOf":[{"$ref":"#/definitions/__schema0"}]},"propertyNames":{"type":"string"},"type":"object"}]},"__schema1":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"items":{"allOf":[{"$ref":"#/definitions/__schema1"}]},"type":"array"},{"additionalProperties":{"allOf":[{"$ref":"#/definitions/__schema1"}]},"propertyNames":{"type":"string"},"type":"object"}]},"__schema2":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"items":{"allOf":[{"$ref":"#/definitions/__schema2"}]},"type":"array"},{"additionalProperties":{"allOf":[{"$ref":"#/definitions/__schema2"}]},"propertyNames":{"type":"string"},"type":"object"}]}},"properties":{"categories":{"description":"pdf: web results that are PDF files. research: scholarly papers, in a research list, ranked by relevance then citations. videos: YouTube videos for the query, in YouTube's order, in a videos list, with the channel, length, views and watch link; a video whose captions we hold also gets the passage that matches the query and where it starts.","items":{"anyOf":[{"enum":["research","pdf","videos"],"type":"string"},{"additionalProperties":false,"properties":{"type":{"enum":["research","pdf","videos"],"type":"string"}},"required":["type"],"type":"object"}]},"type":"array"},"country":{"description":"Two-letter country to search from, like us. uk is read as gb. Image results are always US.","pattern":"^[A-Za-z]{2}$","type":"string"},"excludeDomains":{"items":{"type":"string"},"maxItems":10,"type":"array"},"highlights":{"default":false,"description":"Off by default. With true, a web result whose page we already hold gets the passages that best match the query as its description, in markdown, up to about 2,000 characters; others keep the engine's snippet.","type":"boolean"},"ignoreInvalidURLs":{"default":false,"description":"Leave out results whose address cannot be read as a page.","type":"boolean"},"includeDomains":{"items":{"type":"string"},"maxItems":10,"type":"array"},"lang":{"description":"Two-letter language for web results, like de. It steers which pages come back; some results can still be in other languages.","pattern":"^[A-Za-z]{2}$","type":"string"},"limit":{"description":"Most results to return for each source. Default 10, or 5 when scrapeOptions has formats, which reads every web and news result returned. News returns at most 50.","maximum":100,"minimum":1,"type":"integer"},"location":{"description":"Where to search from, like Germany or San Francisco,California,United States. The last part is the country and replaces country. A city before it narrows web results to that place.","minLength":1,"type":"string"},"maxAge":{"description":"Accept a stored answer up to this many milliseconds old, at most 30 days. Without it, 15 minutes for news and 1 hour for web and images. 0 always searches live.","maximum":9007199254740991,"minimum":0,"type":"integer"},"query":{"description":"What to search for, up to 500 characters. Search operators work in web results: quotes for an exact phrase, -word, site:, -site:, filetype:, inurl:, allinurl:, intitle: and allintitle:. In image results, imagesize:WIDTHxHEIGHT keeps images of exactly that size and larger:WIDTHxHEIGHT keeps images at least that large.","maxLength":500,"minLength":1,"type":"string"},"safe":{"description":"Hide explicit web, news and image results when true.","type":"boolean"},"scrapeOptions":{"additionalProperties":false,"description":"With formats, reads each web and news result, as many as limit asks for, within timeout, and fills each web result's description from it. Without formats no page is read and nothing more is charged. Takes the options of scrape: formats (markdown, html, rawHtml, links, images, summary, screenshot, json and the rest), onlyMainContent, includeTags, excludeTags, maxAge, minAge, waitFor, mobile, timeout (per page), headers, actions, location, parsers, profile and zeroDataRetention. Costs what scrape costs for each page read: $2 per 1,000 pages, plus $8 per 1,000 pages for each summary or json with a schema or prompt that returns something.","properties":{"actions":{"description":"Up to 50 steps to run on the page, in order, before reading it: { \"type\": \"wait\", \"milliseconds\": 500 } (up to 60 seconds), { \"type\": \"wait\", \"selector\": \".results\" }, { \"type\": \"click\", \"selector\": \"button.more\" }, { \"type\": \"write\", \"text\": \"tides\" }, { \"type\": \"press\", \"key\": \"Enter\" }, { \"type\": \"scroll\", \"direction\": \"down\" } (also up, left or right; amount is pixels, \"viewport\" or \"max\"; maxScrolls 1 to 50; selector scrolls an inner container; \"max\" keeps scrolling until the page stops growing, for feeds that load as you go), { \"type\": \"screenshot\", \"fullPage\": true } (links come back in actions.screenshots), { \"type\": \"scrape\" } (the page at that point, in actions.scrapes), { \"type\": \"executeJavascript\", \"script\": \"document.title\" } (results in actions.javascriptReturns), { \"type\": \"pdf\", \"format\": \"A4\" } (links in actions.pdfs) or { \"type\": \"perform\", \"action\": \"Click the Load more button\" } (a step in plain words, up to 5 browser steps on this page, never leaving the site; at most 5 per call). A read with actions costs $2 per 1,000 pages, the same as any page; the actions themselves add nothing. If an action fails, you still get the page as it stood, with a warning that names the action and says why.","items":{"anyOf":[{"additionalProperties":false,"properties":{"milliseconds":{"maximum":60000,"minimum":1,"type":"integer"},"type":{"const":"wait","type":"string"}},"required":["type","milliseconds"],"type":"object"},{"additionalProperties":false,"properties":{"selector":{"minLength":1,"type":"string"},"type":{"const":"wait","type":"string"}},"required":["type","selector"],"type":"object"},{"additionalProperties":false,"properties":{"all":{"const":false,"type":"boolean"},"selector":{"minLength":1,"type":"string"},"type":{"const":"click","type":"string"}},"required":["type","selector"],"type":"object"},{"additionalProperties":false,"properties":{"text":{"minLength":1,"type":"string"},"type":{"const":"write","type":"string"}},"required":["type","text"],"type":"object"},{"additionalProperties":false,"properties":{"key":{"maxLength":40,"minLength":1,"type":"string"},"type":{"const":"press","type":"string"}},"required":["type","key"],"type":"object"},{"additionalProperties":false,"properties":{"amount":{"anyOf":[{"maximum":100000,"minimum":1,"type":"integer"},{"enum":["viewport","max"],"type":"string"}]},"direction":{"default":"down","enum":["up","down","left","right"],"type":"string"},"maxScrolls":{"maximum":50,"minimum":1,"type":"integer"},"selector":{"minLength":1,"type":"string"},"type":{"const":"scroll","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"fullPage":{"type":"boolean"},"quality":{"maximum":100,"minimum":1,"type":"integer"},"type":{"const":"screenshot","type":"string"},"viewport":{"additionalProperties":false,"properties":{"height":{"maximum":2160,"minimum":200,"type":"integer"},"width":{"maximum":3840,"minimum":200,"type":"integer"}},"required":["width","height"],"type":"object"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"type":{"const":"scrape","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"script":{"maxLength":20000,"minLength":1,"type":"string"},"type":{"const":"executeJavascript","type":"string"}},"required":["type","script"],"type":"object"},{"additionalProperties":false,"properties":{"format":{"enum":["Letter","Legal","Tabloid","Ledger","A0","A1","A2","A3","A4","A5","A6"],"type":"string"},"landscape":{"type":"boolean"},"scale":{"maximum":2,"minimum":0.1,"type":"number"},"type":{"const":"pdf","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"action":{"maxLength":500,"minLength":1,"type":"string"},"type":{"const":"perform","type":"string"}},"required":["type","action"],"type":"object"}]},"maxItems":50,"minItems":1,"type":"array"},"blockAds":{"description":"Ads and trackers are not loaded when a page runs in a browser. Send false to load them.","type":"boolean"},"checkPromptInjection":{"description":"Send true to scan the page text for instructions aimed at an AI model before anything is built from it. A page that has them is refused with 403 promptInjectionDetected and costs nothing. The scan adds $8 per 1,000 pages when it runs; a page it cannot scan fully comes back with a warning and no charge.","type":"boolean"},"excludeTags":{"description":"Remove the parts of the page that match these CSS selectors, such as .comments.","items":{"minLength":1,"type":"string"},"minItems":1,"type":"array"},"fastMode":{"description":"Send true to read the page without opening a browser: the answer comes sooner, but a page that needs a browser, or that refuses a plain request, comes back as an error instead of being retried. Ignored when the call needs a browser (actions, screenshot, waitFor, mobile, profile, network, branding).","type":"boolean"},"formats":{"default":["markdown"],"description":"What to return: markdown (clean page text), summary (a short summary of the page), html (the cleaned page), rawHtml (the page as sent), audio and video (for a YouTube link: the audio track as an M4A file, or the video as an MP4 file, as a link that works for 1 hour), rawBase64 (the bytes the site sent, Base64 encoded, from a live read; metadata.contentType says what they are), links (every link on the page), images (every image address), screenshot (a link to a JPEG of the visible page, kept for 7 days), changeTracking (what changed in the markdown since your key last read this page with the same options, kept 30 days; add modes [\"git-diff\",\"json\"] with a schema or prompt to compare fields too), question (send { \"type\": \"question\", \"question\": \"...\" } to get answer, null when the page does not state one), product (title, brand, category, url, description and variants with price, sale, availability and images, or null) and menu (merchant, currency and sections of items with prices, or null) network (the JSON the page loaded while it rendered, up to 30 responses) and branding (the page's colors, fonts, typography, spacing, button and input styles, logo and brand images, read from how the page looks, with a field left out when the page does not show it). Send { \"type\": \"screenshot\", \"fullPage\": true } for the whole page. Send { \"type\": \"highlights\", \"query\": \"refund policy\" } for the passages that best match a query. Send { \"type\": \"json\", \"schema\": { \"type\": \"object\", \"properties\": { \"price\": { \"type\": \"number\" } } } } or { \"type\": \"json\", \"prompt\": \"the price and the stock\" } for fields filled from the page, each checked against it. Send { \"type\": \"json\", \"parser\": \"amazon-product\" } to get a site's own data as json instead of reading the page; GET /v1/parsers lists the parsers. Send { \"type\": \"json\", \"rules\": { \"title\": \"h1\", \"links\": { \"selector\": \"a\", \"type\": \"list\", \"output\": \"@href\" } } } to read the page with CSS rules and no model, at the page's own price. Send { \"type\": \"attributes\", \"selectors\": [{ \"selector\": \"a\", \"attribute\": \"href\" }] } for attribute values, returned in attributes. Without a parser or rules, json needs a schema or a prompt and is filled from the page. json with a schema or a prompt, summary, highlights, question, product, menu and changeTracking in json mode add $8 per 1,000 pages each when they return something. json with rules or a parser, and attributes, cost nothing more. A screenshot, network or branding read costs $2 per 1,000 pages, the same as any page. A PDF comes back as markdown only, and adds $2 per 1,000 pages of text that comes back. A CSV or an Excel .xlsx file comes back as markdown tables.","items":{"anyOf":[{"enum":["markdown","summary","html","rawHtml","rawBase64","links","images","network","branding","audio","video","screenshot","changeTracking","product","menu"],"type":"string"},{"additionalProperties":false,"properties":{"type":{"enum":["markdown","summary","html","rawHtml","rawBase64","links","images","network","branding","audio","video"],"type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"modes":{"description":"git-diff returns a unified diff of the markdown. json compares the fields in schema or prompt between this read and the last one. Without modes you get git-diff.","items":{"enum":["git-diff","json"],"type":"string"},"maxItems":2,"type":"array"},"prompt":{"description":"With json mode: what to compare, in plain words, such as the price and stock.","maxLength":10000,"minLength":1,"type":"string"},"schema":{"additionalProperties":{"$ref":"#/definitions/__schema0"},"description":"The fields to fill, as a JSON Schema (draft-07 or 2020-12) object with properties. Pydantic's model_json_schema() and zod's toJSONSchema() output work as they are. enum, const, anyOf, oneOf, nullable types, $ref with $defs, required, descriptions and any key names are read. Up to 100 top-level fields and 32 KB. A field the page does not state comes back null.","propertyNames":{"type":"string"},"type":"object"},"tag":{"type":"null"},"type":{"const":"changeTracking","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"question":{"description":"A question to answer from the page, such as what the refund window is.","maxLength":10000,"minLength":1,"type":"string"},"type":{"const":"question","type":"string"}},"required":["type","question"],"type":"object"},{"additionalProperties":false,"properties":{"type":{"const":"product","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"type":{"const":"menu","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"fullPage":{"default":false,"description":"Capture the whole page from top to bottom instead of the visible part.","type":"boolean"},"quality":{"description":"JPEG quality from 1 to 100. The default is 70.","maximum":100,"minimum":1,"type":"integer"},"type":{"const":"screenshot","type":"string"},"viewport":{"additionalProperties":false,"description":"The window size in pixels, such as { width: 390, height: 844 }.","properties":{"height":{"maximum":2160,"minimum":200,"type":"integer"},"width":{"maximum":3840,"minimum":200,"type":"integer"}},"required":["width","height"],"type":"object"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"count":{"default":5,"description":"How many passages to return, best match first.","maximum":20,"minimum":1,"type":"integer"},"query":{"description":"What you are looking for on the page, such as refund policy.","maxLength":10000,"minLength":1,"type":"string"},"type":{"const":"highlights","type":"string"}},"required":["type","query"],"type":"object"},{"additionalProperties":false,"properties":{"checkPromptInjection":{"description":"Deprecated: send checkPromptInjection at the top level of the call.","type":"boolean"},"options":{"additionalProperties":{"$ref":"#/definitions/__schema1"},"description":"Only with parser: extra inputs for it, such as { \"page\": 2 } for the next page of results or { \"minRating\": 4.5 } for a filter. GET /v1/parsers lists what each parser accepts.","propertyNames":{"type":"string"},"type":"object"},"parser":{"description":"Read the page with a named parser, which gives the site's own data as json. The url must be the kind of page the parser reads. Parsers are the only way to read some sites. GET /v1/parsers lists them.","type":"string"},"prompt":{"description":"What to pull from the page in plain words, such as the version and the release date.","maxLength":10000,"minLength":1,"type":"string"},"rules":{"additionalProperties":{"$ref":"#/definitions/__schema2"},"description":"Read the page with CSS rules instead of a model, no extra fee. Each field is a selector such as \"h1\" (the first match's text), \"a@href\" (an attribute) or { \"selector\": \"li\", \"type\": \"list\", \"output\": \"text\" | \"html\" | \"@attribute\" | { nested fields } }. A missing item is null and an unmatched list is []. Relative links become absolute. Up to 100 fields, 5 levels deep. Not with schema, prompt or parser.","propertyNames":{"type":"string"},"type":"object"},"schema":{"additionalProperties":{"$ref":"#/definitions/__schema0"},"description":"The fields to fill, as a JSON Schema (draft-07 or 2020-12) object with properties. Pydantic's model_json_schema() and zod's toJSONSchema() output work as they are. enum, const, anyOf, oneOf, nullable types, $ref with $defs, required, descriptions and any key names are read. Up to 100 top-level fields and 32 KB. A field the page does not state comes back null.","propertyNames":{"type":"string"},"type":"object"},"type":{"const":"json","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"selectors":{"description":"The elements and attributes to read, such as { selector: 'a.buy', attribute: 'href' }.","items":{"additionalProperties":false,"properties":{"attribute":{"maxLength":100,"minLength":1,"type":"string"},"selector":{"minLength":1,"type":"string"}},"required":["selector","attribute"],"type":"object"},"maxItems":50,"minItems":1,"type":"array"},"type":{"const":"attributes","type":"string"}},"required":["type","selectors"],"type":"object"}]},"maxItems":20,"minItems":1,"type":"array"},"headers":{"additionalProperties":{"maxLength":2000,"pattern":"^[\\t\\x20-\\x7e]*$","type":"string"},"description":"Extra request headers to send to the site, such as { \"x-plan\": \"pro\" }. A read with headers is never answered from or saved to a stored copy.","propertyNames":{"pattern":"^[A-Za-z0-9-]{1,64}$","type":"string"},"type":"object"},"includeTags":{"description":"Keep only the parts of the page that match these CSS selectors, such as article or .price. When set, onlyMainContent is not applied.","items":{"minLength":1,"type":"string"},"minItems":1,"type":"array"},"location":{"additionalProperties":false,"description":"Where to read the page from. The default is the United States.","properties":{"country":{"description":"Two-letter country code to read the page from, such as DE or JP.","type":"string"},"languages":{"description":"Languages to ask the site for, best first, such as [\"de\", \"en\"]. Sent as Accept-Language. A read with languages is never answered from or saved to a stored copy.","items":{"pattern":"^[A-Za-z]{2,3}(?:-[A-Za-z0-9]{2,8})*$","type":"string"},"maxItems":5,"minItems":1,"type":"array"}},"type":"object"},"lockdown":{"description":"Send true to answer only from a stored copy of the page and never read it live, whatever its age. A page with no stored copy is notFound. The same as minAge 0.","type":"boolean"},"maxAge":{"description":"Accept a stored answer up to this many milliseconds old, at most 30 days. Without it, 2 days, or less for a site whose pages change often, and a copy up to twice that age (at most 7 days) comes back at once as stale while a fresh read runs. 0 always reads the page live. metadata.cacheState says which one you got.","maximum":9007199254740991,"minimum":0,"type":"integer"},"minAge":{"description":"Answer only from a stored copy that is at least this many milliseconds old, and never read the page live. 0 accepts any stored copy. A page with no such copy is notFound.","maximum":9007199254740991,"minimum":0,"type":"integer"},"mobile":{"description":"Read the page as a phone would: a phone-sized screen and the mobile version of the site. The page loads in a browser.","type":"boolean"},"onlyCleanContent":{"description":"Send true to have a model remove what onlyMainContent leaves behind in the markdown: cookie banners, ads, share widgets, breadcrumbs, sign-up prompts, comment prompts and related-article lists. It only removes whole paragraphs and lists; it never rewrites or adds text, and code blocks are always kept. Skipped with a warning when the page is too long to clean or the model does not answer. Not with zeroDataRetention. Summary, answers and highlights are made from the cleaned markdown.","type":"boolean"},"onlyMainContent":{"default":true,"description":"Keep only the page's main content, without menus, headers, footers and ads.","type":"boolean"},"parsers":{"description":"Only the pdf parser exists. Send \"pdf\" or { \"type\": \"pdf\", mode, maxPages, pages, blocks, pageMarkers } with the same meaning as in parse. Without mode a PDF is read as auto: from its text layer, and from the picture of any page that has no text. fast reads the text layer only, and ocr reads the picture of every page, up to 20 pages. Each page of text that comes back costs $2 per 1,000 pages. Pictures are read only with an API key.","items":{"anyOf":[{"const":"pdf","type":"string"},{"additionalProperties":false,"properties":{"blocks":{"description":"Send true to also get the page's layout in blocks: each title, section header or run of text, with its page, reading order, position on the page (bbox as left, top, right, bottom from 0 to 1) and where its text sits in that page's markdown (span, as in pages). Tables, figures and formulas are not told apart. A page read from its picture is one block. No extra charge.","type":"boolean"},"maxPages":{"description":"Read at most this many pages, up to 500, which is also the default.","maximum":500,"minimum":1,"type":"integer"},"mode":{"description":"fast reads the text layer only. auto (the default) reads the text layer and reads the picture of any page that has none. ocr reads the picture of every page.","enum":["fast","auto","ocr"],"type":"string"},"pageMarkers":{"description":"Send true to mark page breaks in the markdown: pages are joined with \"---\" and a line, where N is the page that follows. No extra charge.","type":"boolean"},"pages":{"description":"Send true to also get each page's markdown in pages, as { pageNumber, markdown }. No extra charge.","type":"boolean"},"type":{"const":"pdf","type":"string"}},"required":["type"],"type":"object"}]},"minItems":1,"type":"array"},"profile":{"additionalProperties":false,"description":"Read the page with the cookies and local storage that earlier calls saved under this name, kept for your account for 30 days after the last use. A call with a profile always loads the page in a browser, costs $2 per 1,000 pages, the same as any page, and is never answered from a stored copy. Only one call at a time can save to a profile.","properties":{"name":{"description":"A name you choose, such as shop-login. Calls with the same name share state.","maxLength":128,"minLength":1,"type":"string"},"saveChanges":{"default":true,"description":"Keep the cookies and local storage this read leaves behind for the next call with this name. Send false to read with the profile without changing it.","type":"boolean"}},"required":["name"],"type":"object"},"proxy":{"description":"auto: basic first, enhanced once if the site refuses. basic: one plain attempt. enhanced: the stronger read from the start. stealth is the same as enhanced. Same price.","enum":["auto","basic","enhanced","stealth"],"type":"string"},"redactPII":{"anyOf":[{"type":"boolean"},{"additionalProperties":false,"description":"Options for redactPII.","properties":{"entities":{"default":["PERSON","EMAIL","PHONE","LOCATION","FINANCIAL","SECRET"],"description":"What to hide: PERSON, EMAIL, PHONE, LOCATION, FINANCIAL, SECRET. All by default.","items":{"enum":["PERSON","EMAIL","PHONE","LOCATION","FINANCIAL","SECRET"],"type":"string"},"minItems":1,"type":"array"},"mode":{"default":"accurate","description":"accurate finds names and places with the model and the rest by pattern. aggressive adds guesses that catch more and may hide a little too much. fast uses patterns only, so it finds no ordinary names or places.","enum":["accurate","aggressive","fast"],"type":"string"},"replaceStyle":{"default":"tag","description":"tag writes <EMAIL>, mask writes * for each character, remove deletes it.","enum":["tag","mask","remove"],"type":"string"}},"type":"object"}],"description":"Send true, or an object, to hide personal data in the markdown and in everything made from it (summary, answers, highlights, json). Links, html and rawHtml are not changed. A page the model cannot scan is refused rather than returned unredacted."},"removeBase64Images":{"description":"Images inside the page that carry their data in the address (data:image) are dropped by default. Send false to keep them in markdown and html.","type":"boolean"},"skipTlsVerification":{"description":"Send true to read a page whose certificate is expired, self-signed or for another name. The read is not private against someone between us and the site.","type":"boolean"},"storeInCache":{"default":true,"description":"Send false to neither read nor keep a stored copy of this page.","type":"boolean"},"timeout":{"default":30000,"description":"How long to keep trying, in milliseconds, from 1 second to 5 minutes; 30 seconds by default. A page that needs a browser needs at least 5 seconds, and pages behind a bot check can need 10 to 30 seconds the first time. A read that runs out of time is an error and costs nothing.","maximum":300000,"minimum":1000,"type":"integer"},"waitFor":{"description":"Extra milliseconds to wait before reading, up to 60000, for pages that load their content late. To wait for an element, add a wait action with a selector. A read that waits costs $2 per 1,000 pages, the same as any page.","maximum":60000,"minimum":0,"type":"integer"},"zeroDataRetention":{"default":false,"description":"Send true to keep nothing from this call: no stored copy is read or made, and nothing from it is logged. Adds $2 per 1,000 pages. Not with a screenshot.","type":"boolean"}},"type":"object"},"sources":{"description":"What to search: web, news, images. Each is a string or {type}. Default web, or none when categories asks for research or videos.","items":{"anyOf":[{"enum":["web","news","images"],"type":"string"},{"additionalProperties":false,"properties":{"country":{"description":"ISO 3166-1 alpha-2 country code, e.g. us. Any case is accepted.","pattern":"^[A-Za-z]{2}$","type":"string"},"lang":{"description":"Two-letter language for web results, like de. It steers which pages come back; some results can still be in other languages.","pattern":"^[A-Za-z]{2}$","type":"string"},"location":{"type":"string"},"tbs":{"type":"string"},"type":{"const":"web","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"type":{"enum":["news","images"],"type":"string"}},"required":["type"],"type":"object"}]},"maxItems":5,"minItems":1,"type":"array"},"tbs":{"description":"Time filter: qdr:d, qdr:w, qdr:m or qdr:y, or cdr:1,cd_min:MM/DD/YYYY,cd_max:MM/DD/YYYY, plus sbd:1, like sbd:1,qdr:w. sbd:1 sorts newest first; results without a date come last. Web takes all of them; news takes qdr and sbd; images take none.","minLength":1,"type":"string"},"timeout":{"description":"Milliseconds to wait for the sources, from 1,000 to 120,000; more is read as 120,000. Default 60,000. A source that has not answered by then is left out with a warning. When none has, the call fails and costs nothing.","maximum":9007199254740991,"minimum":1000,"type":"integer"}},"required":["query"],"type":"object"}after
{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"definitions":{"__schema0":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"items":{"allOf":[{"$ref":"#/definitions/__schema0"}]},"type":"array"},{"additionalProperties":{"allOf":[{"$ref":"#/definitions/__schema0"}]},"propertyNames":{"type":"string"},"type":"object"}]},"__schema1":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"items":{"allOf":[{"$ref":"#/definitions/__schema1"}]},"type":"array"},{"additionalProperties":{"allOf":[{"$ref":"#/definitions/__schema1"}]},"propertyNames":{"type":"string"},"type":"object"}]},"__schema2":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"items":{"allOf":[{"$ref":"#/definitions/__schema2"}]},"type":"array"},{"additionalProperties":{"allOf":[{"$ref":"#/definitions/__schema2"}]},"propertyNames":{"type":"string"},"type":"object"}]}},"properties":{"categories":{"description":"pdf: web results that are PDF files. research: scholarly papers, in a research list, ranked by relevance then citations. videos: YouTube videos for the query, in YouTube's order, in a videos list, with the channel, length, views and watch link; a video whose captions we hold also gets the passage that matches the query and where it starts.","items":{"anyOf":[{"enum":["research","pdf","videos"],"type":"string"},{"additionalProperties":false,"properties":{"type":{"enum":["research","pdf","videos"],"type":"string"}},"required":["type"],"type":"object"}]},"type":"array"},"country":{"description":"Two-letter country to search from, like us. uk is read as gb. Image results are always US.","pattern":"^[A-Za-z]{2}$","type":"string"},"excludeDomains":{"items":{"type":"string"},"maxItems":10,"type":"array"},"highlights":{"default":false,"description":"Off by default. With true, a web result whose page we already hold gets the passages that best match the query as its description, in markdown, up to about 2,000 characters; others keep the engine's snippet.","type":"boolean"},"ignoreInvalidURLs":{"default":false,"description":"Leave out results whose address cannot be read as a page.","type":"boolean"},"includeDomains":{"items":{"type":"string"},"maxItems":10,"type":"array"},"lang":{"description":"Two-letter language for web results, like de. It steers which pages come back; some results can still be in other languages.","pattern":"^[A-Za-z]{2}$","type":"string"},"limit":{"description":"Most results to return for each source. Default 10, or 5 when scrapeOptions has formats, which reads every web and news result returned. News returns at most 50.","maximum":100,"minimum":1,"type":"integer"},"location":{"description":"Where to search from, like Germany or San Francisco,California,United States. The last part is the country and replaces country. A city before it narrows web results to that place.","minLength":1,"type":"string"},"maxAge":{"description":"Accept a stored answer up to this many milliseconds old, at most 30 days. Without it, 15 minutes for news and 1 hour for web and images. 0 always searches live.","maximum":9007199254740991,"minimum":0,"type":"integer"},"query":{"description":"What to search for, up to 500 characters. Search operators work in web results: quotes for an exact phrase, -word, site:, -site:, filetype:, inurl:, allinurl:, intitle: and allintitle:. In image results, imagesize:WIDTHxHEIGHT keeps images of exactly that size and larger:WIDTHxHEIGHT keeps images at least that large.","maxLength":500,"minLength":1,"type":"string"},"safe":{"description":"Hide explicit web, news and image results when true.","type":"boolean"},"scrapeOptions":{"additionalProperties":false,"description":"With formats, reads each web and news result, as many as limit asks for, within timeout, and fills each web result's description from it. Without formats no page is read and nothing more is charged. Takes the options of scrape: formats (markdown, html, rawHtml, links, images, summary, screenshot, json and the rest), onlyMainContent, includeTags, excludeTags, maxAge, minAge, waitFor, mobile, timeout (per page), headers, actions, location, parsers, profile and zeroDataRetention. Costs what scrape costs for each page read: $2 per 1,000 pages, plus $8 per 1,000 pages for each summary or json with a schema or prompt that returns something.","properties":{"actions":{"description":"Up to 50 steps to run on the page, in order, before reading it: { \"type\": \"wait\", \"milliseconds\": 500 } (up to 60 seconds), { \"type\": \"wait\", \"selector\": \".results\" }, { \"type\": \"click\", \"selector\": \"button.more\" }, { \"type\": \"write\", \"text\": \"tides\" }, { \"type\": \"press\", \"key\": \"Enter\" }, { \"type\": \"scroll\", \"direction\": \"down\" } (also up, left or right; amount is pixels, \"viewport\" or \"max\"; maxScrolls 1 to 50; selector scrolls an inner container; \"max\" keeps scrolling until the page stops growing, for feeds that load as you go), { \"type\": \"screenshot\", \"fullPage\": true } (links come back in actions.screenshots), { \"type\": \"scrape\" } (the page at that point, in actions.scrapes), { \"type\": \"executeJavascript\", \"script\": \"document.title\" } (results in actions.javascriptReturns), { \"type\": \"pdf\", \"format\": \"A4\" } (links in actions.pdfs) or { \"type\": \"perform\", \"action\": \"Click the Load more button\" } (a step in plain words, up to 5 browser steps on this page, never leaving the site; at most 5 per call). A read with actions costs $2 per 1,000 pages, the same as any page; the actions themselves add nothing. If an action fails, you still get the page as it stood, with a warning that names the action and says why.","items":{"anyOf":[{"additionalProperties":false,"properties":{"milliseconds":{"maximum":60000,"minimum":1,"type":"integer"},"type":{"const":"wait","type":"string"}},"required":["type","milliseconds"],"type":"object"},{"additionalProperties":false,"properties":{"selector":{"minLength":1,"type":"string"},"type":{"const":"wait","type":"string"}},"required":["type","selector"],"type":"object"},{"additionalProperties":false,"properties":{"all":{"const":false,"type":"boolean"},"selector":{"minLength":1,"type":"string"},"type":{"const":"click","type":"string"}},"required":["type","selector"],"type":"object"},{"additionalProperties":false,"properties":{"text":{"minLength":1,"type":"string"},"type":{"const":"write","type":"string"}},"required":["type","text"],"type":"object"},{"additionalProperties":false,"properties":{"key":{"maxLength":40,"minLength":1,"type":"string"},"type":{"const":"press","type":"string"}},"required":["type","key"],"type":"object"},{"additionalProperties":false,"properties":{"amount":{"anyOf":[{"maximum":100000,"minimum":1,"type":"integer"},{"enum":["viewport","max"],"type":"string"}]},"direction":{"default":"down","enum":["up","down","left","right"],"type":"string"},"maxScrolls":{"maximum":50,"minimum":1,"type":"integer"},"selector":{"minLength":1,"type":"string"},"type":{"const":"scroll","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"fullPage":{"type":"boolean"},"quality":{"maximum":100,"minimum":1,"type":"integer"},"type":{"const":"screenshot","type":"string"},"viewport":{"additionalProperties":false,"properties":{"height":{"maximum":2160,"minimum":200,"type":"integer"},"width":{"maximum":3840,"minimum":200,"type":"integer"}},"required":["width","height"],"type":"object"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"type":{"const":"scrape","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"script":{"maxLength":20000,"minLength":1,"type":"string"},"type":{"const":"executeJavascript","type":"string"}},"required":["type","script"],"type":"object"},{"additionalProperties":false,"properties":{"format":{"enum":["Letter","Legal","Tabloid","Ledger","A0","A1","A2","A3","A4","A5","A6"],"type":"string"},"landscape":{"type":"boolean"},"scale":{"maximum":2,"minimum":0.1,"type":"number"},"type":{"const":"pdf","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"action":{"maxLength":500,"minLength":1,"type":"string"},"type":{"const":"perform","type":"string"}},"required":["type","action"],"type":"object"}]},"maxItems":50,"minItems":1,"type":"array"},"blockAds":{"description":"Ads and trackers are not loaded when a page runs in a browser. Send false to load them.","type":"boolean"},"checkPromptInjection":{"description":"Send true to scan the page text for instructions aimed at an AI model before anything is built from it. A page that has them is refused with 403 promptInjectionDetected and costs nothing. The scan adds $8 per 1,000 pages when it runs; a page it cannot scan fully comes back with a warning and no charge.","type":"boolean"},"excludeTags":{"description":"Remove the parts of the page that match these CSS selectors, such as .comments.","items":{"minLength":1,"type":"string"},"minItems":1,"type":"array"},"fastMode":{"description":"Send true to read the page without opening a browser: the answer comes sooner, but a page that needs a browser, or that refuses a plain request, comes back as an error instead of being retried. Ignored when the call needs a browser (actions, screenshot, waitFor, mobile, profile, network, branding).","type":"boolean"},"formats":{"default":["markdown"],"description":"What to return: markdown (clean page text), summary (a short summary of the page), html (the cleaned page), rawHtml (the page as sent), audio and video (for a YouTube link: the audio track as an M4A file, or the video as an MP4 file, as a link that works for 1 hour), rawBase64 (the bytes the site sent, Base64 encoded, from a live read; metadata.contentType says what they are), links (every link on the page), images (every image address), screenshot (a link to a JPEG of the visible page, kept for 7 days), changeTracking (what changed in the markdown since your key last read this page with the same options, kept 30 days; add modes [\"git-diff\",\"json\"] with a schema or prompt to compare fields too), question (send { \"type\": \"question\", \"question\": \"...\" } to get answer, left out with a warning when the page does not state one), product (title, brand, category, url, description and variants with price, sale, availability and images, left out with a warning when there is none) and menu (merchant, currency and sections of items with prices, left out with a warning when there is none) network (the JSON the page loaded while it rendered, up to 30 responses) and branding (the page's colors, fonts, typography, spacing, button and input styles, logo and brand images, read from how the page looks, with a field left out when the page does not show it). Send { \"type\": \"screenshot\", \"fullPage\": true } for the whole page. Send { \"type\": \"highlights\", \"query\": \"refund policy\" } for the passages that best match a query. Send { \"type\": \"json\", \"schema\": { \"type\": \"object\", \"properties\": { \"price\": { \"type\": \"number\" } } } } or { \"type\": \"json\", \"prompt\": \"the price and the stock\" } for fields filled from the page, each checked against it. Send { \"type\": \"json\", \"parser\": \"amazon-product\" } to get a site's own data as json instead of reading the page; GET /v1/parsers lists the parsers. Send { \"type\": \"json\", \"rules\": { \"title\": \"h1\", \"links\": { \"selector\": \"a\", \"type\": \"list\", \"output\": \"@href\" } } } to read the page with CSS rules and no model, at the page's own price. Send { \"type\": \"attributes\", \"selectors\": [{ \"selector\": \"a\", \"attribute\": \"href\" }] } for attribute values, returned in attributes. Without a parser or rules, json needs a schema or a prompt and is filled from the page. json with a schema or a prompt, summary, highlights, question, product, menu and changeTracking in json mode add $8 per 1,000 pages each when they return something. json with rules or a parser, and attributes, cost nothing more. A screenshot, network or branding read costs $2 per 1,000 pages, the same as any page. A PDF comes back as markdown only, and adds $2 per 1,000 pages of text that comes back. A CSV or an Excel .xlsx file comes back as markdown tables.","items":{"anyOf":[{"enum":["markdown","summary","html","rawHtml","rawBase64","links","images","network","branding","audio","video","screenshot","changeTracking","product","menu"],"type":"string"},{"additionalProperties":false,"properties":{"type":{"enum":["markdown","summary","html","rawHtml","rawBase64","links","images","network","branding","audio","video"],"type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"modes":{"description":"git-diff returns a unified diff of the markdown. json compares the fields in schema or prompt between this read and the last one. Without modes you get git-diff.","items":{"enum":["git-diff","json"],"type":"string"},"maxItems":2,"type":"array"},"prompt":{"description":"With json mode: what to compare, in plain words, such as the price and stock.","maxLength":10000,"minLength":1,"type":"string"},"schema":{"additionalProperties":{"$ref":"#/definitions/__schema0"},"description":"The fields to fill, as a JSON Schema (draft-07 or 2020-12) object with properties. Pydantic's model_json_schema() and zod's toJSONSchema() output work as they are. enum, const, anyOf, oneOf, nullable types, $ref with $defs, required, descriptions and any key names are read. Up to 100 top-level fields and 32 KB. A field the page does not state comes back null.","propertyNames":{"type":"string"},"type":"object"},"tag":{"type":"null"},"type":{"const":"changeTracking","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"question":{"description":"A question to answer from the page, such as what the refund window is.","maxLength":10000,"minLength":1,"type":"string"},"type":{"const":"question","type":"string"}},"required":["type","question"],"type":"object"},{"additionalProperties":false,"properties":{"type":{"const":"product","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"type":{"const":"menu","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"fullPage":{"default":false,"description":"Capture the whole page from top to bottom instead of the visible part.","type":"boolean"},"quality":{"description":"JPEG quality from 1 to 100. The default is 70.","maximum":100,"minimum":1,"type":"integer"},"type":{"const":"screenshot","type":"string"},"viewport":{"additionalProperties":false,"description":"The window size in pixels, such as { width: 390, height: 844 }.","properties":{"height":{"maximum":2160,"minimum":200,"type":"integer"},"width":{"maximum":3840,"minimum":200,"type":"integer"}},"required":["width","height"],"type":"object"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"count":{"default":5,"description":"How many passages to return, best match first.","maximum":20,"minimum":1,"type":"integer"},"query":{"description":"What you are looking for on the page, such as refund policy.","maxLength":10000,"minLength":1,"type":"string"},"type":{"const":"highlights","type":"string"}},"required":["type","query"],"type":"object"},{"additionalProperties":false,"properties":{"checkPromptInjection":{"description":"Deprecated: send checkPromptInjection at the top level of the call.","type":"boolean"},"options":{"additionalProperties":{"$ref":"#/definitions/__schema1"},"description":"Only with parser: extra inputs for it, such as { \"page\": 2 } for the next page of results or { \"minRating\": 4.5 } for a filter. GET /v1/parsers lists what each parser accepts.","propertyNames":{"type":"string"},"type":"object"},"parser":{"description":"Read the page with a named parser, which gives the site's own data as json. The url must be the kind of page the parser reads. Parsers are the only way to read some sites. GET /v1/parsers lists them.","type":"string"},"prompt":{"description":"What to pull from the page in plain words, such as the version and the release date.","maxLength":10000,"minLength":1,"type":"string"},"rules":{"additionalProperties":{"$ref":"#/definitions/__schema2"},"description":"Read the page with CSS rules instead of a model, no extra fee. Each field is a selector such as \"h1\" (the first match's text), \"a@href\" (an attribute) or { \"selector\": \"li\", \"type\": \"list\", \"output\": \"text\" | \"html\" | \"@attribute\" | { nested fields } }. A missing item is null and an unmatched list is []. Relative links become absolute. Up to 100 fields, 5 levels deep. Not with schema, prompt or parser.","propertyNames":{"type":"string"},"type":"object"},"schema":{"additionalProperties":{"$ref":"#/definitions/__schema0"},"description":"The fields to fill, as a JSON Schema (draft-07 or 2020-12) object with properties. Pydantic's model_json_schema() and zod's toJSONSchema() output work as they are. enum, const, anyOf, oneOf, nullable types, $ref with $defs, required, descriptions and any key names are read. Up to 100 top-level fields and 32 KB. A field the page does not state comes back null.","propertyNames":{"type":"string"},"type":"object"},"type":{"const":"json","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"selectors":{"description":"The elements and attributes to read, such as { selector: 'a.buy', attribute: 'href' }.","items":{"additionalProperties":false,"properties":{"attribute":{"maxLength":100,"minLength":1,"type":"string"},"selector":{"minLength":1,"type":"string"}},"required":["selector","attribute"],"type":"object"},"maxItems":50,"minItems":1,"type":"array"},"type":{"const":"attributes","type":"string"}},"required":["type","selectors"],"type":"object"}]},"maxItems":20,"minItems":1,"type":"array"},"headers":{"additionalProperties":{"maxLength":2000,"pattern":"^[\\t\\x20-\\x7e]*$","type":"string"},"description":"Extra request headers to send to the site, such as { \"x-plan\": \"pro\" }. A read with headers is never answered from or saved to a stored copy.","propertyNames":{"pattern":"^[A-Za-z0-9-]{1,64}$","type":"string"},"type":"object"},"includeTags":{"description":"Keep only the parts of the page that match these CSS selectors, such as article or .price. When set, onlyMainContent is not applied.","items":{"minLength":1,"type":"string"},"minItems":1,"type":"array"},"location":{"additionalProperties":false,"description":"Where to read the page from. The default is the United States.","properties":{"country":{"description":"Two-letter country code to read the page from, such as DE or JP.","type":"string"},"languages":{"description":"Languages to ask the site for, best first, such as [\"de\", \"en\"]. Sent as Accept-Language. A read with languages is never answered from or saved to a stored copy.","items":{"pattern":"^[A-Za-z]{2,3}(?:-[A-Za-z0-9]{2,8})*$","type":"string"},"maxItems":5,"minItems":1,"type":"array"}},"type":"object"},"lockdown":{"description":"Send true to answer only from a stored copy of the page and never read it live, whatever its age. A page with no stored copy is notFound. The same as minAge 0.","type":"boolean"},"maxAge":{"description":"Accept a stored answer up to this many milliseconds old, at most 30 days. Without it, 2 days, or less for a site whose pages change often, and a copy up to twice that age (at most 7 days) comes back at once as stale while a fresh read runs. 0 always reads the page live. metadata.cacheState says which one you got.","maximum":9007199254740991,"minimum":0,"type":"integer"},"minAge":{"description":"Answer only from a stored copy that is at least this many milliseconds old, and never read the page live. 0 accepts any stored copy. A page with no such copy is notFound.","maximum":9007199254740991,"minimum":0,"type":"integer"},"mobile":{"description":"Read the page as a phone would: a phone-sized screen and the mobile version of the site. The page loads in a browser.","type":"boolean"},"onlyCleanContent":{"description":"Send true to have a model remove what onlyMainContent leaves behind in the markdown: cookie banners, ads, share widgets, breadcrumbs, sign-up prompts, comment prompts and related-article lists. It only removes whole paragraphs and lists; it never rewrites or adds text, and code blocks are always kept. Skipped with a warning when the page is too long to clean or the model does not answer. Not with zeroDataRetention. Summary, answers and highlights are made from the cleaned markdown.","type":"boolean"},"onlyMainContent":{"default":true,"description":"Keep only the page's main content, without menus, headers, footers and ads.","type":"boolean"},"parsers":{"description":"Only the pdf parser exists. Send \"pdf\" or { \"type\": \"pdf\", mode, maxPages, pages, blocks, pageMarkers } with the same meaning as in parse. Without mode a PDF is read as auto: from its text layer, and from the picture of any page that has no text. fast reads the text layer only, and ocr reads the picture of every page, up to 20 pages. Each page of text that comes back costs $2 per 1,000 pages. Pictures are read only with an API key.","items":{"anyOf":[{"const":"pdf","type":"string"},{"additionalProperties":false,"properties":{"blocks":{"description":"Send true to also get the page's layout in blocks: each title, section header or run of text, with its page, reading order, position on the page (bbox as left, top, right, bottom from 0 to 1) and where its text sits in that page's markdown (span, as in pages). Tables, figures and formulas are not told apart. A page read from its picture is one block. No extra charge.","type":"boolean"},"maxPages":{"description":"Read at most this many pages, up to 500, which is also the default.","maximum":500,"minimum":1,"type":"integer"},"mode":{"description":"fast reads the text layer only. auto (the default) reads the text layer and reads the picture of any page that has none. ocr reads the picture of every page.","enum":["fast","auto","ocr"],"type":"string"},"pageMarkers":{"description":"Send true to mark page breaks in the markdown: pages are joined with \"---\" and a line, where N is the page that follows. No extra charge.","type":"boolean"},"pages":{"description":"Send true to also get each page's markdown in pages, as { pageNumber, markdown }. No extra charge.","type":"boolean"},"type":{"const":"pdf","type":"string"}},"required":["type"],"type":"object"}]},"minItems":1,"type":"array"},"profile":{"additionalProperties":false,"description":"Read the page with the cookies and local storage that earlier calls saved under this name, kept for your account for 30 days after the last use. A call with a profile always loads the page in a browser, costs $2 per 1,000 pages, the same as any page, and is never answered from a stored copy. Only one call at a time can save to a profile.","properties":{"name":{"description":"A name you choose, such as shop-login. Calls with the same name share state.","maxLength":128,"minLength":1,"type":"string"},"saveChanges":{"default":true,"description":"Keep the cookies and local storage this read leaves behind for the next call with this name. Send false to read with the profile without changing it.","type":"boolean"}},"required":["name"],"type":"object"},"proxy":{"description":"auto: basic first, enhanced once if the site refuses. basic: one plain attempt. enhanced: the stronger read from the start. stealth is the same as enhanced. Same price.","enum":["auto","basic","enhanced","stealth"],"type":"string"},"redactPII":{"anyOf":[{"type":"boolean"},{"additionalProperties":false,"description":"Options for redactPII.","properties":{"entities":{"default":["PERSON","EMAIL","PHONE","LOCATION","FINANCIAL","SECRET"],"description":"What to hide: PERSON, EMAIL, PHONE, LOCATION, FINANCIAL, SECRET. All by default.","items":{"enum":["PERSON","EMAIL","PHONE","LOCATION","FINANCIAL","SECRET"],"type":"string"},"minItems":1,"type":"array"},"mode":{"default":"accurate","description":"accurate finds names and places with the model and the rest by pattern. aggressive adds guesses that catch more and may hide a little too much. fast uses patterns only, so it finds no ordinary names or places.","enum":["accurate","aggressive","fast"],"type":"string"},"replaceStyle":{"default":"tag","description":"tag writes <EMAIL>, mask writes * for each character, remove deletes it.","enum":["tag","mask","remove"],"type":"string"}},"type":"object"}],"description":"Send true, or an object, to hide personal data in the markdown and in everything made from it (summary, answers, highlights, json). Links, html and rawHtml are not changed. A page the model cannot scan is refused rather than returned unredacted."},"removeBase64Images":{"description":"Images inside the page that carry their data in the address (data:image) are dropped by default. Send false to keep them in markdown and html.","type":"boolean"},"skipTlsVerification":{"description":"Send true to read a page whose certificate is expired, self-signed or for another name. The read is not private against someone between us and the site.","type":"boolean"},"storeInCache":{"default":true,"description":"Send false to neither read nor keep a stored copy of this page.","type":"boolean"},"timeout":{"default":30000,"description":"How long to keep trying, in milliseconds, from 1 second to 5 minutes; 30 seconds by default. A page that needs a browser needs at least 5 seconds, and pages behind a bot check can need 10 to 30 seconds the first time. A read that runs out of time is an error and costs nothing.","maximum":300000,"minimum":1000,"type":"integer"},"waitFor":{"description":"Extra milliseconds to wait before reading, up to 60000, for pages that load their content late. To wait for an element, add a wait action with a selector. A read that waits costs $2 per 1,000 pages, the same as any page.","maximum":60000,"minimum":0,"type":"integer"},"zeroDataRetention":{"default":false,"description":"Send true to keep nothing from this call: no stored copy is read or made, and nothing from it is logged. Adds $2 per 1,000 pages. Not with a screenshot.","type":"boolean"}},"type":"object"},"sources":{"description":"What to search: web, news, images. Each is a string or {type}. Default web, or none when categories asks for research or videos.","items":{"anyOf":[{"enum":["web","news","images"],"type":"string"},{"additionalProperties":false,"properties":{"country":{"description":"ISO 3166-1 alpha-2 country code, e.g. us. Any case is accepted.","pattern":"^[A-Za-z]{2}$","type":"string"},"lang":{"description":"Two-letter language for web results, like de. It steers which pages come back; some results can still be in other languages.","pattern":"^[A-Za-z]{2}$","type":"string"},"location":{"type":"string"},"tbs":{"type":"string"},"type":{"const":"web","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"type":{"enum":["news","images"],"type":"string"}},"required":["type"],"type":"object"}]},"maxItems":5,"minItems":1,"type":"array"},"tbs":{"description":"Time filter: qdr:d, qdr:w, qdr:m or qdr:y, or cdr:1,cd_min:MM/DD/YYYY,cd_max:MM/DD/YYYY, plus sbd:1, like sbd:1,qdr:w. sbd:1 sorts newest first; results without a date come last. Web takes all of them; news takes qdr and sbd; images take none.","minLength":1,"type":"string"},"timeout":{"description":"Milliseconds to wait for the sources, from 1,000 to 120,000; more is read as 120,000. Default 3,000, or 60,000 when scrapeOptions has formats and the search reads pages. A source that has not answered by then is left out with a warning. When none has, the call fails and costs nothing.","maximum":9007199254740991,"minimum":1000,"type":"integer"}},"required":["query"],"type":"object"}before
{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"definitions":{"__schema0":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"items":{"allOf":[{"$ref":"#/definitions/__schema0"}]},"type":"array"},{"additionalProperties":{"allOf":[{"$ref":"#/definitions/__schema0"}]},"propertyNames":{"type":"string"},"type":"object"}]},"__schema1":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"items":{"allOf":[{"$ref":"#/definitions/__schema1"}]},"type":"array"},{"additionalProperties":{"allOf":[{"$ref":"#/definitions/__schema1"}]},"propertyNames":{"type":"string"},"type":"object"}]},"__schema2":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"items":{"allOf":[{"$ref":"#/definitions/__schema2"}]},"type":"array"},{"additionalProperties":{"allOf":[{"$ref":"#/definitions/__schema2"}]},"propertyNames":{"type":"string"},"type":"object"}]}},"properties":{"allowExternalLinks":{"default":false,"description":"Also follow links to other sites. They count toward limit and maxDiscoveryDepth. Only the start site's robots.txt is read.","type":"boolean"},"allowSubdomains":{"default":false,"description":"Also read pages on subdomains, such as docs.bun.com for bun.com.","type":"boolean"},"crawlEntireDomain":{"default":false,"description":"Read the whole site, not only pages under the start page's path.","type":"boolean"},"deduplicateSimilarURLs":{"default":true,"description":"Read one page when addresses differ only by www, a trailing slash, a #fragment, tracking parameters such as utm_source, or the order of the ?query. Send false to read each address.","type":"boolean"},"delay":{"description":"Seconds to wait between pages. With delay the crawl reads one page at a time. At most 60.","maximum":60,"minimum":0,"type":"number"},"excludePaths":{"default":[],"description":"Skip pages whose path matches one of these regular expressions, such as tag/.*.","items":{"maxLength":200,"minLength":1,"type":"string"},"maxItems":100,"type":"array"},"ignoreQueryParameters":{"default":false,"description":"Treat addresses that differ only in their ?query part as one page.","type":"boolean"},"includePaths":{"default":[],"description":"Read only pages whose path matches one of these regular expressions, such as blog/.*.","items":{"maxLength":200,"minLength":1,"type":"string"},"maxItems":100,"type":"array"},"limit":{"default":10000,"description":"Stop after reading this many pages in total.","maximum":10000,"minimum":1,"type":"integer"},"maxConcurrency":{"description":"Most pages read at once. We read at most 4 at once, so a larger number gives the same speed.","maximum":100,"minimum":1,"type":"integer"},"maxDiscoveryDepth":{"description":"How many links away from the start page to go. Without it there is no depth limit, and limit bounds the crawl.","maximum":9007199254740991,"minimum":0,"type":"integer"},"prompt":{"description":"What you are looking for, such as sqlite performance. Pages about it are read first, and the crawl stops once new pages stop mentioning it.","maxLength":1000,"minLength":1,"type":"string"},"regexOnFullURL":{"default":false,"description":"Match includePaths and excludePaths against the whole address, not only the path.","type":"boolean"},"scrapeOptions":{"additionalProperties":{},"description":"How to read each page, the same options and formats as scrape. Without formats, each page comes back as markdown.","properties":{"actions":{"description":"Up to 50 steps to run on the page, in order, before reading it: { \"type\": \"wait\", \"milliseconds\": 500 } (up to 60 seconds), { \"type\": \"wait\", \"selector\": \".results\" }, { \"type\": \"click\", \"selector\": \"button.more\" }, { \"type\": \"write\", \"text\": \"tides\" }, { \"type\": \"press\", \"key\": \"Enter\" }, { \"type\": \"scroll\", \"direction\": \"down\" } (also up, left or right; amount is pixels, \"viewport\" or \"max\"; maxScrolls 1 to 50; selector scrolls an inner container; \"max\" keeps scrolling until the page stops growing, for feeds that load as you go), { \"type\": \"screenshot\", \"fullPage\": true } (links come back in actions.screenshots), { \"type\": \"scrape\" } (the page at that point, in actions.scrapes), { \"type\": \"executeJavascript\", \"script\": \"document.title\" } (results in actions.javascriptReturns), { \"type\": \"pdf\", \"format\": \"A4\" } (links in actions.pdfs) or { \"type\": \"perform\", \"action\": \"Click the Load more button\" } (a step in plain words, up to 5 browser steps on this page, never leaving the site; at most 5 per call). A read with actions costs 1 credit, the same as any page; the actions themselves add nothing. If an action fails, you still get the page as it stood, with a warning that names the action and says why.","items":{"anyOf":[{"additionalProperties":false,"properties":{"milliseconds":{"maximum":60000,"minimum":1,"type":"integer"},"type":{"const":"wait","type":"string"}},"required":["type","milliseconds"],"type":"object"},{"additionalProperties":false,"properties":{"selector":{"minLength":1,"type":"string"},"type":{"const":"wait","type":"string"}},"required":["type","selector"],"type":"object"},{"additionalProperties":false,"properties":{"all":{"const":false,"type":"boolean"},"selector":{"minLength":1,"type":"string"},"type":{"const":"click","type":"string"}},"required":["type","selector"],"type":"object"},{"additionalProperties":false,"properties":{"text":{"minLength":1,"type":"string"},"type":{"const":"write","type":"string"}},"required":["type","text"],"type":"object"},{"additionalProperties":false,"properties":{"key":{"maxLength":40,"minLength":1,"type":"string"},"type":{"const":"press","type":"string"}},"required":["type","key"],"type":"object"},{"additionalProperties":false,"properties":{"amount":{"anyOf":[{"maximum":100000,"minimum":1,"type":"integer"},{"enum":["viewport","max"],"type":"string"}]},"direction":{"default":"down","enum":["up","down","left","right"],"type":"string"},"maxScrolls":{"maximum":50,"minimum":1,"type":"integer"},"selector":{"minLength":1,"type":"string"},"type":{"const":"scroll","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"fullPage":{"type":"boolean"},"quality":{"maximum":100,"minimum":1,"type":"integer"},"type":{"const":"screenshot","type":"string"},"viewport":{"additionalProperties":false,"properties":{"height":{"maximum":2160,"minimum":200,"type":"integer"},"width":{"maximum":3840,"minimum":200,"type":"integer"}},"required":["width","height"],"type":"object"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"type":{"const":"scrape","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"script":{"maxLength":20000,"minLength":1,"type":"string"},"type":{"const":"executeJavascript","type":"string"}},"required":["type","script"],"type":"object"},{"additionalProperties":false,"properties":{"format":{"enum":["Letter","Legal","Tabloid","Ledger","A0","A1","A2","A3","A4","A5","A6"],"type":"string"},"landscape":{"type":"boolean"},"scale":{"maximum":2,"minimum":0.1,"type":"number"},"type":{"const":"pdf","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"action":{"maxLength":500,"minLength":1,"type":"string"},"type":{"const":"perform","type":"string"}},"required":["type","action"],"type":"object"}]},"maxItems":50,"minItems":1,"type":"array"},"blockAds":{"description":"Ads and trackers are not loaded when a page runs in a browser. Send false to load them.","type":"boolean"},"checkPromptInjection":{"description":"Send true to scan the page text for instructions aimed at an AI model before anything is built from it. A page that has them is refused with 403 promptInjectionDetected and costs nothing. The scan adds 4 credits when it runs; a page it cannot scan fully comes back with a warning and no charge.","type":"boolean"},"excludeTags":{"description":"Remove the parts of the page that match these CSS selectors, such as .comments.","items":{"minLength":1,"type":"string"},"minItems":1,"type":"array"},"fastMode":{"description":"Send true to read the page without opening a browser: the answer comes sooner, but a page that needs a browser, or that refuses a plain request, comes back as an error instead of being retried. Ignored when the call needs a browser (actions, screenshot, waitFor, mobile, profile, network, branding).","type":"boolean"},"formats":{"default":["markdown"],"description":"What to return: markdown (clean page text), summary (a short summary of the page), html (the cleaned page), rawHtml (the page as sent), audio and video (for a YouTube link: the audio track as an M4A file, or the video as an MP4 file, as a link that works for 1 hour), rawBase64 (the bytes the site sent, Base64 encoded, from a live read; metadata.contentType says what they are), links (every link on the page), images (every image address), screenshot (a link to a JPEG of the visible page, kept for 7 days), changeTracking (what changed in the markdown since your key last read this page with the same options, kept 30 days; add modes [\"git-diff\",\"json\"] with a schema or prompt to compare fields too), question (send { \"type\": \"question\", \"question\": \"...\" } to get answer, null when the page does not state one), product (title, brand, category, url, description and variants with price, sale, availability and images, or null) and menu (merchant, currency and sections of items with prices, or null) network (the JSON the page loaded while it rendered, up to 30 responses) and branding (the page's colors, fonts, typography, spacing, button and input styles, logo and brand images, read from how the page looks, with a field left out when the page does not show it). Send { \"type\": \"screenshot\", \"fullPage\": true } for the whole page. Send { \"type\": \"highlights\", \"query\": \"refund policy\" } for the passages that best match a query. Send { \"type\": \"json\", \"schema\": { \"type\": \"object\", \"properties\": { \"price\": { \"type\": \"number\" } } } } or { \"type\": \"json\", \"prompt\": \"the price and the stock\" } for fields filled from the page, each checked against it. Send { \"type\": \"json\", \"parser\": \"amazon-product\" } to get a site's own data as json instead of reading the page; GET /v1/parsers lists the parsers. Send { \"type\": \"json\", \"rules\": { \"title\": \"h1\", \"links\": { \"selector\": \"a\", \"type\": \"list\", \"output\": \"@href\" } } } to read the page with CSS rules and no model, at the page's own price. Send { \"type\": \"attributes\", \"selectors\": [{ \"selector\": \"a\", \"attribute\": \"href\" }] } for attribute values, returned in attributes. Without a parser or rules, json needs a schema or a prompt and is filled from the page. json with a schema or a prompt, summary, highlights, question, product, menu and changeTracking in json mode cost 4 credits more each when they return something. json with rules or a parser, and attributes, cost nothing more. A screenshot, network or branding read costs 1 credit, the same as any page. A PDF comes back as markdown only, and costs 1 credit more for each page of text that comes back. A CSV or an Excel .xlsx file comes back as markdown tables.","items":{"anyOf":[{"enum":["markdown","summary","html","rawHtml","rawBase64","links","images","network","branding","audio","video","screenshot","changeTracking","product","menu"],"type":"string"},{"additionalProperties":false,"properties":{"type":{"enum":["markdown","summary","html","rawHtml","rawBase64","links","images","network","branding","audio","video"],"type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"modes":{"description":"git-diff returns a unified diff of the markdown. json compares the fields in schema or prompt between this read and the last one. Without modes you get git-diff.","items":{"enum":["git-diff","json"],"type":"string"},"maxItems":2,"type":"array"},"prompt":{"description":"With json mode: what to compare, in plain words, such as the price and stock.","maxLength":10000,"minLength":1,"type":"string"},"schema":{"additionalProperties":{"$ref":"#/definitions/__schema0"},"description":"The fields to fill, as a JSON Schema (draft-07 or 2020-12) object with properties. Pydantic's model_json_schema() and zod's toJSONSchema() output work as they are. enum, const, anyOf, oneOf, nullable types, $ref with $defs, required, descriptions and any key names are read. Up to 100 top-level fields and 32 KB. A field the page does not state comes back null.","propertyNames":{"type":"string"},"type":"object"},"tag":{"type":"null"},"type":{"const":"changeTracking","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"question":{"description":"A question to answer from the page, such as what the refund window is.","maxLength":10000,"minLength":1,"type":"string"},"type":{"const":"question","type":"string"}},"required":["type","question"],"type":"object"},{"additionalProperties":false,"properties":{"type":{"const":"product","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"type":{"const":"menu","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"fullPage":{"default":false,"description":"Capture the whole page from top to bottom instead of the visible part.","type":"boolean"},"quality":{"description":"JPEG quality from 1 to 100. The default is 70.","maximum":100,"minimum":1,"type":"integer"},"type":{"const":"screenshot","type":"string"},"viewport":{"additionalProperties":false,"description":"The window size in pixels, such as { width: 390, height: 844 }.","properties":{"height":{"maximum":2160,"minimum":200,"type":"integer"},"width":{"maximum":3840,"minimum":200,"type":"integer"}},"required":["width","height"],"type":"object"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"count":{"default":5,"description":"How many passages to return, best match first.","maximum":20,"minimum":1,"type":"integer"},"query":{"description":"What you are looking for on the page, such as refund policy.","maxLength":10000,"minLength":1,"type":"string"},"type":{"const":"highlights","type":"string"}},"required":["type","query"],"type":"object"},{"additionalProperties":false,"properties":{"checkPromptInjection":{"description":"Deprecated: send checkPromptInjection at the top level of the call.","type":"boolean"},"options":{"additionalProperties":{"$ref":"#/definitions/__schema1"},"description":"Only with parser: extra inputs for it, such as { \"page\": 2 } for the next page of results or { \"minRating\": 4.5 } for a filter. GET /v1/parsers lists what each parser accepts.","propertyNames":{"type":"string"},"type":"object"},"parser":{"description":"Read the page with a named parser, which gives the site's own data as json. The url must be the kind of page the parser reads. Parsers are the only way to read some sites. GET /v1/parsers lists them.","type":"string"},"prompt":{"description":"What to pull from the page in plain words, such as the version and the release date.","maxLength":10000,"minLength":1,"type":"string"},"rules":{"additionalProperties":{"$ref":"#/definitions/__schema2"},"description":"Read the page with CSS rules instead of a model, no extra fee. Each field is a selector such as \"h1\" (the first match's text), \"a@href\" (an attribute) or { \"selector\": \"li\", \"type\": \"list\", \"output\": \"text\" | \"html\" | \"@attribute\" | { nested fields } }. A missing item is null and an unmatched list is []. Relative links become absolute. Up to 100 fields, 5 levels deep. Not with schema, prompt or parser.","propertyNames":{"type":"string"},"type":"object"},"schema":{"additionalProperties":{"$ref":"#/definitions/__schema0"},"description":"The fields to fill, as a JSON Schema (draft-07 or 2020-12) object with properties. Pydantic's model_json_schema() and zod's toJSONSchema() output work as they are. enum, const, anyOf, oneOf, nullable types, $ref with $defs, required, descriptions and any key names are read. Up to 100 top-level fields and 32 KB. A field the page does not state comes back null.","propertyNames":{"type":"string"},"type":"object"},"type":{"const":"json","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"selectors":{"description":"The elements and attributes to read, such as { selector: 'a.buy', attribute: 'href' }.","items":{"additionalProperties":false,"properties":{"attribute":{"maxLength":100,"minLength":1,"type":"string"},"selector":{"minLength":1,"type":"string"}},"required":["selector","attribute"],"type":"object"},"maxItems":50,"minItems":1,"type":"array"},"type":{"const":"attributes","type":"string"}},"required":["type","selectors"],"type":"object"}]},"maxItems":20,"minItems":1,"type":"array"},"headers":{"additionalProperties":{"maxLength":2000,"pattern":"^[\\t\\x20-\\x7e]*$","type":"string"},"description":"Extra request headers to send to the site, such as { \"x-plan\": \"pro\" }. A read with headers is never answered from or saved to a stored copy.","propertyNames":{"pattern":"^[A-Za-z0-9-]{1,64}$","type":"string"},"type":"object"},"includeTags":{"description":"Keep only the parts of the page that match these CSS selectors, such as article or .price. When set, onlyMainContent is not applied.","items":{"minLength":1,"type":"string"},"minItems":1,"type":"array"},"location":{"additionalProperties":false,"description":"Where to read the page from. The default is the United States.","properties":{"country":{"description":"Two-letter country code to read the page from, such as DE or JP.","type":"string"},"languages":{"description":"Languages to ask the site for, best first, such as [\"de\", \"en\"]. Sent as Accept-Language. A read with languages is never answered from or saved to a stored copy.","items":{"pattern":"^[A-Za-z]{2,3}(?:-[A-Za-z0-9]{2,8})*$","type":"string"},"maxItems":5,"minItems":1,"type":"array"}},"type":"object"},"lockdown":{"description":"Send true to answer only from a stored copy of the page and never read it live, whatever its age. A page with no stored copy is notFound. The same as minAge 0.","type":"boolean"},"maxAge":{"description":"Accept a stored answer up to this many milliseconds old, at most 30 days. Without it, 2 days, or less for a site whose pages change often, and a copy up to twice that age (at most 7 days) comes back at once as stale while a fresh read runs. 0 always reads the page live. metadata.cacheState says which one you got.","maximum":9007199254740991,"minimum":0,"type":"integer"},"minAge":{"description":"Answer only from a stored copy that is at least this many milliseconds old, and never read the page live. 0 accepts any stored copy. A page with no such copy is notFound.","maximum":9007199254740991,"minimum":0,"type":"integer"},"mobile":{"description":"Read the page as a phone would: a phone-sized screen and the mobile version of the site. The page loads in a browser.","type":"boolean"},"onlyCleanContent":{"description":"Send true to have a model remove what onlyMainContent leaves behind in the markdown: cookie banners, ads, share widgets, breadcrumbs, sign-up prompts, comment prompts and related-article lists. It only removes whole paragraphs and lists; it never rewrites or adds text, and code blocks are always kept. Skipped with a warning when the page is too long to clean or the model does not answer. Not with zeroDataRetention. Summary, answers and highlights are made from the cleaned markdown.","type":"boolean"},"onlyMainContent":{"default":true,"description":"Keep only the page's main content, without menus, headers, footers and ads.","type":"boolean"},"parsers":{"description":"Only the pdf parser exists. Send \"pdf\" or { \"type\": \"pdf\", mode, maxPages, pages, blocks, pageMarkers } with the same meaning as in parse. Without mode a PDF is read as auto: from its text layer, and from the picture of any page that has no text. fast reads the text layer only, and ocr reads the picture of every page, up to 20 pages. Each page of text that comes back costs 1 credit. Pictures are read only with an API key.","items":{"anyOf":[{"const":"pdf","type":"string"},{"additionalProperties":false,"properties":{"blocks":{"description":"Send true to also get the page's layout in blocks: each title, section header or run of text, with its page, reading order, position on the page (bbox as left, top, right, bottom from 0 to 1) and where its text sits in that page's markdown (span, as in pages). Tables, figures and formulas are not told apart. A page read from its picture is one block. No extra charge.","type":"boolean"},"maxPages":{"description":"Read at most this many pages, up to 500, which is also the default.","maximum":500,"minimum":1,"type":"integer"},"mode":{"description":"fast reads the text layer only. auto (the default) reads the text layer and reads the picture of any page that has none. ocr reads the picture of every page.","enum":["fast","auto","ocr"],"type":"string"},"pageMarkers":{"description":"Send true to mark page breaks in the markdown: pages are joined with \"---\" and a line, where N is the page that follows. No extra charge.","type":"boolean"},"pages":{"description":"Send true to also get each page's markdown in pages, as { pageNumber, markdown }. No extra charge.","type":"boolean"},"type":{"const":"pdf","type":"string"}},"required":["type"],"type":"object"}]},"minItems":1,"type":"array"},"profile":{"additionalProperties":false,"description":"Read the page with the cookies and local storage that earlier calls saved under this name, kept for your account for 30 days after the last use. A call with a profile always loads the page in a browser, costs 1 credit, the same as any page, and is never answered from a stored copy. Only one call at a time can save to a profile.","properties":{"name":{"description":"A name you choose, such as shop-login. Calls with the same name share state.","maxLength":128,"minLength":1,"type":"string"},"saveChanges":{"default":true,"description":"Keep the cookies and local storage this read leaves behind for the next call with this name. Send false to read with the profile without changing it.","type":"boolean"}},"required":["name"],"type":"object"},"proxy":{"description":"auto: basic first, enhanced once if the site refuses. basic: one plain attempt. enhanced: the stronger read from the start. stealth is the same as enhanced. Same price.","enum":["auto","basic","enhanced","stealth"],"type":"string"},"redactPII":{"anyOf":[{"type":"boolean"},{"additionalProperties":false,"description":"Options for redactPII.","properties":{"entities":{"default":["PERSON","EMAIL","PHONE","LOCATION","FINANCIAL","SECRET"],"description":"What to hide: PERSON, EMAIL, PHONE, LOCATION, FINANCIAL, SECRET. All by default.","items":{"enum":["PERSON","EMAIL","PHONE","LOCATION","FINANCIAL","SECRET"],"type":"string"},"minItems":1,"type":"array"},"mode":{"default":"accurate","description":"accurate finds names and places with the model and the rest by pattern. aggressive adds guesses that catch more and may hide a little too much. fast uses patterns only, so it finds no ordinary names or places.","enum":["accurate","aggressive","fast"],"type":"string"},"replaceStyle":{"default":"tag","description":"tag writes <EMAIL>, mask writes * for each character, remove deletes it.","enum":["tag","mask","remove"],"type":"string"}},"type":"object"}],"description":"Send true, or an object, to hide personal data in the markdown and in everything made from it (summary, answers, highlights, json). Links, html and rawHtml are not changed. A page the model cannot scan is refused rather than returned unredacted."},"removeBase64Images":{"description":"Images inside the page that carry their data in the address (data:image) are dropped by default. Send false to keep them in markdown and html.","type":"boolean"},"skipTlsVerification":{"description":"Send true to read a page whose certificate is expired, self-signed or for another name. The read is not private against someone between us and the site.","type":"boolean"},"storeInCache":{"default":true,"description":"Send false to neither read nor keep a stored copy of this page.","type":"boolean"},"timeout":{"default":60000,"description":"How long to keep trying, in milliseconds, from 1 second to 5 minutes; 60 seconds by default. A page that needs a browser needs at least 5 seconds, and pages behind a bot check can need 10 to 30 seconds the first time. A read that runs out of time is an error and costs nothing.","maximum":300000,"minimum":1000,"type":"integer"},"waitFor":{"description":"Extra milliseconds to wait before reading, up to 60000, for pages that load their content late. To wait for an element, add a wait action with a selector. A read that waits costs 1 credit, the same as any page.","maximum":60000,"minimum":0,"type":"integer"},"zeroDataRetention":{"default":false,"description":"Send true to keep nothing from this call: no stored copy is read or made, and nothing from it is logged. Costs 1 credit more per page. Not with a screenshot.","type":"boolean"}},"type":"object"},"sitemap":{"default":"include","description":"include also uses the site's sitemaps. only reads just the pages the sitemaps name. skip ignores them.","enum":["skip","include","only"],"type":"string"},"url":{"description":"The page to start from, such as https://bun.com/docs.","type":"string"},"webhook":{"anyOf":[{"type":"string"},{"additionalProperties":false,"properties":{"events":{"items":{"enum":["started","page","action","completed","failed","cancelled"],"type":"string"},"minItems":1,"type":"array"},"headers":{"additionalProperties":{"maxLength":1000,"type":"string"},"propertyNames":{"pattern":"^[A-Za-z0-9-]{1,64}$","type":"string"},"type":"object"},"metadata":{"additionalProperties":{"$ref":"#/definitions/__schema0"},"propertyNames":{"type":"string"},"type":"object"},"url":{"type":"string"}},"required":["url"],"type":"object"}],"description":"Where to be told about the job: a plain address, or { url } which gets a JSON POST when the job starts, for each finished page, and when the job ends. headers are sent with every call, metadata comes back in every call, and events picks which of started, page, action, completed, failed and cancelled to send (all by default). An agent run sends action for each step it takes, and page too. Every call is signed: read Stophy-Signature (t=<unix seconds>,v1=<hex>), where v1 is the HMAC-SHA256 of \"<t>.<body>\" with your webhook secret from webhook.secret. A call that gets no 2xx is sent again, up to 3 times. If your address answers slowly, a page event can carry only the page url. Read that page with the status call."},"zeroDataRetention":{"default":false,"description":"Send true to keep nothing from this crawl: no stored copy is read or made, page results are held for one hour at most, and nothing is logged. Costs 1 credit more per page.","type":"boolean"}},"required":["url"],"type":"object"}after
{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"definitions":{"__schema0":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"items":{"allOf":[{"$ref":"#/definitions/__schema0"}]},"type":"array"},{"additionalProperties":{"allOf":[{"$ref":"#/definitions/__schema0"}]},"propertyNames":{"type":"string"},"type":"object"}]},"__schema1":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"items":{"allOf":[{"$ref":"#/definitions/__schema1"}]},"type":"array"},{"additionalProperties":{"allOf":[{"$ref":"#/definitions/__schema1"}]},"propertyNames":{"type":"string"},"type":"object"}]},"__schema2":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"items":{"allOf":[{"$ref":"#/definitions/__schema2"}]},"type":"array"},{"additionalProperties":{"allOf":[{"$ref":"#/definitions/__schema2"}]},"propertyNames":{"type":"string"},"type":"object"}]}},"properties":{"allowExternalLinks":{"default":false,"description":"Also follow links to other sites. They count toward limit and maxDiscoveryDepth. Only the start site's robots.txt is read.","type":"boolean"},"allowSubdomains":{"default":false,"description":"Also read pages on subdomains, such as docs.bun.com for bun.com.","type":"boolean"},"crawlEntireDomain":{"default":false,"description":"Read the whole site, not only pages under the start page's path.","type":"boolean"},"deduplicateSimilarURLs":{"default":true,"description":"Read one page when addresses differ only by www, a trailing slash, a #fragment, tracking parameters such as utm_source, or the order of the ?query. Send false to read each address.","type":"boolean"},"delay":{"description":"Seconds to wait between pages. With delay the crawl reads one page at a time. At most 60.","maximum":60,"minimum":0,"type":"number"},"excludePaths":{"default":[],"description":"Skip pages whose path matches one of these regular expressions, such as tag/.*.","items":{"maxLength":200,"minLength":1,"type":"string"},"maxItems":100,"type":"array"},"ignoreQueryParameters":{"default":false,"description":"Treat addresses that differ only in their ?query part as one page.","type":"boolean"},"includePaths":{"default":[],"description":"Read only pages whose path matches one of these regular expressions, such as blog/.*.","items":{"maxLength":200,"minLength":1,"type":"string"},"maxItems":100,"type":"array"},"limit":{"default":10000,"description":"Stop after reading this many pages in total.","maximum":10000,"minimum":1,"type":"integer"},"maxConcurrency":{"description":"Most pages read at once. We read at most 4 at once, so a larger number gives the same speed.","maximum":100,"minimum":1,"type":"integer"},"maxDiscoveryDepth":{"description":"How many links away from the start page to go. Without it there is no depth limit, and limit bounds the crawl.","maximum":9007199254740991,"minimum":0,"type":"integer"},"prompt":{"description":"What you are looking for, such as sqlite performance. Pages about it are read first, and the crawl stops once new pages stop mentioning it.","maxLength":1000,"minLength":1,"type":"string"},"regexOnFullURL":{"default":false,"description":"Match includePaths and excludePaths against the whole address, not only the path.","type":"boolean"},"scrapeOptions":{"additionalProperties":{},"description":"How to read each page, the same options and formats as scrape. Without formats, each page comes back as markdown.","properties":{"actions":{"description":"Up to 50 steps to run on the page, in order, before reading it: { \"type\": \"wait\", \"milliseconds\": 500 } (up to 60 seconds), { \"type\": \"wait\", \"selector\": \".results\" }, { \"type\": \"click\", \"selector\": \"button.more\" }, { \"type\": \"write\", \"text\": \"tides\" }, { \"type\": \"press\", \"key\": \"Enter\" }, { \"type\": \"scroll\", \"direction\": \"down\" } (also up, left or right; amount is pixels, \"viewport\" or \"max\"; maxScrolls 1 to 50; selector scrolls an inner container; \"max\" keeps scrolling until the page stops growing, for feeds that load as you go), { \"type\": \"screenshot\", \"fullPage\": true } (links come back in actions.screenshots), { \"type\": \"scrape\" } (the page at that point, in actions.scrapes), { \"type\": \"executeJavascript\", \"script\": \"document.title\" } (results in actions.javascriptReturns), { \"type\": \"pdf\", \"format\": \"A4\" } (links in actions.pdfs) or { \"type\": \"perform\", \"action\": \"Click the Load more button\" } (a step in plain words, up to 5 browser steps on this page, never leaving the site; at most 5 per call). A read with actions costs $2 per 1,000 pages, the same as any page; the actions themselves add nothing. If an action fails, you still get the page as it stood, with a warning that names the action and says why.","items":{"anyOf":[{"additionalProperties":false,"properties":{"milliseconds":{"maximum":60000,"minimum":1,"type":"integer"},"type":{"const":"wait","type":"string"}},"required":["type","milliseconds"],"type":"object"},{"additionalProperties":false,"properties":{"selector":{"minLength":1,"type":"string"},"type":{"const":"wait","type":"string"}},"required":["type","selector"],"type":"object"},{"additionalProperties":false,"properties":{"all":{"const":false,"type":"boolean"},"selector":{"minLength":1,"type":"string"},"type":{"const":"click","type":"string"}},"required":["type","selector"],"type":"object"},{"additionalProperties":false,"properties":{"text":{"minLength":1,"type":"string"},"type":{"const":"write","type":"string"}},"required":["type","text"],"type":"object"},{"additionalProperties":false,"properties":{"key":{"maxLength":40,"minLength":1,"type":"string"},"type":{"const":"press","type":"string"}},"required":["type","key"],"type":"object"},{"additionalProperties":false,"properties":{"amount":{"anyOf":[{"maximum":100000,"minimum":1,"type":"integer"},{"enum":["viewport","max"],"type":"string"}]},"direction":{"default":"down","enum":["up","down","left","right"],"type":"string"},"maxScrolls":{"maximum":50,"minimum":1,"type":"integer"},"selector":{"minLength":1,"type":"string"},"type":{"const":"scroll","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"fullPage":{"type":"boolean"},"quality":{"maximum":100,"minimum":1,"type":"integer"},"type":{"const":"screenshot","type":"string"},"viewport":{"additionalProperties":false,"properties":{"height":{"maximum":2160,"minimum":200,"type":"integer"},"width":{"maximum":3840,"minimum":200,"type":"integer"}},"required":["width","height"],"type":"object"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"type":{"const":"scrape","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"script":{"maxLength":20000,"minLength":1,"type":"string"},"type":{"const":"executeJavascript","type":"string"}},"required":["type","script"],"type":"object"},{"additionalProperties":false,"properties":{"format":{"enum":["Letter","Legal","Tabloid","Ledger","A0","A1","A2","A3","A4","A5","A6"],"type":"string"},"landscape":{"type":"boolean"},"scale":{"maximum":2,"minimum":0.1,"type":"number"},"type":{"const":"pdf","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"action":{"maxLength":500,"minLength":1,"type":"string"},"type":{"const":"perform","type":"string"}},"required":["type","action"],"type":"object"}]},"maxItems":50,"minItems":1,"type":"array"},"blockAds":{"description":"Ads and trackers are not loaded when a page runs in a browser. Send false to load them.","type":"boolean"},"checkPromptInjection":{"description":"Send true to scan the page text for instructions aimed at an AI model before anything is built from it. A page that has them is refused with 403 promptInjectionDetected and costs nothing. The scan adds $8 per 1,000 pages when it runs; a page it cannot scan fully comes back with a warning and no charge.","type":"boolean"},"excludeTags":{"description":"Remove the parts of the page that match these CSS selectors, such as .comments.","items":{"minLength":1,"type":"string"},"minItems":1,"type":"array"},"fastMode":{"description":"Send true to read the page without opening a browser: the answer comes sooner, but a page that needs a browser, or that refuses a plain request, comes back as an error instead of being retried. Ignored when the call needs a browser (actions, screenshot, waitFor, mobile, profile, network, branding).","type":"boolean"},"formats":{"default":["markdown"],"description":"What to return: markdown (clean page text), summary (a short summary of the page), html (the cleaned page), rawHtml (the page as sent), audio and video (for a YouTube link: the audio track as an M4A file, or the video as an MP4 file, as a link that works for 1 hour), rawBase64 (the bytes the site sent, Base64 encoded, from a live read; metadata.contentType says what they are), links (every link on the page), images (every image address), screenshot (a link to a JPEG of the visible page, kept for 7 days), changeTracking (what changed in the markdown since your key last read this page with the same options, kept 30 days; add modes [\"git-diff\",\"json\"] with a schema or prompt to compare fields too), question (send { \"type\": \"question\", \"question\": \"...\" } to get answer, null when the page does not state one), product (title, brand, category, url, description and variants with price, sale, availability and images, or null) and menu (merchant, currency and sections of items with prices, or null) network (the JSON the page loaded while it rendered, up to 30 responses) and branding (the page's colors, fonts, typography, spacing, button and input styles, logo and brand images, read from how the page looks, with a field left out when the page does not show it). Send { \"type\": \"screenshot\", \"fullPage\": true } for the whole page. Send { \"type\": \"highlights\", \"query\": \"refund policy\" } for the passages that best match a query. Send { \"type\": \"json\", \"schema\": { \"type\": \"object\", \"properties\": { \"price\": { \"type\": \"number\" } } } } or { \"type\": \"json\", \"prompt\": \"the price and the stock\" } for fields filled from the page, each checked against it. Send { \"type\": \"json\", \"parser\": \"amazon-product\" } to get a site's own data as json instead of reading the page; GET /v1/parsers lists the parsers. Send { \"type\": \"json\", \"rules\": { \"title\": \"h1\", \"links\": { \"selector\": \"a\", \"type\": \"list\", \"output\": \"@href\" } } } to read the page with CSS rules and no model, at the page's own price. Send { \"type\": \"attributes\", \"selectors\": [{ \"selector\": \"a\", \"attribute\": \"href\" }] } for attribute values, returned in attributes. Without a parser or rules, json needs a schema or a prompt and is filled from the page. json with a schema or a prompt, summary, highlights, question, product, menu and changeTracking in json mode add $8 per 1,000 pages each when they return something. json with rules or a parser, and attributes, cost nothing more. A screenshot, network or branding read costs $2 per 1,000 pages, the same as any page. A PDF comes back as markdown only, and adds $2 per 1,000 pages of text that comes back. A CSV or an Excel .xlsx file comes back as markdown tables.","items":{"anyOf":[{"enum":["markdown","summary","html","rawHtml","rawBase64","links","images","network","branding","audio","video","screenshot","changeTracking","product","menu"],"type":"string"},{"additionalProperties":false,"properties":{"type":{"enum":["markdown","summary","html","rawHtml","rawBase64","links","images","network","branding","audio","video"],"type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"modes":{"description":"git-diff returns a unified diff of the markdown. json compares the fields in schema or prompt between this read and the last one. Without modes you get git-diff.","items":{"enum":["git-diff","json"],"type":"string"},"maxItems":2,"type":"array"},"prompt":{"description":"With json mode: what to compare, in plain words, such as the price and stock.","maxLength":10000,"minLength":1,"type":"string"},"schema":{"additionalProperties":{"$ref":"#/definitions/__schema0"},"description":"The fields to fill, as a JSON Schema (draft-07 or 2020-12) object with properties. Pydantic's model_json_schema() and zod's toJSONSchema() output work as they are. enum, const, anyOf, oneOf, nullable types, $ref with $defs, required, descriptions and any key names are read. Up to 100 top-level fields and 32 KB. A field the page does not state comes back null.","propertyNames":{"type":"string"},"type":"object"},"tag":{"type":"null"},"type":{"const":"changeTracking","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"question":{"description":"A question to answer from the page, such as what the refund window is.","maxLength":10000,"minLength":1,"type":"string"},"type":{"const":"question","type":"string"}},"required":["type","question"],"type":"object"},{"additionalProperties":false,"properties":{"type":{"const":"product","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"type":{"const":"menu","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"fullPage":{"default":false,"description":"Capture the whole page from top to bottom instead of the visible part.","type":"boolean"},"quality":{"description":"JPEG quality from 1 to 100. The default is 70.","maximum":100,"minimum":1,"type":"integer"},"type":{"const":"screenshot","type":"string"},"viewport":{"additionalProperties":false,"description":"The window size in pixels, such as { width: 390, height: 844 }.","properties":{"height":{"maximum":2160,"minimum":200,"type":"integer"},"width":{"maximum":3840,"minimum":200,"type":"integer"}},"required":["width","height"],"type":"object"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"count":{"default":5,"description":"How many passages to return, best match first.","maximum":20,"minimum":1,"type":"integer"},"query":{"description":"What you are looking for on the page, such as refund policy.","maxLength":10000,"minLength":1,"type":"string"},"type":{"const":"highlights","type":"string"}},"required":["type","query"],"type":"object"},{"additionalProperties":false,"properties":{"checkPromptInjection":{"description":"Deprecated: send checkPromptInjection at the top level of the call.","type":"boolean"},"options":{"additionalProperties":{"$ref":"#/definitions/__schema1"},"description":"Only with parser: extra inputs for it, such as { \"page\": 2 } for the next page of results or { \"minRating\": 4.5 } for a filter. GET /v1/parsers lists what each parser accepts.","propertyNames":{"type":"string"},"type":"object"},"parser":{"description":"Read the page with a named parser, which gives the site's own data as json. The url must be the kind of page the parser reads. Parsers are the only way to read some sites. GET /v1/parsers lists them.","type":"string"},"prompt":{"description":"What to pull from the page in plain words, such as the version and the release date.","maxLength":10000,"minLength":1,"type":"string"},"rules":{"additionalProperties":{"$ref":"#/definitions/__schema2"},"description":"Read the page with CSS rules instead of a model, no extra fee. Each field is a selector such as \"h1\" (the first match's text), \"a@href\" (an attribute) or { \"selector\": \"li\", \"type\": \"list\", \"output\": \"text\" | \"html\" | \"@attribute\" | { nested fields } }. A missing item is null and an unmatched list is []. Relative links become absolute. Up to 100 fields, 5 levels deep. Not with schema, prompt or parser.","propertyNames":{"type":"string"},"type":"object"},"schema":{"additionalProperties":{"$ref":"#/definitions/__schema0"},"description":"The fields to fill, as a JSON Schema (draft-07 or 2020-12) object with properties. Pydantic's model_json_schema() and zod's toJSONSchema() output work as they are. enum, const, anyOf, oneOf, nullable types, $ref with $defs, required, descriptions and any key names are read. Up to 100 top-level fields and 32 KB. A field the page does not state comes back null.","propertyNames":{"type":"string"},"type":"object"},"type":{"const":"json","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"selectors":{"description":"The elements and attributes to read, such as { selector: 'a.buy', attribute: 'href' }.","items":{"additionalProperties":false,"properties":{"attribute":{"maxLength":100,"minLength":1,"type":"string"},"selector":{"minLength":1,"type":"string"}},"required":["selector","attribute"],"type":"object"},"maxItems":50,"minItems":1,"type":"array"},"type":{"const":"attributes","type":"string"}},"required":["type","selectors"],"type":"object"}]},"maxItems":20,"minItems":1,"type":"array"},"headers":{"additionalProperties":{"maxLength":2000,"pattern":"^[\\t\\x20-\\x7e]*$","type":"string"},"description":"Extra request headers to send to the site, such as { \"x-plan\": \"pro\" }. A read with headers is never answered from or saved to a stored copy.","propertyNames":{"pattern":"^[A-Za-z0-9-]{1,64}$","type":"string"},"type":"object"},"includeTags":{"description":"Keep only the parts of the page that match these CSS selectors, such as article or .price. When set, onlyMainContent is not applied.","items":{"minLength":1,"type":"string"},"minItems":1,"type":"array"},"location":{"additionalProperties":false,"description":"Where to read the page from. The default is the United States.","properties":{"country":{"description":"Two-letter country code to read the page from, such as DE or JP.","type":"string"},"languages":{"description":"Languages to ask the site for, best first, such as [\"de\", \"en\"]. Sent as Accept-Language. A read with languages is never answered from or saved to a stored copy.","items":{"pattern":"^[A-Za-z]{2,3}(?:-[A-Za-z0-9]{2,8})*$","type":"string"},"maxItems":5,"minItems":1,"type":"array"}},"type":"object"},"lockdown":{"description":"Send true to answer only from a stored copy of the page and never read it live, whatever its age. A page with no stored copy is notFound. The same as minAge 0.","type":"boolean"},"maxAge":{"description":"Accept a stored answer up to this many milliseconds old, at most 30 days. Without it, 2 days, or less for a site whose pages change often, and a copy up to twice that age (at most 7 days) comes back at once as stale while a fresh read runs. 0 always reads the page live. metadata.cacheState says which one you got.","maximum":9007199254740991,"minimum":0,"type":"integer"},"minAge":{"description":"Answer only from a stored copy that is at least this many milliseconds old, and never read the page live. 0 accepts any stored copy. A page with no such copy is notFound.","maximum":9007199254740991,"minimum":0,"type":"integer"},"mobile":{"description":"Read the page as a phone would: a phone-sized screen and the mobile version of the site. The page loads in a browser.","type":"boolean"},"onlyCleanContent":{"description":"Send true to have a model remove what onlyMainContent leaves behind in the markdown: cookie banners, ads, share widgets, breadcrumbs, sign-up prompts, comment prompts and related-article lists. It only removes whole paragraphs and lists; it never rewrites or adds text, and code blocks are always kept. Skipped with a warning when the page is too long to clean or the model does not answer. Not with zeroDataRetention. Summary, answers and highlights are made from the cleaned markdown.","type":"boolean"},"onlyMainContent":{"default":true,"description":"Keep only the page's main content, without menus, headers, footers and ads.","type":"boolean"},"parsers":{"description":"Only the pdf parser exists. Send \"pdf\" or { \"type\": \"pdf\", mode, maxPages, pages, blocks, pageMarkers } with the same meaning as in parse. Without mode a PDF is read as auto: from its text layer, and from the picture of any page that has no text. fast reads the text layer only, and ocr reads the picture of every page, up to 20 pages. Each page of text that comes back costs $2 per 1,000 pages. Pictures are read only with an API key.","items":{"anyOf":[{"const":"pdf","type":"string"},{"additionalProperties":false,"properties":{"blocks":{"description":"Send true to also get the page's layout in blocks: each title, section header or run of text, with its page, reading order, position on the page (bbox as left, top, right, bottom from 0 to 1) and where its text sits in that page's markdown (span, as in pages). Tables, figures and formulas are not told apart. A page read from its picture is one block. No extra charge.","type":"boolean"},"maxPages":{"description":"Read at most this many pages, up to 500, which is also the default.","maximum":500,"minimum":1,"type":"integer"},"mode":{"description":"fast reads the text layer only. auto (the default) reads the text layer and reads the picture of any page that has none. ocr reads the picture of every page.","enum":["fast","auto","ocr"],"type":"string"},"pageMarkers":{"description":"Send true to mark page breaks in the markdown: pages are joined with \"---\" and a line, where N is the page that follows. No extra charge.","type":"boolean"},"pages":{"description":"Send true to also get each page's markdown in pages, as { pageNumber, markdown }. No extra charge.","type":"boolean"},"type":{"const":"pdf","type":"string"}},"required":["type"],"type":"object"}]},"minItems":1,"type":"array"},"profile":{"additionalProperties":false,"description":"Read the page with the cookies and local storage that earlier calls saved under this name, kept for your account for 30 days after the last use. A call with a profile always loads the page in a browser, costs $2 per 1,000 pages, the same as any page, and is never answered from a stored copy. Only one call at a time can save to a profile.","properties":{"name":{"description":"A name you choose, such as shop-login. Calls with the same name share state.","maxLength":128,"minLength":1,"type":"string"},"saveChanges":{"default":true,"description":"Keep the cookies and local storage this read leaves behind for the next call with this name. Send false to read with the profile without changing it.","type":"boolean"}},"required":["name"],"type":"object"},"proxy":{"description":"auto: basic first, enhanced once if the site refuses. basic: one plain attempt. enhanced: the stronger read from the start. stealth is the same as enhanced. Same price.","enum":["auto","basic","enhanced","stealth"],"type":"string"},"redactPII":{"anyOf":[{"type":"boolean"},{"additionalProperties":false,"description":"Options for redactPII.","properties":{"entities":{"default":["PERSON","EMAIL","PHONE","LOCATION","FINANCIAL","SECRET"],"description":"What to hide: PERSON, EMAIL, PHONE, LOCATION, FINANCIAL, SECRET. All by default.","items":{"enum":["PERSON","EMAIL","PHONE","LOCATION","FINANCIAL","SECRET"],"type":"string"},"minItems":1,"type":"array"},"mode":{"default":"accurate","description":"accurate finds names and places with the model and the rest by pattern. aggressive adds guesses that catch more and may hide a little too much. fast uses patterns only, so it finds no ordinary names or places.","enum":["accurate","aggressive","fast"],"type":"string"},"replaceStyle":{"default":"tag","description":"tag writes <EMAIL>, mask writes * for each character, remove deletes it.","enum":["tag","mask","remove"],"type":"string"}},"type":"object"}],"description":"Send true, or an object, to hide personal data in the markdown and in everything made from it (summary, answers, highlights, json). Links, html and rawHtml are not changed. A page the model cannot scan is refused rather than returned unredacted."},"removeBase64Images":{"description":"Images inside the page that carry their data in the address (data:image) are dropped by default. Send false to keep them in markdown and html.","type":"boolean"},"skipTlsVerification":{"description":"Send true to read a page whose certificate is expired, self-signed or for another name. The read is not private against someone between us and the site.","type":"boolean"},"storeInCache":{"default":true,"description":"Send false to neither read nor keep a stored copy of this page.","type":"boolean"},"timeout":{"default":60000,"description":"How long to keep trying, in milliseconds, from 1 second to 5 minutes; 60 seconds by default. A page that needs a browser needs at least 5 seconds, and pages behind a bot check can need 10 to 30 seconds the first time. A read that runs out of time is an error and costs nothing.","maximum":300000,"minimum":1000,"type":"integer"},"waitFor":{"description":"Extra milliseconds to wait before reading, up to 60000, for pages that load their content late. To wait for an element, add a wait action with a selector. A read that waits costs $2 per 1,000 pages, the same as any page.","maximum":60000,"minimum":0,"type":"integer"},"zeroDataRetention":{"default":false,"description":"Send true to keep nothing from this call: no stored copy is read or made, and nothing from it is logged. Adds $2 per 1,000 pages. Not with a screenshot.","type":"boolean"}},"type":"object"},"sitemap":{"default":"include","description":"include also uses the site's sitemaps. only reads just the pages the sitemaps name. skip ignores them.","enum":["skip","include","only"],"type":"string"},"url":{"description":"The page to start from, such as https://bun.com/docs.","type":"string"},"webhook":{"anyOf":[{"type":"string"},{"additionalProperties":false,"properties":{"events":{"items":{"enum":["started","page","action","completed","failed","cancelled"],"type":"string"},"minItems":1,"type":"array"},"headers":{"additionalProperties":{"maxLength":1000,"type":"string"},"propertyNames":{"pattern":"^[A-Za-z0-9-]{1,64}$","type":"string"},"type":"object"},"metadata":{"additionalProperties":{"$ref":"#/definitions/__schema0"},"propertyNames":{"type":"string"},"type":"object"},"url":{"type":"string"}},"required":["url"],"type":"object"}],"description":"Where to be told about the job: a plain address, or { url } which gets a JSON POST when the job starts, for each finished page, and when the job ends. headers are sent with every call, metadata comes back in every call, and events picks which of started, page, action, completed, failed and cancelled to send (all by default). An agent run sends action for each step it takes, and page too. Every call is signed: read Stophy-Signature (t=<unix seconds>,v1=<hex>), where v1 is the HMAC-SHA256 of \"<t>.<body>\" with your webhook secret from webhook.secret. A call that gets no 2xx is sent again, up to 3 times. If your address answers slowly, a page event can carry only the page url. Read that page with the status call."},"zeroDataRetention":{"default":false,"description":"Send true to keep nothing from this crawl: no stored copy is read or made, page results are held for one hour at most, and nothing is logged. Adds $2 per 1,000 pages.","type":"boolean"}},"required":["url"],"type":"object"}{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":{},"properties":{"costUsd":{"type":"number"},"creditsUsed":{"type":"number"},"requestId" ⟨5 unchanged words⟩ type":"boolean"}},"required":["creditsUsed","costUsd","requestId"],"type":"object"}
⟨9 unchanged words⟩ as JSON, each checked against the page.5 credits$10forpermost1,000 pages:theforp...most pa...
before
{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"definitions":{"__schema0":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"items":{"allOf":[{"$ref":"#/definitions/__schema0"}]},"type":"array"},{"additionalProperties":{"allOf":[{"$ref":"#/definitions/__schema0"}]},"propertyNames":{"type":"string"},"type":"object"}]}},"properties":{"agent":{"additionalProperties":false,"description":"Accepted so a client that sends { model: \"FIRE-1\" } works. An extract reads the pages it is given and checks every value; it does not browse or click, and the answer says so in warning. To navigate a site, use the agent endpoint.","properties":{"model":{"maxLength":40,"minLength":1,"type":"string"}},"required":["model"],"type":"object"},"allowExternalLinks":{"default":false,"description":"Send true to also read pages on other sites that the pages link to, up to 5, picking the links whose address mentions your prompt. Each page read costs 1 credit.","type":"boolean"},"enableWebSearch":{"default":false,"description":"Send true to also search the web for your prompt and read the best pages it finds, up to 3 more. Needs a prompt. Costs 2 credits for the search. With no urls, the search runs without this.","type":"boolean"},"ignoreInvalidURLs":{"default":true,"description":"Skip addresses that are not public website URLs. Send false to refuse the call instead.","type":"boolean"},"ignoreSitemap":{"default":false,"description":"For an address ending in /*: skip the site's sitemaps and find pages by links.","type":"boolean"},"includeSubdomains":{"default":true,"description":"For an address ending in /*: also read pages on subdomains of the site. Send false to stay on the exact host.","type":"boolean"},"limit":{"description":"For an address ending in /*: read at most this many pages under it. At most 25 pages are read in all.","maximum":9007199254740991,"minimum":1,"type":"integer"},"prompt":{"description":"What to pull from the pages in plain words, such as the version and the release date, up to 10000 characters. With no urls, the web is searched for the first 400 characters of it.","maxLength":10000,"minLength":1,"type":"string"},"schema":{"additionalProperties":{"$ref":"#/definitions/__schema0"},"description":"The fields to fill, as a JSON Schema (draft-07 or 2020-12) object with properties. Pydantic's model_json_schema() and zod's toJSONSchema() output work as they are. enum, const, anyOf, oneOf, nullable types, $ref with $defs, required, descriptions and any key names are read. Up to 100 top-level fields and 32 KB. A field the page does not state comes back null.","propertyNames":{"type":"string"},"type":"object"},"scrapeOptions":{"additionalProperties":false,"description":"How to read each page, the same options as scrape.","properties":{"actions":{"description":"Up to 50 steps to run on the page, in order, before reading it: { \"type\": \"wait\", \"milliseconds\": 500 } (up to 60 seconds), { \"type\": \"wait\", \"selector\": \".results\" }, { \"type\": \"click\", \"selector\": \"button.more\" }, { \"type\": \"write\", \"text\": \"tides\" }, { \"type\": \"press\", \"key\": \"Enter\" }, { \"type\": \"scroll\", \"direction\": \"down\" } (also up, left or right; amount is pixels, \"viewport\" or \"max\"; maxScrolls 1 to 50; selector scrolls an inner container; \"max\" keeps scrolling until the page stops growing, for feeds that load as you go), { \"type\": \"screenshot\", \"fullPage\": true } (links come back in actions.screenshots), { \"type\": \"scrape\" } (the page at that point, in actions.scrapes), { \"type\": \"executeJavascript\", \"script\": \"document.title\" } (results in actions.javascriptReturns), { \"type\": \"pdf\", \"format\": \"A4\" } (links in actions.pdfs) or { \"type\": \"perform\", \"action\": \"Click the Load more button\" } (a step in plain words, up to 5 browser steps on this page, never leaving the site; at most 5 per call). A read with actions costs 1 credit, the same as any page; the actions themselves add nothing. If an action fails, you still get the page as it stood, with a warning that names the action and says why.","items":{"anyOf":[{"additionalProperties":false,"properties":{"milliseconds":{"maximum":60000,"minimum":1,"type":"integer"},"type":{"const":"wait","type":"string"}},"required":["type","milliseconds"],"type":"object"},{"additionalProperties":false,"properties":{"selector":{"minLength":1,"type":"string"},"type":{"const":"wait","type":"string"}},"required":["type","selector"],"type":"object"},{"additionalProperties":false,"properties":{"all":{"const":false,"type":"boolean"},"selector":{"minLength":1,"type":"string"},"type":{"const":"click","type":"string"}},"required":["type","selector"],"type":"object"},{"additionalProperties":false,"properties":{"text":{"minLength":1,"type":"string"},"type":{"const":"write","type":"string"}},"required":["type","text"],"type":"object"},{"additionalProperties":false,"properties":{"key":{"maxLength":40,"minLength":1,"type":"string"},"type":{"const":"press","type":"string"}},"required":["type","key"],"type":"object"},{"additionalProperties":false,"properties":{"amount":{"anyOf":[{"maximum":100000,"minimum":1,"type":"integer"},{"enum":["viewport","max"],"type":"string"}]},"direction":{"default":"down","enum":["up","down","left","right"],"type":"string"},"maxScrolls":{"maximum":50,"minimum":1,"type":"integer"},"selector":{"minLength":1,"type":"string"},"type":{"const":"scroll","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"fullPage":{"type":"boolean"},"quality":{"maximum":100,"minimum":1,"type":"integer"},"type":{"const":"screenshot","type":"string"},"viewport":{"additionalProperties":false,"properties":{"height":{"maximum":2160,"minimum":200,"type":"integer"},"width":{"maximum":3840,"minimum":200,"type":"integer"}},"required":["width","height"],"type":"object"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"type":{"const":"scrape","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"script":{"maxLength":20000,"minLength":1,"type":"string"},"type":{"const":"executeJavascript","type":"string"}},"required":["type","script"],"type":"object"},{"additionalProperties":false,"properties":{"format":{"enum":["Letter","Legal","Tabloid","Ledger","A0","A1","A2","A3","A4","A5","A6"],"type":"string"},"landscape":{"type":"boolean"},"scale":{"maximum":2,"minimum":0.1,"type":"number"},"type":{"const":"pdf","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"action":{"maxLength":500,"minLength":1,"type":"string"},"type":{"const":"perform","type":"string"}},"required":["type","action"],"type":"object"}]},"maxItems":50,"minItems":1,"type":"array"},"blockAds":{"description":"Ads and trackers are not loaded when a page runs in a browser. Send false to load them.","type":"boolean"},"checkPromptInjection":{"description":"Send true to scan the page text for instructions aimed at an AI model before anything is built from it. A page that has them is refused with 403 promptInjectionDetected and costs nothing. The scan adds 4 credits when it runs; a page it cannot scan fully comes back with a warning and no charge.","type":"boolean"},"excludeTags":{"description":"Remove the parts of the page that match these CSS selectors, such as .comments.","items":{"minLength":1,"type":"string"},"minItems":1,"type":"array"},"fastMode":{"description":"Send true to read the page without opening a browser: the answer comes sooner, but a page that needs a browser, or that refuses a plain request, comes back as an error instead of being retried. Ignored when the call needs a browser (actions, screenshot, waitFor, mobile, profile, network, branding).","type":"boolean"},"headers":{"additionalProperties":{"maxLength":2000,"pattern":"^[\\t\\x20-\\x7e]*$","type":"string"},"description":"Extra request headers to send to the site, such as { \"x-plan\": \"pro\" }. A read with headers is never answered from or saved to a stored copy.","propertyNames":{"pattern":"^[A-Za-z0-9-]{1,64}$","type":"string"},"type":"object"},"includeTags":{"description":"Keep only the parts of the page that match these CSS selectors, such as article or .price. When set, onlyMainContent is not applied.","items":{"minLength":1,"type":"string"},"minItems":1,"type":"array"},"location":{"additionalProperties":false,"description":"Where to read the page from. The default is the United States.","properties":{"country":{"description":"Two-letter country code to read the page from, such as DE or JP.","type":"string"},"languages":{"description":"Languages to ask the site for, best first, such as [\"de\", \"en\"]. Sent as Accept-Language. A read with languages is never answered from or saved to a stored copy.","items":{"pattern":"^[A-Za-z]{2,3}(?:-[A-Za-z0-9]{2,8})*$","type":"string"},"maxItems":5,"minItems":1,"type":"array"}},"type":"object"},"lockdown":{"description":"Send true to answer only from a stored copy of the page and never read it live, whatever its age. A page with no stored copy is notFound. The same as minAge 0.","type":"boolean"},"maxAge":{"description":"Accept a stored answer up to this many milliseconds old, at most 30 days. Without it, 2 days, or less for a site whose pages change often, and a copy up to twice that age (at most 7 days) comes back at once as stale while a fresh read runs. 0 always reads the page live. metadata.cacheState says which one you got.","maximum":9007199254740991,"minimum":0,"type":"integer"},"minAge":{"description":"Answer only from a stored copy that is at least this many milliseconds old, and never read the page live. 0 accepts any stored copy. A page with no such copy is notFound.","maximum":9007199254740991,"minimum":0,"type":"integer"},"mobile":{"description":"Read the page as a phone would: a phone-sized screen and the mobile version of the site. The page loads in a browser.","type":"boolean"},"onlyCleanContent":{"description":"Send true to have a model remove what onlyMainContent leaves behind in the markdown: cookie banners, ads, share widgets, breadcrumbs, sign-up prompts, comment prompts and related-article lists. It only removes whole paragraphs and lists; it never rewrites or adds text, and code blocks are always kept. Skipped with a warning when the page is too long to clean or the model does not answer. Not with zeroDataRetention. Summary, answers and highlights are made from the cleaned markdown.","type":"boolean"},"onlyMainContent":{"default":true,"description":"Keep only the page's main content, without menus, headers, footers and ads.","type":"boolean"},"parsers":{"description":"Only the pdf parser exists. Send \"pdf\" or { \"type\": \"pdf\", mode, maxPages, pages, blocks, pageMarkers } with the same meaning as in parse. Without mode a PDF is read as auto: from its text layer, and from the picture of any page that has no text. fast reads the text layer only, and ocr reads the picture of every page, up to 20 pages. Each page of text that comes back costs 1 credit. Pictures are read only with an API key.","items":{"anyOf":[{"const":"pdf","type":"string"},{"additionalProperties":false,"properties":{"blocks":{"description":"Send true to also get the page's layout in blocks: each title, section header or run of text, with its page, reading order, position on the page (bbox as left, top, right, bottom from 0 to 1) and where its text sits in that page's markdown (span, as in pages). Tables, figures and formulas are not told apart. A page read from its picture is one block. No extra charge.","type":"boolean"},"maxPages":{"description":"Read at most this many pages, up to 500, which is also the default.","maximum":500,"minimum":1,"type":"integer"},"mode":{"description":"fast reads the text layer only. auto (the default) reads the text layer and reads the picture of any page that has none. ocr reads the picture of every page.","enum":["fast","auto","ocr"],"type":"string"},"pageMarkers":{"description":"Send true to mark page breaks in the markdown: pages are joined with \"---\" and a line, where N is the page that follows. No extra charge.","type":"boolean"},"pages":{"description":"Send true to also get each page's markdown in pages, as { pageNumber, markdown }. No extra charge.","type":"boolean"},"type":{"const":"pdf","type":"string"}},"required":["type"],"type":"object"}]},"minItems":1,"type":"array"},"profile":{"additionalProperties":false,"description":"Read the page with the cookies and local storage that earlier calls saved under this name, kept for your account for 30 days after the last use. A call with a profile always loads the page in a browser, costs 1 credit, the same as any page, and is never answered from a stored copy. Only one call at a time can save to a profile.","properties":{"name":{"description":"A name you choose, such as shop-login. Calls with the same name share state.","maxLength":128,"minLength":1,"type":"string"},"saveChanges":{"default":true,"description":"Keep the cookies and local storage this read leaves behind for the next call with this name. Send false to read with the profile without changing it.","type":"boolean"}},"required":["name"],"type":"object"},"proxy":{"description":"auto: basic first, enhanced once if the site refuses. basic: one plain attempt. enhanced: the stronger read from the start. stealth is the same as enhanced. Same price.","enum":["auto","basic","enhanced","stealth"],"type":"string"},"redactPII":{"anyOf":[{"type":"boolean"},{"additionalProperties":false,"description":"Options for redactPII.","properties":{"entities":{"default":["PERSON","EMAIL","PHONE","LOCATION","FINANCIAL","SECRET"],"description":"What to hide: PERSON, EMAIL, PHONE, LOCATION, FINANCIAL, SECRET. All by default.","items":{"enum":["PERSON","EMAIL","PHONE","LOCATION","FINANCIAL","SECRET"],"type":"string"},"minItems":1,"type":"array"},"mode":{"default":"accurate","description":"accurate finds names and places with the model and the rest by pattern. aggressive adds guesses that catch more and may hide a little too much. fast uses patterns only, so it finds no ordinary names or places.","enum":["accurate","aggressive","fast"],"type":"string"},"replaceStyle":{"default":"tag","description":"tag writes <EMAIL>, mask writes * for each character, remove deletes it.","enum":["tag","mask","remove"],"type":"string"}},"type":"object"}],"description":"Send true, or an object, to hide personal data in the markdown and in everything made from it (summary, answers, highlights, json). Links, html and rawHtml are not changed. A page the model cannot scan is refused rather than returned unredacted."},"removeBase64Images":{"description":"Images inside the page that carry their data in the address (data:image) are dropped by default. Send false to keep them in markdown and html.","type":"boolean"},"skipTlsVerification":{"description":"Send true to read a page whose certificate is expired, self-signed or for another name. The read is not private against someone between us and the site.","type":"boolean"},"storeInCache":{"default":true,"description":"Send false to neither read nor keep a stored copy of this page.","type":"boolean"},"timeout":{"default":60000,"description":"How long to keep trying, in milliseconds, from 1 second to 5 minutes; 60 seconds by default. A page that needs a browser needs at least 5 seconds, and pages behind a bot check can need 10 to 30 seconds the first time. A read that runs out of time is an error and costs nothing.","maximum":300000,"minimum":1000,"type":"integer"},"waitFor":{"description":"Extra milliseconds to wait before reading, up to 60000, for pages that load their content late. To wait for an element, add a wait action with a selector. A read that waits costs 1 credit, the same as any page.","maximum":60000,"minimum":0,"type":"integer"},"zeroDataRetention":{"default":false,"description":"Send true to keep nothing from this call: no stored copy is read or made, and nothing from it is logged. Costs 1 credit more per page. Not with a screenshot.","type":"boolean"}},"type":"object"},"showSources":{"default":false,"description":"Send true to get sources: for each field, the pages that state its value.","type":"boolean"},"systemPrompt":{"description":"Standing instructions for how to fill the fields, such as units or how to write dates, up to 10000 characters. They add to the rules of the extract: a value is still copied from the page and is null when the page does not state it.","maxLength":10000,"minLength":1,"type":"string"},"timeout":{"default":30000,"description":"How long to keep reading the pages, in milliseconds, from 1 second to 5 minutes; 30 seconds by default. A page not read by then is skipped and named in warning, and costs nothing.","maximum":300000,"minimum":1000,"type":"integer"},"urls":{"default":[],"description":"The pages to read, up to 25, such as [\"https://bun.com/blog/bun-v1.3\"]. An address ending in /* reads pages under it, found through the site's sitemap. With more than one, the fields are filled from all of them together. A page that cannot be read is skipped and named in warning, and costs nothing. A page is read up to 50000 characters. With several pages each one gets a smaller share, and all together are read up to 150000 characters. A page that is cut is counted in warning. The call fails only when no page can be read. Leave it out and send a prompt to search the web instead.","items":{"maxLength":2048,"type":"string"},"maxItems":25,"type":"array"},"webhook":{"anyOf":[{"type":"string"},{"additionalProperties":false,"properties":{"events":{"items":{"enum":["started","page","action","completed","failed","cancelled"],"type":"string"},"minItems":1,"type":"array"},"headers":{"additionalProperties":{"maxLength":1000,"type":"string"},"propertyNames":{"pattern":"^[A-Za-z0-9-]{1,64}$","type":"string"},"type":"object"},"metadata":{"additionalProperties":{"$ref":"#/definitions/__schema0"},"propertyNames":{"type":"string"},"type":"object"},"url":{"type":"string"}},"required":["url"],"type":"object"}],"description":"Where to be told when the extract ends: a plain address, or { url } which gets one JSON POST with the id, the status, the data and creditsUsed. headers are sent with the call, metadata comes back in it, and events picks completed, failed or both (both by default). The call is signed: read Stophy-Signature (t=<unix seconds>,v1=<hex>), the HMAC-SHA256 of \"<t>.<body>\" with your webhook secret from webhook.secret. A call that gets no 2xx is sent again, up to 3 times."},"zeroDataRetention":{"default":false,"description":"Send true to keep nothing from this call: pages are read live, the result is held for one hour at most, and nothing is logged. Costs 1 credit more per page.","type":"boolean"}},"type":"object"}after
{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"definitions":{"__schema0":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"items":{"allOf":[{"$ref":"#/definitions/__schema0"}]},"type":"array"},{"additionalProperties":{"allOf":[{"$ref":"#/definitions/__schema0"}]},"propertyNames":{"type":"string"},"type":"object"}]}},"properties":{"agent":{"additionalProperties":false,"description":"Accepted so a client that sends { model: \"FIRE-1\" } works. An extract reads the pages it is given and checks every value; it does not browse or click, and the answer says so in warning. To navigate a site, use the agent endpoint.","properties":{"model":{"maxLength":40,"minLength":1,"type":"string"}},"required":["model"],"type":"object"},"allowExternalLinks":{"default":false,"description":"Send true to also read pages on other sites that the pages link to, up to 5, picking the links whose address mentions your prompt. Each page read costs $2 per 1,000 pages.","type":"boolean"},"enableWebSearch":{"default":false,"description":"Send true to also search the web for your prompt and read the best pages it finds, up to 3 more. Needs a prompt. The search costs $4 per 1,000 searches. With no urls, the search runs without this.","type":"boolean"},"ignoreInvalidURLs":{"default":true,"description":"Skip addresses that are not public website URLs. Send false to refuse the call instead.","type":"boolean"},"ignoreSitemap":{"default":false,"description":"For an address ending in /*: skip the site's sitemaps and find pages by links.","type":"boolean"},"includeSubdomains":{"default":true,"description":"For an address ending in /*: also read pages on subdomains of the site. Send false to stay on the exact host.","type":"boolean"},"limit":{"description":"For an address ending in /*: read at most this many pages under it. At most 25 pages are read in all.","maximum":9007199254740991,"minimum":1,"type":"integer"},"prompt":{"description":"What to pull from the pages in plain words, such as the version and the release date, up to 10000 characters. With no urls, the web is searched for the first 400 characters of it.","maxLength":10000,"minLength":1,"type":"string"},"schema":{"additionalProperties":{"$ref":"#/definitions/__schema0"},"description":"The fields to fill, as a JSON Schema (draft-07 or 2020-12) object with properties. Pydantic's model_json_schema() and zod's toJSONSchema() output work as they are. enum, const, anyOf, oneOf, nullable types, $ref with $defs, required, descriptions and any key names are read. Up to 100 top-level fields and 32 KB. A field the page does not state comes back null.","propertyNames":{"type":"string"},"type":"object"},"scrapeOptions":{"additionalProperties":false,"description":"How to read each page, the same options as scrape.","properties":{"actions":{"description":"Up to 50 steps to run on the page, in order, before reading it: { \"type\": \"wait\", \"milliseconds\": 500 } (up to 60 seconds), { \"type\": \"wait\", \"selector\": \".results\" }, { \"type\": \"click\", \"selector\": \"button.more\" }, { \"type\": \"write\", \"text\": \"tides\" }, { \"type\": \"press\", \"key\": \"Enter\" }, { \"type\": \"scroll\", \"direction\": \"down\" } (also up, left or right; amount is pixels, \"viewport\" or \"max\"; maxScrolls 1 to 50; selector scrolls an inner container; \"max\" keeps scrolling until the page stops growing, for feeds that load as you go), { \"type\": \"screenshot\", \"fullPage\": true } (links come back in actions.screenshots), { \"type\": \"scrape\" } (the page at that point, in actions.scrapes), { \"type\": \"executeJavascript\", \"script\": \"document.title\" } (results in actions.javascriptReturns), { \"type\": \"pdf\", \"format\": \"A4\" } (links in actions.pdfs) or { \"type\": \"perform\", \"action\": \"Click the Load more button\" } (a step in plain words, up to 5 browser steps on this page, never leaving the site; at most 5 per call). A read with actions costs $2 per 1,000 pages, the same as any page; the actions themselves add nothing. If an action fails, you still get the page as it stood, with a warning that names the action and says why.","items":{"anyOf":[{"additionalProperties":false,"properties":{"milliseconds":{"maximum":60000,"minimum":1,"type":"integer"},"type":{"const":"wait","type":"string"}},"required":["type","milliseconds"],"type":"object"},{"additionalProperties":false,"properties":{"selector":{"minLength":1,"type":"string"},"type":{"const":"wait","type":"string"}},"required":["type","selector"],"type":"object"},{"additionalProperties":false,"properties":{"all":{"const":false,"type":"boolean"},"selector":{"minLength":1,"type":"string"},"type":{"const":"click","type":"string"}},"required":["type","selector"],"type":"object"},{"additionalProperties":false,"properties":{"text":{"minLength":1,"type":"string"},"type":{"const":"write","type":"string"}},"required":["type","text"],"type":"object"},{"additionalProperties":false,"properties":{"key":{"maxLength":40,"minLength":1,"type":"string"},"type":{"const":"press","type":"string"}},"required":["type","key"],"type":"object"},{"additionalProperties":false,"properties":{"amount":{"anyOf":[{"maximum":100000,"minimum":1,"type":"integer"},{"enum":["viewport","max"],"type":"string"}]},"direction":{"default":"down","enum":["up","down","left","right"],"type":"string"},"maxScrolls":{"maximum":50,"minimum":1,"type":"integer"},"selector":{"minLength":1,"type":"string"},"type":{"const":"scroll","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"fullPage":{"type":"boolean"},"quality":{"maximum":100,"minimum":1,"type":"integer"},"type":{"const":"screenshot","type":"string"},"viewport":{"additionalProperties":false,"properties":{"height":{"maximum":2160,"minimum":200,"type":"integer"},"width":{"maximum":3840,"minimum":200,"type":"integer"}},"required":["width","height"],"type":"object"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"type":{"const":"scrape","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"script":{"maxLength":20000,"minLength":1,"type":"string"},"type":{"const":"executeJavascript","type":"string"}},"required":["type","script"],"type":"object"},{"additionalProperties":false,"properties":{"format":{"enum":["Letter","Legal","Tabloid","Ledger","A0","A1","A2","A3","A4","A5","A6"],"type":"string"},"landscape":{"type":"boolean"},"scale":{"maximum":2,"minimum":0.1,"type":"number"},"type":{"const":"pdf","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"action":{"maxLength":500,"minLength":1,"type":"string"},"type":{"const":"perform","type":"string"}},"required":["type","action"],"type":"object"}]},"maxItems":50,"minItems":1,"type":"array"},"blockAds":{"description":"Ads and trackers are not loaded when a page runs in a browser. Send false to load them.","type":"boolean"},"checkPromptInjection":{"description":"Send true to scan the page text for instructions aimed at an AI model before anything is built from it. A page that has them is refused with 403 promptInjectionDetected and costs nothing. The scan adds $8 per 1,000 pages when it runs; a page it cannot scan fully comes back with a warning and no charge.","type":"boolean"},"excludeTags":{"description":"Remove the parts of the page that match these CSS selectors, such as .comments.","items":{"minLength":1,"type":"string"},"minItems":1,"type":"array"},"fastMode":{"description":"Send true to read the page without opening a browser: the answer comes sooner, but a page that needs a browser, or that refuses a plain request, comes back as an error instead of being retried. Ignored when the call needs a browser (actions, screenshot, waitFor, mobile, profile, network, branding).","type":"boolean"},"headers":{"additionalProperties":{"maxLength":2000,"pattern":"^[\\t\\x20-\\x7e]*$","type":"string"},"description":"Extra request headers to send to the site, such as { \"x-plan\": \"pro\" }. A read with headers is never answered from or saved to a stored copy.","propertyNames":{"pattern":"^[A-Za-z0-9-]{1,64}$","type":"string"},"type":"object"},"includeTags":{"description":"Keep only the parts of the page that match these CSS selectors, such as article or .price. When set, onlyMainContent is not applied.","items":{"minLength":1,"type":"string"},"minItems":1,"type":"array"},"location":{"additionalProperties":false,"description":"Where to read the page from. The default is the United States.","properties":{"country":{"description":"Two-letter country code to read the page from, such as DE or JP.","type":"string"},"languages":{"description":"Languages to ask the site for, best first, such as [\"de\", \"en\"]. Sent as Accept-Language. A read with languages is never answered from or saved to a stored copy.","items":{"pattern":"^[A-Za-z]{2,3}(?:-[A-Za-z0-9]{2,8})*$","type":"string"},"maxItems":5,"minItems":1,"type":"array"}},"type":"object"},"lockdown":{"description":"Send true to answer only from a stored copy of the page and never read it live, whatever its age. A page with no stored copy is notFound. The same as minAge 0.","type":"boolean"},"maxAge":{"description":"Accept a stored answer up to this many milliseconds old, at most 30 days. Without it, 2 days, or less for a site whose pages change often, and a copy up to twice that age (at most 7 days) comes back at once as stale while a fresh read runs. 0 always reads the page live. metadata.cacheState says which one you got.","maximum":9007199254740991,"minimum":0,"type":"integer"},"minAge":{"description":"Answer only from a stored copy that is at least this many milliseconds old, and never read the page live. 0 accepts any stored copy. A page with no such copy is notFound.","maximum":9007199254740991,"minimum":0,"type":"integer"},"mobile":{"description":"Read the page as a phone would: a phone-sized screen and the mobile version of the site. The page loads in a browser.","type":"boolean"},"onlyCleanContent":{"description":"Send true to have a model remove what onlyMainContent leaves behind in the markdown: cookie banners, ads, share widgets, breadcrumbs, sign-up prompts, comment prompts and related-article lists. It only removes whole paragraphs and lists; it never rewrites or adds text, and code blocks are always kept. Skipped with a warning when the page is too long to clean or the model does not answer. Not with zeroDataRetention. Summary, answers and highlights are made from the cleaned markdown.","type":"boolean"},"onlyMainContent":{"default":true,"description":"Keep only the page's main content, without menus, headers, footers and ads.","type":"boolean"},"parsers":{"description":"Only the pdf parser exists. Send \"pdf\" or { \"type\": \"pdf\", mode, maxPages, pages, blocks, pageMarkers } with the same meaning as in parse. Without mode a PDF is read as auto: from its text layer, and from the picture of any page that has no text. fast reads the text layer only, and ocr reads the picture of every page, up to 20 pages. Each page of text that comes back costs $2 per 1,000 pages. Pictures are read only with an API key.","items":{"anyOf":[{"const":"pdf","type":"string"},{"additionalProperties":false,"properties":{"blocks":{"description":"Send true to also get the page's layout in blocks: each title, section header or run of text, with its page, reading order, position on the page (bbox as left, top, right, bottom from 0 to 1) and where its text sits in that page's markdown (span, as in pages). Tables, figures and formulas are not told apart. A page read from its picture is one block. No extra charge.","type":"boolean"},"maxPages":{"description":"Read at most this many pages, up to 500, which is also the default.","maximum":500,"minimum":1,"type":"integer"},"mode":{"description":"fast reads the text layer only. auto (the default) reads the text layer and reads the picture of any page that has none. ocr reads the picture of every page.","enum":["fast","auto","ocr"],"type":"string"},"pageMarkers":{"description":"Send true to mark page breaks in the markdown: pages are joined with \"---\" and a line, where N is the page that follows. No extra charge.","type":"boolean"},"pages":{"description":"Send true to also get each page's markdown in pages, as { pageNumber, markdown }. No extra charge.","type":"boolean"},"type":{"const":"pdf","type":"string"}},"required":["type"],"type":"object"}]},"minItems":1,"type":"array"},"profile":{"additionalProperties":false,"description":"Read the page with the cookies and local storage that earlier calls saved under this name, kept for your account for 30 days after the last use. A call with a profile always loads the page in a browser, costs $2 per 1,000 pages, the same as any page, and is never answered from a stored copy. Only one call at a time can save to a profile.","properties":{"name":{"description":"A name you choose, such as shop-login. Calls with the same name share state.","maxLength":128,"minLength":1,"type":"string"},"saveChanges":{"default":true,"description":"Keep the cookies and local storage this read leaves behind for the next call with this name. Send false to read with the profile without changing it.","type":"boolean"}},"required":["name"],"type":"object"},"proxy":{"description":"auto: basic first, enhanced once if the site refuses. basic: one plain attempt. enhanced: the stronger read from the start. stealth is the same as enhanced. Same price.","enum":["auto","basic","enhanced","stealth"],"type":"string"},"redactPII":{"anyOf":[{"type":"boolean"},{"additionalProperties":false,"description":"Options for redactPII.","properties":{"entities":{"default":["PERSON","EMAIL","PHONE","LOCATION","FINANCIAL","SECRET"],"description":"What to hide: PERSON, EMAIL, PHONE, LOCATION, FINANCIAL, SECRET. All by default.","items":{"enum":["PERSON","EMAIL","PHONE","LOCATION","FINANCIAL","SECRET"],"type":"string"},"minItems":1,"type":"array"},"mode":{"default":"accurate","description":"accurate finds names and places with the model and the rest by pattern. aggressive adds guesses that catch more and may hide a little too much. fast uses patterns only, so it finds no ordinary names or places.","enum":["accurate","aggressive","fast"],"type":"string"},"replaceStyle":{"default":"tag","description":"tag writes <EMAIL>, mask writes * for each character, remove deletes it.","enum":["tag","mask","remove"],"type":"string"}},"type":"object"}],"description":"Send true, or an object, to hide personal data in the markdown and in everything made from it (summary, answers, highlights, json). Links, html and rawHtml are not changed. A page the model cannot scan is refused rather than returned unredacted."},"removeBase64Images":{"description":"Images inside the page that carry their data in the address (data:image) are dropped by default. Send false to keep them in markdown and html.","type":"boolean"},"skipTlsVerification":{"description":"Send true to read a page whose certificate is expired, self-signed or for another name. The read is not private against someone between us and the site.","type":"boolean"},"storeInCache":{"default":true,"description":"Send false to neither read nor keep a stored copy of this page.","type":"boolean"},"timeout":{"default":60000,"description":"How long to keep trying, in milliseconds, from 1 second to 5 minutes; 60 seconds by default. A page that needs a browser needs at least 5 seconds, and pages behind a bot check can need 10 to 30 seconds the first time. A read that runs out of time is an error and costs nothing.","maximum":300000,"minimum":1000,"type":"integer"},"waitFor":{"description":"Extra milliseconds to wait before reading, up to 60000, for pages that load their content late. To wait for an element, add a wait action with a selector. A read that waits costs $2 per 1,000 pages, the same as any page.","maximum":60000,"minimum":0,"type":"integer"},"zeroDataRetention":{"default":false,"description":"Send true to keep nothing from this call: no stored copy is read or made, and nothing from it is logged. Adds $2 per 1,000 pages. Not with a screenshot.","type":"boolean"}},"type":"object"},"showSources":{"default":false,"description":"Send true to get sources: for each field, the pages that state its value.","type":"boolean"},"systemPrompt":{"description":"Standing instructions for how to fill the fields, such as units or how to write dates, up to 10000 characters. They add to the rules of the extract: a value is still copied from the page and is null when the page does not state it.","maxLength":10000,"minLength":1,"type":"string"},"timeout":{"default":30000,"description":"How long to keep reading the pages, in milliseconds, from 1 second to 5 minutes; 30 seconds by default. A page not read by then is skipped and named in warning, and costs nothing.","maximum":300000,"minimum":1000,"type":"integer"},"urls":{"default":[],"description":"The pages to read, up to 25, such as [\"https://bun.com/blog/bun-v1.3\"]. An address ending in /* reads pages under it, found through the site's sitemap. With more than one, the fields are filled from all of them together. A page that cannot be read is skipped and named in warning, and costs nothing. A page is read up to 50000 characters. With several pages each one gets a smaller share, and all together are read up to 150000 characters. A page that is cut is counted in warning. The call fails only when no page can be read. Leave it out and send a prompt to search the web instead.","items":{"maxLength":2048,"type":"string"},"maxItems":25,"type":"array"},"webhook":{"anyOf":[{"type":"string"},{"additionalProperties":false,"properties":{"events":{"items":{"enum":["started","page","action","completed","failed","cancelled"],"type":"string"},"minItems":1,"type":"array"},"headers":{"additionalProperties":{"maxLength":1000,"type":"string"},"propertyNames":{"pattern":"^[A-Za-z0-9-]{1,64}$","type":"string"},"type":"object"},"metadata":{"additionalProperties":{"$ref":"#/definitions/__schema0"},"propertyNames":{"type":"string"},"type":"object"},"url":{"type":"string"}},"required":["url"],"type":"object"}],"description":"Where to be told when the extract ends: a plain address, or { url } which gets one JSON POST with the id, the status, the data and costUsd. headers are sent with the call, metadata comes back in it, and events picks completed, failed or both (both by default). The call is signed: read Stophy-Signature (t=<unix seconds>,v1=<hex>), the HMAC-SHA256 of \"<t>.<body>\" with your webhook secret from webhook.secret. A call that gets no 2xx is sent again, up to 3 times."},"zeroDataRetention":{"default":false,"description":"Send true to keep nothing from this call: pages are read live, the result is held for one hour at most, and nothing is logged. Adds $2 per 1,000 pages.","type":"boolean"}},"type":"object"}{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":{},"properties":{"costUsd":{"type":"number"},"creditsUsed":{"type":"number"},"requestId" ⟨5 unchanged words⟩ type":"boolean"}},"required":["creditsUsed","costUsd","requestId"],"type":"object"}
Scrape the list of pages on a website.1 credit$2 percall.1,000 calls. Input: url, search, sitemap, includeSubdomains,ignoreQuery...ignoreQuer...
{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":{},"properties":{"costUsd":{"type":"number"},"creditsUsed":{"type":"number"},"requestId" ⟨5 unchanged words⟩ type":"boolean"}},"required":["creditsUsed","costUsd","requestId"],"type":"object"}
⟨7 unchanged words⟩ , HTML, links, a screenshot or JSON.1 credit$2forperany1,000pagepages, howeverittheyisare reached. checkPromptInjection adds4$8creditsper 1,000 pages when the scan runs, json with a schema ⟨7 unchanged words⟩ , menu and changeTracking in json mode add4$8creditsper 1,000 pages each when they return something. CSS rules and attributes add nothing. A PDF adds1 credit$2forpereach1,000pagepages of text thatcomescome back, so a PDF read with maxChars, ⟨23 unchanged words⟩ answer from a stored copy within maxAge costs $2 per 1,000creditpages like any page. A page that comes back ⟨170 unchanged words⟩
before
{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"definitions":{"__schema0":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"items":{"allOf":[{"$ref":"#/definitions/__schema0"}]},"type":"array"},{"additionalProperties":{"allOf":[{"$ref":"#/definitions/__schema0"}]},"propertyNames":{"type":"string"},"type":"object"}]},"__schema1":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"items":{"allOf":[{"$ref":"#/definitions/__schema1"}]},"type":"array"},{"additionalProperties":{"allOf":[{"$ref":"#/definitions/__schema1"}]},"propertyNames":{"type":"string"},"type":"object"}]},"__schema2":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"items":{"allOf":[{"$ref":"#/definitions/__schema2"}]},"type":"array"},{"additionalProperties":{"allOf":[{"$ref":"#/definitions/__schema2"}]},"propertyNames":{"type":"string"},"type":"object"}]}},"properties":{"actions":{"description":"Up to 50 steps to run on the page, in order, before reading it: { \"type\": \"wait\", \"milliseconds\": 500 } (up to 60 seconds), { \"type\": \"wait\", \"selector\": \".results\" }, { \"type\": \"click\", \"selector\": \"button.more\" }, { \"type\": \"write\", \"text\": \"tides\" }, { \"type\": \"press\", \"key\": \"Enter\" }, { \"type\": \"scroll\", \"direction\": \"down\" } (also up, left or right; amount is pixels, \"viewport\" or \"max\"; maxScrolls 1 to 50; selector scrolls an inner container; \"max\" keeps scrolling until the page stops growing, for feeds that load as you go), { \"type\": \"screenshot\", \"fullPage\": true } (links come back in actions.screenshots), { \"type\": \"scrape\" } (the page at that point, in actions.scrapes), { \"type\": \"executeJavascript\", \"script\": \"document.title\" } (results in actions.javascriptReturns), { \"type\": \"pdf\", \"format\": \"A4\" } (links in actions.pdfs) or { \"type\": \"perform\", \"action\": \"Click the Load more button\" } (a step in plain words, up to 5 browser steps on this page, never leaving the site; at most 5 per call). A read with actions costs 1 credit, the same as any page; the actions themselves add nothing. If an action fails, you still get the page as it stood, with a warning that names the action and says why.","items":{"anyOf":[{"additionalProperties":false,"properties":{"milliseconds":{"maximum":60000,"minimum":1,"type":"integer"},"type":{"const":"wait","type":"string"}},"required":["type","milliseconds"],"type":"object"},{"additionalProperties":false,"properties":{"selector":{"minLength":1,"type":"string"},"type":{"const":"wait","type":"string"}},"required":["type","selector"],"type":"object"},{"additionalProperties":false,"properties":{"all":{"const":false,"type":"boolean"},"selector":{"minLength":1,"type":"string"},"type":{"const":"click","type":"string"}},"required":["type","selector"],"type":"object"},{"additionalProperties":false,"properties":{"text":{"minLength":1,"type":"string"},"type":{"const":"write","type":"string"}},"required":["type","text"],"type":"object"},{"additionalProperties":false,"properties":{"key":{"maxLength":40,"minLength":1,"type":"string"},"type":{"const":"press","type":"string"}},"required":["type","key"],"type":"object"},{"additionalProperties":false,"properties":{"amount":{"anyOf":[{"maximum":100000,"minimum":1,"type":"integer"},{"enum":["viewport","max"],"type":"string"}]},"direction":{"default":"down","enum":["up","down","left","right"],"type":"string"},"maxScrolls":{"maximum":50,"minimum":1,"type":"integer"},"selector":{"minLength":1,"type":"string"},"type":{"const":"scroll","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"fullPage":{"type":"boolean"},"quality":{"maximum":100,"minimum":1,"type":"integer"},"type":{"const":"screenshot","type":"string"},"viewport":{"additionalProperties":false,"properties":{"height":{"maximum":2160,"minimum":200,"type":"integer"},"width":{"maximum":3840,"minimum":200,"type":"integer"}},"required":["width","height"],"type":"object"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"type":{"const":"scrape","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"script":{"maxLength":20000,"minLength":1,"type":"string"},"type":{"const":"executeJavascript","type":"string"}},"required":["type","script"],"type":"object"},{"additionalProperties":false,"properties":{"format":{"enum":["Letter","Legal","Tabloid","Ledger","A0","A1","A2","A3","A4","A5","A6"],"type":"string"},"landscape":{"type":"boolean"},"scale":{"maximum":2,"minimum":0.1,"type":"number"},"type":{"const":"pdf","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"action":{"maxLength":500,"minLength":1,"type":"string"},"type":{"const":"perform","type":"string"}},"required":["type","action"],"type":"object"}]},"maxItems":50,"minItems":1,"type":"array"},"blockAds":{"description":"Ads and trackers are not loaded when a page runs in a browser. Send false to load them.","type":"boolean"},"checkPromptInjection":{"description":"Send true to scan the page text for instructions aimed at an AI model before anything is built from it. A page that has them is refused with 403 promptInjectionDetected and costs nothing. The scan adds 4 credits when it runs; a page it cannot scan fully comes back with a warning and no charge.","type":"boolean"},"excludeTags":{"description":"Remove the parts of the page that match these CSS selectors, such as .comments.","items":{"minLength":1,"type":"string"},"minItems":1,"type":"array"},"fastMode":{"description":"Send true to read the page without opening a browser: the answer comes sooner, but a page that needs a browser, or that refuses a plain request, comes back as an error instead of being retried. Ignored when the call needs a browser (actions, screenshot, waitFor, mobile, profile, network, branding).","type":"boolean"},"formats":{"default":["markdown"],"description":"What to return: markdown (clean page text), summary (a short summary of the page), html (the cleaned page), rawHtml (the page as sent), audio and video (for a YouTube link: the audio track as an M4A file, or the video as an MP4 file, as a link that works for 1 hour), rawBase64 (the bytes the site sent, Base64 encoded, from a live read; metadata.contentType says what they are), links (every link on the page), images (every image address), screenshot (a link to a JPEG of the visible page, kept for 7 days), changeTracking (what changed in the markdown since your key last read this page with the same options, kept 30 days; add modes [\"git-diff\",\"json\"] with a schema or prompt to compare fields too), question (send { \"type\": \"question\", \"question\": \"...\" } to get answer, null when the page does not state one), product (title, brand, category, url, description and variants with price, sale, availability and images, or null) and menu (merchant, currency and sections of items with prices, or null) network (the JSON the page loaded while it rendered, up to 30 responses) and branding (the page's colors, fonts, typography, spacing, button and input styles, logo and brand images, read from how the page looks, with a field left out when the page does not show it). Send { \"type\": \"screenshot\", \"fullPage\": true } for the whole page. Send { \"type\": \"highlights\", \"query\": \"refund policy\" } for the passages that best match a query. Send { \"type\": \"json\", \"schema\": { \"type\": \"object\", \"properties\": { \"price\": { \"type\": \"number\" } } } } or { \"type\": \"json\", \"prompt\": \"the price and the stock\" } for fields filled from the page, each checked against it. Send { \"type\": \"json\", \"parser\": \"amazon-product\" } to get a site's own data as json instead of reading the page; GET /v1/parsers lists the parsers. Send { \"type\": \"json\", \"rules\": { \"title\": \"h1\", \"links\": { \"selector\": \"a\", \"type\": \"list\", \"output\": \"@href\" } } } to read the page with CSS rules and no model, at the page's own price. Send { \"type\": \"attributes\", \"selectors\": [{ \"selector\": \"a\", \"attribute\": \"href\" }] } for attribute values, returned in attributes. Without a parser or rules, json needs a schema or a prompt and is filled from the page. json with a schema or a prompt, summary, highlights, question, product, menu and changeTracking in json mode cost 4 credits more each when they return something. json with rules or a parser, and attributes, cost nothing more. A screenshot, network or branding read costs 1 credit, the same as any page. A PDF comes back as markdown only, and costs 1 credit more for each page of text that comes back. A CSV or an Excel .xlsx file comes back as markdown tables.","items":{"anyOf":[{"enum":["markdown","summary","html","rawHtml","rawBase64","links","images","network","branding","audio","video","screenshot","changeTracking","product","menu"],"type":"string"},{"additionalProperties":false,"properties":{"type":{"enum":["markdown","summary","html","rawHtml","rawBase64","links","images","network","branding","audio","video"],"type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"modes":{"description":"git-diff returns a unified diff of the markdown. json compares the fields in schema or prompt between this read and the last one. Without modes you get git-diff.","items":{"enum":["git-diff","json"],"type":"string"},"maxItems":2,"type":"array"},"prompt":{"description":"With json mode: what to compare, in plain words, such as the price and stock.","maxLength":10000,"minLength":1,"type":"string"},"schema":{"additionalProperties":{"$ref":"#/definitions/__schema0"},"description":"The fields to fill, as a JSON Schema (draft-07 or 2020-12) object with properties. Pydantic's model_json_schema() and zod's toJSONSchema() output work as they are. enum, const, anyOf, oneOf, nullable types, $ref with $defs, required, descriptions and any key names are read. Up to 100 top-level fields and 32 KB. A field the page does not state comes back null.","propertyNames":{"type":"string"},"type":"object"},"tag":{"type":"null"},"type":{"const":"changeTracking","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"question":{"description":"A question to answer from the page, such as what the refund window is.","maxLength":10000,"minLength":1,"type":"string"},"type":{"const":"question","type":"string"}},"required":["type","question"],"type":"object"},{"additionalProperties":false,"properties":{"type":{"const":"product","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"type":{"const":"menu","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"fullPage":{"default":false,"description":"Capture the whole page from top to bottom instead of the visible part.","type":"boolean"},"quality":{"description":"JPEG quality from 1 to 100. The default is 70.","maximum":100,"minimum":1,"type":"integer"},"type":{"const":"screenshot","type":"string"},"viewport":{"additionalProperties":false,"description":"The window size in pixels, such as { width: 390, height: 844 }.","properties":{"height":{"maximum":2160,"minimum":200,"type":"integer"},"width":{"maximum":3840,"minimum":200,"type":"integer"}},"required":["width","height"],"type":"object"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"count":{"default":5,"description":"How many passages to return, best match first.","maximum":20,"minimum":1,"type":"integer"},"query":{"description":"What you are looking for on the page, such as refund policy.","maxLength":10000,"minLength":1,"type":"string"},"type":{"const":"highlights","type":"string"}},"required":["type","query"],"type":"object"},{"additionalProperties":false,"properties":{"checkPromptInjection":{"description":"Deprecated: send checkPromptInjection at the top level of the call.","type":"boolean"},"options":{"additionalProperties":{"$ref":"#/definitions/__schema1"},"description":"Only with parser: extra inputs for it, such as { \"page\": 2 } for the next page of results or { \"minRating\": 4.5 } for a filter. GET /v1/parsers lists what each parser accepts.","propertyNames":{"type":"string"},"type":"object"},"parser":{"description":"Read the page with a named parser, which gives the site's own data as json. The url must be the kind of page the parser reads. Parsers are the only way to read some sites. GET /v1/parsers lists them.","type":"string"},"prompt":{"description":"What to pull from the page in plain words, such as the version and the release date.","maxLength":10000,"minLength":1,"type":"string"},"rules":{"additionalProperties":{"$ref":"#/definitions/__schema2"},"description":"Read the page with CSS rules instead of a model, no extra fee. Each field is a selector such as \"h1\" (the first match's text), \"a@href\" (an attribute) or { \"selector\": \"li\", \"type\": \"list\", \"output\": \"text\" | \"html\" | \"@attribute\" | { nested fields } }. A missing item is null and an unmatched list is []. Relative links become absolute. Up to 100 fields, 5 levels deep. Not with schema, prompt or parser.","propertyNames":{"type":"string"},"type":"object"},"schema":{"additionalProperties":{"$ref":"#/definitions/__schema0"},"description":"The fields to fill, as a JSON Schema (draft-07 or 2020-12) object with properties. Pydantic's model_json_schema() and zod's toJSONSchema() output work as they are. enum, const, anyOf, oneOf, nullable types, $ref with $defs, required, descriptions and any key names are read. Up to 100 top-level fields and 32 KB. A field the page does not state comes back null.","propertyNames":{"type":"string"},"type":"object"},"type":{"const":"json","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"selectors":{"description":"The elements and attributes to read, such as { selector: 'a.buy', attribute: 'href' }.","items":{"additionalProperties":false,"properties":{"attribute":{"maxLength":100,"minLength":1,"type":"string"},"selector":{"minLength":1,"type":"string"}},"required":["selector","attribute"],"type":"object"},"maxItems":50,"minItems":1,"type":"array"},"type":{"const":"attributes","type":"string"}},"required":["type","selectors"],"type":"object"}]},"maxItems":20,"minItems":1,"type":"array"},"headers":{"additionalProperties":{"maxLength":2000,"pattern":"^[\\t\\x20-\\x7e]*$","type":"string"},"description":"Extra request headers to send to the site, such as { \"x-plan\": \"pro\" }. A read with headers is never answered from or saved to a stored copy.","propertyNames":{"pattern":"^[A-Za-z0-9-]{1,64}$","type":"string"},"type":"object"},"includeTags":{"description":"Keep only the parts of the page that match these CSS selectors, such as article or .price. When set, onlyMainContent is not applied.","items":{"minLength":1,"type":"string"},"minItems":1,"type":"array"},"linkStyle":{"default":"inline","description":"How links appear in the markdown. inline keeps [text](address). numbered writes Pricing⟨3⟩ and lists each address once at the end. none keeps only the link text, which makes link-heavy pages 10 to 70% shorter; ask for the links format to get the addresses.","enum":["inline","numbered","none"],"type":"string"},"location":{"additionalProperties":false,"description":"Where to read the page from. The default is the United States.","properties":{"country":{"description":"Two-letter country code to read the page from, such as DE or JP.","type":"string"},"languages":{"description":"Languages to ask the site for, best first, such as [\"de\", \"en\"]. Sent as Accept-Language. A read with languages is never answered from or saved to a stored copy.","items":{"pattern":"^[A-Za-z]{2,3}(?:-[A-Za-z0-9]{2,8})*$","type":"string"},"maxItems":5,"minItems":1,"type":"array"}},"type":"object"},"lockdown":{"description":"Send true to answer only from a stored copy of the page and never read it live, whatever its age. A page with no stored copy is notFound. The same as minAge 0.","type":"boolean"},"maxAge":{"description":"Accept a stored answer up to this many milliseconds old, at most 30 days. Without it, 2 days, or less for a site whose pages change often, and a copy up to twice that age (at most 7 days) comes back at once as stale while a fresh read runs. 0 always reads the page live. metadata.cacheState says which one you got.","maximum":9007199254740991,"minimum":0,"type":"integer"},"maxChars":{"description":"Cut the markdown at this many characters; isTruncated says when that happened and nextOffset where to read on. With query, how much of the page to keep, 8000 by default.","maximum":1000000,"minimum":500,"type":"integer"},"minAge":{"description":"Answer only from a stored copy that is at least this many milliseconds old, and never read the page live. 0 accepts any stored copy. A page with no such copy is notFound.","maximum":9007199254740991,"minimum":0,"type":"integer"},"mobile":{"description":"Read the page as a phone would: a phone-sized screen and the mobile version of the site. The page loads in a browser.","type":"boolean"},"offset":{"description":"Start the markdown this many characters into the page, PDF or file. Send the nextOffset of the last answer, with the same maxChars, to read on. Not with query.","maximum":9007199254740991,"minimum":0,"type":"integer"},"onlyCleanContent":{"description":"Send true to have a model remove what onlyMainContent leaves behind in the markdown: cookie banners, ads, share widgets, breadcrumbs, sign-up prompts, comment prompts and related-article lists. It only removes whole paragraphs and lists; it never rewrites or adds text, and code blocks are always kept. Skipped with a warning when the page is too long to clean or the model does not answer. Not with zeroDataRetention. Summary, answers and highlights are made from the cleaned markdown.","type":"boolean"},"onlyMainContent":{"default":true,"description":"Keep only the page's main content, without menus, headers, footers and ads.","type":"boolean"},"parsers":{"description":"Only the pdf parser exists. Send \"pdf\" or { \"type\": \"pdf\", mode, maxPages, pages, blocks, pageMarkers } with the same meaning as in parse. Without mode a PDF is read as auto: from its text layer, and from the picture of any page that has no text. fast reads the text layer only, and ocr reads the picture of every page, up to 20 pages. Each page of text that comes back costs 1 credit. Pictures are read only with an API key.","items":{"anyOf":[{"const":"pdf","type":"string"},{"additionalProperties":false,"properties":{"blocks":{"description":"Send true to also get the page's layout in blocks: each title, section header or run of text, with its page, reading order, position on the page (bbox as left, top, right, bottom from 0 to 1) and where its text sits in that page's markdown (span, as in pages). Tables, figures and formulas are not told apart. A page read from its picture is one block. No extra charge.","type":"boolean"},"maxPages":{"description":"Read at most this many pages, up to 500, which is also the default.","maximum":500,"minimum":1,"type":"integer"},"mode":{"description":"fast reads the text layer only. auto (the default) reads the text layer and reads the picture of any page that has none. ocr reads the picture of every page.","enum":["fast","auto","ocr"],"type":"string"},"pageMarkers":{"description":"Send true to mark page breaks in the markdown: pages are joined with \"---\" and a line, where N is the page that follows. No extra charge.","type":"boolean"},"pages":{"description":"Send true to also get each page's markdown in pages, as { pageNumber, markdown }. No extra charge.","type":"boolean"},"type":{"const":"pdf","type":"string"}},"required":["type"],"type":"object"}]},"minItems":1,"type":"array"},"profile":{"additionalProperties":false,"description":"Read the page with the cookies and local storage that earlier calls saved under this name, kept for your account for 30 days after the last use. A call with a profile always loads the page in a browser, costs 1 credit, the same as any page, and is never answered from a stored copy. Only one call at a time can save to a profile.","properties":{"name":{"description":"A name you choose, such as shop-login. Calls with the same name share state.","maxLength":128,"minLength":1,"type":"string"},"saveChanges":{"default":true,"description":"Keep the cookies and local storage this read leaves behind for the next call with this name. Send false to read with the profile without changing it.","type":"boolean"}},"required":["name"],"type":"object"},"proxy":{"description":"auto: basic first, enhanced once if the site refuses. basic: one plain attempt. enhanced: the stronger read from the start. stealth is the same as enhanced. Same price.","enum":["auto","basic","enhanced","stealth"],"type":"string"},"query":{"description":"What you are looking for on the page, such as refund window. A page longer than maxChars (8000 by default) comes back as the passages that match, in page order, each with the text around it and its table header; a shorter page comes back whole. Costs nothing extra, and a PDF is charged for the share of its pages that comes back. Not with offset.","maxLength":10000,"minLength":1,"type":"string"},"redactPII":{"anyOf":[{"type":"boolean"},{"additionalProperties":false,"description":"Options for redactPII.","properties":{"entities":{"default":["PERSON","EMAIL","PHONE","LOCATION","FINANCIAL","SECRET"],"description":"What to hide: PERSON, EMAIL, PHONE, LOCATION, FINANCIAL, SECRET. All by default.","items":{"enum":["PERSON","EMAIL","PHONE","LOCATION","FINANCIAL","SECRET"],"type":"string"},"minItems":1,"type":"array"},"mode":{"default":"accurate","description":"accurate finds names and places with the model and the rest by pattern. aggressive adds guesses that catch more and may hide a little too much. fast uses patterns only, so it finds no ordinary names or places.","enum":["accurate","aggressive","fast"],"type":"string"},"replaceStyle":{"default":"tag","description":"tag writes <EMAIL>, mask writes * for each character, remove deletes it.","enum":["tag","mask","remove"],"type":"string"}},"type":"object"}],"description":"Send true, or an object, to hide personal data in the markdown and in everything made from it (summary, answers, highlights, json). Links, html and rawHtml are not changed. A page the model cannot scan is refused rather than returned unredacted."},"removeBase64Images":{"description":"Images inside the page that carry their data in the address (data:image) are dropped by default. Send false to keep them in markdown and html.","type":"boolean"},"skipTlsVerification":{"description":"Send true to read a page whose certificate is expired, self-signed or for another name. The read is not private against someone between us and the site.","type":"boolean"},"storeInCache":{"default":true,"description":"Send false to neither read nor keep a stored copy of this page.","type":"boolean"},"timeout":{"default":60000,"description":"How long to keep trying, in milliseconds, from 1 second to 5 minutes; 60 seconds by default. A page that needs a browser needs at least 5 seconds, and pages behind a bot check can need 10 to 30 seconds the first time. A read that runs out of time is an error and costs nothing.","maximum":300000,"minimum":1000,"type":"integer"},"url":{"description":"The page or PDF to read, such as https://bun.com/docs.","type":"string"},"urls":{"not":{}},"waitFor":{"description":"Extra milliseconds to wait before reading, up to 60000, for pages that load their content late. To wait for an element, add a wait action with a selector. A read that waits costs 1 credit, the same as any page.","maximum":60000,"minimum":0,"type":"integer"},"zeroDataRetention":{"default":false,"description":"Send true to keep nothing from this call: no stored copy is read or made, and nothing from it is logged. Costs 1 credit more per page. Not with a screenshot.","type":"boolean"}},"required":["url"],"type":"object"}{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":{},"properties":{"costUsd":{"type":"number"},"creditsUsed":{"type":"number"},"requestId" ⟨5 unchanged words⟩ type":"boolean"}},"required":["creditsUsed","costUsd","requestId"],"type":"object"}
⟨5 unchanged words⟩ scholarly papers and YouTube videos in one call.2$0.004creditsforpereach 10 results from eachsou...s...
before
{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"definitions":{"__schema0":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"items":{"allOf":[{"$ref":"#/definitions/__schema0"}]},"type":"array"},{"additionalProperties":{"allOf":[{"$ref":"#/definitions/__schema0"}]},"propertyNames":{"type":"string"},"type":"object"}]},"__schema1":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"items":{"allOf":[{"$ref":"#/definitions/__schema1"}]},"type":"array"},{"additionalProperties":{"allOf":[{"$ref":"#/definitions/__schema1"}]},"propertyNames":{"type":"string"},"type":"object"}]},"__schema2":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"items":{"allOf":[{"$ref":"#/definitions/__schema2"}]},"type":"array"},{"additionalProperties":{"allOf":[{"$ref":"#/definitions/__schema2"}]},"propertyNames":{"type":"string"},"type":"object"}]}},"properties":{"categories":{"description":"pdf: web results that are PDF files. research: scholarly papers, in a research list, ranked by relevance then citations. videos: YouTube videos for the query, in YouTube's order, in a videos list, with the channel, length, views and watch link; a video whose captions we hold also gets the passage that matches the query and where it starts.","items":{"anyOf":[{"enum":["research","pdf","videos"],"type":"string"},{"additionalProperties":false,"properties":{"type":{"enum":["research","pdf","videos"],"type":"string"}},"required":["type"],"type":"object"}]},"type":"array"},"country":{"description":"Two-letter country to search from, like us. uk is read as gb. Image results are always US.","pattern":"^[A-Za-z]{2}$","type":"string"},"excludeDomains":{"items":{"type":"string"},"maxItems":10,"type":"array"},"highlights":{"default":false,"description":"Off by default. With true, a web result whose page we already hold gets the passages that best match the query as its description, in markdown, up to about 2,000 characters; others keep the engine's snippet.","type":"boolean"},"ignoreInvalidURLs":{"default":false,"description":"Leave out results whose address cannot be read as a page.","type":"boolean"},"includeDomains":{"items":{"type":"string"},"maxItems":10,"type":"array"},"lang":{"description":"Two-letter language for web results, like de. It steers which pages come back; some results can still be in other languages.","pattern":"^[A-Za-z]{2}$","type":"string"},"limit":{"description":"Most results to return for each source. Default 10, or 5 when scrapeOptions has formats, which reads every web and news result returned. News returns at most 50.","maximum":100,"minimum":1,"type":"integer"},"location":{"description":"Where to search from, like Germany or San Francisco,California,United States. The last part is the country and replaces country. A city before it narrows web results to that place.","minLength":1,"type":"string"},"maxAge":{"description":"Accept a stored answer up to this many milliseconds old, at most 30 days. Without it, 15 minutes for news and 1 hour for web and images. 0 always searches live.","maximum":9007199254740991,"minimum":0,"type":"integer"},"query":{"description":"What to search for, up to 500 characters. Search operators work in web results: quotes for an exact phrase, -word, site:, -site:, filetype:, inurl:, allinurl:, intitle: and allintitle:. In image results, imagesize:WIDTHxHEIGHT keeps images of exactly that size and larger:WIDTHxHEIGHT keeps images at least that large.","maxLength":500,"minLength":1,"type":"string"},"safe":{"description":"Hide explicit web, news and image results when true.","type":"boolean"},"scrapeOptions":{"additionalProperties":false,"description":"With formats, reads each web and news result, as many as limit asks for, within timeout, and fills each web result's description from it. Without formats no page is read and nothing more is charged. Takes the options of scrape: formats (markdown, html, rawHtml, links, images, summary, screenshot, json and the rest), onlyMainContent, includeTags, excludeTags, maxAge, minAge, waitFor, mobile, timeout (per page), headers, actions, location, parsers, profile and zeroDataRetention. Costs what scrape costs for each page read: 1 credit, plus 4 for each summary or json with a schema or prompt that returns something.","properties":{"actions":{"description":"Up to 50 steps to run on the page, in order, before reading it: { \"type\": \"wait\", \"milliseconds\": 500 } (up to 60 seconds), { \"type\": \"wait\", \"selector\": \".results\" }, { \"type\": \"click\", \"selector\": \"button.more\" }, { \"type\": \"write\", \"text\": \"tides\" }, { \"type\": \"press\", \"key\": \"Enter\" }, { \"type\": \"scroll\", \"direction\": \"down\" } (also up, left or right; amount is pixels, \"viewport\" or \"max\"; maxScrolls 1 to 50; selector scrolls an inner container; \"max\" keeps scrolling until the page stops growing, for feeds that load as you go), { \"type\": \"screenshot\", \"fullPage\": true } (links come back in actions.screenshots), { \"type\": \"scrape\" } (the page at that point, in actions.scrapes), { \"type\": \"executeJavascript\", \"script\": \"document.title\" } (results in actions.javascriptReturns), { \"type\": \"pdf\", \"format\": \"A4\" } (links in actions.pdfs) or { \"type\": \"perform\", \"action\": \"Click the Load more button\" } (a step in plain words, up to 5 browser steps on this page, never leaving the site; at most 5 per call). A read with actions costs 1 credit, the same as any page; the actions themselves add nothing. If an action fails, you still get the page as it stood, with a warning that names the action and says why.","items":{"anyOf":[{"additionalProperties":false,"properties":{"milliseconds":{"maximum":60000,"minimum":1,"type":"integer"},"type":{"const":"wait","type":"string"}},"required":["type","milliseconds"],"type":"object"},{"additionalProperties":false,"properties":{"selector":{"minLength":1,"type":"string"},"type":{"const":"wait","type":"string"}},"required":["type","selector"],"type":"object"},{"additionalProperties":false,"properties":{"all":{"const":false,"type":"boolean"},"selector":{"minLength":1,"type":"string"},"type":{"const":"click","type":"string"}},"required":["type","selector"],"type":"object"},{"additionalProperties":false,"properties":{"text":{"minLength":1,"type":"string"},"type":{"const":"write","type":"string"}},"required":["type","text"],"type":"object"},{"additionalProperties":false,"properties":{"key":{"maxLength":40,"minLength":1,"type":"string"},"type":{"const":"press","type":"string"}},"required":["type","key"],"type":"object"},{"additionalProperties":false,"properties":{"amount":{"anyOf":[{"maximum":100000,"minimum":1,"type":"integer"},{"enum":["viewport","max"],"type":"string"}]},"direction":{"default":"down","enum":["up","down","left","right"],"type":"string"},"maxScrolls":{"maximum":50,"minimum":1,"type":"integer"},"selector":{"minLength":1,"type":"string"},"type":{"const":"scroll","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"fullPage":{"type":"boolean"},"quality":{"maximum":100,"minimum":1,"type":"integer"},"type":{"const":"screenshot","type":"string"},"viewport":{"additionalProperties":false,"properties":{"height":{"maximum":2160,"minimum":200,"type":"integer"},"width":{"maximum":3840,"minimum":200,"type":"integer"}},"required":["width","height"],"type":"object"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"type":{"const":"scrape","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"script":{"maxLength":20000,"minLength":1,"type":"string"},"type":{"const":"executeJavascript","type":"string"}},"required":["type","script"],"type":"object"},{"additionalProperties":false,"properties":{"format":{"enum":["Letter","Legal","Tabloid","Ledger","A0","A1","A2","A3","A4","A5","A6"],"type":"string"},"landscape":{"type":"boolean"},"scale":{"maximum":2,"minimum":0.1,"type":"number"},"type":{"const":"pdf","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"action":{"maxLength":500,"minLength":1,"type":"string"},"type":{"const":"perform","type":"string"}},"required":["type","action"],"type":"object"}]},"maxItems":50,"minItems":1,"type":"array"},"blockAds":{"description":"Ads and trackers are not loaded when a page runs in a browser. Send false to load them.","type":"boolean"},"checkPromptInjection":{"description":"Send true to scan the page text for instructions aimed at an AI model before anything is built from it. A page that has them is refused with 403 promptInjectionDetected and costs nothing. The scan adds 4 credits when it runs; a page it cannot scan fully comes back with a warning and no charge.","type":"boolean"},"excludeTags":{"description":"Remove the parts of the page that match these CSS selectors, such as .comments.","items":{"minLength":1,"type":"string"},"minItems":1,"type":"array"},"fastMode":{"description":"Send true to read the page without opening a browser: the answer comes sooner, but a page that needs a browser, or that refuses a plain request, comes back as an error instead of being retried. Ignored when the call needs a browser (actions, screenshot, waitFor, mobile, profile, network, branding).","type":"boolean"},"formats":{"default":["markdown"],"description":"What to return: markdown (clean page text), summary (a short summary of the page), html (the cleaned page), rawHtml (the page as sent), audio and video (for a YouTube link: the audio track as an M4A file, or the video as an MP4 file, as a link that works for 1 hour), rawBase64 (the bytes the site sent, Base64 encoded, from a live read; metadata.contentType says what they are), links (every link on the page), images (every image address), screenshot (a link to a JPEG of the visible page, kept for 7 days), changeTracking (what changed in the markdown since your key last read this page with the same options, kept 30 days; add modes [\"git-diff\",\"json\"] with a schema or prompt to compare fields too), question (send { \"type\": \"question\", \"question\": \"...\" } to get answer, null when the page does not state one), product (title, brand, category, url, description and variants with price, sale, availability and images, or null) and menu (merchant, currency and sections of items with prices, or null) network (the JSON the page loaded while it rendered, up to 30 responses) and branding (the page's colors, fonts, typography, spacing, button and input styles, logo and brand images, read from how the page looks, with a field left out when the page does not show it). Send { \"type\": \"screenshot\", \"fullPage\": true } for the whole page. Send { \"type\": \"highlights\", \"query\": \"refund policy\" } for the passages that best match a query. Send { \"type\": \"json\", \"schema\": { \"type\": \"object\", \"properties\": { \"price\": { \"type\": \"number\" } } } } or { \"type\": \"json\", \"prompt\": \"the price and the stock\" } for fields filled from the page, each checked against it. Send { \"type\": \"json\", \"parser\": \"amazon-product\" } to get a site's own data as json instead of reading the page; GET /v1/parsers lists the parsers. Send { \"type\": \"json\", \"rules\": { \"title\": \"h1\", \"links\": { \"selector\": \"a\", \"type\": \"list\", \"output\": \"@href\" } } } to read the page with CSS rules and no model, at the page's own price. Send { \"type\": \"attributes\", \"selectors\": [{ \"selector\": \"a\", \"attribute\": \"href\" }] } for attribute values, returned in attributes. Without a parser or rules, json needs a schema or a prompt and is filled from the page. json with a schema or a prompt, summary, highlights, question, product, menu and changeTracking in json mode cost 4 credits more each when they return something. json with rules or a parser, and attributes, cost nothing more. A screenshot, network or branding read costs 1 credit, the same as any page. A PDF comes back as markdown only, and costs 1 credit more for each page of text that comes back. A CSV or an Excel .xlsx file comes back as markdown tables.","items":{"anyOf":[{"enum":["markdown","summary","html","rawHtml","rawBase64","links","images","network","branding","audio","video","screenshot","changeTracking","product","menu"],"type":"string"},{"additionalProperties":false,"properties":{"type":{"enum":["markdown","summary","html","rawHtml","rawBase64","links","images","network","branding","audio","video"],"type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"modes":{"description":"git-diff returns a unified diff of the markdown. json compares the fields in schema or prompt between this read and the last one. Without modes you get git-diff.","items":{"enum":["git-diff","json"],"type":"string"},"maxItems":2,"type":"array"},"prompt":{"description":"With json mode: what to compare, in plain words, such as the price and stock.","maxLength":10000,"minLength":1,"type":"string"},"schema":{"additionalProperties":{"$ref":"#/definitions/__schema0"},"description":"The fields to fill, as a JSON Schema (draft-07 or 2020-12) object with properties. Pydantic's model_json_schema() and zod's toJSONSchema() output work as they are. enum, const, anyOf, oneOf, nullable types, $ref with $defs, required, descriptions and any key names are read. Up to 100 top-level fields and 32 KB. A field the page does not state comes back null.","propertyNames":{"type":"string"},"type":"object"},"tag":{"type":"null"},"type":{"const":"changeTracking","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"question":{"description":"A question to answer from the page, such as what the refund window is.","maxLength":10000,"minLength":1,"type":"string"},"type":{"const":"question","type":"string"}},"required":["type","question"],"type":"object"},{"additionalProperties":false,"properties":{"type":{"const":"product","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"type":{"const":"menu","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"fullPage":{"default":false,"description":"Capture the whole page from top to bottom instead of the visible part.","type":"boolean"},"quality":{"description":"JPEG quality from 1 to 100. The default is 70.","maximum":100,"minimum":1,"type":"integer"},"type":{"const":"screenshot","type":"string"},"viewport":{"additionalProperties":false,"description":"The window size in pixels, such as { width: 390, height: 844 }.","properties":{"height":{"maximum":2160,"minimum":200,"type":"integer"},"width":{"maximum":3840,"minimum":200,"type":"integer"}},"required":["width","height"],"type":"object"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"count":{"default":5,"description":"How many passages to return, best match first.","maximum":20,"minimum":1,"type":"integer"},"query":{"description":"What you are looking for on the page, such as refund policy.","maxLength":10000,"minLength":1,"type":"string"},"type":{"const":"highlights","type":"string"}},"required":["type","query"],"type":"object"},{"additionalProperties":false,"properties":{"checkPromptInjection":{"description":"Deprecated: send checkPromptInjection at the top level of the call.","type":"boolean"},"options":{"additionalProperties":{"$ref":"#/definitions/__schema1"},"description":"Only with parser: extra inputs for it, such as { \"page\": 2 } for the next page of results or { \"minRating\": 4.5 } for a filter. GET /v1/parsers lists what each parser accepts.","propertyNames":{"type":"string"},"type":"object"},"parser":{"description":"Read the page with a named parser, which gives the site's own data as json. The url must be the kind of page the parser reads. Parsers are the only way to read some sites. GET /v1/parsers lists them.","type":"string"},"prompt":{"description":"What to pull from the page in plain words, such as the version and the release date.","maxLength":10000,"minLength":1,"type":"string"},"rules":{"additionalProperties":{"$ref":"#/definitions/__schema2"},"description":"Read the page with CSS rules instead of a model, no extra fee. Each field is a selector such as \"h1\" (the first match's text), \"a@href\" (an attribute) or { \"selector\": \"li\", \"type\": \"list\", \"output\": \"text\" | \"html\" | \"@attribute\" | { nested fields } }. A missing item is null and an unmatched list is []. Relative links become absolute. Up to 100 fields, 5 levels deep. Not with schema, prompt or parser.","propertyNames":{"type":"string"},"type":"object"},"schema":{"additionalProperties":{"$ref":"#/definitions/__schema0"},"description":"The fields to fill, as a JSON Schema (draft-07 or 2020-12) object with properties. Pydantic's model_json_schema() and zod's toJSONSchema() output work as they are. enum, const, anyOf, oneOf, nullable types, $ref with $defs, required, descriptions and any key names are read. Up to 100 top-level fields and 32 KB. A field the page does not state comes back null.","propertyNames":{"type":"string"},"type":"object"},"type":{"const":"json","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"selectors":{"description":"The elements and attributes to read, such as { selector: 'a.buy', attribute: 'href' }.","items":{"additionalProperties":false,"properties":{"attribute":{"maxLength":100,"minLength":1,"type":"string"},"selector":{"minLength":1,"type":"string"}},"required":["selector","attribute"],"type":"object"},"maxItems":50,"minItems":1,"type":"array"},"type":{"const":"attributes","type":"string"}},"required":["type","selectors"],"type":"object"}]},"maxItems":20,"minItems":1,"type":"array"},"headers":{"additionalProperties":{"maxLength":2000,"pattern":"^[\\t\\x20-\\x7e]*$","type":"string"},"description":"Extra request headers to send to the site, such as { \"x-plan\": \"pro\" }. A read with headers is never answered from or saved to a stored copy.","propertyNames":{"pattern":"^[A-Za-z0-9-]{1,64}$","type":"string"},"type":"object"},"includeTags":{"description":"Keep only the parts of the page that match these CSS selectors, such as article or .price. When set, onlyMainContent is not applied.","items":{"minLength":1,"type":"string"},"minItems":1,"type":"array"},"location":{"additionalProperties":false,"description":"Where to read the page from. The default is the United States.","properties":{"country":{"description":"Two-letter country code to read the page from, such as DE or JP.","type":"string"},"languages":{"description":"Languages to ask the site for, best first, such as [\"de\", \"en\"]. Sent as Accept-Language. A read with languages is never answered from or saved to a stored copy.","items":{"pattern":"^[A-Za-z]{2,3}(?:-[A-Za-z0-9]{2,8})*$","type":"string"},"maxItems":5,"minItems":1,"type":"array"}},"type":"object"},"lockdown":{"description":"Send true to answer only from a stored copy of the page and never read it live, whatever its age. A page with no stored copy is notFound. The same as minAge 0.","type":"boolean"},"maxAge":{"description":"Accept a stored answer up to this many milliseconds old, at most 30 days. Without it, 2 days, or less for a site whose pages change often, and a copy up to twice that age (at most 7 days) comes back at once as stale while a fresh read runs. 0 always reads the page live. metadata.cacheState says which one you got.","maximum":9007199254740991,"minimum":0,"type":"integer"},"minAge":{"description":"Answer only from a stored copy that is at least this many milliseconds old, and never read the page live. 0 accepts any stored copy. A page with no such copy is notFound.","maximum":9007199254740991,"minimum":0,"type":"integer"},"mobile":{"description":"Read the page as a phone would: a phone-sized screen and the mobile version of the site. The page loads in a browser.","type":"boolean"},"onlyCleanContent":{"description":"Send true to have a model remove what onlyMainContent leaves behind in the markdown: cookie banners, ads, share widgets, breadcrumbs, sign-up prompts, comment prompts and related-article lists. It only removes whole paragraphs and lists; it never rewrites or adds text, and code blocks are always kept. Skipped with a warning when the page is too long to clean or the model does not answer. Not with zeroDataRetention. Summary, answers and highlights are made from the cleaned markdown.","type":"boolean"},"onlyMainContent":{"default":true,"description":"Keep only the page's main content, without menus, headers, footers and ads.","type":"boolean"},"parsers":{"description":"Only the pdf parser exists. Send \"pdf\" or { \"type\": \"pdf\", mode, maxPages, pages, blocks, pageMarkers } with the same meaning as in parse. Without mode a PDF is read as auto: from its text layer, and from the picture of any page that has no text. fast reads the text layer only, and ocr reads the picture of every page, up to 20 pages. Each page of text that comes back costs 1 credit. Pictures are read only with an API key.","items":{"anyOf":[{"const":"pdf","type":"string"},{"additionalProperties":false,"properties":{"blocks":{"description":"Send true to also get the page's layout in blocks: each title, section header or run of text, with its page, reading order, position on the page (bbox as left, top, right, bottom from 0 to 1) and where its text sits in that page's markdown (span, as in pages). Tables, figures and formulas are not told apart. A page read from its picture is one block. No extra charge.","type":"boolean"},"maxPages":{"description":"Read at most this many pages, up to 500, which is also the default.","maximum":500,"minimum":1,"type":"integer"},"mode":{"description":"fast reads the text layer only. auto (the default) reads the text layer and reads the picture of any page that has none. ocr reads the picture of every page.","enum":["fast","auto","ocr"],"type":"string"},"pageMarkers":{"description":"Send true to mark page breaks in the markdown: pages are joined with \"---\" and a line, where N is the page that follows. No extra charge.","type":"boolean"},"pages":{"description":"Send true to also get each page's markdown in pages, as { pageNumber, markdown }. No extra charge.","type":"boolean"},"type":{"const":"pdf","type":"string"}},"required":["type"],"type":"object"}]},"minItems":1,"type":"array"},"profile":{"additionalProperties":false,"description":"Read the page with the cookies and local storage that earlier calls saved under this name, kept for your account for 30 days after the last use. A call with a profile always loads the page in a browser, costs 1 credit, the same as any page, and is never answered from a stored copy. Only one call at a time can save to a profile.","properties":{"name":{"description":"A name you choose, such as shop-login. Calls with the same name share state.","maxLength":128,"minLength":1,"type":"string"},"saveChanges":{"default":true,"description":"Keep the cookies and local storage this read leaves behind for the next call with this name. Send false to read with the profile without changing it.","type":"boolean"}},"required":["name"],"type":"object"},"proxy":{"description":"auto: basic first, enhanced once if the site refuses. basic: one plain attempt. enhanced: the stronger read from the start. stealth is the same as enhanced. Same price.","enum":["auto","basic","enhanced","stealth"],"type":"string"},"redactPII":{"anyOf":[{"type":"boolean"},{"additionalProperties":false,"description":"Options for redactPII.","properties":{"entities":{"default":["PERSON","EMAIL","PHONE","LOCATION","FINANCIAL","SECRET"],"description":"What to hide: PERSON, EMAIL, PHONE, LOCATION, FINANCIAL, SECRET. All by default.","items":{"enum":["PERSON","EMAIL","PHONE","LOCATION","FINANCIAL","SECRET"],"type":"string"},"minItems":1,"type":"array"},"mode":{"default":"accurate","description":"accurate finds names and places with the model and the rest by pattern. aggressive adds guesses that catch more and may hide a little too much. fast uses patterns only, so it finds no ordinary names or places.","enum":["accurate","aggressive","fast"],"type":"string"},"replaceStyle":{"default":"tag","description":"tag writes <EMAIL>, mask writes * for each character, remove deletes it.","enum":["tag","mask","remove"],"type":"string"}},"type":"object"}],"description":"Send true, or an object, to hide personal data in the markdown and in everything made from it (summary, answers, highlights, json). Links, html and rawHtml are not changed. A page the model cannot scan is refused rather than returned unredacted."},"removeBase64Images":{"description":"Images inside the page that carry their data in the address (data:image) are dropped by default. Send false to keep them in markdown and html.","type":"boolean"},"skipTlsVerification":{"description":"Send true to read a page whose certificate is expired, self-signed or for another name. The read is not private against someone between us and the site.","type":"boolean"},"storeInCache":{"default":true,"description":"Send false to neither read nor keep a stored copy of this page.","type":"boolean"},"timeout":{"default":30000,"description":"How long to keep trying, in milliseconds, from 1 second to 5 minutes; 30 seconds by default. A page that needs a browser needs at least 5 seconds, and pages behind a bot check can need 10 to 30 seconds the first time. A read that runs out of time is an error and costs nothing.","maximum":300000,"minimum":1000,"type":"integer"},"waitFor":{"description":"Extra milliseconds to wait before reading, up to 60000, for pages that load their content late. To wait for an element, add a wait action with a selector. A read that waits costs 1 credit, the same as any page.","maximum":60000,"minimum":0,"type":"integer"},"zeroDataRetention":{"default":false,"description":"Send true to keep nothing from this call: no stored copy is read or made, and nothing from it is logged. Costs 1 credit more per page. Not with a screenshot.","type":"boolean"}},"type":"object"},"sources":{"description":"What to search: web, news, images. Each is a string or {type}. Default web, or none when categories asks for research or videos.","items":{"anyOf":[{"enum":["web","news","images"],"type":"string"},{"additionalProperties":false,"properties":{"country":{"description":"ISO 3166-1 alpha-2 country code, e.g. us. Any case is accepted.","pattern":"^[A-Za-z]{2}$","type":"string"},"lang":{"description":"Two-letter language for web results, like de. It steers which pages come back; some results can still be in other languages.","pattern":"^[A-Za-z]{2}$","type":"string"},"location":{"type":"string"},"tbs":{"type":"string"},"type":{"const":"web","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"type":{"enum":["news","images"],"type":"string"}},"required":["type"],"type":"object"}]},"maxItems":5,"minItems":1,"type":"array"},"tbs":{"description":"Time filter: qdr:d, qdr:w, qdr:m or qdr:y, or cdr:1,cd_min:MM/DD/YYYY,cd_max:MM/DD/YYYY, plus sbd:1, like sbd:1,qdr:w. sbd:1 sorts newest first; results without a date come last. Web takes all of them; news takes qdr and sbd; images take none.","minLength":1,"type":"string"},"timeout":{"description":"Milliseconds to wait for the sources, from 1,000 to 120,000; more is read as 120,000. Default 60,000. A source that has not answered by then is left out with a warning. When none has, the call fails and costs nothing.","maximum":9007199254740991,"minimum":1000,"type":"integer"}},"required":["query"],"type":"object"}after
{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"definitions":{"__schema0":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"items":{"allOf":[{"$ref":"#/definitions/__schema0"}]},"type":"array"},{"additionalProperties":{"allOf":[{"$ref":"#/definitions/__schema0"}]},"propertyNames":{"type":"string"},"type":"object"}]},"__schema1":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"items":{"allOf":[{"$ref":"#/definitions/__schema1"}]},"type":"array"},{"additionalProperties":{"allOf":[{"$ref":"#/definitions/__schema1"}]},"propertyNames":{"type":"string"},"type":"object"}]},"__schema2":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"items":{"allOf":[{"$ref":"#/definitions/__schema2"}]},"type":"array"},{"additionalProperties":{"allOf":[{"$ref":"#/definitions/__schema2"}]},"propertyNames":{"type":"string"},"type":"object"}]}},"properties":{"categories":{"description":"pdf: web results that are PDF files. research: scholarly papers, in a research list, ranked by relevance then citations. videos: YouTube videos for the query, in YouTube's order, in a videos list, with the channel, length, views and watch link; a video whose captions we hold also gets the passage that matches the query and where it starts.","items":{"anyOf":[{"enum":["research","pdf","videos"],"type":"string"},{"additionalProperties":false,"properties":{"type":{"enum":["research","pdf","videos"],"type":"string"}},"required":["type"],"type":"object"}]},"type":"array"},"country":{"description":"Two-letter country to search from, like us. uk is read as gb. Image results are always US.","pattern":"^[A-Za-z]{2}$","type":"string"},"excludeDomains":{"items":{"type":"string"},"maxItems":10,"type":"array"},"highlights":{"default":false,"description":"Off by default. With true, a web result whose page we already hold gets the passages that best match the query as its description, in markdown, up to about 2,000 characters; others keep the engine's snippet.","type":"boolean"},"ignoreInvalidURLs":{"default":false,"description":"Leave out results whose address cannot be read as a page.","type":"boolean"},"includeDomains":{"items":{"type":"string"},"maxItems":10,"type":"array"},"lang":{"description":"Two-letter language for web results, like de. It steers which pages come back; some results can still be in other languages.","pattern":"^[A-Za-z]{2}$","type":"string"},"limit":{"description":"Most results to return for each source. Default 10, or 5 when scrapeOptions has formats, which reads every web and news result returned. News returns at most 50.","maximum":100,"minimum":1,"type":"integer"},"location":{"description":"Where to search from, like Germany or San Francisco,California,United States. The last part is the country and replaces country. A city before it narrows web results to that place.","minLength":1,"type":"string"},"maxAge":{"description":"Accept a stored answer up to this many milliseconds old, at most 30 days. Without it, 15 minutes for news and 1 hour for web and images. 0 always searches live.","maximum":9007199254740991,"minimum":0,"type":"integer"},"query":{"description":"What to search for, up to 500 characters. Search operators work in web results: quotes for an exact phrase, -word, site:, -site:, filetype:, inurl:, allinurl:, intitle: and allintitle:. In image results, imagesize:WIDTHxHEIGHT keeps images of exactly that size and larger:WIDTHxHEIGHT keeps images at least that large.","maxLength":500,"minLength":1,"type":"string"},"safe":{"description":"Hide explicit web, news and image results when true.","type":"boolean"},"scrapeOptions":{"additionalProperties":false,"description":"With formats, reads each web and news result, as many as limit asks for, within timeout, and fills each web result's description from it. Without formats no page is read and nothing more is charged. Takes the options of scrape: formats (markdown, html, rawHtml, links, images, summary, screenshot, json and the rest), onlyMainContent, includeTags, excludeTags, maxAge, minAge, waitFor, mobile, timeout (per page), headers, actions, location, parsers, profile and zeroDataRetention. Costs what scrape costs for each page read: $2 per 1,000 pages, plus $8 per 1,000 pages for each summary or json with a schema or prompt that returns something.","properties":{"actions":{"description":"Up to 50 steps to run on the page, in order, before reading it: { \"type\": \"wait\", \"milliseconds\": 500 } (up to 60 seconds), { \"type\": \"wait\", \"selector\": \".results\" }, { \"type\": \"click\", \"selector\": \"button.more\" }, { \"type\": \"write\", \"text\": \"tides\" }, { \"type\": \"press\", \"key\": \"Enter\" }, { \"type\": \"scroll\", \"direction\": \"down\" } (also up, left or right; amount is pixels, \"viewport\" or \"max\"; maxScrolls 1 to 50; selector scrolls an inner container; \"max\" keeps scrolling until the page stops growing, for feeds that load as you go), { \"type\": \"screenshot\", \"fullPage\": true } (links come back in actions.screenshots), { \"type\": \"scrape\" } (the page at that point, in actions.scrapes), { \"type\": \"executeJavascript\", \"script\": \"document.title\" } (results in actions.javascriptReturns), { \"type\": \"pdf\", \"format\": \"A4\" } (links in actions.pdfs) or { \"type\": \"perform\", \"action\": \"Click the Load more button\" } (a step in plain words, up to 5 browser steps on this page, never leaving the site; at most 5 per call). A read with actions costs $2 per 1,000 pages, the same as any page; the actions themselves add nothing. If an action fails, you still get the page as it stood, with a warning that names the action and says why.","items":{"anyOf":[{"additionalProperties":false,"properties":{"milliseconds":{"maximum":60000,"minimum":1,"type":"integer"},"type":{"const":"wait","type":"string"}},"required":["type","milliseconds"],"type":"object"},{"additionalProperties":false,"properties":{"selector":{"minLength":1,"type":"string"},"type":{"const":"wait","type":"string"}},"required":["type","selector"],"type":"object"},{"additionalProperties":false,"properties":{"all":{"const":false,"type":"boolean"},"selector":{"minLength":1,"type":"string"},"type":{"const":"click","type":"string"}},"required":["type","selector"],"type":"object"},{"additionalProperties":false,"properties":{"text":{"minLength":1,"type":"string"},"type":{"const":"write","type":"string"}},"required":["type","text"],"type":"object"},{"additionalProperties":false,"properties":{"key":{"maxLength":40,"minLength":1,"type":"string"},"type":{"const":"press","type":"string"}},"required":["type","key"],"type":"object"},{"additionalProperties":false,"properties":{"amount":{"anyOf":[{"maximum":100000,"minimum":1,"type":"integer"},{"enum":["viewport","max"],"type":"string"}]},"direction":{"default":"down","enum":["up","down","left","right"],"type":"string"},"maxScrolls":{"maximum":50,"minimum":1,"type":"integer"},"selector":{"minLength":1,"type":"string"},"type":{"const":"scroll","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"fullPage":{"type":"boolean"},"quality":{"maximum":100,"minimum":1,"type":"integer"},"type":{"const":"screenshot","type":"string"},"viewport":{"additionalProperties":false,"properties":{"height":{"maximum":2160,"minimum":200,"type":"integer"},"width":{"maximum":3840,"minimum":200,"type":"integer"}},"required":["width","height"],"type":"object"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"type":{"const":"scrape","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"script":{"maxLength":20000,"minLength":1,"type":"string"},"type":{"const":"executeJavascript","type":"string"}},"required":["type","script"],"type":"object"},{"additionalProperties":false,"properties":{"format":{"enum":["Letter","Legal","Tabloid","Ledger","A0","A1","A2","A3","A4","A5","A6"],"type":"string"},"landscape":{"type":"boolean"},"scale":{"maximum":2,"minimum":0.1,"type":"number"},"type":{"const":"pdf","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"action":{"maxLength":500,"minLength":1,"type":"string"},"type":{"const":"perform","type":"string"}},"required":["type","action"],"type":"object"}]},"maxItems":50,"minItems":1,"type":"array"},"blockAds":{"description":"Ads and trackers are not loaded when a page runs in a browser. Send false to load them.","type":"boolean"},"checkPromptInjection":{"description":"Send true to scan the page text for instructions aimed at an AI model before anything is built from it. A page that has them is refused with 403 promptInjectionDetected and costs nothing. The scan adds $8 per 1,000 pages when it runs; a page it cannot scan fully comes back with a warning and no charge.","type":"boolean"},"excludeTags":{"description":"Remove the parts of the page that match these CSS selectors, such as .comments.","items":{"minLength":1,"type":"string"},"minItems":1,"type":"array"},"fastMode":{"description":"Send true to read the page without opening a browser: the answer comes sooner, but a page that needs a browser, or that refuses a plain request, comes back as an error instead of being retried. Ignored when the call needs a browser (actions, screenshot, waitFor, mobile, profile, network, branding).","type":"boolean"},"formats":{"default":["markdown"],"description":"What to return: markdown (clean page text), summary (a short summary of the page), html (the cleaned page), rawHtml (the page as sent), audio and video (for a YouTube link: the audio track as an M4A file, or the video as an MP4 file, as a link that works for 1 hour), rawBase64 (the bytes the site sent, Base64 encoded, from a live read; metadata.contentType says what they are), links (every link on the page), images (every image address), screenshot (a link to a JPEG of the visible page, kept for 7 days), changeTracking (what changed in the markdown since your key last read this page with the same options, kept 30 days; add modes [\"git-diff\",\"json\"] with a schema or prompt to compare fields too), question (send { \"type\": \"question\", \"question\": \"...\" } to get answer, null when the page does not state one), product (title, brand, category, url, description and variants with price, sale, availability and images, or null) and menu (merchant, currency and sections of items with prices, or null) network (the JSON the page loaded while it rendered, up to 30 responses) and branding (the page's colors, fonts, typography, spacing, button and input styles, logo and brand images, read from how the page looks, with a field left out when the page does not show it). Send { \"type\": \"screenshot\", \"fullPage\": true } for the whole page. Send { \"type\": \"highlights\", \"query\": \"refund policy\" } for the passages that best match a query. Send { \"type\": \"json\", \"schema\": { \"type\": \"object\", \"properties\": { \"price\": { \"type\": \"number\" } } } } or { \"type\": \"json\", \"prompt\": \"the price and the stock\" } for fields filled from the page, each checked against it. Send { \"type\": \"json\", \"parser\": \"amazon-product\" } to get a site's own data as json instead of reading the page; GET /v1/parsers lists the parsers. Send { \"type\": \"json\", \"rules\": { \"title\": \"h1\", \"links\": { \"selector\": \"a\", \"type\": \"list\", \"output\": \"@href\" } } } to read the page with CSS rules and no model, at the page's own price. Send { \"type\": \"attributes\", \"selectors\": [{ \"selector\": \"a\", \"attribute\": \"href\" }] } for attribute values, returned in attributes. Without a parser or rules, json needs a schema or a prompt and is filled from the page. json with a schema or a prompt, summary, highlights, question, product, menu and changeTracking in json mode add $8 per 1,000 pages each when they return something. json with rules or a parser, and attributes, cost nothing more. A screenshot, network or branding read costs $2 per 1,000 pages, the same as any page. A PDF comes back as markdown only, and adds $2 per 1,000 pages of text that comes back. A CSV or an Excel .xlsx file comes back as markdown tables.","items":{"anyOf":[{"enum":["markdown","summary","html","rawHtml","rawBase64","links","images","network","branding","audio","video","screenshot","changeTracking","product","menu"],"type":"string"},{"additionalProperties":false,"properties":{"type":{"enum":["markdown","summary","html","rawHtml","rawBase64","links","images","network","branding","audio","video"],"type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"modes":{"description":"git-diff returns a unified diff of the markdown. json compares the fields in schema or prompt between this read and the last one. Without modes you get git-diff.","items":{"enum":["git-diff","json"],"type":"string"},"maxItems":2,"type":"array"},"prompt":{"description":"With json mode: what to compare, in plain words, such as the price and stock.","maxLength":10000,"minLength":1,"type":"string"},"schema":{"additionalProperties":{"$ref":"#/definitions/__schema0"},"description":"The fields to fill, as a JSON Schema (draft-07 or 2020-12) object with properties. Pydantic's model_json_schema() and zod's toJSONSchema() output work as they are. enum, const, anyOf, oneOf, nullable types, $ref with $defs, required, descriptions and any key names are read. Up to 100 top-level fields and 32 KB. A field the page does not state comes back null.","propertyNames":{"type":"string"},"type":"object"},"tag":{"type":"null"},"type":{"const":"changeTracking","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"question":{"description":"A question to answer from the page, such as what the refund window is.","maxLength":10000,"minLength":1,"type":"string"},"type":{"const":"question","type":"string"}},"required":["type","question"],"type":"object"},{"additionalProperties":false,"properties":{"type":{"const":"product","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"type":{"const":"menu","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"fullPage":{"default":false,"description":"Capture the whole page from top to bottom instead of the visible part.","type":"boolean"},"quality":{"description":"JPEG quality from 1 to 100. The default is 70.","maximum":100,"minimum":1,"type":"integer"},"type":{"const":"screenshot","type":"string"},"viewport":{"additionalProperties":false,"description":"The window size in pixels, such as { width: 390, height: 844 }.","properties":{"height":{"maximum":2160,"minimum":200,"type":"integer"},"width":{"maximum":3840,"minimum":200,"type":"integer"}},"required":["width","height"],"type":"object"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"count":{"default":5,"description":"How many passages to return, best match first.","maximum":20,"minimum":1,"type":"integer"},"query":{"description":"What you are looking for on the page, such as refund policy.","maxLength":10000,"minLength":1,"type":"string"},"type":{"const":"highlights","type":"string"}},"required":["type","query"],"type":"object"},{"additionalProperties":false,"properties":{"checkPromptInjection":{"description":"Deprecated: send checkPromptInjection at the top level of the call.","type":"boolean"},"options":{"additionalProperties":{"$ref":"#/definitions/__schema1"},"description":"Only with parser: extra inputs for it, such as { \"page\": 2 } for the next page of results or { \"minRating\": 4.5 } for a filter. GET /v1/parsers lists what each parser accepts.","propertyNames":{"type":"string"},"type":"object"},"parser":{"description":"Read the page with a named parser, which gives the site's own data as json. The url must be the kind of page the parser reads. Parsers are the only way to read some sites. GET /v1/parsers lists them.","type":"string"},"prompt":{"description":"What to pull from the page in plain words, such as the version and the release date.","maxLength":10000,"minLength":1,"type":"string"},"rules":{"additionalProperties":{"$ref":"#/definitions/__schema2"},"description":"Read the page with CSS rules instead of a model, no extra fee. Each field is a selector such as \"h1\" (the first match's text), \"a@href\" (an attribute) or { \"selector\": \"li\", \"type\": \"list\", \"output\": \"text\" | \"html\" | \"@attribute\" | { nested fields } }. A missing item is null and an unmatched list is []. Relative links become absolute. Up to 100 fields, 5 levels deep. Not with schema, prompt or parser.","propertyNames":{"type":"string"},"type":"object"},"schema":{"additionalProperties":{"$ref":"#/definitions/__schema0"},"description":"The fields to fill, as a JSON Schema (draft-07 or 2020-12) object with properties. Pydantic's model_json_schema() and zod's toJSONSchema() output work as they are. enum, const, anyOf, oneOf, nullable types, $ref with $defs, required, descriptions and any key names are read. Up to 100 top-level fields and 32 KB. A field the page does not state comes back null.","propertyNames":{"type":"string"},"type":"object"},"type":{"const":"json","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"selectors":{"description":"The elements and attributes to read, such as { selector: 'a.buy', attribute: 'href' }.","items":{"additionalProperties":false,"properties":{"attribute":{"maxLength":100,"minLength":1,"type":"string"},"selector":{"minLength":1,"type":"string"}},"required":["selector","attribute"],"type":"object"},"maxItems":50,"minItems":1,"type":"array"},"type":{"const":"attributes","type":"string"}},"required":["type","selectors"],"type":"object"}]},"maxItems":20,"minItems":1,"type":"array"},"headers":{"additionalProperties":{"maxLength":2000,"pattern":"^[\\t\\x20-\\x7e]*$","type":"string"},"description":"Extra request headers to send to the site, such as { \"x-plan\": \"pro\" }. A read with headers is never answered from or saved to a stored copy.","propertyNames":{"pattern":"^[A-Za-z0-9-]{1,64}$","type":"string"},"type":"object"},"includeTags":{"description":"Keep only the parts of the page that match these CSS selectors, such as article or .price. When set, onlyMainContent is not applied.","items":{"minLength":1,"type":"string"},"minItems":1,"type":"array"},"location":{"additionalProperties":false,"description":"Where to read the page from. The default is the United States.","properties":{"country":{"description":"Two-letter country code to read the page from, such as DE or JP.","type":"string"},"languages":{"description":"Languages to ask the site for, best first, such as [\"de\", \"en\"]. Sent as Accept-Language. A read with languages is never answered from or saved to a stored copy.","items":{"pattern":"^[A-Za-z]{2,3}(?:-[A-Za-z0-9]{2,8})*$","type":"string"},"maxItems":5,"minItems":1,"type":"array"}},"type":"object"},"lockdown":{"description":"Send true to answer only from a stored copy of the page and never read it live, whatever its age. A page with no stored copy is notFound. The same as minAge 0.","type":"boolean"},"maxAge":{"description":"Accept a stored answer up to this many milliseconds old, at most 30 days. Without it, 2 days, or less for a site whose pages change often, and a copy up to twice that age (at most 7 days) comes back at once as stale while a fresh read runs. 0 always reads the page live. metadata.cacheState says which one you got.","maximum":9007199254740991,"minimum":0,"type":"integer"},"minAge":{"description":"Answer only from a stored copy that is at least this many milliseconds old, and never read the page live. 0 accepts any stored copy. A page with no such copy is notFound.","maximum":9007199254740991,"minimum":0,"type":"integer"},"mobile":{"description":"Read the page as a phone would: a phone-sized screen and the mobile version of the site. The page loads in a browser.","type":"boolean"},"onlyCleanContent":{"description":"Send true to have a model remove what onlyMainContent leaves behind in the markdown: cookie banners, ads, share widgets, breadcrumbs, sign-up prompts, comment prompts and related-article lists. It only removes whole paragraphs and lists; it never rewrites or adds text, and code blocks are always kept. Skipped with a warning when the page is too long to clean or the model does not answer. Not with zeroDataRetention. Summary, answers and highlights are made from the cleaned markdown.","type":"boolean"},"onlyMainContent":{"default":true,"description":"Keep only the page's main content, without menus, headers, footers and ads.","type":"boolean"},"parsers":{"description":"Only the pdf parser exists. Send \"pdf\" or { \"type\": \"pdf\", mode, maxPages, pages, blocks, pageMarkers } with the same meaning as in parse. Without mode a PDF is read as auto: from its text layer, and from the picture of any page that has no text. fast reads the text layer only, and ocr reads the picture of every page, up to 20 pages. Each page of text that comes back costs $2 per 1,000 pages. Pictures are read only with an API key.","items":{"anyOf":[{"const":"pdf","type":"string"},{"additionalProperties":false,"properties":{"blocks":{"description":"Send true to also get the page's layout in blocks: each title, section header or run of text, with its page, reading order, position on the page (bbox as left, top, right, bottom from 0 to 1) and where its text sits in that page's markdown (span, as in pages). Tables, figures and formulas are not told apart. A page read from its picture is one block. No extra charge.","type":"boolean"},"maxPages":{"description":"Read at most this many pages, up to 500, which is also the default.","maximum":500,"minimum":1,"type":"integer"},"mode":{"description":"fast reads the text layer only. auto (the default) reads the text layer and reads the picture of any page that has none. ocr reads the picture of every page.","enum":["fast","auto","ocr"],"type":"string"},"pageMarkers":{"description":"Send true to mark page breaks in the markdown: pages are joined with \"---\" and a line, where N is the page that follows. No extra charge.","type":"boolean"},"pages":{"description":"Send true to also get each page's markdown in pages, as { pageNumber, markdown }. No extra charge.","type":"boolean"},"type":{"const":"pdf","type":"string"}},"required":["type"],"type":"object"}]},"minItems":1,"type":"array"},"profile":{"additionalProperties":false,"description":"Read the page with the cookies and local storage that earlier calls saved under this name, kept for your account for 30 days after the last use. A call with a profile always loads the page in a browser, costs $2 per 1,000 pages, the same as any page, and is never answered from a stored copy. Only one call at a time can save to a profile.","properties":{"name":{"description":"A name you choose, such as shop-login. Calls with the same name share state.","maxLength":128,"minLength":1,"type":"string"},"saveChanges":{"default":true,"description":"Keep the cookies and local storage this read leaves behind for the next call with this name. Send false to read with the profile without changing it.","type":"boolean"}},"required":["name"],"type":"object"},"proxy":{"description":"auto: basic first, enhanced once if the site refuses. basic: one plain attempt. enhanced: the stronger read from the start. stealth is the same as enhanced. Same price.","enum":["auto","basic","enhanced","stealth"],"type":"string"},"redactPII":{"anyOf":[{"type":"boolean"},{"additionalProperties":false,"description":"Options for redactPII.","properties":{"entities":{"default":["PERSON","EMAIL","PHONE","LOCATION","FINANCIAL","SECRET"],"description":"What to hide: PERSON, EMAIL, PHONE, LOCATION, FINANCIAL, SECRET. All by default.","items":{"enum":["PERSON","EMAIL","PHONE","LOCATION","FINANCIAL","SECRET"],"type":"string"},"minItems":1,"type":"array"},"mode":{"default":"accurate","description":"accurate finds names and places with the model and the rest by pattern. aggressive adds guesses that catch more and may hide a little too much. fast uses patterns only, so it finds no ordinary names or places.","enum":["accurate","aggressive","fast"],"type":"string"},"replaceStyle":{"default":"tag","description":"tag writes <EMAIL>, mask writes * for each character, remove deletes it.","enum":["tag","mask","remove"],"type":"string"}},"type":"object"}],"description":"Send true, or an object, to hide personal data in the markdown and in everything made from it (summary, answers, highlights, json). Links, html and rawHtml are not changed. A page the model cannot scan is refused rather than returned unredacted."},"removeBase64Images":{"description":"Images inside the page that carry their data in the address (data:image) are dropped by default. Send false to keep them in markdown and html.","type":"boolean"},"skipTlsVerification":{"description":"Send true to read a page whose certificate is expired, self-signed or for another name. The read is not private against someone between us and the site.","type":"boolean"},"storeInCache":{"default":true,"description":"Send false to neither read nor keep a stored copy of this page.","type":"boolean"},"timeout":{"default":30000,"description":"How long to keep trying, in milliseconds, from 1 second to 5 minutes; 30 seconds by default. A page that needs a browser needs at least 5 seconds, and pages behind a bot check can need 10 to 30 seconds the first time. A read that runs out of time is an error and costs nothing.","maximum":300000,"minimum":1000,"type":"integer"},"waitFor":{"description":"Extra milliseconds to wait before reading, up to 60000, for pages that load their content late. To wait for an element, add a wait action with a selector. A read that waits costs $2 per 1,000 pages, the same as any page.","maximum":60000,"minimum":0,"type":"integer"},"zeroDataRetention":{"default":false,"description":"Send true to keep nothing from this call: no stored copy is read or made, and nothing from it is logged. Adds $2 per 1,000 pages. Not with a screenshot.","type":"boolean"}},"type":"object"},"sources":{"description":"What to search: web, news, images. Each is a string or {type}. Default web, or none when categories asks for research or videos.","items":{"anyOf":[{"enum":["web","news","images"],"type":"string"},{"additionalProperties":false,"properties":{"country":{"description":"ISO 3166-1 alpha-2 country code, e.g. us. Any case is accepted.","pattern":"^[A-Za-z]{2}$","type":"string"},"lang":{"description":"Two-letter language for web results, like de. It steers which pages come back; some results can still be in other languages.","pattern":"^[A-Za-z]{2}$","type":"string"},"location":{"type":"string"},"tbs":{"type":"string"},"type":{"const":"web","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"type":{"enum":["news","images"],"type":"string"}},"required":["type"],"type":"object"}]},"maxItems":5,"minItems":1,"type":"array"},"tbs":{"description":"Time filter: qdr:d, qdr:w, qdr:m or qdr:y, or cdr:1,cd_min:MM/DD/YYYY,cd_max:MM/DD/YYYY, plus sbd:1, like sbd:1,qdr:w. sbd:1 sorts newest first; results without a date come last. Web takes all of them; news takes qdr and sbd; images take none.","minLength":1,"type":"string"},"timeout":{"description":"Milliseconds to wait for the sources, from 1,000 to 120,000; more is read as 120,000. Default 60,000. A source that has not answered by then is left out with a warning. When none has, the call fails and costs nothing.","maximum":9007199254740991,"minimum":1000,"type":"integer"}},"required":["query"],"type":"object"}{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":{},"properties":{"costUsd":{"type":"number"},"creditsUsed":{"type":"number"},"requestId" ⟨5 unchanged words⟩ type":"boolean"}},"required":["creditsUsed","costUsd","requestId"],"type":"object"}
before
{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"definitions":{"__schema0":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"items":{"allOf":[{"$ref":"#/definitions/__schema0"}]},"type":"array"},{"additionalProperties":{"allOf":[{"$ref":"#/definitions/__schema0"}]},"propertyNames":{"type":"string"},"type":"object"}]},"__schema1":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"items":{"allOf":[{"$ref":"#/definitions/__schema1"}]},"type":"array"},{"additionalProperties":{"allOf":[{"$ref":"#/definitions/__schema1"}]},"propertyNames":{"type":"string"},"type":"object"}]},"__schema2":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"items":{"allOf":[{"$ref":"#/definitions/__schema2"}]},"type":"array"},{"additionalProperties":{"allOf":[{"$ref":"#/definitions/__schema2"}]},"propertyNames":{"type":"string"},"type":"object"}]}},"properties":{"categories":{"description":"pdf: web results that are PDF files. research: scholarly papers, in a research list, ranked by relevance then citations. companies: companies that match the query, in a companies list, best matches first. The query can name a place, industry, employee count, founding year and funding stage, like fintech startups in Berlin, 50-200 employees. people: people that match the query, in a people list, best matches first. The query can name a role, company, place or research topic, like CFO of Stripe, founders of fintech startups in Berlin, or researchers on CRISPR base editing. Each person has roles, affiliations and public profile links, never contact details. videos: YouTube videos for the query, in YouTube's order, in a videos list, with the channel, length, views and watch link; a video whose captions we hold also gets the passage that matches the query and where it starts.","items":{"anyOf":[{"enum":["research","pdf","companies","people","videos"],"type":"string"},{"additionalProperties":false,"properties":{"type":{"enum":["research","pdf","companies","people","videos"],"type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"mode":{"description":"normal (4 credits per 10 results) or thorough (10): thorough checks every result against each part of the query and takes longer.","enum":["normal","thorough"],"type":"string"},"type":{"enum":["companies","people"],"type":"string"}},"required":["type","mode"],"type":"object"}]},"type":"array"},"country":{"description":"Two-letter country to search from, like us. uk is read as gb. Image results are always US.","pattern":"^[A-Za-z]{2}$","type":"string"},"excludeDomains":{"items":{"type":"string"},"maxItems":10,"type":"array"},"highlights":{"default":false,"description":"Off by default. With true, a web result whose page we already hold gets the passages that best match the query as its description, in markdown, up to about 2,000 characters; others keep the engine's snippet.","type":"boolean"},"ignoreInvalidURLs":{"default":false,"description":"Leave out results whose address cannot be read as a page.","type":"boolean"},"includeDomains":{"items":{"type":"string"},"maxItems":10,"type":"array"},"lang":{"description":"Two-letter language for web results, like de. It steers which pages come back; some results can still be in other languages.","pattern":"^[A-Za-z]{2}$","type":"string"},"limit":{"description":"Most results to return for each source. Default 10, or 5 when scrapeOptions has formats, which reads every web and news result returned. News returns at most 50.","maximum":100,"minimum":1,"type":"integer"},"location":{"description":"Where to search from, like Germany or San Francisco,California,United States. The last part is the country and replaces country. A city before it narrows web results to that place.","minLength":1,"type":"string"},"maxAge":{"description":"Accept a stored answer up to this many milliseconds old, at most 30 days. Without it, 15 minutes for news and 1 hour for web and images. 0 always searches live.","maximum":9007199254740991,"minimum":0,"type":"integer"},"query":{"description":"What to search for, up to 500 characters. Search operators work in web results: quotes for an exact phrase, -word, site:, -site:, filetype:, inurl:, allinurl:, intitle: and allintitle:. In image results, imagesize:WIDTHxHEIGHT keeps images of exactly that size and larger:WIDTHxHEIGHT keeps images at least that large.","maxLength":500,"minLength":1,"type":"string"},"safe":{"description":"Hide explicit web, news and image results when true.","type":"boolean"},"scrapeOptions":{"additionalProperties":false,"description":"With formats, reads each web and news result, as many as limit asks for, within timeout, and fills each web result's description from it. Without formats no page is read and nothing more is charged. Takes the options of scrape: formats (markdown, html, rawHtml, links, images, summary, screenshot, json and the rest), onlyMainContent, includeTags, excludeTags, maxAge, minAge, waitFor, mobile, timeout (per page), headers, actions, location, parsers, profile and zeroDataRetention. Costs what scrape costs for each page read: 1 credit, plus 4 for each summary or json with a schema or prompt that returns something.","properties":{"actions":{"description":"Up to 50 steps to run on the page, in order, before reading it: { \"type\": \"wait\", \"milliseconds\": 500 } (up to 60 seconds), { \"type\": \"wait\", \"selector\": \".results\" }, { \"type\": \"click\", \"selector\": \"button.more\" }, { \"type\": \"write\", \"text\": \"tides\" }, { \"type\": \"press\", \"key\": \"Enter\" }, { \"type\": \"scroll\", \"direction\": \"down\" } (also up, left or right; amount is pixels, \"viewport\" or \"max\"; maxScrolls 1 to 50; selector scrolls an inner container; \"max\" keeps scrolling until the page stops growing, for feeds that load as you go), { \"type\": \"screenshot\", \"fullPage\": true } (links come back in actions.screenshots), { \"type\": \"scrape\" } (the page at that point, in actions.scrapes), { \"type\": \"executeJavascript\", \"script\": \"document.title\" } (results in actions.javascriptReturns), { \"type\": \"pdf\", \"format\": \"A4\" } (links in actions.pdfs) or { \"type\": \"perform\", \"action\": \"Click the Load more button\" } (a step in plain words, up to 5 browser steps on this page, never leaving the site; at most 5 per call). A read with actions costs 1 credit, the same as any page; the actions themselves add nothing. If an action fails, you still get the page as it stood, with a warning that names the action and says why.","items":{"anyOf":[{"additionalProperties":false,"properties":{"milliseconds":{"maximum":60000,"minimum":1,"type":"integer"},"type":{"const":"wait","type":"string"}},"required":["type","milliseconds"],"type":"object"},{"additionalProperties":false,"properties":{"selector":{"minLength":1,"type":"string"},"type":{"const":"wait","type":"string"}},"required":["type","selector"],"type":"object"},{"additionalProperties":false,"properties":{"all":{"const":false,"type":"boolean"},"selector":{"minLength":1,"type":"string"},"type":{"const":"click","type":"string"}},"required":["type","selector"],"type":"object"},{"additionalProperties":false,"properties":{"text":{"minLength":1,"type":"string"},"type":{"const":"write","type":"string"}},"required":["type","text"],"type":"object"},{"additionalProperties":false,"properties":{"key":{"maxLength":40,"minLength":1,"type":"string"},"type":{"const":"press","type":"string"}},"required":["type","key"],"type":"object"},{"additionalProperties":false,"properties":{"amount":{"anyOf":[{"maximum":100000,"minimum":1,"type":"integer"},{"enum":["viewport","max"],"type":"string"}]},"direction":{"default":"down","enum":["up","down","left","right"],"type":"string"},"maxScrolls":{"maximum":50,"minimum":1,"type":"integer"},"selector":{"minLength":1,"type":"string"},"type":{"const":"scroll","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"fullPage":{"type":"boolean"},"quality":{"maximum":100,"minimum":1,"type":"integer"},"type":{"const":"screenshot","type":"string"},"viewport":{"additionalProperties":false,"properties":{"height":{"maximum":2160,"minimum":200,"type":"integer"},"width":{"maximum":3840,"minimum":200,"type":"integer"}},"required":["width","height"],"type":"object"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"type":{"const":"scrape","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"script":{"maxLength":20000,"minLength":1,"type":"string"},"type":{"const":"executeJavascript","type":"string"}},"required":["type","script"],"type":"object"},{"additionalProperties":false,"properties":{"format":{"enum":["Letter","Legal","Tabloid","Ledger","A0","A1","A2","A3","A4","A5","A6"],"type":"string"},"landscape":{"type":"boolean"},"scale":{"maximum":2,"minimum":0.1,"type":"number"},"type":{"const":"pdf","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"action":{"maxLength":500,"minLength":1,"type":"string"},"type":{"const":"perform","type":"string"}},"required":["type","action"],"type":"object"}]},"maxItems":50,"minItems":1,"type":"array"},"blockAds":{"description":"Ads and trackers are not loaded when a page runs in a browser. Send false to load them.","type":"boolean"},"checkPromptInjection":{"description":"Send true to scan the page text for instructions aimed at an AI model before anything is built from it. A page that has them is refused with 403 promptInjectionDetected and costs nothing. The scan adds 4 credits when it runs; a page it cannot scan fully comes back with a warning and no charge.","type":"boolean"},"excludeTags":{"description":"Remove the parts of the page that match these CSS selectors, such as .comments.","items":{"minLength":1,"type":"string"},"minItems":1,"type":"array"},"fastMode":{"description":"Send true to read the page without opening a browser: the answer comes sooner, but a page that needs a browser, or that refuses a plain request, comes back as an error instead of being retried. Ignored when the call needs a browser (actions, screenshot, waitFor, mobile, profile, network, branding).","type":"boolean"},"formats":{"default":["markdown"],"description":"What to return: markdown (clean page text), summary (a short summary of the page), html (the cleaned page), rawHtml (the page as sent), audio and video (for a YouTube link: the audio track as an M4A file, or the video as an MP4 file, as a link that works for 1 hour), rawBase64 (the bytes the site sent, Base64 encoded, from a live read; metadata.contentType says what they are), links (every link on the page), images (every image address), screenshot (a link to a JPEG of the visible page, kept for 7 days), changeTracking (what changed in the markdown since your key last read this page with the same options, kept 30 days; add modes [\"git-diff\",\"json\"] with a schema or prompt to compare fields too), question (send { \"type\": \"question\", \"question\": \"...\" } to get answer, null when the page does not state one), product (title, brand, category, url, description and variants with price, sale, availability and images, or null) and menu (merchant, currency and sections of items with prices, or null) network (the JSON the page loaded while it rendered, up to 30 responses) and branding (the page's colors, fonts, typography, spacing, button and input styles, logo and brand images, read from how the page looks, with a field left out when the page does not show it). Send { \"type\": \"screenshot\", \"fullPage\": true } for the whole page. Send { \"type\": \"highlights\", \"query\": \"refund policy\" } for the passages that best match a query. Send { \"type\": \"json\", \"schema\": { \"type\": \"object\", \"properties\": { \"price\": { \"type\": \"number\" } } } } or { \"type\": \"json\", \"prompt\": \"the price and the stock\" } for fields filled from the page, each checked against it. Send { \"type\": \"json\", \"parser\": \"amazon-product\" } to get a site's own data as json instead of reading the page; GET /v1/parsers lists the parsers. Send { \"type\": \"json\", \"rules\": { \"title\": \"h1\", \"links\": { \"selector\": \"a\", \"type\": \"list\", \"output\": \"@href\" } } } to read the page with CSS rules and no model, at the page's own price. Send { \"type\": \"attributes\", \"selectors\": [{ \"selector\": \"a\", \"attribute\": \"href\" }] } for attribute values, returned in attributes. Without a parser or rules, json needs a schema or a prompt and is filled from the page. json with a schema or a prompt, summary, highlights, question, product, menu and changeTracking in json mode cost 4 credits more each when they return something. json with rules or a parser, and attributes, cost nothing more. A screenshot, network or branding read costs 1 credit, the same as any page. A PDF comes back as markdown only, and costs 1 credit more for each page of text that comes back. A CSV or an Excel .xlsx file comes back as markdown tables.","items":{"anyOf":[{"enum":["markdown","summary","html","rawHtml","rawBase64","links","images","network","branding","audio","video","screenshot","changeTracking","product","menu"],"type":"string"},{"additionalProperties":false,"properties":{"type":{"enum":["markdown","summary","html","rawHtml","rawBase64","links","images","network","branding","audio","video"],"type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"modes":{"description":"git-diff returns a unified diff of the markdown. json compares the fields in schema or prompt between this read and the last one. Without modes you get git-diff.","items":{"enum":["git-diff","json"],"type":"string"},"maxItems":2,"type":"array"},"prompt":{"description":"With json mode: what to compare, in plain words, such as the price and stock.","maxLength":10000,"minLength":1,"type":"string"},"schema":{"additionalProperties":{"$ref":"#/definitions/__schema0"},"description":"The fields to fill, as a JSON Schema (draft-07 or 2020-12) object with properties. Pydantic's model_json_schema() and zod's toJSONSchema() output work as they are. enum, const, anyOf, oneOf, nullable types, $ref with $defs, required, descriptions and any key names are read. Up to 100 top-level fields and 32 KB. A field the page does not state comes back null.","propertyNames":{"type":"string"},"type":"object"},"tag":{"type":"null"},"type":{"const":"changeTracking","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"question":{"description":"A question to answer from the page, such as what the refund window is.","maxLength":10000,"minLength":1,"type":"string"},"type":{"const":"question","type":"string"}},"required":["type","question"],"type":"object"},{"additionalProperties":false,"properties":{"type":{"const":"product","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"type":{"const":"menu","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"fullPage":{"default":false,"description":"Capture the whole page from top to bottom instead of the visible part.","type":"boolean"},"quality":{"description":"JPEG quality from 1 to 100. The default is 70.","maximum":100,"minimum":1,"type":"integer"},"type":{"const":"screenshot","type":"string"},"viewport":{"additionalProperties":false,"description":"The window size in pixels, such as { width: 390, height: 844 }.","properties":{"height":{"maximum":2160,"minimum":200,"type":"integer"},"width":{"maximum":3840,"minimum":200,"type":"integer"}},"required":["width","height"],"type":"object"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"count":{"default":5,"description":"How many passages to return, best match first.","maximum":20,"minimum":1,"type":"integer"},"query":{"description":"What you are looking for on the page, such as refund policy.","maxLength":10000,"minLength":1,"type":"string"},"type":{"const":"highlights","type":"string"}},"required":["type","query"],"type":"object"},{"additionalProperties":false,"properties":{"checkPromptInjection":{"description":"Deprecated: send checkPromptInjection at the top level of the call.","type":"boolean"},"options":{"additionalProperties":{"$ref":"#/definitions/__schema1"},"description":"Only with parser: extra inputs for it, such as { \"page\": 2 } for the next page of results or { \"minRating\": 4.5 } for a filter. GET /v1/parsers lists what each parser accepts.","propertyNames":{"type":"string"},"type":"object"},"parser":{"description":"Read the page with a named parser, which gives the site's own data as json. The url must be the kind of page the parser reads. Parsers are the only way to read some sites. GET /v1/parsers lists them.","type":"string"},"prompt":{"description":"What to pull from the page in plain words, such as the version and the release date.","maxLength":10000,"minLength":1,"type":"string"},"rules":{"additionalProperties":{"$ref":"#/definitions/__schema2"},"description":"Read the page with CSS rules instead of a model, no extra fee. Each field is a selector such as \"h1\" (the first match's text), \"a@href\" (an attribute) or { \"selector\": \"li\", \"type\": \"list\", \"output\": \"text\" | \"html\" | \"@attribute\" | { nested fields } }. A missing item is null and an unmatched list is []. Relative links become absolute. Up to 100 fields, 5 levels deep. Not with schema, prompt or parser.","propertyNames":{"type":"string"},"type":"object"},"schema":{"additionalProperties":{"$ref":"#/definitions/__schema0"},"description":"The fields to fill, as a JSON Schema (draft-07 or 2020-12) object with properties. Pydantic's model_json_schema() and zod's toJSONSchema() output work as they are. enum, const, anyOf, oneOf, nullable types, $ref with $defs, required, descriptions and any key names are read. Up to 100 top-level fields and 32 KB. A field the page does not state comes back null.","propertyNames":{"type":"string"},"type":"object"},"type":{"const":"json","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"selectors":{"description":"The elements and attributes to read, such as { selector: 'a.buy', attribute: 'href' }.","items":{"additionalProperties":false,"properties":{"attribute":{"maxLength":100,"minLength":1,"type":"string"},"selector":{"minLength":1,"type":"string"}},"required":["selector","attribute"],"type":"object"},"maxItems":50,"minItems":1,"type":"array"},"type":{"const":"attributes","type":"string"}},"required":["type","selectors"],"type":"object"}]},"maxItems":20,"minItems":1,"type":"array"},"headers":{"additionalProperties":{"maxLength":2000,"pattern":"^[\\t\\x20-\\x7e]*$","type":"string"},"description":"Extra request headers to send to the site, such as { \"x-plan\": \"pro\" }. A read with headers is never answered from or saved to a stored copy.","propertyNames":{"pattern":"^[A-Za-z0-9-]{1,64}$","type":"string"},"type":"object"},"includeTags":{"description":"Keep only the parts of the page that match these CSS selectors, such as article or .price. When set, onlyMainContent is not applied.","items":{"minLength":1,"type":"string"},"minItems":1,"type":"array"},"location":{"additionalProperties":false,"description":"Where to read the page from. The default is the United States.","properties":{"country":{"description":"Two-letter country code to read the page from, such as DE or JP.","type":"string"},"languages":{"description":"Languages to ask the site for, best first, such as [\"de\", \"en\"]. Sent as Accept-Language. A read with languages is never answered from or saved to a stored copy.","items":{"pattern":"^[A-Za-z]{2,3}(?:-[A-Za-z0-9]{2,8})*$","type":"string"},"maxItems":5,"minItems":1,"type":"array"}},"type":"object"},"lockdown":{"description":"Send true to answer only from a stored copy of the page and never read it live, whatever its age. A page with no stored copy is notFound. The same as minAge 0.","type":"boolean"},"maxAge":{"description":"Accept a stored answer up to this many milliseconds old, at most 30 days. Without it, 2 days, or less for a site whose pages change often, and a copy up to twice that age (at most 7 days) comes back at once as stale while a fresh read runs. 0 always reads the page live. metadata.cacheState says which one you got.","maximum":9007199254740991,"minimum":0,"type":"integer"},"minAge":{"description":"Answer only from a stored copy that is at least this many milliseconds old, and never read the page live. 0 accepts any stored copy. A page with no such copy is notFound.","maximum":9007199254740991,"minimum":0,"type":"integer"},"mobile":{"description":"Read the page as a phone would: a phone-sized screen and the mobile version of the site. The page loads in a browser.","type":"boolean"},"onlyCleanContent":{"description":"Send true to have a model remove what onlyMainContent leaves behind in the markdown: cookie banners, ads, share widgets, breadcrumbs, sign-up prompts, comment prompts and related-article lists. It only removes whole paragraphs and lists; it never rewrites or adds text, and code blocks are always kept. Skipped with a warning when the page is too long to clean or the model does not answer. Not with zeroDataRetention. Summary, answers and highlights are made from the cleaned markdown.","type":"boolean"},"onlyMainContent":{"default":true,"description":"Keep only the page's main content, without menus, headers, footers and ads.","type":"boolean"},"parsers":{"description":"Only the pdf parser exists. Send \"pdf\" or { \"type\": \"pdf\", mode, maxPages, pages, blocks, pageMarkers } with the same meaning as in parse. Without mode a PDF is read as auto: from its text layer, and from the picture of any page that has no text. fast reads the text layer only, and ocr reads the picture of every page, up to 20 pages. Each page of text that comes back costs 1 credit. Pictures are read only with an API key.","items":{"anyOf":[{"const":"pdf","type":"string"},{"additionalProperties":false,"properties":{"blocks":{"description":"Send true to also get the page's layout in blocks: each title, section header or run of text, with its page, reading order, position on the page (bbox as left, top, right, bottom from 0 to 1) and where its text sits in that page's markdown (span, as in pages). Tables, figures and formulas are not told apart. A page read from its picture is one block. No extra charge.","type":"boolean"},"maxPages":{"description":"Read at most this many pages, up to 500, which is also the default.","maximum":500,"minimum":1,"type":"integer"},"mode":{"description":"fast reads the text layer only. auto (the default) reads the text layer and reads the picture of any page that has none. ocr reads the picture of every page.","enum":["fast","auto","ocr"],"type":"string"},"pageMarkers":{"description":"Send true to mark page breaks in the markdown: pages are joined with \"---\" and a line, where N is the page that follows. No extra charge.","type":"boolean"},"pages":{"description":"Send true to also get each page's markdown in pages, as { pageNumber, markdown }. No extra charge.","type":"boolean"},"type":{"const":"pdf","type":"string"}},"required":["type"],"type":"object"}]},"minItems":1,"type":"array"},"profile":{"additionalProperties":false,"description":"Read the page with the cookies and local storage that earlier calls saved under this name, kept for your account for 30 days after the last use. A call with a profile always loads the page in a browser, costs 1 credit, the same as any page, and is never answered from a stored copy. Only one call at a time can save to a profile.","properties":{"name":{"description":"A name you choose, such as shop-login. Calls with the same name share state.","maxLength":128,"minLength":1,"type":"string"},"saveChanges":{"default":true,"description":"Keep the cookies and local storage this read leaves behind for the next call with this name. Send false to read with the profile without changing it.","type":"boolean"}},"required":["name"],"type":"object"},"proxy":{"description":"auto: basic first, enhanced once if the site refuses. basic: one plain attempt. enhanced: the stronger read from the start. stealth is the same as enhanced. Same price.","enum":["auto","basic","enhanced","stealth"],"type":"string"},"redactPII":{"anyOf":[{"type":"boolean"},{"additionalProperties":false,"description":"Options for redactPII.","properties":{"entities":{"default":["PERSON","EMAIL","PHONE","LOCATION","FINANCIAL","SECRET"],"description":"What to hide: PERSON, EMAIL, PHONE, LOCATION, FINANCIAL, SECRET. All by default.","items":{"enum":["PERSON","EMAIL","PHONE","LOCATION","FINANCIAL","SECRET"],"type":"string"},"minItems":1,"type":"array"},"mode":{"default":"accurate","description":"accurate finds names and places with the model and the rest by pattern. aggressive adds guesses that catch more and may hide a little too much. fast uses patterns only, so it finds no ordinary names or places.","enum":["accurate","aggressive","fast"],"type":"string"},"replaceStyle":{"default":"tag","description":"tag writes <EMAIL>, mask writes * for each character, remove deletes it.","enum":["tag","mask","remove"],"type":"string"}},"type":"object"}],"description":"Send true, or an object, to hide personal data in the markdown and in everything made from it (summary, answers, highlights, json). Links, html and rawHtml are not changed. A page the model cannot scan is refused rather than returned unredacted."},"removeBase64Images":{"description":"Images inside the page that carry their data in the address (data:image) are dropped by default. Send false to keep them in markdown and html.","type":"boolean"},"skipTlsVerification":{"description":"Send true to read a page whose certificate is expired, self-signed or for another name. The read is not private against someone between us and the site.","type":"boolean"},"storeInCache":{"default":true,"description":"Send false to neither read nor keep a stored copy of this page.","type":"boolean"},"timeout":{"default":30000,"description":"How long to keep trying, in milliseconds, from 1 second to 5 minutes; 30 seconds by default. A page that needs a browser needs at least 5 seconds, and pages behind a bot check can need 10 to 30 seconds the first time. A read that runs out of time is an error and costs nothing.","maximum":300000,"minimum":1000,"type":"integer"},"waitFor":{"description":"Extra milliseconds to wait before reading, up to 60000, for pages that load their content late. To wait for an element, add a wait action with a selector. A read that waits costs 1 credit, the same as any page.","maximum":60000,"minimum":0,"type":"integer"},"zeroDataRetention":{"default":false,"description":"Send true to keep nothing from this call: no stored copy is read or made, and nothing from it is logged. Costs 1 credit more per page. Not with a screenshot.","type":"boolean"}},"type":"object"},"sources":{"description":"What to search: web, news, images. Each is a string or {type}. Default web, or none when categories asks for research, companies, people or videos.","items":{"anyOf":[{"enum":["web","news","images"],"type":"string"},{"additionalProperties":false,"properties":{"country":{"description":"ISO 3166-1 alpha-2 country code, e.g. us. Any case is accepted.","pattern":"^[A-Za-z]{2}$","type":"string"},"lang":{"description":"Two-letter language for web results, like de. It steers which pages come back; some results can still be in other languages.","pattern":"^[A-Za-z]{2}$","type":"string"},"location":{"type":"string"},"tbs":{"type":"string"},"type":{"const":"web","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"type":{"enum":["news","images"],"type":"string"}},"required":["type"],"type":"object"}]},"maxItems":5,"minItems":1,"type":"array"},"tbs":{"description":"Time filter: qdr:d, qdr:w, qdr:m or qdr:y, or cdr:1,cd_min:MM/DD/YYYY,cd_max:MM/DD/YYYY, plus sbd:1, like sbd:1,qdr:w. sbd:1 sorts newest first; results without a date come last. Web takes all of them; news takes qdr and sbd; images take none.","minLength":1,"type":"string"},"timeout":{"description":"Milliseconds to wait for the sources, from 1,000 to 120,000; more is read as 120,000. Default 60,000. A source that has not answered by then is left out with a warning. When none has, the call fails and costs nothing.","maximum":9007199254740991,"minimum":1000,"type":"integer"}},"required":["query"],"type":"object"}after
{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"definitions":{"__schema0":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"items":{"allOf":[{"$ref":"#/definitions/__schema0"}]},"type":"array"},{"additionalProperties":{"allOf":[{"$ref":"#/definitions/__schema0"}]},"propertyNames":{"type":"string"},"type":"object"}]},"__schema1":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"items":{"allOf":[{"$ref":"#/definitions/__schema1"}]},"type":"array"},{"additionalProperties":{"allOf":[{"$ref":"#/definitions/__schema1"}]},"propertyNames":{"type":"string"},"type":"object"}]},"__schema2":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"items":{"allOf":[{"$ref":"#/definitions/__schema2"}]},"type":"array"},{"additionalProperties":{"allOf":[{"$ref":"#/definitions/__schema2"}]},"propertyNames":{"type":"string"},"type":"object"}]}},"properties":{"categories":{"description":"pdf: web results that are PDF files. research: scholarly papers, in a research list, ranked by relevance then citations. videos: YouTube videos for the query, in YouTube's order, in a videos list, with the channel, length, views and watch link; a video whose captions we hold also gets the passage that matches the query and where it starts.","items":{"anyOf":[{"enum":["research","pdf","videos"],"type":"string"},{"additionalProperties":false,"properties":{"type":{"enum":["research","pdf","videos"],"type":"string"}},"required":["type"],"type":"object"}]},"type":"array"},"country":{"description":"Two-letter country to search from, like us. uk is read as gb. Image results are always US.","pattern":"^[A-Za-z]{2}$","type":"string"},"excludeDomains":{"items":{"type":"string"},"maxItems":10,"type":"array"},"highlights":{"default":false,"description":"Off by default. With true, a web result whose page we already hold gets the passages that best match the query as its description, in markdown, up to about 2,000 characters; others keep the engine's snippet.","type":"boolean"},"ignoreInvalidURLs":{"default":false,"description":"Leave out results whose address cannot be read as a page.","type":"boolean"},"includeDomains":{"items":{"type":"string"},"maxItems":10,"type":"array"},"lang":{"description":"Two-letter language for web results, like de. It steers which pages come back; some results can still be in other languages.","pattern":"^[A-Za-z]{2}$","type":"string"},"limit":{"description":"Most results to return for each source. Default 10, or 5 when scrapeOptions has formats, which reads every web and news result returned. News returns at most 50.","maximum":100,"minimum":1,"type":"integer"},"location":{"description":"Where to search from, like Germany or San Francisco,California,United States. The last part is the country and replaces country. A city before it narrows web results to that place.","minLength":1,"type":"string"},"maxAge":{"description":"Accept a stored answer up to this many milliseconds old, at most 30 days. Without it, 15 minutes for news and 1 hour for web and images. 0 always searches live.","maximum":9007199254740991,"minimum":0,"type":"integer"},"query":{"description":"What to search for, up to 500 characters. Search operators work in web results: quotes for an exact phrase, -word, site:, -site:, filetype:, inurl:, allinurl:, intitle: and allintitle:. In image results, imagesize:WIDTHxHEIGHT keeps images of exactly that size and larger:WIDTHxHEIGHT keeps images at least that large.","maxLength":500,"minLength":1,"type":"string"},"safe":{"description":"Hide explicit web, news and image results when true.","type":"boolean"},"scrapeOptions":{"additionalProperties":false,"description":"With formats, reads each web and news result, as many as limit asks for, within timeout, and fills each web result's description from it. Without formats no page is read and nothing more is charged. Takes the options of scrape: formats (markdown, html, rawHtml, links, images, summary, screenshot, json and the rest), onlyMainContent, includeTags, excludeTags, maxAge, minAge, waitFor, mobile, timeout (per page), headers, actions, location, parsers, profile and zeroDataRetention. Costs what scrape costs for each page read: 1 credit, plus 4 for each summary or json with a schema or prompt that returns something.","properties":{"actions":{"description":"Up to 50 steps to run on the page, in order, before reading it: { \"type\": \"wait\", \"milliseconds\": 500 } (up to 60 seconds), { \"type\": \"wait\", \"selector\": \".results\" }, { \"type\": \"click\", \"selector\": \"button.more\" }, { \"type\": \"write\", \"text\": \"tides\" }, { \"type\": \"press\", \"key\": \"Enter\" }, { \"type\": \"scroll\", \"direction\": \"down\" } (also up, left or right; amount is pixels, \"viewport\" or \"max\"; maxScrolls 1 to 50; selector scrolls an inner container; \"max\" keeps scrolling until the page stops growing, for feeds that load as you go), { \"type\": \"screenshot\", \"fullPage\": true } (links come back in actions.screenshots), { \"type\": \"scrape\" } (the page at that point, in actions.scrapes), { \"type\": \"executeJavascript\", \"script\": \"document.title\" } (results in actions.javascriptReturns), { \"type\": \"pdf\", \"format\": \"A4\" } (links in actions.pdfs) or { \"type\": \"perform\", \"action\": \"Click the Load more button\" } (a step in plain words, up to 5 browser steps on this page, never leaving the site; at most 5 per call). A read with actions costs 1 credit, the same as any page; the actions themselves add nothing. If an action fails, you still get the page as it stood, with a warning that names the action and says why.","items":{"anyOf":[{"additionalProperties":false,"properties":{"milliseconds":{"maximum":60000,"minimum":1,"type":"integer"},"type":{"const":"wait","type":"string"}},"required":["type","milliseconds"],"type":"object"},{"additionalProperties":false,"properties":{"selector":{"minLength":1,"type":"string"},"type":{"const":"wait","type":"string"}},"required":["type","selector"],"type":"object"},{"additionalProperties":false,"properties":{"all":{"const":false,"type":"boolean"},"selector":{"minLength":1,"type":"string"},"type":{"const":"click","type":"string"}},"required":["type","selector"],"type":"object"},{"additionalProperties":false,"properties":{"text":{"minLength":1,"type":"string"},"type":{"const":"write","type":"string"}},"required":["type","text"],"type":"object"},{"additionalProperties":false,"properties":{"key":{"maxLength":40,"minLength":1,"type":"string"},"type":{"const":"press","type":"string"}},"required":["type","key"],"type":"object"},{"additionalProperties":false,"properties":{"amount":{"anyOf":[{"maximum":100000,"minimum":1,"type":"integer"},{"enum":["viewport","max"],"type":"string"}]},"direction":{"default":"down","enum":["up","down","left","right"],"type":"string"},"maxScrolls":{"maximum":50,"minimum":1,"type":"integer"},"selector":{"minLength":1,"type":"string"},"type":{"const":"scroll","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"fullPage":{"type":"boolean"},"quality":{"maximum":100,"minimum":1,"type":"integer"},"type":{"const":"screenshot","type":"string"},"viewport":{"additionalProperties":false,"properties":{"height":{"maximum":2160,"minimum":200,"type":"integer"},"width":{"maximum":3840,"minimum":200,"type":"integer"}},"required":["width","height"],"type":"object"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"type":{"const":"scrape","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"script":{"maxLength":20000,"minLength":1,"type":"string"},"type":{"const":"executeJavascript","type":"string"}},"required":["type","script"],"type":"object"},{"additionalProperties":false,"properties":{"format":{"enum":["Letter","Legal","Tabloid","Ledger","A0","A1","A2","A3","A4","A5","A6"],"type":"string"},"landscape":{"type":"boolean"},"scale":{"maximum":2,"minimum":0.1,"type":"number"},"type":{"const":"pdf","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"action":{"maxLength":500,"minLength":1,"type":"string"},"type":{"const":"perform","type":"string"}},"required":["type","action"],"type":"object"}]},"maxItems":50,"minItems":1,"type":"array"},"blockAds":{"description":"Ads and trackers are not loaded when a page runs in a browser. Send false to load them.","type":"boolean"},"checkPromptInjection":{"description":"Send true to scan the page text for instructions aimed at an AI model before anything is built from it. A page that has them is refused with 403 promptInjectionDetected and costs nothing. The scan adds 4 credits when it runs; a page it cannot scan fully comes back with a warning and no charge.","type":"boolean"},"excludeTags":{"description":"Remove the parts of the page that match these CSS selectors, such as .comments.","items":{"minLength":1,"type":"string"},"minItems":1,"type":"array"},"fastMode":{"description":"Send true to read the page without opening a browser: the answer comes sooner, but a page that needs a browser, or that refuses a plain request, comes back as an error instead of being retried. Ignored when the call needs a browser (actions, screenshot, waitFor, mobile, profile, network, branding).","type":"boolean"},"formats":{"default":["markdown"],"description":"What to return: markdown (clean page text), summary (a short summary of the page), html (the cleaned page), rawHtml (the page as sent), audio and video (for a YouTube link: the audio track as an M4A file, or the video as an MP4 file, as a link that works for 1 hour), rawBase64 (the bytes the site sent, Base64 encoded, from a live read; metadata.contentType says what they are), links (every link on the page), images (every image address), screenshot (a link to a JPEG of the visible page, kept for 7 days), changeTracking (what changed in the markdown since your key last read this page with the same options, kept 30 days; add modes [\"git-diff\",\"json\"] with a schema or prompt to compare fields too), question (send { \"type\": \"question\", \"question\": \"...\" } to get answer, null when the page does not state one), product (title, brand, category, url, description and variants with price, sale, availability and images, or null) and menu (merchant, currency and sections of items with prices, or null) network (the JSON the page loaded while it rendered, up to 30 responses) and branding (the page's colors, fonts, typography, spacing, button and input styles, logo and brand images, read from how the page looks, with a field left out when the page does not show it). Send { \"type\": \"screenshot\", \"fullPage\": true } for the whole page. Send { \"type\": \"highlights\", \"query\": \"refund policy\" } for the passages that best match a query. Send { \"type\": \"json\", \"schema\": { \"type\": \"object\", \"properties\": { \"price\": { \"type\": \"number\" } } } } or { \"type\": \"json\", \"prompt\": \"the price and the stock\" } for fields filled from the page, each checked against it. Send { \"type\": \"json\", \"parser\": \"amazon-product\" } to get a site's own data as json instead of reading the page; GET /v1/parsers lists the parsers. Send { \"type\": \"json\", \"rules\": { \"title\": \"h1\", \"links\": { \"selector\": \"a\", \"type\": \"list\", \"output\": \"@href\" } } } to read the page with CSS rules and no model, at the page's own price. Send { \"type\": \"attributes\", \"selectors\": [{ \"selector\": \"a\", \"attribute\": \"href\" }] } for attribute values, returned in attributes. Without a parser or rules, json needs a schema or a prompt and is filled from the page. json with a schema or a prompt, summary, highlights, question, product, menu and changeTracking in json mode cost 4 credits more each when they return something. json with rules or a parser, and attributes, cost nothing more. A screenshot, network or branding read costs 1 credit, the same as any page. A PDF comes back as markdown only, and costs 1 credit more for each page of text that comes back. A CSV or an Excel .xlsx file comes back as markdown tables.","items":{"anyOf":[{"enum":["markdown","summary","html","rawHtml","rawBase64","links","images","network","branding","audio","video","screenshot","changeTracking","product","menu"],"type":"string"},{"additionalProperties":false,"properties":{"type":{"enum":["markdown","summary","html","rawHtml","rawBase64","links","images","network","branding","audio","video"],"type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"modes":{"description":"git-diff returns a unified diff of the markdown. json compares the fields in schema or prompt between this read and the last one. Without modes you get git-diff.","items":{"enum":["git-diff","json"],"type":"string"},"maxItems":2,"type":"array"},"prompt":{"description":"With json mode: what to compare, in plain words, such as the price and stock.","maxLength":10000,"minLength":1,"type":"string"},"schema":{"additionalProperties":{"$ref":"#/definitions/__schema0"},"description":"The fields to fill, as a JSON Schema (draft-07 or 2020-12) object with properties. Pydantic's model_json_schema() and zod's toJSONSchema() output work as they are. enum, const, anyOf, oneOf, nullable types, $ref with $defs, required, descriptions and any key names are read. Up to 100 top-level fields and 32 KB. A field the page does not state comes back null.","propertyNames":{"type":"string"},"type":"object"},"tag":{"type":"null"},"type":{"const":"changeTracking","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"question":{"description":"A question to answer from the page, such as what the refund window is.","maxLength":10000,"minLength":1,"type":"string"},"type":{"const":"question","type":"string"}},"required":["type","question"],"type":"object"},{"additionalProperties":false,"properties":{"type":{"const":"product","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"type":{"const":"menu","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"fullPage":{"default":false,"description":"Capture the whole page from top to bottom instead of the visible part.","type":"boolean"},"quality":{"description":"JPEG quality from 1 to 100. The default is 70.","maximum":100,"minimum":1,"type":"integer"},"type":{"const":"screenshot","type":"string"},"viewport":{"additionalProperties":false,"description":"The window size in pixels, such as { width: 390, height: 844 }.","properties":{"height":{"maximum":2160,"minimum":200,"type":"integer"},"width":{"maximum":3840,"minimum":200,"type":"integer"}},"required":["width","height"],"type":"object"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"count":{"default":5,"description":"How many passages to return, best match first.","maximum":20,"minimum":1,"type":"integer"},"query":{"description":"What you are looking for on the page, such as refund policy.","maxLength":10000,"minLength":1,"type":"string"},"type":{"const":"highlights","type":"string"}},"required":["type","query"],"type":"object"},{"additionalProperties":false,"properties":{"checkPromptInjection":{"description":"Deprecated: send checkPromptInjection at the top level of the call.","type":"boolean"},"options":{"additionalProperties":{"$ref":"#/definitions/__schema1"},"description":"Only with parser: extra inputs for it, such as { \"page\": 2 } for the next page of results or { \"minRating\": 4.5 } for a filter. GET /v1/parsers lists what each parser accepts.","propertyNames":{"type":"string"},"type":"object"},"parser":{"description":"Read the page with a named parser, which gives the site's own data as json. The url must be the kind of page the parser reads. Parsers are the only way to read some sites. GET /v1/parsers lists them.","type":"string"},"prompt":{"description":"What to pull from the page in plain words, such as the version and the release date.","maxLength":10000,"minLength":1,"type":"string"},"rules":{"additionalProperties":{"$ref":"#/definitions/__schema2"},"description":"Read the page with CSS rules instead of a model, no extra fee. Each field is a selector such as \"h1\" (the first match's text), \"a@href\" (an attribute) or { \"selector\": \"li\", \"type\": \"list\", \"output\": \"text\" | \"html\" | \"@attribute\" | { nested fields } }. A missing item is null and an unmatched list is []. Relative links become absolute. Up to 100 fields, 5 levels deep. Not with schema, prompt or parser.","propertyNames":{"type":"string"},"type":"object"},"schema":{"additionalProperties":{"$ref":"#/definitions/__schema0"},"description":"The fields to fill, as a JSON Schema (draft-07 or 2020-12) object with properties. Pydantic's model_json_schema() and zod's toJSONSchema() output work as they are. enum, const, anyOf, oneOf, nullable types, $ref with $defs, required, descriptions and any key names are read. Up to 100 top-level fields and 32 KB. A field the page does not state comes back null.","propertyNames":{"type":"string"},"type":"object"},"type":{"const":"json","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"selectors":{"description":"The elements and attributes to read, such as { selector: 'a.buy', attribute: 'href' }.","items":{"additionalProperties":false,"properties":{"attribute":{"maxLength":100,"minLength":1,"type":"string"},"selector":{"minLength":1,"type":"string"}},"required":["selector","attribute"],"type":"object"},"maxItems":50,"minItems":1,"type":"array"},"type":{"const":"attributes","type":"string"}},"required":["type","selectors"],"type":"object"}]},"maxItems":20,"minItems":1,"type":"array"},"headers":{"additionalProperties":{"maxLength":2000,"pattern":"^[\\t\\x20-\\x7e]*$","type":"string"},"description":"Extra request headers to send to the site, such as { \"x-plan\": \"pro\" }. A read with headers is never answered from or saved to a stored copy.","propertyNames":{"pattern":"^[A-Za-z0-9-]{1,64}$","type":"string"},"type":"object"},"includeTags":{"description":"Keep only the parts of the page that match these CSS selectors, such as article or .price. When set, onlyMainContent is not applied.","items":{"minLength":1,"type":"string"},"minItems":1,"type":"array"},"location":{"additionalProperties":false,"description":"Where to read the page from. The default is the United States.","properties":{"country":{"description":"Two-letter country code to read the page from, such as DE or JP.","type":"string"},"languages":{"description":"Languages to ask the site for, best first, such as [\"de\", \"en\"]. Sent as Accept-Language. A read with languages is never answered from or saved to a stored copy.","items":{"pattern":"^[A-Za-z]{2,3}(?:-[A-Za-z0-9]{2,8})*$","type":"string"},"maxItems":5,"minItems":1,"type":"array"}},"type":"object"},"lockdown":{"description":"Send true to answer only from a stored copy of the page and never read it live, whatever its age. A page with no stored copy is notFound. The same as minAge 0.","type":"boolean"},"maxAge":{"description":"Accept a stored answer up to this many milliseconds old, at most 30 days. Without it, 2 days, or less for a site whose pages change often, and a copy up to twice that age (at most 7 days) comes back at once as stale while a fresh read runs. 0 always reads the page live. metadata.cacheState says which one you got.","maximum":9007199254740991,"minimum":0,"type":"integer"},"minAge":{"description":"Answer only from a stored copy that is at least this many milliseconds old, and never read the page live. 0 accepts any stored copy. A page with no such copy is notFound.","maximum":9007199254740991,"minimum":0,"type":"integer"},"mobile":{"description":"Read the page as a phone would: a phone-sized screen and the mobile version of the site. The page loads in a browser.","type":"boolean"},"onlyCleanContent":{"description":"Send true to have a model remove what onlyMainContent leaves behind in the markdown: cookie banners, ads, share widgets, breadcrumbs, sign-up prompts, comment prompts and related-article lists. It only removes whole paragraphs and lists; it never rewrites or adds text, and code blocks are always kept. Skipped with a warning when the page is too long to clean or the model does not answer. Not with zeroDataRetention. Summary, answers and highlights are made from the cleaned markdown.","type":"boolean"},"onlyMainContent":{"default":true,"description":"Keep only the page's main content, without menus, headers, footers and ads.","type":"boolean"},"parsers":{"description":"Only the pdf parser exists. Send \"pdf\" or { \"type\": \"pdf\", mode, maxPages, pages, blocks, pageMarkers } with the same meaning as in parse. Without mode a PDF is read as auto: from its text layer, and from the picture of any page that has no text. fast reads the text layer only, and ocr reads the picture of every page, up to 20 pages. Each page of text that comes back costs 1 credit. Pictures are read only with an API key.","items":{"anyOf":[{"const":"pdf","type":"string"},{"additionalProperties":false,"properties":{"blocks":{"description":"Send true to also get the page's layout in blocks: each title, section header or run of text, with its page, reading order, position on the page (bbox as left, top, right, bottom from 0 to 1) and where its text sits in that page's markdown (span, as in pages). Tables, figures and formulas are not told apart. A page read from its picture is one block. No extra charge.","type":"boolean"},"maxPages":{"description":"Read at most this many pages, up to 500, which is also the default.","maximum":500,"minimum":1,"type":"integer"},"mode":{"description":"fast reads the text layer only. auto (the default) reads the text layer and reads the picture of any page that has none. ocr reads the picture of every page.","enum":["fast","auto","ocr"],"type":"string"},"pageMarkers":{"description":"Send true to mark page breaks in the markdown: pages are joined with \"---\" and a line, where N is the page that follows. No extra charge.","type":"boolean"},"pages":{"description":"Send true to also get each page's markdown in pages, as { pageNumber, markdown }. No extra charge.","type":"boolean"},"type":{"const":"pdf","type":"string"}},"required":["type"],"type":"object"}]},"minItems":1,"type":"array"},"profile":{"additionalProperties":false,"description":"Read the page with the cookies and local storage that earlier calls saved under this name, kept for your account for 30 days after the last use. A call with a profile always loads the page in a browser, costs 1 credit, the same as any page, and is never answered from a stored copy. Only one call at a time can save to a profile.","properties":{"name":{"description":"A name you choose, such as shop-login. Calls with the same name share state.","maxLength":128,"minLength":1,"type":"string"},"saveChanges":{"default":true,"description":"Keep the cookies and local storage this read leaves behind for the next call with this name. Send false to read with the profile without changing it.","type":"boolean"}},"required":["name"],"type":"object"},"proxy":{"description":"auto: basic first, enhanced once if the site refuses. basic: one plain attempt. enhanced: the stronger read from the start. stealth is the same as enhanced. Same price.","enum":["auto","basic","enhanced","stealth"],"type":"string"},"redactPII":{"anyOf":[{"type":"boolean"},{"additionalProperties":false,"description":"Options for redactPII.","properties":{"entities":{"default":["PERSON","EMAIL","PHONE","LOCATION","FINANCIAL","SECRET"],"description":"What to hide: PERSON, EMAIL, PHONE, LOCATION, FINANCIAL, SECRET. All by default.","items":{"enum":["PERSON","EMAIL","PHONE","LOCATION","FINANCIAL","SECRET"],"type":"string"},"minItems":1,"type":"array"},"mode":{"default":"accurate","description":"accurate finds names and places with the model and the rest by pattern. aggressive adds guesses that catch more and may hide a little too much. fast uses patterns only, so it finds no ordinary names or places.","enum":["accurate","aggressive","fast"],"type":"string"},"replaceStyle":{"default":"tag","description":"tag writes <EMAIL>, mask writes * for each character, remove deletes it.","enum":["tag","mask","remove"],"type":"string"}},"type":"object"}],"description":"Send true, or an object, to hide personal data in the markdown and in everything made from it (summary, answers, highlights, json). Links, html and rawHtml are not changed. A page the model cannot scan is refused rather than returned unredacted."},"removeBase64Images":{"description":"Images inside the page that carry their data in the address (data:image) are dropped by default. Send false to keep them in markdown and html.","type":"boolean"},"skipTlsVerification":{"description":"Send true to read a page whose certificate is expired, self-signed or for another name. The read is not private against someone between us and the site.","type":"boolean"},"storeInCache":{"default":true,"description":"Send false to neither read nor keep a stored copy of this page.","type":"boolean"},"timeout":{"default":30000,"description":"How long to keep trying, in milliseconds, from 1 second to 5 minutes; 30 seconds by default. A page that needs a browser needs at least 5 seconds, and pages behind a bot check can need 10 to 30 seconds the first time. A read that runs out of time is an error and costs nothing.","maximum":300000,"minimum":1000,"type":"integer"},"waitFor":{"description":"Extra milliseconds to wait before reading, up to 60000, for pages that load their content late. To wait for an element, add a wait action with a selector. A read that waits costs 1 credit, the same as any page.","maximum":60000,"minimum":0,"type":"integer"},"zeroDataRetention":{"default":false,"description":"Send true to keep nothing from this call: no stored copy is read or made, and nothing from it is logged. Costs 1 credit more per page. Not with a screenshot.","type":"boolean"}},"type":"object"},"sources":{"description":"What to search: web, news, images. Each is a string or {type}. Default web, or none when categories asks for research or videos.","items":{"anyOf":[{"enum":["web","news","images"],"type":"string"},{"additionalProperties":false,"properties":{"country":{"description":"ISO 3166-1 alpha-2 country code, e.g. us. Any case is accepted.","pattern":"^[A-Za-z]{2}$","type":"string"},"lang":{"description":"Two-letter language for web results, like de. It steers which pages come back; some results can still be in other languages.","pattern":"^[A-Za-z]{2}$","type":"string"},"location":{"type":"string"},"tbs":{"type":"string"},"type":{"const":"web","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"type":{"enum":["news","images"],"type":"string"}},"required":["type"],"type":"object"}]},"maxItems":5,"minItems":1,"type":"array"},"tbs":{"description":"Time filter: qdr:d, qdr:w, qdr:m or qdr:y, or cdr:1,cd_min:MM/DD/YYYY,cd_max:MM/DD/YYYY, plus sbd:1, like sbd:1,qdr:w. sbd:1 sorts newest first; results without a date come last. Web takes all of them; news takes qdr and sbd; images take none.","minLength":1,"type":"string"},"timeout":{"description":"Milliseconds to wait for the sources, from 1,000 to 120,000; more is read as 120,000. Default 60,000. A source that has not answered by then is left out with a warning. When none has, the call fails and costs nothing.","maximum":9007199254740991,"minimum":1000,"type":"integer"}},"required":["query"],"type":"object"}before
{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"definitions":{"__schema0":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"items":{"allOf":[{"$ref":"#/definitions/__schema0"}]},"type":"array"},{"additionalProperties":{"allOf":[{"$ref":"#/definitions/__schema0"}]},"propertyNames":{"type":"string"},"type":"object"}]},"__schema1":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"items":{"allOf":[{"$ref":"#/definitions/__schema1"}]},"type":"array"},{"additionalProperties":{"allOf":[{"$ref":"#/definitions/__schema1"}]},"propertyNames":{"type":"string"},"type":"object"}]},"__schema2":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"items":{"allOf":[{"$ref":"#/definitions/__schema2"}]},"type":"array"},{"additionalProperties":{"allOf":[{"$ref":"#/definitions/__schema2"}]},"propertyNames":{"type":"string"},"type":"object"}]}},"properties":{"categories":{"description":"pdf: web results that are PDF files. research: scholarly papers, in a research list, ranked by relevance then citations. companies: companies that match the query, in a companies list, best matches first. The query can name a place, industry, employee count, founding year and funding stage, like fintech startups in Berlin, 50-200 employees. people: people that match the query, in a people list, best matches first. The query can name a role, company, place or research topic, like CFO of Stripe, founders of fintech startups in Berlin, or researchers on CRISPR base editing. Each person has roles, affiliations and public profile links, never contact details. developer: passages from GitHub READMEs, issues, merged pull requests, releases, developer docs and API operations, in a developer list; send it as an object to filter by repos, types, language and minStars. gov: statutes, regulations, register notices and bills from government sources, in the web group with category gov and the kind, jurisdiction and citation of each. videos: passages from what is said in YouTube videos shared under a Creative Commons license, in a videos list, one result per video, with the channel, the license and the watch link; the link carries &t= only when the passage's start is exact. The index is a June 2024 snapshot of English videos, so a link may be dead.","items":{"anyOf":[{"enum":["developer","gov","research","pdf","companies","people","videos"],"type":"string"},{"additionalProperties":false,"properties":{"type":{"enum":["developer","gov","research","pdf","companies","people","videos"],"type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"language":{"description":"Only repositories whose main language is this, like TypeScript.","minLength":1,"type":"string"},"minStars":{"description":"Only repositories with at least this many GitHub stars.","maximum":9007199254740991,"minimum":0,"type":"integer"},"repos":{"default":[],"description":"Only results from these GitHub repositories, as owner/name.","items":{"pattern":"^[\\w.-]+\\/[\\w.-]+$","type":"string"},"maxItems":5,"type":"array"},"type":{"const":"developer","type":"string"},"types":{"default":[],"description":"Only these result types: readme, issue, pull_request, release, operation, doc.","items":{"enum":["readme","issue","pull_request","release","operation","doc"],"type":"string"},"type":"array"}},"required":["type"],"type":"object"}]},"type":"array"},"country":{"description":"Two-letter country to search from, like us. uk is read as gb. Image results are always US.","pattern":"^[A-Za-z]{2}$","type":"string"},"excludeDomains":{"items":{"type":"string"},"maxItems":10,"type":"array"},"highlights":{"default":false,"description":"Off by default. With true, a web result whose page we already hold gets the passages that best match the query as its description, in markdown, up to about 2,000 characters; others keep the engine's snippet.","type":"boolean"},"ignoreInvalidURLs":{"default":false,"description":"Leave out results whose address cannot be read as a page.","type":"boolean"},"includeDomains":{"items":{"type":"string"},"maxItems":10,"type":"array"},"lang":{"description":"Two-letter language for web results, like de. It steers which pages come back; some results can still be in other languages.","pattern":"^[A-Za-z]{2}$","type":"string"},"limit":{"description":"Most results to return for each source. Default 10, or 5 when scrapeOptions has formats, which reads every web and news result returned. News returns at most 50.","maximum":100,"minimum":1,"type":"integer"},"location":{"description":"Where to search from, like Germany or San Francisco,California,United States. The last part is the country and replaces country. A city before it narrows web results to that place.","minLength":1,"type":"string"},"maxAge":{"description":"Accept a stored answer up to this many milliseconds old, at most 30 days. Without it, 15 minutes for news and 1 hour for web and images. 0 always searches live.","maximum":9007199254740991,"minimum":0,"type":"integer"},"query":{"description":"What to search for, up to 500 characters. Search operators work in web results: quotes for an exact phrase, -word, site:, -site:, filetype:, inurl:, allinurl:, intitle: and allintitle:. In image results, imagesize:WIDTHxHEIGHT keeps images of exactly that size and larger:WIDTHxHEIGHT keeps images at least that large.","maxLength":500,"minLength":1,"type":"string"},"safe":{"description":"Hide explicit web, news and image results when true.","type":"boolean"},"scrapeOptions":{"additionalProperties":false,"description":"With formats, reads each web and news result, as many as limit asks for, within timeout, and fills each web result's description from it. Without formats no page is read and nothing more is charged. Takes the options of scrape: formats (markdown, html, rawHtml, links, images, summary, screenshot, json and the rest), onlyMainContent, includeTags, excludeTags, maxAge, minAge, waitFor, mobile, timeout (per page), headers, actions, location, parsers, profile and zeroDataRetention. Costs what scrape costs for each page read: 1 credit, plus 4 for each summary or json with a schema or prompt that returns something.","properties":{"actions":{"description":"Up to 50 steps to run on the page, in order, before reading it: { \"type\": \"wait\", \"milliseconds\": 500 } (up to 60 seconds), { \"type\": \"wait\", \"selector\": \".results\" }, { \"type\": \"click\", \"selector\": \"button.more\" }, { \"type\": \"write\", \"text\": \"tides\" }, { \"type\": \"press\", \"key\": \"Enter\" }, { \"type\": \"scroll\", \"direction\": \"down\" } (also up, left or right; amount is pixels, \"viewport\" or \"max\"; maxScrolls 1 to 50; selector scrolls an inner container; \"max\" keeps scrolling until the page stops growing, for feeds that load as you go), { \"type\": \"screenshot\", \"fullPage\": true } (links come back in actions.screenshots), { \"type\": \"scrape\" } (the page at that point, in actions.scrapes), { \"type\": \"executeJavascript\", \"script\": \"document.title\" } (results in actions.javascriptReturns), { \"type\": \"pdf\", \"format\": \"A4\" } (links in actions.pdfs) or { \"type\": \"perform\", \"action\": \"Click the Load more button\" } (a step in plain words, up to 5 browser steps on this page, never leaving the site; at most 5 per call). A read with actions costs 1 credit, the same as any page; the actions themselves add nothing. If an action fails, you still get the page as it stood, with a warning that names the action and says why.","items":{"anyOf":[{"additionalProperties":false,"properties":{"milliseconds":{"maximum":60000,"minimum":1,"type":"integer"},"type":{"const":"wait","type":"string"}},"required":["type","milliseconds"],"type":"object"},{"additionalProperties":false,"properties":{"selector":{"minLength":1,"type":"string"},"type":{"const":"wait","type":"string"}},"required":["type","selector"],"type":"object"},{"additionalProperties":false,"properties":{"all":{"const":false,"type":"boolean"},"selector":{"minLength":1,"type":"string"},"type":{"const":"click","type":"string"}},"required":["type","selector"],"type":"object"},{"additionalProperties":false,"properties":{"text":{"minLength":1,"type":"string"},"type":{"const":"write","type":"string"}},"required":["type","text"],"type":"object"},{"additionalProperties":false,"properties":{"key":{"maxLength":40,"minLength":1,"type":"string"},"type":{"const":"press","type":"string"}},"required":["type","key"],"type":"object"},{"additionalProperties":false,"properties":{"amount":{"anyOf":[{"maximum":100000,"minimum":1,"type":"integer"},{"enum":["viewport","max"],"type":"string"}]},"direction":{"default":"down","enum":["up","down","left","right"],"type":"string"},"maxScrolls":{"maximum":50,"minimum":1,"type":"integer"},"selector":{"minLength":1,"type":"string"},"type":{"const":"scroll","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"fullPage":{"type":"boolean"},"quality":{"maximum":100,"minimum":1,"type":"integer"},"type":{"const":"screenshot","type":"string"},"viewport":{"additionalProperties":false,"properties":{"height":{"maximum":2160,"minimum":200,"type":"integer"},"width":{"maximum":3840,"minimum":200,"type":"integer"}},"required":["width","height"],"type":"object"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"type":{"const":"scrape","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"script":{"maxLength":20000,"minLength":1,"type":"string"},"type":{"const":"executeJavascript","type":"string"}},"required":["type","script"],"type":"object"},{"additionalProperties":false,"properties":{"format":{"enum":["Letter","Legal","Tabloid","Ledger","A0","A1","A2","A3","A4","A5","A6"],"type":"string"},"landscape":{"type":"boolean"},"scale":{"maximum":2,"minimum":0.1,"type":"number"},"type":{"const":"pdf","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"action":{"maxLength":500,"minLength":1,"type":"string"},"type":{"const":"perform","type":"string"}},"required":["type","action"],"type":"object"}]},"maxItems":50,"minItems":1,"type":"array"},"blockAds":{"description":"Ads and trackers are not loaded when a page runs in a browser. Send false to load them.","type":"boolean"},"checkPromptInjection":{"description":"Send true to scan the page text for instructions aimed at an AI model before anything is built from it. A page that has them is refused with 403 promptInjectionDetected and costs nothing. The scan adds 4 credits when it runs; a page it cannot scan fully comes back with a warning and no charge.","type":"boolean"},"excludeTags":{"description":"Remove the parts of the page that match these CSS selectors, such as .comments.","items":{"minLength":1,"type":"string"},"minItems":1,"type":"array"},"fastMode":{"description":"Send true to read the page without opening a browser: the answer comes sooner, but a page that needs a browser, or that refuses a plain request, comes back as an error instead of being retried. Ignored when the call needs a browser (actions, screenshot, waitFor, mobile, profile, network, branding).","type":"boolean"},"formats":{"default":["markdown"],"description":"What to return: markdown (clean page text), summary (a short summary of the page), html (the cleaned page), rawHtml (the page as sent), audio and video (for a YouTube link: the audio track as an M4A file, or the video as an MP4 file, as a link that works for 1 hour), rawBase64 (the bytes the site sent, Base64 encoded, from a live read; metadata.contentType says what they are), links (every link on the page), images (every image address), screenshot (a link to a JPEG of the visible page, kept for 7 days), changeTracking (what changed in the markdown since your key last read this page with the same options, kept 30 days; add modes [\"git-diff\",\"json\"] with a schema or prompt to compare fields too), question (send { \"type\": \"question\", \"question\": \"...\" } to get answer, null when the page does not state one), product (title, brand, category, url, description and variants with price, sale, availability and images, or null) and menu (merchant, currency and sections of items with prices, or null) network (the JSON the page loaded while it rendered, up to 30 responses) and branding (the page's colors, fonts, typography, spacing, button and input styles, logo and brand images, read from how the page looks, with a field left out when the page does not show it). Send { \"type\": \"screenshot\", \"fullPage\": true } for the whole page. Send { \"type\": \"highlights\", \"query\": \"refund policy\" } for the passages that best match a query. Send { \"type\": \"json\", \"schema\": { \"type\": \"object\", \"properties\": { \"price\": { \"type\": \"number\" } } } } or { \"type\": \"json\", \"prompt\": \"the price and the stock\" } for fields filled from the page, each checked against it. Send { \"type\": \"json\", \"parser\": \"amazon-product\" } to get a site's own data as json instead of reading the page; GET /v1/parsers lists the parsers. Send { \"type\": \"json\", \"rules\": { \"title\": \"h1\", \"links\": { \"selector\": \"a\", \"type\": \"list\", \"output\": \"@href\" } } } to read the page with CSS rules and no model, at the page's own price. Send { \"type\": \"attributes\", \"selectors\": [{ \"selector\": \"a\", \"attribute\": \"href\" }] } for attribute values, returned in attributes. Without a parser or rules, json needs a schema or a prompt and is filled from the page. json with a schema or a prompt, summary, highlights, question, product, menu and changeTracking in json mode cost 4 credits more each when they return something. json with rules or a parser, and attributes, cost nothing more. A screenshot, network or branding read costs 1 credit, the same as any page. A PDF comes back as markdown only, and costs 1 credit more for each page of text that comes back. A CSV or an Excel .xlsx file comes back as markdown tables.","items":{"anyOf":[{"enum":["markdown","summary","html","rawHtml","rawBase64","links","images","network","branding","audio","video","screenshot","changeTracking","product","menu"],"type":"string"},{"additionalProperties":false,"properties":{"type":{"enum":["markdown","summary","html","rawHtml","rawBase64","links","images","network","branding","audio","video"],"type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"modes":{"description":"git-diff returns a unified diff of the markdown. json compares the fields in schema or prompt between this read and the last one. Without modes you get git-diff.","items":{"enum":["git-diff","json"],"type":"string"},"maxItems":2,"type":"array"},"prompt":{"description":"With json mode: what to compare, in plain words, such as the price and stock.","maxLength":10000,"minLength":1,"type":"string"},"schema":{"additionalProperties":{"$ref":"#/definitions/__schema0"},"description":"The fields to fill, as a JSON Schema (draft-07 or 2020-12) object with properties. Pydantic's model_json_schema() and zod's toJSONSchema() output work as they are. enum, const, anyOf, oneOf, nullable types, $ref with $defs, required, descriptions and any key names are read. Up to 100 top-level fields and 32 KB. A field the page does not state comes back null.","propertyNames":{"type":"string"},"type":"object"},"tag":{"type":"null"},"type":{"const":"changeTracking","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"question":{"description":"A question to answer from the page, such as what the refund window is.","maxLength":10000,"minLength":1,"type":"string"},"type":{"const":"question","type":"string"}},"required":["type","question"],"type":"object"},{"additionalProperties":false,"properties":{"type":{"const":"product","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"type":{"const":"menu","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"fullPage":{"default":false,"description":"Capture the whole page from top to bottom instead of the visible part.","type":"boolean"},"quality":{"description":"JPEG quality from 1 to 100. The default is 70.","maximum":100,"minimum":1,"type":"integer"},"type":{"const":"screenshot","type":"string"},"viewport":{"additionalProperties":false,"description":"The window size in pixels, such as { width: 390, height: 844 }.","properties":{"height":{"maximum":2160,"minimum":200,"type":"integer"},"width":{"maximum":3840,"minimum":200,"type":"integer"}},"required":["width","height"],"type":"object"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"count":{"default":5,"description":"How many passages to return, best match first.","maximum":20,"minimum":1,"type":"integer"},"query":{"description":"What you are looking for on the page, such as refund policy.","maxLength":10000,"minLength":1,"type":"string"},"type":{"const":"highlights","type":"string"}},"required":["type","query"],"type":"object"},{"additionalProperties":false,"properties":{"checkPromptInjection":{"description":"Deprecated: send checkPromptInjection at the top level of the call.","type":"boolean"},"options":{"additionalProperties":{"$ref":"#/definitions/__schema1"},"description":"Only with parser: extra inputs for it, such as { \"page\": 2 } for the next page of results or { \"minRating\": 4.5 } for a filter. GET /v1/parsers lists what each parser accepts.","propertyNames":{"type":"string"},"type":"object"},"parser":{"description":"Read the page with a named parser, which gives the site's own data as json. The url must be the kind of page the parser reads. Parsers are the only way to read some sites. GET /v1/parsers lists them.","type":"string"},"prompt":{"description":"What to pull from the page in plain words, such as the version and the release date.","maxLength":10000,"minLength":1,"type":"string"},"rules":{"additionalProperties":{"$ref":"#/definitions/__schema2"},"description":"Read the page with CSS rules instead of a model, no extra fee. Each field is a selector such as \"h1\" (the first match's text), \"a@href\" (an attribute) or { \"selector\": \"li\", \"type\": \"list\", \"output\": \"text\" | \"html\" | \"@attribute\" | { nested fields } }. A missing item is null and an unmatched list is []. Relative links become absolute. Up to 100 fields, 5 levels deep. Not with schema, prompt or parser.","propertyNames":{"type":"string"},"type":"object"},"schema":{"additionalProperties":{"$ref":"#/definitions/__schema0"},"description":"The fields to fill, as a JSON Schema (draft-07 or 2020-12) object with properties. Pydantic's model_json_schema() and zod's toJSONSchema() output work as they are. enum, const, anyOf, oneOf, nullable types, $ref with $defs, required, descriptions and any key names are read. Up to 100 top-level fields and 32 KB. A field the page does not state comes back null.","propertyNames":{"type":"string"},"type":"object"},"type":{"const":"json","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"selectors":{"description":"The elements and attributes to read, such as { selector: 'a.buy', attribute: 'href' }.","items":{"additionalProperties":false,"properties":{"attribute":{"maxLength":100,"minLength":1,"type":"string"},"selector":{"minLength":1,"type":"string"}},"required":["selector","attribute"],"type":"object"},"maxItems":50,"minItems":1,"type":"array"},"type":{"const":"attributes","type":"string"}},"required":["type","selectors"],"type":"object"}]},"maxItems":20,"minItems":1,"type":"array"},"headers":{"additionalProperties":{"maxLength":2000,"pattern":"^[\\t\\x20-\\x7e]*$","type":"string"},"description":"Extra request headers to send to the site, such as { \"x-plan\": \"pro\" }. A read with headers is never answered from or saved to a stored copy.","propertyNames":{"pattern":"^[A-Za-z0-9-]{1,64}$","type":"string"},"type":"object"},"includeTags":{"description":"Keep only the parts of the page that match these CSS selectors, such as article or .price. When set, onlyMainContent is not applied.","items":{"minLength":1,"type":"string"},"minItems":1,"type":"array"},"location":{"additionalProperties":false,"description":"Where to read the page from. The default is the United States.","properties":{"country":{"description":"Two-letter country code to read the page from, such as DE or JP.","type":"string"},"languages":{"description":"Languages to ask the site for, best first, such as [\"de\", \"en\"]. Sent as Accept-Language. A read with languages is never answered from or saved to a stored copy.","items":{"pattern":"^[A-Za-z]{2,3}(?:-[A-Za-z0-9]{2,8})*$","type":"string"},"maxItems":5,"minItems":1,"type":"array"}},"type":"object"},"lockdown":{"description":"Send true to answer only from a stored copy of the page and never read it live, whatever its age. A page with no stored copy is notFound. The same as minAge 0.","type":"boolean"},"maxAge":{"description":"Accept a stored answer up to this many milliseconds old, at most 30 days. Without it, 2 days, or less for a site whose pages change often, and a copy up to twice that age (at most 7 days) comes back at once as stale while a fresh read runs. 0 always reads the page live. metadata.cacheState says which one you got.","maximum":9007199254740991,"minimum":0,"type":"integer"},"minAge":{"description":"Answer only from a stored copy that is at least this many milliseconds old, and never read the page live. 0 accepts any stored copy. A page with no such copy is notFound.","maximum":9007199254740991,"minimum":0,"type":"integer"},"mobile":{"description":"Read the page as a phone would: a phone-sized screen and the mobile version of the site. The page loads in a browser.","type":"boolean"},"onlyCleanContent":{"description":"Send true to have a model remove what onlyMainContent leaves behind in the markdown: cookie banners, ads, share widgets, breadcrumbs, sign-up prompts, comment prompts and related-article lists. It only removes whole paragraphs and lists; it never rewrites or adds text, and code blocks are always kept. Skipped with a warning when the page is too long to clean or the model does not answer. Not with zeroDataRetention. Summary, answers and highlights are made from the cleaned markdown.","type":"boolean"},"onlyMainContent":{"default":true,"description":"Keep only the page's main content, without menus, headers, footers and ads.","type":"boolean"},"parsers":{"description":"Only the pdf parser exists. Send \"pdf\" or { \"type\": \"pdf\", mode, maxPages, pages, blocks, pageMarkers } with the same meaning as in parse. Without mode a PDF is read as auto: from its text layer, and from the picture of any page that has no text. fast reads the text layer only, and ocr reads the picture of every page, up to 20 pages. Each page of text that comes back costs 1 credit. Pictures are read only with an API key.","items":{"anyOf":[{"const":"pdf","type":"string"},{"additionalProperties":false,"properties":{"blocks":{"description":"Send true to also get the page's layout in blocks: each title, section header or run of text, with its page, reading order, position on the page (bbox as left, top, right, bottom from 0 to 1) and where its text sits in that page's markdown (span, as in pages). Tables, figures and formulas are not told apart. A page read from its picture is one block. No extra charge.","type":"boolean"},"maxPages":{"description":"Read at most this many pages, up to 500, which is also the default.","maximum":500,"minimum":1,"type":"integer"},"mode":{"description":"fast reads the text layer only. auto (the default) reads the text layer and reads the picture of any page that has none. ocr reads the picture of every page.","enum":["fast","auto","ocr"],"type":"string"},"pageMarkers":{"description":"Send true to mark page breaks in the markdown: pages are joined with \"---\" and a line, where N is the page that follows. No extra charge.","type":"boolean"},"pages":{"description":"Send true to also get each page's markdown in pages, as { pageNumber, markdown }. No extra charge.","type":"boolean"},"type":{"const":"pdf","type":"string"}},"required":["type"],"type":"object"}]},"minItems":1,"type":"array"},"profile":{"additionalProperties":false,"description":"Read the page with the cookies and local storage that earlier calls saved under this name, kept for your account for 30 days after the last use. A call with a profile always loads the page in a browser, costs 1 credit, the same as any page, and is never answered from a stored copy. Only one call at a time can save to a profile.","properties":{"name":{"description":"A name you choose, such as shop-login. Calls with the same name share state.","maxLength":128,"minLength":1,"type":"string"},"saveChanges":{"default":true,"description":"Keep the cookies and local storage this read leaves behind for the next call with this name. Send false to read with the profile without changing it.","type":"boolean"}},"required":["name"],"type":"object"},"proxy":{"description":"auto: basic first, enhanced once if the site refuses. basic: one plain attempt. enhanced: the stronger read from the start. stealth is the same as enhanced. Same price.","enum":["auto","basic","enhanced","stealth"],"type":"string"},"redactPII":{"anyOf":[{"type":"boolean"},{"additionalProperties":false,"description":"Options for redactPII.","properties":{"entities":{"default":["PERSON","EMAIL","PHONE","LOCATION","FINANCIAL","SECRET"],"description":"What to hide: PERSON, EMAIL, PHONE, LOCATION, FINANCIAL, SECRET. All by default.","items":{"enum":["PERSON","EMAIL","PHONE","LOCATION","FINANCIAL","SECRET"],"type":"string"},"minItems":1,"type":"array"},"mode":{"default":"accurate","description":"accurate finds names and places with the model and the rest by pattern. aggressive adds guesses that catch more and may hide a little too much. fast uses patterns only, so it finds no ordinary names or places.","enum":["accurate","aggressive","fast"],"type":"string"},"replaceStyle":{"default":"tag","description":"tag writes <EMAIL>, mask writes * for each character, remove deletes it.","enum":["tag","mask","remove"],"type":"string"}},"type":"object"}],"description":"Send true, or an object, to hide personal data in the markdown and in everything made from it (summary, answers, highlights, json). Links, html and rawHtml are not changed. A page the model cannot scan is refused rather than returned unredacted."},"removeBase64Images":{"description":"Images inside the page that carry their data in the address (data:image) are dropped by default. Send false to keep them in markdown and html.","type":"boolean"},"skipTlsVerification":{"description":"Send true to read a page whose certificate is expired, self-signed or for another name. The read is not private against someone between us and the site.","type":"boolean"},"storeInCache":{"default":true,"description":"Send false to neither read nor keep a stored copy of this page.","type":"boolean"},"timeout":{"default":30000,"description":"How long to keep trying, in milliseconds, from 1 second to 5 minutes; 30 seconds by default. A page that needs a browser needs at least 5 seconds, and pages behind a bot check can need 10 to 30 seconds the first time. A read that runs out of time is an error and costs nothing.","maximum":300000,"minimum":1000,"type":"integer"},"waitFor":{"description":"Extra milliseconds to wait before reading, up to 60000, for pages that load their content late. To wait for an element, add a wait action with a selector. A read that waits costs 1 credit, the same as any page.","maximum":60000,"minimum":0,"type":"integer"},"zeroDataRetention":{"default":false,"description":"Send true to keep nothing from this call: no stored copy is read or made, and nothing from it is logged. Costs 1 credit more per page. Not with a screenshot.","type":"boolean"}},"type":"object"},"sources":{"description":"What to search: web, news, images. Each is a string or {type}. Default web, or none when categories asks for research, companies, people, developer, gov or videos.","items":{"anyOf":[{"enum":["web","news","images"],"type":"string"},{"additionalProperties":false,"properties":{"country":{"description":"ISO 3166-1 alpha-2 country code, e.g. us. Any case is accepted.","pattern":"^[A-Za-z]{2}$","type":"string"},"lang":{"description":"Two-letter language for web results, like de. It steers which pages come back; some results can still be in other languages.","pattern":"^[A-Za-z]{2}$","type":"string"},"location":{"type":"string"},"tbs":{"type":"string"},"type":{"const":"web","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"type":{"enum":["news","images"],"type":"string"}},"required":["type"],"type":"object"}]},"maxItems":5,"minItems":1,"type":"array"},"tbs":{"description":"Time filter: qdr:d, qdr:w, qdr:m or qdr:y, or cdr:1,cd_min:MM/DD/YYYY,cd_max:MM/DD/YYYY, plus sbd:1, like sbd:1,qdr:w. sbd:1 sorts newest first; results without a date come last. Web takes all of them; news takes qdr and sbd; images take none.","minLength":1,"type":"string"},"timeout":{"description":"Milliseconds to wait for the sources, from 1,000 to 120,000; more is read as 120,000. Default 60,000. A source that has not answered by then is left out with a warning. When none has, the call fails and costs nothing.","maximum":9007199254740991,"minimum":1000,"type":"integer"}},"required":["query"],"type":"object"}after
{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"definitions":{"__schema0":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"items":{"allOf":[{"$ref":"#/definitions/__schema0"}]},"type":"array"},{"additionalProperties":{"allOf":[{"$ref":"#/definitions/__schema0"}]},"propertyNames":{"type":"string"},"type":"object"}]},"__schema1":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"items":{"allOf":[{"$ref":"#/definitions/__schema1"}]},"type":"array"},{"additionalProperties":{"allOf":[{"$ref":"#/definitions/__schema1"}]},"propertyNames":{"type":"string"},"type":"object"}]},"__schema2":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"items":{"allOf":[{"$ref":"#/definitions/__schema2"}]},"type":"array"},{"additionalProperties":{"allOf":[{"$ref":"#/definitions/__schema2"}]},"propertyNames":{"type":"string"},"type":"object"}]}},"properties":{"categories":{"description":"pdf: web results that are PDF files. research: scholarly papers, in a research list, ranked by relevance then citations. companies: companies that match the query, in a companies list, best matches first. The query can name a place, industry, employee count, founding year and funding stage, like fintech startups in Berlin, 50-200 employees. people: people that match the query, in a people list, best matches first. The query can name a role, company, place or research topic, like CFO of Stripe, founders of fintech startups in Berlin, or researchers on CRISPR base editing. Each person has roles, affiliations and public profile links, never contact details. videos: YouTube videos for the query, in YouTube's order, in a videos list, with the channel, length, views and watch link; a video whose captions we hold also gets the passage that matches the query and where it starts.","items":{"anyOf":[{"enum":["research","pdf","companies","people","videos"],"type":"string"},{"additionalProperties":false,"properties":{"type":{"enum":["research","pdf","companies","people","videos"],"type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"mode":{"description":"normal (4 credits per 10 results) or thorough (10): thorough checks every result against each part of the query and takes longer.","enum":["normal","thorough"],"type":"string"},"type":{"enum":["companies","people"],"type":"string"}},"required":["type","mode"],"type":"object"}]},"type":"array"},"country":{"description":"Two-letter country to search from, like us. uk is read as gb. Image results are always US.","pattern":"^[A-Za-z]{2}$","type":"string"},"excludeDomains":{"items":{"type":"string"},"maxItems":10,"type":"array"},"highlights":{"default":false,"description":"Off by default. With true, a web result whose page we already hold gets the passages that best match the query as its description, in markdown, up to about 2,000 characters; others keep the engine's snippet.","type":"boolean"},"ignoreInvalidURLs":{"default":false,"description":"Leave out results whose address cannot be read as a page.","type":"boolean"},"includeDomains":{"items":{"type":"string"},"maxItems":10,"type":"array"},"lang":{"description":"Two-letter language for web results, like de. It steers which pages come back; some results can still be in other languages.","pattern":"^[A-Za-z]{2}$","type":"string"},"limit":{"description":"Most results to return for each source. Default 10, or 5 when scrapeOptions has formats, which reads every web and news result returned. News returns at most 50.","maximum":100,"minimum":1,"type":"integer"},"location":{"description":"Where to search from, like Germany or San Francisco,California,United States. The last part is the country and replaces country. A city before it narrows web results to that place.","minLength":1,"type":"string"},"maxAge":{"description":"Accept a stored answer up to this many milliseconds old, at most 30 days. Without it, 15 minutes for news and 1 hour for web and images. 0 always searches live.","maximum":9007199254740991,"minimum":0,"type":"integer"},"query":{"description":"What to search for, up to 500 characters. Search operators work in web results: quotes for an exact phrase, -word, site:, -site:, filetype:, inurl:, allinurl:, intitle: and allintitle:. In image results, imagesize:WIDTHxHEIGHT keeps images of exactly that size and larger:WIDTHxHEIGHT keeps images at least that large.","maxLength":500,"minLength":1,"type":"string"},"safe":{"description":"Hide explicit web, news and image results when true.","type":"boolean"},"scrapeOptions":{"additionalProperties":false,"description":"With formats, reads each web and news result, as many as limit asks for, within timeout, and fills each web result's description from it. Without formats no page is read and nothing more is charged. Takes the options of scrape: formats (markdown, html, rawHtml, links, images, summary, screenshot, json and the rest), onlyMainContent, includeTags, excludeTags, maxAge, minAge, waitFor, mobile, timeout (per page), headers, actions, location, parsers, profile and zeroDataRetention. Costs what scrape costs for each page read: 1 credit, plus 4 for each summary or json with a schema or prompt that returns something.","properties":{"actions":{"description":"Up to 50 steps to run on the page, in order, before reading it: { \"type\": \"wait\", \"milliseconds\": 500 } (up to 60 seconds), { \"type\": \"wait\", \"selector\": \".results\" }, { \"type\": \"click\", \"selector\": \"button.more\" }, { \"type\": \"write\", \"text\": \"tides\" }, { \"type\": \"press\", \"key\": \"Enter\" }, { \"type\": \"scroll\", \"direction\": \"down\" } (also up, left or right; amount is pixels, \"viewport\" or \"max\"; maxScrolls 1 to 50; selector scrolls an inner container; \"max\" keeps scrolling until the page stops growing, for feeds that load as you go), { \"type\": \"screenshot\", \"fullPage\": true } (links come back in actions.screenshots), { \"type\": \"scrape\" } (the page at that point, in actions.scrapes), { \"type\": \"executeJavascript\", \"script\": \"document.title\" } (results in actions.javascriptReturns), { \"type\": \"pdf\", \"format\": \"A4\" } (links in actions.pdfs) or { \"type\": \"perform\", \"action\": \"Click the Load more button\" } (a step in plain words, up to 5 browser steps on this page, never leaving the site; at most 5 per call). A read with actions costs 1 credit, the same as any page; the actions themselves add nothing. If an action fails, you still get the page as it stood, with a warning that names the action and says why.","items":{"anyOf":[{"additionalProperties":false,"properties":{"milliseconds":{"maximum":60000,"minimum":1,"type":"integer"},"type":{"const":"wait","type":"string"}},"required":["type","milliseconds"],"type":"object"},{"additionalProperties":false,"properties":{"selector":{"minLength":1,"type":"string"},"type":{"const":"wait","type":"string"}},"required":["type","selector"],"type":"object"},{"additionalProperties":false,"properties":{"all":{"const":false,"type":"boolean"},"selector":{"minLength":1,"type":"string"},"type":{"const":"click","type":"string"}},"required":["type","selector"],"type":"object"},{"additionalProperties":false,"properties":{"text":{"minLength":1,"type":"string"},"type":{"const":"write","type":"string"}},"required":["type","text"],"type":"object"},{"additionalProperties":false,"properties":{"key":{"maxLength":40,"minLength":1,"type":"string"},"type":{"const":"press","type":"string"}},"required":["type","key"],"type":"object"},{"additionalProperties":false,"properties":{"amount":{"anyOf":[{"maximum":100000,"minimum":1,"type":"integer"},{"enum":["viewport","max"],"type":"string"}]},"direction":{"default":"down","enum":["up","down","left","right"],"type":"string"},"maxScrolls":{"maximum":50,"minimum":1,"type":"integer"},"selector":{"minLength":1,"type":"string"},"type":{"const":"scroll","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"fullPage":{"type":"boolean"},"quality":{"maximum":100,"minimum":1,"type":"integer"},"type":{"const":"screenshot","type":"string"},"viewport":{"additionalProperties":false,"properties":{"height":{"maximum":2160,"minimum":200,"type":"integer"},"width":{"maximum":3840,"minimum":200,"type":"integer"}},"required":["width","height"],"type":"object"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"type":{"const":"scrape","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"script":{"maxLength":20000,"minLength":1,"type":"string"},"type":{"const":"executeJavascript","type":"string"}},"required":["type","script"],"type":"object"},{"additionalProperties":false,"properties":{"format":{"enum":["Letter","Legal","Tabloid","Ledger","A0","A1","A2","A3","A4","A5","A6"],"type":"string"},"landscape":{"type":"boolean"},"scale":{"maximum":2,"minimum":0.1,"type":"number"},"type":{"const":"pdf","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"action":{"maxLength":500,"minLength":1,"type":"string"},"type":{"const":"perform","type":"string"}},"required":["type","action"],"type":"object"}]},"maxItems":50,"minItems":1,"type":"array"},"blockAds":{"description":"Ads and trackers are not loaded when a page runs in a browser. Send false to load them.","type":"boolean"},"checkPromptInjection":{"description":"Send true to scan the page text for instructions aimed at an AI model before anything is built from it. A page that has them is refused with 403 promptInjectionDetected and costs nothing. The scan adds 4 credits when it runs; a page it cannot scan fully comes back with a warning and no charge.","type":"boolean"},"excludeTags":{"description":"Remove the parts of the page that match these CSS selectors, such as .comments.","items":{"minLength":1,"type":"string"},"minItems":1,"type":"array"},"fastMode":{"description":"Send true to read the page without opening a browser: the answer comes sooner, but a page that needs a browser, or that refuses a plain request, comes back as an error instead of being retried. Ignored when the call needs a browser (actions, screenshot, waitFor, mobile, profile, network, branding).","type":"boolean"},"formats":{"default":["markdown"],"description":"What to return: markdown (clean page text), summary (a short summary of the page), html (the cleaned page), rawHtml (the page as sent), audio and video (for a YouTube link: the audio track as an M4A file, or the video as an MP4 file, as a link that works for 1 hour), rawBase64 (the bytes the site sent, Base64 encoded, from a live read; metadata.contentType says what they are), links (every link on the page), images (every image address), screenshot (a link to a JPEG of the visible page, kept for 7 days), changeTracking (what changed in the markdown since your key last read this page with the same options, kept 30 days; add modes [\"git-diff\",\"json\"] with a schema or prompt to compare fields too), question (send { \"type\": \"question\", \"question\": \"...\" } to get answer, null when the page does not state one), product (title, brand, category, url, description and variants with price, sale, availability and images, or null) and menu (merchant, currency and sections of items with prices, or null) network (the JSON the page loaded while it rendered, up to 30 responses) and branding (the page's colors, fonts, typography, spacing, button and input styles, logo and brand images, read from how the page looks, with a field left out when the page does not show it). Send { \"type\": \"screenshot\", \"fullPage\": true } for the whole page. Send { \"type\": \"highlights\", \"query\": \"refund policy\" } for the passages that best match a query. Send { \"type\": \"json\", \"schema\": { \"type\": \"object\", \"properties\": { \"price\": { \"type\": \"number\" } } } } or { \"type\": \"json\", \"prompt\": \"the price and the stock\" } for fields filled from the page, each checked against it. Send { \"type\": \"json\", \"parser\": \"amazon-product\" } to get a site's own data as json instead of reading the page; GET /v1/parsers lists the parsers. Send { \"type\": \"json\", \"rules\": { \"title\": \"h1\", \"links\": { \"selector\": \"a\", \"type\": \"list\", \"output\": \"@href\" } } } to read the page with CSS rules and no model, at the page's own price. Send { \"type\": \"attributes\", \"selectors\": [{ \"selector\": \"a\", \"attribute\": \"href\" }] } for attribute values, returned in attributes. Without a parser or rules, json needs a schema or a prompt and is filled from the page. json with a schema or a prompt, summary, highlights, question, product, menu and changeTracking in json mode cost 4 credits more each when they return something. json with rules or a parser, and attributes, cost nothing more. A screenshot, network or branding read costs 1 credit, the same as any page. A PDF comes back as markdown only, and costs 1 credit more for each page of text that comes back. A CSV or an Excel .xlsx file comes back as markdown tables.","items":{"anyOf":[{"enum":["markdown","summary","html","rawHtml","rawBase64","links","images","network","branding","audio","video","screenshot","changeTracking","product","menu"],"type":"string"},{"additionalProperties":false,"properties":{"type":{"enum":["markdown","summary","html","rawHtml","rawBase64","links","images","network","branding","audio","video"],"type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"modes":{"description":"git-diff returns a unified diff of the markdown. json compares the fields in schema or prompt between this read and the last one. Without modes you get git-diff.","items":{"enum":["git-diff","json"],"type":"string"},"maxItems":2,"type":"array"},"prompt":{"description":"With json mode: what to compare, in plain words, such as the price and stock.","maxLength":10000,"minLength":1,"type":"string"},"schema":{"additionalProperties":{"$ref":"#/definitions/__schema0"},"description":"The fields to fill, as a JSON Schema (draft-07 or 2020-12) object with properties. Pydantic's model_json_schema() and zod's toJSONSchema() output work as they are. enum, const, anyOf, oneOf, nullable types, $ref with $defs, required, descriptions and any key names are read. Up to 100 top-level fields and 32 KB. A field the page does not state comes back null.","propertyNames":{"type":"string"},"type":"object"},"tag":{"type":"null"},"type":{"const":"changeTracking","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"question":{"description":"A question to answer from the page, such as what the refund window is.","maxLength":10000,"minLength":1,"type":"string"},"type":{"const":"question","type":"string"}},"required":["type","question"],"type":"object"},{"additionalProperties":false,"properties":{"type":{"const":"product","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"type":{"const":"menu","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"fullPage":{"default":false,"description":"Capture the whole page from top to bottom instead of the visible part.","type":"boolean"},"quality":{"description":"JPEG quality from 1 to 100. The default is 70.","maximum":100,"minimum":1,"type":"integer"},"type":{"const":"screenshot","type":"string"},"viewport":{"additionalProperties":false,"description":"The window size in pixels, such as { width: 390, height: 844 }.","properties":{"height":{"maximum":2160,"minimum":200,"type":"integer"},"width":{"maximum":3840,"minimum":200,"type":"integer"}},"required":["width","height"],"type":"object"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"count":{"default":5,"description":"How many passages to return, best match first.","maximum":20,"minimum":1,"type":"integer"},"query":{"description":"What you are looking for on the page, such as refund policy.","maxLength":10000,"minLength":1,"type":"string"},"type":{"const":"highlights","type":"string"}},"required":["type","query"],"type":"object"},{"additionalProperties":false,"properties":{"checkPromptInjection":{"description":"Deprecated: send checkPromptInjection at the top level of the call.","type":"boolean"},"options":{"additionalProperties":{"$ref":"#/definitions/__schema1"},"description":"Only with parser: extra inputs for it, such as { \"page\": 2 } for the next page of results or { \"minRating\": 4.5 } for a filter. GET /v1/parsers lists what each parser accepts.","propertyNames":{"type":"string"},"type":"object"},"parser":{"description":"Read the page with a named parser, which gives the site's own data as json. The url must be the kind of page the parser reads. Parsers are the only way to read some sites. GET /v1/parsers lists them.","type":"string"},"prompt":{"description":"What to pull from the page in plain words, such as the version and the release date.","maxLength":10000,"minLength":1,"type":"string"},"rules":{"additionalProperties":{"$ref":"#/definitions/__schema2"},"description":"Read the page with CSS rules instead of a model, no extra fee. Each field is a selector such as \"h1\" (the first match's text), \"a@href\" (an attribute) or { \"selector\": \"li\", \"type\": \"list\", \"output\": \"text\" | \"html\" | \"@attribute\" | { nested fields } }. A missing item is null and an unmatched list is []. Relative links become absolute. Up to 100 fields, 5 levels deep. Not with schema, prompt or parser.","propertyNames":{"type":"string"},"type":"object"},"schema":{"additionalProperties":{"$ref":"#/definitions/__schema0"},"description":"The fields to fill, as a JSON Schema (draft-07 or 2020-12) object with properties. Pydantic's model_json_schema() and zod's toJSONSchema() output work as they are. enum, const, anyOf, oneOf, nullable types, $ref with $defs, required, descriptions and any key names are read. Up to 100 top-level fields and 32 KB. A field the page does not state comes back null.","propertyNames":{"type":"string"},"type":"object"},"type":{"const":"json","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"selectors":{"description":"The elements and attributes to read, such as { selector: 'a.buy', attribute: 'href' }.","items":{"additionalProperties":false,"properties":{"attribute":{"maxLength":100,"minLength":1,"type":"string"},"selector":{"minLength":1,"type":"string"}},"required":["selector","attribute"],"type":"object"},"maxItems":50,"minItems":1,"type":"array"},"type":{"const":"attributes","type":"string"}},"required":["type","selectors"],"type":"object"}]},"maxItems":20,"minItems":1,"type":"array"},"headers":{"additionalProperties":{"maxLength":2000,"pattern":"^[\\t\\x20-\\x7e]*$","type":"string"},"description":"Extra request headers to send to the site, such as { \"x-plan\": \"pro\" }. A read with headers is never answered from or saved to a stored copy.","propertyNames":{"pattern":"^[A-Za-z0-9-]{1,64}$","type":"string"},"type":"object"},"includeTags":{"description":"Keep only the parts of the page that match these CSS selectors, such as article or .price. When set, onlyMainContent is not applied.","items":{"minLength":1,"type":"string"},"minItems":1,"type":"array"},"location":{"additionalProperties":false,"description":"Where to read the page from. The default is the United States.","properties":{"country":{"description":"Two-letter country code to read the page from, such as DE or JP.","type":"string"},"languages":{"description":"Languages to ask the site for, best first, such as [\"de\", \"en\"]. Sent as Accept-Language. A read with languages is never answered from or saved to a stored copy.","items":{"pattern":"^[A-Za-z]{2,3}(?:-[A-Za-z0-9]{2,8})*$","type":"string"},"maxItems":5,"minItems":1,"type":"array"}},"type":"object"},"lockdown":{"description":"Send true to answer only from a stored copy of the page and never read it live, whatever its age. A page with no stored copy is notFound. The same as minAge 0.","type":"boolean"},"maxAge":{"description":"Accept a stored answer up to this many milliseconds old, at most 30 days. Without it, 2 days, or less for a site whose pages change often, and a copy up to twice that age (at most 7 days) comes back at once as stale while a fresh read runs. 0 always reads the page live. metadata.cacheState says which one you got.","maximum":9007199254740991,"minimum":0,"type":"integer"},"minAge":{"description":"Answer only from a stored copy that is at least this many milliseconds old, and never read the page live. 0 accepts any stored copy. A page with no such copy is notFound.","maximum":9007199254740991,"minimum":0,"type":"integer"},"mobile":{"description":"Read the page as a phone would: a phone-sized screen and the mobile version of the site. The page loads in a browser.","type":"boolean"},"onlyCleanContent":{"description":"Send true to have a model remove what onlyMainContent leaves behind in the markdown: cookie banners, ads, share widgets, breadcrumbs, sign-up prompts, comment prompts and related-article lists. It only removes whole paragraphs and lists; it never rewrites or adds text, and code blocks are always kept. Skipped with a warning when the page is too long to clean or the model does not answer. Not with zeroDataRetention. Summary, answers and highlights are made from the cleaned markdown.","type":"boolean"},"onlyMainContent":{"default":true,"description":"Keep only the page's main content, without menus, headers, footers and ads.","type":"boolean"},"parsers":{"description":"Only the pdf parser exists. Send \"pdf\" or { \"type\": \"pdf\", mode, maxPages, pages, blocks, pageMarkers } with the same meaning as in parse. Without mode a PDF is read as auto: from its text layer, and from the picture of any page that has no text. fast reads the text layer only, and ocr reads the picture of every page, up to 20 pages. Each page of text that comes back costs 1 credit. Pictures are read only with an API key.","items":{"anyOf":[{"const":"pdf","type":"string"},{"additionalProperties":false,"properties":{"blocks":{"description":"Send true to also get the page's layout in blocks: each title, section header or run of text, with its page, reading order, position on the page (bbox as left, top, right, bottom from 0 to 1) and where its text sits in that page's markdown (span, as in pages). Tables, figures and formulas are not told apart. A page read from its picture is one block. No extra charge.","type":"boolean"},"maxPages":{"description":"Read at most this many pages, up to 500, which is also the default.","maximum":500,"minimum":1,"type":"integer"},"mode":{"description":"fast reads the text layer only. auto (the default) reads the text layer and reads the picture of any page that has none. ocr reads the picture of every page.","enum":["fast","auto","ocr"],"type":"string"},"pageMarkers":{"description":"Send true to mark page breaks in the markdown: pages are joined with \"---\" and a line, where N is the page that follows. No extra charge.","type":"boolean"},"pages":{"description":"Send true to also get each page's markdown in pages, as { pageNumber, markdown }. No extra charge.","type":"boolean"},"type":{"const":"pdf","type":"string"}},"required":["type"],"type":"object"}]},"minItems":1,"type":"array"},"profile":{"additionalProperties":false,"description":"Read the page with the cookies and local storage that earlier calls saved under this name, kept for your account for 30 days after the last use. A call with a profile always loads the page in a browser, costs 1 credit, the same as any page, and is never answered from a stored copy. Only one call at a time can save to a profile.","properties":{"name":{"description":"A name you choose, such as shop-login. Calls with the same name share state.","maxLength":128,"minLength":1,"type":"string"},"saveChanges":{"default":true,"description":"Keep the cookies and local storage this read leaves behind for the next call with this name. Send false to read with the profile without changing it.","type":"boolean"}},"required":["name"],"type":"object"},"proxy":{"description":"auto: basic first, enhanced once if the site refuses. basic: one plain attempt. enhanced: the stronger read from the start. stealth is the same as enhanced. Same price.","enum":["auto","basic","enhanced","stealth"],"type":"string"},"redactPII":{"anyOf":[{"type":"boolean"},{"additionalProperties":false,"description":"Options for redactPII.","properties":{"entities":{"default":["PERSON","EMAIL","PHONE","LOCATION","FINANCIAL","SECRET"],"description":"What to hide: PERSON, EMAIL, PHONE, LOCATION, FINANCIAL, SECRET. All by default.","items":{"enum":["PERSON","EMAIL","PHONE","LOCATION","FINANCIAL","SECRET"],"type":"string"},"minItems":1,"type":"array"},"mode":{"default":"accurate","description":"accurate finds names and places with the model and the rest by pattern. aggressive adds guesses that catch more and may hide a little too much. fast uses patterns only, so it finds no ordinary names or places.","enum":["accurate","aggressive","fast"],"type":"string"},"replaceStyle":{"default":"tag","description":"tag writes <EMAIL>, mask writes * for each character, remove deletes it.","enum":["tag","mask","remove"],"type":"string"}},"type":"object"}],"description":"Send true, or an object, to hide personal data in the markdown and in everything made from it (summary, answers, highlights, json). Links, html and rawHtml are not changed. A page the model cannot scan is refused rather than returned unredacted."},"removeBase64Images":{"description":"Images inside the page that carry their data in the address (data:image) are dropped by default. Send false to keep them in markdown and html.","type":"boolean"},"skipTlsVerification":{"description":"Send true to read a page whose certificate is expired, self-signed or for another name. The read is not private against someone between us and the site.","type":"boolean"},"storeInCache":{"default":true,"description":"Send false to neither read nor keep a stored copy of this page.","type":"boolean"},"timeout":{"default":30000,"description":"How long to keep trying, in milliseconds, from 1 second to 5 minutes; 30 seconds by default. A page that needs a browser needs at least 5 seconds, and pages behind a bot check can need 10 to 30 seconds the first time. A read that runs out of time is an error and costs nothing.","maximum":300000,"minimum":1000,"type":"integer"},"waitFor":{"description":"Extra milliseconds to wait before reading, up to 60000, for pages that load their content late. To wait for an element, add a wait action with a selector. A read that waits costs 1 credit, the same as any page.","maximum":60000,"minimum":0,"type":"integer"},"zeroDataRetention":{"default":false,"description":"Send true to keep nothing from this call: no stored copy is read or made, and nothing from it is logged. Costs 1 credit more per page. Not with a screenshot.","type":"boolean"}},"type":"object"},"sources":{"description":"What to search: web, news, images. Each is a string or {type}. Default web, or none when categories asks for research, companies, people or videos.","items":{"anyOf":[{"enum":["web","news","images"],"type":"string"},{"additionalProperties":false,"properties":{"country":{"description":"ISO 3166-1 alpha-2 country code, e.g. us. Any case is accepted.","pattern":"^[A-Za-z]{2}$","type":"string"},"lang":{"description":"Two-letter language for web results, like de. It steers which pages come back; some results can still be in other languages.","pattern":"^[A-Za-z]{2}$","type":"string"},"location":{"type":"string"},"tbs":{"type":"string"},"type":{"const":"web","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"type":{"enum":["news","images"],"type":"string"}},"required":["type"],"type":"object"}]},"maxItems":5,"minItems":1,"type":"array"},"tbs":{"description":"Time filter: qdr:d, qdr:w, qdr:m or qdr:y, or cdr:1,cd_min:MM/DD/YYYY,cd_max:MM/DD/YYYY, plus sbd:1, like sbd:1,qdr:w. sbd:1 sorts newest first; results without a date come last. Web takes all of them; news takes qdr and sbd; images take none.","minLength":1,"type":"string"},"timeout":{"description":"Milliseconds to wait for the sources, from 1,000 to 120,000; more is read as 120,000. Default 60,000. A source that has not answered by then is left out with a warning. When none has, the call fails and costs nothing.","maximum":9007199254740991,"minimum":1000,"type":"integer"}},"required":["query"],"type":"object"}after
{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"definitions":{"__schema0":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"items":{"allOf":[{"$ref":"#/definitions/__schema0"}]},"type":"array"},{"additionalProperties":{"allOf":[{"$ref":"#/definitions/__schema0"}]},"propertyNames":{"type":"string"},"type":"object"}]},"__schema1":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"items":{"allOf":[{"$ref":"#/definitions/__schema1"}]},"type":"array"},{"additionalProperties":{"allOf":[{"$ref":"#/definitions/__schema1"}]},"propertyNames":{"type":"string"},"type":"object"}]},"__schema2":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"items":{"allOf":[{"$ref":"#/definitions/__schema2"}]},"type":"array"},{"additionalProperties":{"allOf":[{"$ref":"#/definitions/__schema2"}]},"propertyNames":{"type":"string"},"type":"object"}]}},"properties":{"categories":{"description":"pdf: web results that are PDF files. research: scholarly papers, in a research list, ranked by relevance then citations. companies: companies that match the query, in a companies list, best matches first. The query can name a place, industry, employee count, founding year and funding stage, like fintech startups in Berlin, 50-200 employees. people: people that match the query, in a people list, best matches first. The query can name a role, company, place or research topic, like CFO of Stripe, founders of fintech startups in Berlin, or researchers on CRISPR base editing. Each person has roles, affiliations and public profile links, never contact details. developer: passages from GitHub READMEs, issues, merged pull requests, releases, developer docs and API operations, in a developer list; send it as an object to filter by repos, types, language and minStars. gov: statutes, regulations, register notices and bills from government sources, in the web group with category gov and the kind, jurisdiction and citation of each. videos: passages from what is said in YouTube videos shared under a Creative Commons license, in a videos list, one result per video, with the channel, the license and the watch link; the link carries &t= only when the passage's start is exact. The index is a June 2024 snapshot of English videos, so a link may be dead.","items":{"anyOf":[{"enum":["developer","gov","research","pdf","companies","people","videos"],"type":"string"},{"additionalProperties":false,"properties":{"type":{"enum":["developer","gov","research","pdf","companies","people","videos"],"type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"language":{"description":"Only repositories whose main language is this, like TypeScript.","minLength":1,"type":"string"},"minStars":{"description":"Only repositories with at least this many GitHub stars.","maximum":9007199254740991,"minimum":0,"type":"integer"},"repos":{"default":[],"description":"Only results from these GitHub repositories, as owner/name.","items":{"pattern":"^[\\w.-]+\\/[\\w.-]+$","type":"string"},"maxItems":5,"type":"array"},"type":{"const":"developer","type":"string"},"types":{"default":[],"description":"Only these result types: readme, issue, pull_request, release, operation, doc.","items":{"enum":["readme","issue","pull_request","release","operation","doc"],"type":"string"},"type":"array"}},"required":["type"],"type":"object"}]},"type":"array"},"country":{"description":"Two-letter country to search from, like us. uk is read as gb. Image results are always US.","pattern":"^[A-Za-z]{2}$","type":"string"},"excludeDomains":{"items":{"type":"string"},"maxItems":10,"type":"array"},"highlights":{"default":false,"description":"Off by default. With true, a web result whose page we already hold gets the passages that best match the query as its description, in markdown, up to about 2,000 characters; others keep the engine's snippet.","type":"boolean"},"ignoreInvalidURLs":{"default":false,"description":"Leave out results whose address cannot be read as a page.","type":"boolean"},"includeDomains":{"items":{"type":"string"},"maxItems":10,"type":"array"},"lang":{"description":"Two-letter language for web results, like de. It steers which pages come back; some results can still be in other languages.","pattern":"^[A-Za-z]{2}$","type":"string"},"limit":{"description":"Most results to return for each source. Default 10, or 5 when scrapeOptions has formats, which reads every web and news result returned. News returns at most 50.","maximum":100,"minimum":1,"type":"integer"},"location":{"description":"Where to search from, like Germany or San Francisco,California,United States. The last part is the country and replaces country. A city before it narrows web results to that place.","minLength":1,"type":"string"},"maxAge":{"description":"Accept a stored answer up to this many milliseconds old, at most 30 days. Without it, 15 minutes for news and 1 hour for web and images. 0 always searches live.","maximum":9007199254740991,"minimum":0,"type":"integer"},"query":{"description":"What to search for, up to 500 characters. Search operators work in web results: quotes for an exact phrase, -word, site:, -site:, filetype:, inurl:, allinurl:, intitle: and allintitle:. In image results, imagesize:WIDTHxHEIGHT keeps images of exactly that size and larger:WIDTHxHEIGHT keeps images at least that large.","maxLength":500,"minLength":1,"type":"string"},"safe":{"description":"Hide explicit web, news and image results when true.","type":"boolean"},"scrapeOptions":{"additionalProperties":false,"description":"With formats, reads each web and news result, as many as limit asks for, within timeout, and fills each web result's description from it. Without formats no page is read and nothing more is charged. Takes the options of scrape: formats (markdown, html, rawHtml, links, images, summary, screenshot, json and the rest), onlyMainContent, includeTags, excludeTags, maxAge, minAge, waitFor, mobile, timeout (per page), headers, actions, location, parsers, profile and zeroDataRetention. Costs what scrape costs for each page read: 1 credit, plus 4 for each summary or json with a schema or prompt that returns something.","properties":{"actions":{"description":"Up to 50 steps to run on the page, in order, before reading it: { \"type\": \"wait\", \"milliseconds\": 500 } (up to 60 seconds), { \"type\": \"wait\", \"selector\": \".results\" }, { \"type\": \"click\", \"selector\": \"button.more\" }, { \"type\": \"write\", \"text\": \"tides\" }, { \"type\": \"press\", \"key\": \"Enter\" }, { \"type\": \"scroll\", \"direction\": \"down\" } (also up, left or right; amount is pixels, \"viewport\" or \"max\"; maxScrolls 1 to 50; selector scrolls an inner container; \"max\" keeps scrolling until the page stops growing, for feeds that load as you go), { \"type\": \"screenshot\", \"fullPage\": true } (links come back in actions.screenshots), { \"type\": \"scrape\" } (the page at that point, in actions.scrapes), { \"type\": \"executeJavascript\", \"script\": \"document.title\" } (results in actions.javascriptReturns), { \"type\": \"pdf\", \"format\": \"A4\" } (links in actions.pdfs) or { \"type\": \"perform\", \"action\": \"Click the Load more button\" } (a step in plain words, up to 5 browser steps on this page, never leaving the site; at most 5 per call). A read with actions costs 1 credit, the same as any page; the actions themselves add nothing. If an action fails, you still get the page as it stood, with a warning that names the action and says why.","items":{"anyOf":[{"additionalProperties":false,"properties":{"milliseconds":{"maximum":60000,"minimum":1,"type":"integer"},"type":{"const":"wait","type":"string"}},"required":["type","milliseconds"],"type":"object"},{"additionalProperties":false,"properties":{"selector":{"minLength":1,"type":"string"},"type":{"const":"wait","type":"string"}},"required":["type","selector"],"type":"object"},{"additionalProperties":false,"properties":{"all":{"const":false,"type":"boolean"},"selector":{"minLength":1,"type":"string"},"type":{"const":"click","type":"string"}},"required":["type","selector"],"type":"object"},{"additionalProperties":false,"properties":{"text":{"minLength":1,"type":"string"},"type":{"const":"write","type":"string"}},"required":["type","text"],"type":"object"},{"additionalProperties":false,"properties":{"key":{"maxLength":40,"minLength":1,"type":"string"},"type":{"const":"press","type":"string"}},"required":["type","key"],"type":"object"},{"additionalProperties":false,"properties":{"amount":{"anyOf":[{"maximum":100000,"minimum":1,"type":"integer"},{"enum":["viewport","max"],"type":"string"}]},"direction":{"default":"down","enum":["up","down","left","right"],"type":"string"},"maxScrolls":{"maximum":50,"minimum":1,"type":"integer"},"selector":{"minLength":1,"type":"string"},"type":{"const":"scroll","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"fullPage":{"type":"boolean"},"quality":{"maximum":100,"minimum":1,"type":"integer"},"type":{"const":"screenshot","type":"string"},"viewport":{"additionalProperties":false,"properties":{"height":{"maximum":2160,"minimum":200,"type":"integer"},"width":{"maximum":3840,"minimum":200,"type":"integer"}},"required":["width","height"],"type":"object"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"type":{"const":"scrape","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"script":{"maxLength":20000,"minLength":1,"type":"string"},"type":{"const":"executeJavascript","type":"string"}},"required":["type","script"],"type":"object"},{"additionalProperties":false,"properties":{"format":{"enum":["Letter","Legal","Tabloid","Ledger","A0","A1","A2","A3","A4","A5","A6"],"type":"string"},"landscape":{"type":"boolean"},"scale":{"maximum":2,"minimum":0.1,"type":"number"},"type":{"const":"pdf","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"action":{"maxLength":500,"minLength":1,"type":"string"},"type":{"const":"perform","type":"string"}},"required":["type","action"],"type":"object"}]},"maxItems":50,"minItems":1,"type":"array"},"blockAds":{"description":"Ads and trackers are not loaded when a page runs in a browser. Send false to load them.","type":"boolean"},"checkPromptInjection":{"description":"Send true to scan the page text for instructions aimed at an AI model before anything is built from it. A page that has them is refused with 403 promptInjectionDetected and costs nothing. The scan adds 4 credits when it runs; a page it cannot scan fully comes back with a warning and no charge.","type":"boolean"},"excludeTags":{"description":"Remove the parts of the page that match these CSS selectors, such as .comments.","items":{"minLength":1,"type":"string"},"minItems":1,"type":"array"},"fastMode":{"description":"Send true to read the page without opening a browser: the answer comes sooner, but a page that needs a browser, or that refuses a plain request, comes back as an error instead of being retried. Ignored when the call needs a browser (actions, screenshot, waitFor, mobile, profile, network, branding).","type":"boolean"},"formats":{"default":["markdown"],"description":"What to return: markdown (clean page text), summary (a short summary of the page), html (the cleaned page), rawHtml (the page as sent), audio and video (for a YouTube link: the audio track as an M4A file, or the video as an MP4 file, as a link that works for 1 hour), rawBase64 (the bytes the site sent, Base64 encoded, from a live read; metadata.contentType says what they are), links (every link on the page), images (every image address), screenshot (a link to a JPEG of the visible page, kept for 7 days), changeTracking (what changed in the markdown since your key last read this page with the same options, kept 30 days; add modes [\"git-diff\",\"json\"] with a schema or prompt to compare fields too), question (send { \"type\": \"question\", \"question\": \"...\" } to get answer, null when the page does not state one), product (title, brand, category, url, description and variants with price, sale, availability and images, or null) and menu (merchant, currency and sections of items with prices, or null) network (the JSON the page loaded while it rendered, up to 30 responses) and branding (the page's colors, fonts, typography, spacing, button and input styles, logo and brand images, read from how the page looks, with a field left out when the page does not show it). Send { \"type\": \"screenshot\", \"fullPage\": true } for the whole page. Send { \"type\": \"highlights\", \"query\": \"refund policy\" } for the passages that best match a query. Send { \"type\": \"json\", \"schema\": { \"type\": \"object\", \"properties\": { \"price\": { \"type\": \"number\" } } } } or { \"type\": \"json\", \"prompt\": \"the price and the stock\" } for fields filled from the page, each checked against it. Send { \"type\": \"json\", \"parser\": \"amazon-product\" } to get a site's own data as json instead of reading the page; GET /v1/parsers lists the parsers. Send { \"type\": \"json\", \"rules\": { \"title\": \"h1\", \"links\": { \"selector\": \"a\", \"type\": \"list\", \"output\": \"@href\" } } } to read the page with CSS rules and no model, at the page's own price. Send { \"type\": \"attributes\", \"selectors\": [{ \"selector\": \"a\", \"attribute\": \"href\" }] } for attribute values, returned in attributes. Without a parser or rules, json needs a schema or a prompt and is filled from the page. json with a schema or a prompt, summary, highlights, question, product, menu and changeTracking in json mode cost 4 credits more each when they return something. json with rules or a parser, and attributes, cost nothing more. A screenshot, network or branding read costs 1 credit, the same as any page. A PDF comes back as markdown only, and costs 1 credit more for each page of text that comes back. A CSV or an Excel .xlsx file comes back as markdown tables.","items":{"anyOf":[{"enum":["markdown","summary","html","rawHtml","rawBase64","links","images","network","branding","audio","video","screenshot","changeTracking","product","menu"],"type":"string"},{"additionalProperties":false,"properties":{"type":{"enum":["markdown","summary","html","rawHtml","rawBase64","links","images","network","branding","audio","video"],"type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"modes":{"description":"git-diff returns a unified diff of the markdown. json compares the fields in schema or prompt between this read and the last one. Without modes you get git-diff.","items":{"enum":["git-diff","json"],"type":"string"},"maxItems":2,"type":"array"},"prompt":{"description":"With json mode: what to compare, in plain words, such as the price and stock.","maxLength":10000,"minLength":1,"type":"string"},"schema":{"additionalProperties":{"$ref":"#/definitions/__schema0"},"description":"The fields to fill, as a JSON Schema (draft-07 or 2020-12) object with properties. Pydantic's model_json_schema() and zod's toJSONSchema() output work as they are. enum, const, anyOf, oneOf, nullable types, $ref with $defs, required, descriptions and any key names are read. Up to 100 top-level fields and 32 KB. A field the page does not state comes back null.","propertyNames":{"type":"string"},"type":"object"},"tag":{"type":"null"},"type":{"const":"changeTracking","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"question":{"description":"A question to answer from the page, such as what the refund window is.","maxLength":10000,"minLength":1,"type":"string"},"type":{"const":"question","type":"string"}},"required":["type","question"],"type":"object"},{"additionalProperties":false,"properties":{"type":{"const":"product","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"type":{"const":"menu","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"fullPage":{"default":false,"description":"Capture the whole page from top to bottom instead of the visible part.","type":"boolean"},"quality":{"description":"JPEG quality from 1 to 100. The default is 70.","maximum":100,"minimum":1,"type":"integer"},"type":{"const":"screenshot","type":"string"},"viewport":{"additionalProperties":false,"description":"The window size in pixels, such as { width: 390, height: 844 }.","properties":{"height":{"maximum":2160,"minimum":200,"type":"integer"},"width":{"maximum":3840,"minimum":200,"type":"integer"}},"required":["width","height"],"type":"object"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"count":{"default":5,"description":"How many passages to return, best match first.","maximum":20,"minimum":1,"type":"integer"},"query":{"description":"What you are looking for on the page, such as refund policy.","maxLength":10000,"minLength":1,"type":"string"},"type":{"const":"highlights","type":"string"}},"required":["type","query"],"type":"object"},{"additionalProperties":false,"properties":{"checkPromptInjection":{"description":"Deprecated: send checkPromptInjection at the top level of the call.","type":"boolean"},"options":{"additionalProperties":{"$ref":"#/definitions/__schema1"},"description":"Only with parser: extra inputs for it, such as { \"page\": 2 } for the next page of results or { \"minRating\": 4.5 } for a filter. GET /v1/parsers lists what each parser accepts.","propertyNames":{"type":"string"},"type":"object"},"parser":{"description":"Read the page with a named parser, which gives the site's own data as json. The url must be the kind of page the parser reads. Parsers are the only way to read some sites. GET /v1/parsers lists them.","type":"string"},"prompt":{"description":"What to pull from the page in plain words, such as the version and the release date.","maxLength":10000,"minLength":1,"type":"string"},"rules":{"additionalProperties":{"$ref":"#/definitions/__schema2"},"description":"Read the page with CSS rules instead of a model, no extra fee. Each field is a selector such as \"h1\" (the first match's text), \"a@href\" (an attribute) or { \"selector\": \"li\", \"type\": \"list\", \"output\": \"text\" | \"html\" | \"@attribute\" | { nested fields } }. A missing item is null and an unmatched list is []. Relative links become absolute. Up to 100 fields, 5 levels deep. Not with schema, prompt or parser.","propertyNames":{"type":"string"},"type":"object"},"schema":{"additionalProperties":{"$ref":"#/definitions/__schema0"},"description":"The fields to fill, as a JSON Schema (draft-07 or 2020-12) object with properties. Pydantic's model_json_schema() and zod's toJSONSchema() output work as they are. enum, const, anyOf, oneOf, nullable types, $ref with $defs, required, descriptions and any key names are read. Up to 100 top-level fields and 32 KB. A field the page does not state comes back null.","propertyNames":{"type":"string"},"type":"object"},"type":{"const":"json","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"selectors":{"description":"The elements and attributes to read, such as { selector: 'a.buy', attribute: 'href' }.","items":{"additionalProperties":false,"properties":{"attribute":{"maxLength":100,"minLength":1,"type":"string"},"selector":{"minLength":1,"type":"string"}},"required":["selector","attribute"],"type":"object"},"maxItems":50,"minItems":1,"type":"array"},"type":{"const":"attributes","type":"string"}},"required":["type","selectors"],"type":"object"}]},"maxItems":20,"minItems":1,"type":"array"},"headers":{"additionalProperties":{"maxLength":2000,"pattern":"^[\\t\\x20-\\x7e]*$","type":"string"},"description":"Extra request headers to send to the site, such as { \"x-plan\": \"pro\" }. A read with headers is never answered from or saved to a stored copy.","propertyNames":{"pattern":"^[A-Za-z0-9-]{1,64}$","type":"string"},"type":"object"},"includeTags":{"description":"Keep only the parts of the page that match these CSS selectors, such as article or .price. When set, onlyMainContent is not applied.","items":{"minLength":1,"type":"string"},"minItems":1,"type":"array"},"location":{"additionalProperties":false,"description":"Where to read the page from. The default is the United States.","properties":{"country":{"description":"Two-letter country code to read the page from, such as DE or JP.","type":"string"},"languages":{"description":"Languages to ask the site for, best first, such as [\"de\", \"en\"]. Sent as Accept-Language. A read with languages is never answered from or saved to a stored copy.","items":{"pattern":"^[A-Za-z]{2,3}(?:-[A-Za-z0-9]{2,8})*$","type":"string"},"maxItems":5,"minItems":1,"type":"array"}},"type":"object"},"lockdown":{"description":"Send true to answer only from a stored copy of the page and never read it live, whatever its age. A page with no stored copy is notFound. The same as minAge 0.","type":"boolean"},"maxAge":{"description":"Accept a stored answer up to this many milliseconds old, at most 30 days. Without it, 2 days, or less for a site whose pages change often, and a copy up to twice that age (at most 7 days) comes back at once as stale while a fresh read runs. 0 always reads the page live. metadata.cacheState says which one you got.","maximum":9007199254740991,"minimum":0,"type":"integer"},"minAge":{"description":"Answer only from a stored copy that is at least this many milliseconds old, and never read the page live. 0 accepts any stored copy. A page with no such copy is notFound.","maximum":9007199254740991,"minimum":0,"type":"integer"},"mobile":{"description":"Read the page as a phone would: a phone-sized screen and the mobile version of the site. The page loads in a browser.","type":"boolean"},"onlyCleanContent":{"description":"Send true to have a model remove what onlyMainContent leaves behind in the markdown: cookie banners, ads, share widgets, breadcrumbs, sign-up prompts, comment prompts and related-article lists. It only removes whole paragraphs and lists; it never rewrites or adds text, and code blocks are always kept. Skipped with a warning when the page is too long to clean or the model does not answer. Not with zeroDataRetention. Summary, answers and highlights are made from the cleaned markdown.","type":"boolean"},"onlyMainContent":{"default":true,"description":"Keep only the page's main content, without menus, headers, footers and ads.","type":"boolean"},"parsers":{"description":"Only the pdf parser exists. Send \"pdf\" or { \"type\": \"pdf\", mode, maxPages, pages, blocks, pageMarkers } with the same meaning as in parse. Without mode a PDF is read as auto: from its text layer, and from the picture of any page that has no text. fast reads the text layer only, and ocr reads the picture of every page, up to 20 pages. Each page of text that comes back costs 1 credit. Pictures are read only with an API key.","items":{"anyOf":[{"const":"pdf","type":"string"},{"additionalProperties":false,"properties":{"blocks":{"description":"Send true to also get the page's layout in blocks: each title, section header or run of text, with its page, reading order, position on the page (bbox as left, top, right, bottom from 0 to 1) and where its text sits in that page's markdown (span, as in pages). Tables, figures and formulas are not told apart. A page read from its picture is one block. No extra charge.","type":"boolean"},"maxPages":{"description":"Read at most this many pages, up to 500, which is also the default.","maximum":500,"minimum":1,"type":"integer"},"mode":{"description":"fast reads the text layer only. auto (the default) reads the text layer and reads the picture of any page that has none. ocr reads the picture of every page.","enum":["fast","auto","ocr"],"type":"string"},"pageMarkers":{"description":"Send true to mark page breaks in the markdown: pages are joined with \"---\" and a line, where N is the page that follows. No extra charge.","type":"boolean"},"pages":{"description":"Send true to also get each page's markdown in pages, as { pageNumber, markdown }. No extra charge.","type":"boolean"},"type":{"const":"pdf","type":"string"}},"required":["type"],"type":"object"}]},"minItems":1,"type":"array"},"profile":{"additionalProperties":false,"description":"Read the page with the cookies and local storage that earlier calls saved under this name, kept for your account for 30 days after the last use. A call with a profile always loads the page in a browser, costs 1 credit, the same as any page, and is never answered from a stored copy. Only one call at a time can save to a profile.","properties":{"name":{"description":"A name you choose, such as shop-login. Calls with the same name share state.","maxLength":128,"minLength":1,"type":"string"},"saveChanges":{"default":true,"description":"Keep the cookies and local storage this read leaves behind for the next call with this name. Send false to read with the profile without changing it.","type":"boolean"}},"required":["name"],"type":"object"},"proxy":{"description":"auto: basic first, enhanced once if the site refuses. basic: one plain attempt. enhanced: the stronger read from the start. stealth is the same as enhanced. Same price.","enum":["auto","basic","enhanced","stealth"],"type":"string"},"redactPII":{"anyOf":[{"type":"boolean"},{"additionalProperties":false,"description":"Options for redactPII.","properties":{"entities":{"default":["PERSON","EMAIL","PHONE","LOCATION","FINANCIAL","SECRET"],"description":"What to hide: PERSON, EMAIL, PHONE, LOCATION, FINANCIAL, SECRET. All by default.","items":{"enum":["PERSON","EMAIL","PHONE","LOCATION","FINANCIAL","SECRET"],"type":"string"},"minItems":1,"type":"array"},"mode":{"default":"accurate","description":"accurate finds names and places with the model and the rest by pattern. aggressive adds guesses that catch more and may hide a little too much. fast uses patterns only, so it finds no ordinary names or places.","enum":["accurate","aggressive","fast"],"type":"string"},"replaceStyle":{"default":"tag","description":"tag writes <EMAIL>, mask writes * for each character, remove deletes it.","enum":["tag","mask","remove"],"type":"string"}},"type":"object"}],"description":"Send true, or an object, to hide personal data in the markdown and in everything made from it (summary, answers, highlights, json). Links, html and rawHtml are not changed. A page the model cannot scan is refused rather than returned unredacted."},"removeBase64Images":{"description":"Images inside the page that carry their data in the address (data:image) are dropped by default. Send false to keep them in markdown and html.","type":"boolean"},"skipTlsVerification":{"description":"Send true to read a page whose certificate is expired, self-signed or for another name. The read is not private against someone between us and the site.","type":"boolean"},"storeInCache":{"default":true,"description":"Send false to neither read nor keep a stored copy of this page.","type":"boolean"},"timeout":{"default":30000,"description":"How long to keep trying, in milliseconds, from 1 second to 5 minutes; 30 seconds by default. A page that needs a browser needs at least 5 seconds, and pages behind a bot check can need 10 to 30 seconds the first time. A read that runs out of time is an error and costs nothing.","maximum":300000,"minimum":1000,"type":"integer"},"waitFor":{"description":"Extra milliseconds to wait before reading, up to 60000, for pages that load their content late. To wait for an element, add a wait action with a selector. A read that waits costs 1 credit, the same as any page.","maximum":60000,"minimum":0,"type":"integer"},"zeroDataRetention":{"default":false,"description":"Send true to keep nothing from this call: no stored copy is read or made, and nothing from it is logged. Costs 1 credit more per page. Not with a screenshot.","type":"boolean"}},"type":"object"},"sources":{"description":"What to search: web, news, images. Each is a string or {type}. Default web, or none when categories asks for research, companies, people, developer, gov or videos.","items":{"anyOf":[{"enum":["web","news","images"],"type":"string"},{"additionalProperties":false,"properties":{"country":{"description":"ISO 3166-1 alpha-2 country code, e.g. us. Any case is accepted.","pattern":"^[A-Za-z]{2}$","type":"string"},"lang":{"description":"Two-letter language for web results, like de. It steers which pages come back; some results can still be in other languages.","pattern":"^[A-Za-z]{2}$","type":"string"},"location":{"type":"string"},"tbs":{"type":"string"},"type":{"const":"web","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"type":{"enum":["news","images"],"type":"string"}},"required":["type"],"type":"object"}]},"maxItems":5,"minItems":1,"type":"array"},"tbs":{"description":"Time filter: qdr:d, qdr:w, qdr:m or qdr:y, or cdr:1,cd_min:MM/DD/YYYY,cd_max:MM/DD/YYYY, plus sbd:1, like sbd:1,qdr:w. sbd:1 sorts newest first; results without a date come last. Web takes all of them; news takes qdr and sbd; images take none.","minLength":1,"type":"string"},"timeout":{"description":"Milliseconds to wait for the sources, from 1,000 to 120,000; more is read as 120,000. Default 60,000. A source that has not answered by then is left out with a warning. When none has, the call fails and costs nothing.","maximum":9007199254740991,"minimum":1000,"type":"integer"}},"required":["query"],"type":"object"}after
{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"definitions":{"__schema0":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"items":{"allOf":[{"$ref":"#/definitions/__schema0"}]},"type":"array"},{"additionalProperties":{"allOf":[{"$ref":"#/definitions/__schema0"}]},"propertyNames":{"type":"string"},"type":"object"}]},"__schema1":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"items":{"allOf":[{"$ref":"#/definitions/__schema1"}]},"type":"array"},{"additionalProperties":{"allOf":[{"$ref":"#/definitions/__schema1"}]},"propertyNames":{"type":"string"},"type":"object"}]},"__schema2":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"items":{"allOf":[{"$ref":"#/definitions/__schema2"}]},"type":"array"},{"additionalProperties":{"allOf":[{"$ref":"#/definitions/__schema2"}]},"propertyNames":{"type":"string"},"type":"object"}]}},"properties":{"allowExternalLinks":{"default":false,"description":"Also follow links to other sites. They count toward limit and maxDiscoveryDepth. Only the start site's robots.txt is read.","type":"boolean"},"allowSubdomains":{"default":false,"description":"Also read pages on subdomains, such as docs.bun.com for bun.com.","type":"boolean"},"crawlEntireDomain":{"default":false,"description":"Read the whole site, not only pages under the start page's path.","type":"boolean"},"deduplicateSimilarURLs":{"default":true,"description":"Read one page when addresses differ only by www, a trailing slash, a #fragment, tracking parameters such as utm_source, or the order of the ?query. Send false to read each address.","type":"boolean"},"delay":{"description":"Seconds to wait between pages. With delay the crawl reads one page at a time. At most 60.","maximum":60,"minimum":0,"type":"number"},"excludePaths":{"default":[],"description":"Skip pages whose path matches one of these regular expressions, such as tag/.*.","items":{"maxLength":200,"minLength":1,"type":"string"},"maxItems":100,"type":"array"},"ignoreQueryParameters":{"default":false,"description":"Treat addresses that differ only in their ?query part as one page.","type":"boolean"},"includePaths":{"default":[],"description":"Read only pages whose path matches one of these regular expressions, such as blog/.*.","items":{"maxLength":200,"minLength":1,"type":"string"},"maxItems":100,"type":"array"},"limit":{"default":10000,"description":"Stop after reading this many pages in total.","maximum":10000,"minimum":1,"type":"integer"},"maxConcurrency":{"description":"Most pages read at once. We read at most 4 at once, so a larger number gives the same speed.","maximum":100,"minimum":1,"type":"integer"},"maxDiscoveryDepth":{"description":"How many links away from the start page to go. Without it there is no depth limit, and limit bounds the crawl.","maximum":9007199254740991,"minimum":0,"type":"integer"},"prompt":{"description":"What you are looking for, such as sqlite performance. Pages about it are read first, and the crawl stops once new pages stop mentioning it.","maxLength":1000,"minLength":1,"type":"string"},"regexOnFullURL":{"default":false,"description":"Match includePaths and excludePaths against the whole address, not only the path.","type":"boolean"},"scrapeOptions":{"additionalProperties":{},"description":"How to read each page, the same options and formats as scrape. Without formats, each page comes back as markdown.","properties":{"actions":{"description":"Up to 50 steps to run on the page, in order, before reading it: { \"type\": \"wait\", \"milliseconds\": 500 } (up to 60 seconds), { \"type\": \"wait\", \"selector\": \".results\" }, { \"type\": \"click\", \"selector\": \"button.more\" }, { \"type\": \"write\", \"text\": \"tides\" }, { \"type\": \"press\", \"key\": \"Enter\" }, { \"type\": \"scroll\", \"direction\": \"down\" } (also up, left or right; amount is pixels, \"viewport\" or \"max\"; maxScrolls 1 to 50; selector scrolls an inner container; \"max\" keeps scrolling until the page stops growing, for feeds that load as you go), { \"type\": \"screenshot\", \"fullPage\": true } (links come back in actions.screenshots), { \"type\": \"scrape\" } (the page at that point, in actions.scrapes), { \"type\": \"executeJavascript\", \"script\": \"document.title\" } (results in actions.javascriptReturns), { \"type\": \"pdf\", \"format\": \"A4\" } (links in actions.pdfs) or { \"type\": \"perform\", \"action\": \"Click the Load more button\" } (a step in plain words, up to 5 browser steps on this page, never leaving the site; at most 5 per call). A read with actions costs 1 credit, the same as any page; the actions themselves add nothing. If an action fails, you still get the page as it stood, with a warning that names the action and says why.","items":{"anyOf":[{"additionalProperties":false,"properties":{"milliseconds":{"maximum":60000,"minimum":1,"type":"integer"},"type":{"const":"wait","type":"string"}},"required":["type","milliseconds"],"type":"object"},{"additionalProperties":false,"properties":{"selector":{"minLength":1,"type":"string"},"type":{"const":"wait","type":"string"}},"required":["type","selector"],"type":"object"},{"additionalProperties":false,"properties":{"all":{"const":false,"type":"boolean"},"selector":{"minLength":1,"type":"string"},"type":{"const":"click","type":"string"}},"required":["type","selector"],"type":"object"},{"additionalProperties":false,"properties":{"text":{"minLength":1,"type":"string"},"type":{"const":"write","type":"string"}},"required":["type","text"],"type":"object"},{"additionalProperties":false,"properties":{"key":{"maxLength":40,"minLength":1,"type":"string"},"type":{"const":"press","type":"string"}},"required":["type","key"],"type":"object"},{"additionalProperties":false,"properties":{"amount":{"anyOf":[{"maximum":100000,"minimum":1,"type":"integer"},{"enum":["viewport","max"],"type":"string"}]},"direction":{"default":"down","enum":["up","down","left","right"],"type":"string"},"maxScrolls":{"maximum":50,"minimum":1,"type":"integer"},"selector":{"minLength":1,"type":"string"},"type":{"const":"scroll","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"fullPage":{"type":"boolean"},"quality":{"maximum":100,"minimum":1,"type":"integer"},"type":{"const":"screenshot","type":"string"},"viewport":{"additionalProperties":false,"properties":{"height":{"maximum":2160,"minimum":200,"type":"integer"},"width":{"maximum":3840,"minimum":200,"type":"integer"}},"required":["width","height"],"type":"object"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"type":{"const":"scrape","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"script":{"maxLength":20000,"minLength":1,"type":"string"},"type":{"const":"executeJavascript","type":"string"}},"required":["type","script"],"type":"object"},{"additionalProperties":false,"properties":{"format":{"enum":["Letter","Legal","Tabloid","Ledger","A0","A1","A2","A3","A4","A5","A6"],"type":"string"},"landscape":{"type":"boolean"},"scale":{"maximum":2,"minimum":0.1,"type":"number"},"type":{"const":"pdf","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"action":{"maxLength":500,"minLength":1,"type":"string"},"type":{"const":"perform","type":"string"}},"required":["type","action"],"type":"object"}]},"maxItems":50,"minItems":1,"type":"array"},"blockAds":{"description":"Ads and trackers are not loaded when a page runs in a browser. Send false to load them.","type":"boolean"},"checkPromptInjection":{"description":"Send true to scan the page text for instructions aimed at an AI model before anything is built from it. A page that has them is refused with 403 promptInjectionDetected and costs nothing. The scan adds 4 credits when it runs; a page it cannot scan fully comes back with a warning and no charge.","type":"boolean"},"excludeTags":{"description":"Remove the parts of the page that match these CSS selectors, such as .comments.","items":{"minLength":1,"type":"string"},"minItems":1,"type":"array"},"fastMode":{"description":"Send true to read the page without opening a browser: the answer comes sooner, but a page that needs a browser, or that refuses a plain request, comes back as an error instead of being retried. Ignored when the call needs a browser (actions, screenshot, waitFor, mobile, profile, network, branding).","type":"boolean"},"formats":{"default":["markdown"],"description":"What to return: markdown (clean page text), summary (a short summary of the page), html (the cleaned page), rawHtml (the page as sent), audio and video (for a YouTube link: the audio track as an M4A file, or the video as an MP4 file, as a link that works for 1 hour), rawBase64 (the bytes the site sent, Base64 encoded, from a live read; metadata.contentType says what they are), links (every link on the page), images (every image address), screenshot (a link to a JPEG of the visible page, kept for 7 days), changeTracking (what changed in the markdown since your key last read this page with the same options, kept 30 days; add modes [\"git-diff\",\"json\"] with a schema or prompt to compare fields too), question (send { \"type\": \"question\", \"question\": \"...\" } to get answer, null when the page does not state one), product (title, brand, category, url, description and variants with price, sale, availability and images, or null) and menu (merchant, currency and sections of items with prices, or null) network (the JSON the page loaded while it rendered, up to 30 responses) and branding (the page's colors, fonts, typography, spacing, button and input styles, logo and brand images, read from how the page looks, with a field left out when the page does not show it). Send { \"type\": \"screenshot\", \"fullPage\": true } for the whole page. Send { \"type\": \"highlights\", \"query\": \"refund policy\" } for the passages that best match a query. Send { \"type\": \"json\", \"schema\": { \"type\": \"object\", \"properties\": { \"price\": { \"type\": \"number\" } } } } or { \"type\": \"json\", \"prompt\": \"the price and the stock\" } for fields filled from the page, each checked against it. Send { \"type\": \"json\", \"parser\": \"amazon-product\" } to get a site's own data as json instead of reading the page; GET /v1/parsers lists the parsers. Send { \"type\": \"json\", \"rules\": { \"title\": \"h1\", \"links\": { \"selector\": \"a\", \"type\": \"list\", \"output\": \"@href\" } } } to read the page with CSS rules and no model, at the page's own price. Send { \"type\": \"attributes\", \"selectors\": [{ \"selector\": \"a\", \"attribute\": \"href\" }] } for attribute values, returned in attributes. Without a parser or rules, json needs a schema or a prompt and is filled from the page. json with a schema or a prompt, summary, highlights, question, product, menu and changeTracking in json mode cost 4 credits more each when they return something. json with rules or a parser, and attributes, cost nothing more. A screenshot, network or branding read costs 1 credit, the same as any page. A PDF comes back as markdown only, and costs 1 credit more for each page of text that comes back. A CSV or an Excel .xlsx file comes back as markdown tables.","items":{"anyOf":[{"enum":["markdown","summary","html","rawHtml","rawBase64","links","images","network","branding","audio","video","screenshot","changeTracking","product","menu"],"type":"string"},{"additionalProperties":false,"properties":{"type":{"enum":["markdown","summary","html","rawHtml","rawBase64","links","images","network","branding","audio","video"],"type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"modes":{"description":"git-diff returns a unified diff of the markdown. json compares the fields in schema or prompt between this read and the last one. Without modes you get git-diff.","items":{"enum":["git-diff","json"],"type":"string"},"maxItems":2,"type":"array"},"prompt":{"description":"With json mode: what to compare, in plain words, such as the price and stock.","maxLength":10000,"minLength":1,"type":"string"},"schema":{"additionalProperties":{"$ref":"#/definitions/__schema0"},"description":"The fields to fill, as a JSON Schema (draft-07 or 2020-12) object with properties. Pydantic's model_json_schema() and zod's toJSONSchema() output work as they are. enum, const, anyOf, oneOf, nullable types, $ref with $defs, required, descriptions and any key names are read. Up to 100 top-level fields and 32 KB. A field the page does not state comes back null.","propertyNames":{"type":"string"},"type":"object"},"tag":{"type":"null"},"type":{"const":"changeTracking","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"question":{"description":"A question to answer from the page, such as what the refund window is.","maxLength":10000,"minLength":1,"type":"string"},"type":{"const":"question","type":"string"}},"required":["type","question"],"type":"object"},{"additionalProperties":false,"properties":{"type":{"const":"product","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"type":{"const":"menu","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"fullPage":{"default":false,"description":"Capture the whole page from top to bottom instead of the visible part.","type":"boolean"},"quality":{"description":"JPEG quality from 1 to 100. The default is 70.","maximum":100,"minimum":1,"type":"integer"},"type":{"const":"screenshot","type":"string"},"viewport":{"additionalProperties":false,"description":"The window size in pixels, such as { width: 390, height: 844 }.","properties":{"height":{"maximum":2160,"minimum":200,"type":"integer"},"width":{"maximum":3840,"minimum":200,"type":"integer"}},"required":["width","height"],"type":"object"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"count":{"default":5,"description":"How many passages to return, best match first.","maximum":20,"minimum":1,"type":"integer"},"query":{"description":"What you are looking for on the page, such as refund policy.","maxLength":10000,"minLength":1,"type":"string"},"type":{"const":"highlights","type":"string"}},"required":["type","query"],"type":"object"},{"additionalProperties":false,"properties":{"checkPromptInjection":{"description":"Deprecated: send checkPromptInjection at the top level of the call.","type":"boolean"},"options":{"additionalProperties":{"$ref":"#/definitions/__schema1"},"description":"Only with parser: extra inputs for it, such as { \"page\": 2 } for the next page of results or { \"minRating\": 4.5 } for a filter. GET /v1/parsers lists what each parser accepts.","propertyNames":{"type":"string"},"type":"object"},"parser":{"description":"Read the page with a named parser, which gives the site's own data as json. The url must be the kind of page the parser reads. Parsers are the only way to read some sites. GET /v1/parsers lists them.","type":"string"},"prompt":{"description":"What to pull from the page in plain words, such as the version and the release date.","maxLength":10000,"minLength":1,"type":"string"},"rules":{"additionalProperties":{"$ref":"#/definitions/__schema2"},"description":"Read the page with CSS rules instead of a model, no extra fee. Each field is a selector such as \"h1\" (the first match's text), \"a@href\" (an attribute) or { \"selector\": \"li\", \"type\": \"list\", \"output\": \"text\" | \"html\" | \"@attribute\" | { nested fields } }. A missing item is null and an unmatched list is []. Relative links become absolute. Up to 100 fields, 5 levels deep. Not with schema, prompt or parser.","propertyNames":{"type":"string"},"type":"object"},"schema":{"additionalProperties":{"$ref":"#/definitions/__schema0"},"description":"The fields to fill, as a JSON Schema (draft-07 or 2020-12) object with properties. Pydantic's model_json_schema() and zod's toJSONSchema() output work as they are. enum, const, anyOf, oneOf, nullable types, $ref with $defs, required, descriptions and any key names are read. Up to 100 top-level fields and 32 KB. A field the page does not state comes back null.","propertyNames":{"type":"string"},"type":"object"},"type":{"const":"json","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"selectors":{"description":"The elements and attributes to read, such as { selector: 'a.buy', attribute: 'href' }.","items":{"additionalProperties":false,"properties":{"attribute":{"maxLength":100,"minLength":1,"type":"string"},"selector":{"minLength":1,"type":"string"}},"required":["selector","attribute"],"type":"object"},"maxItems":50,"minItems":1,"type":"array"},"type":{"const":"attributes","type":"string"}},"required":["type","selectors"],"type":"object"}]},"maxItems":20,"minItems":1,"type":"array"},"headers":{"additionalProperties":{"maxLength":2000,"pattern":"^[\\t\\x20-\\x7e]*$","type":"string"},"description":"Extra request headers to send to the site, such as { \"x-plan\": \"pro\" }. A read with headers is never answered from or saved to a stored copy.","propertyNames":{"pattern":"^[A-Za-z0-9-]{1,64}$","type":"string"},"type":"object"},"includeTags":{"description":"Keep only the parts of the page that match these CSS selectors, such as article or .price. When set, onlyMainContent is not applied.","items":{"minLength":1,"type":"string"},"minItems":1,"type":"array"},"location":{"additionalProperties":false,"description":"Where to read the page from. The default is the United States.","properties":{"country":{"description":"Two-letter country code to read the page from, such as DE or JP.","type":"string"},"languages":{"description":"Languages to ask the site for, best first, such as [\"de\", \"en\"]. Sent as Accept-Language. A read with languages is never answered from or saved to a stored copy.","items":{"pattern":"^[A-Za-z]{2,3}(?:-[A-Za-z0-9]{2,8})*$","type":"string"},"maxItems":5,"minItems":1,"type":"array"}},"type":"object"},"lockdown":{"description":"Send true to answer only from a stored copy of the page and never read it live, whatever its age. A page with no stored copy is notFound. The same as minAge 0.","type":"boolean"},"maxAge":{"description":"Accept a stored answer up to this many milliseconds old, at most 30 days. Without it, 2 days, or less for a site whose pages change often, and a copy up to twice that age (at most 7 days) comes back at once as stale while a fresh read runs. 0 always reads the page live. metadata.cacheState says which one you got.","maximum":9007199254740991,"minimum":0,"type":"integer"},"minAge":{"description":"Answer only from a stored copy that is at least this many milliseconds old, and never read the page live. 0 accepts any stored copy. A page with no such copy is notFound.","maximum":9007199254740991,"minimum":0,"type":"integer"},"mobile":{"description":"Read the page as a phone would: a phone-sized screen and the mobile version of the site. The page loads in a browser.","type":"boolean"},"onlyCleanContent":{"description":"Send true to have a model remove what onlyMainContent leaves behind in the markdown: cookie banners, ads, share widgets, breadcrumbs, sign-up prompts, comment prompts and related-article lists. It only removes whole paragraphs and lists; it never rewrites or adds text, and code blocks are always kept. Skipped with a warning when the page is too long to clean or the model does not answer. Not with zeroDataRetention. Summary, answers and highlights are made from the cleaned markdown.","type":"boolean"},"onlyMainContent":{"default":true,"description":"Keep only the page's main content, without menus, headers, footers and ads.","type":"boolean"},"parsers":{"description":"Only the pdf parser exists. Send \"pdf\" or { \"type\": \"pdf\", mode, maxPages, pages, blocks, pageMarkers } with the same meaning as in parse. Without mode a PDF is read as auto: from its text layer, and from the picture of any page that has no text. fast reads the text layer only, and ocr reads the picture of every page, up to 20 pages. Each page of text that comes back costs 1 credit. Pictures are read only with an API key.","items":{"anyOf":[{"const":"pdf","type":"string"},{"additionalProperties":false,"properties":{"blocks":{"description":"Send true to also get the page's layout in blocks: each title, section header or run of text, with its page, reading order, position on the page (bbox as left, top, right, bottom from 0 to 1) and where its text sits in that page's markdown (span, as in pages). Tables, figures and formulas are not told apart. A page read from its picture is one block. No extra charge.","type":"boolean"},"maxPages":{"description":"Read at most this many pages, up to 500, which is also the default.","maximum":500,"minimum":1,"type":"integer"},"mode":{"description":"fast reads the text layer only. auto (the default) reads the text layer and reads the picture of any page that has none. ocr reads the picture of every page.","enum":["fast","auto","ocr"],"type":"string"},"pageMarkers":{"description":"Send true to mark page breaks in the markdown: pages are joined with \"---\" and a line, where N is the page that follows. No extra charge.","type":"boolean"},"pages":{"description":"Send true to also get each page's markdown in pages, as { pageNumber, markdown }. No extra charge.","type":"boolean"},"type":{"const":"pdf","type":"string"}},"required":["type"],"type":"object"}]},"minItems":1,"type":"array"},"profile":{"additionalProperties":false,"description":"Read the page with the cookies and local storage that earlier calls saved under this name, kept for your account for 30 days after the last use. A call with a profile always loads the page in a browser, costs 1 credit, the same as any page, and is never answered from a stored copy. Only one call at a time can save to a profile.","properties":{"name":{"description":"A name you choose, such as shop-login. Calls with the same name share state.","maxLength":128,"minLength":1,"type":"string"},"saveChanges":{"default":true,"description":"Keep the cookies and local storage this read leaves behind for the next call with this name. Send false to read with the profile without changing it.","type":"boolean"}},"required":["name"],"type":"object"},"proxy":{"description":"auto: basic first, enhanced once if the site refuses. basic: one plain attempt. enhanced: the stronger read from the start. stealth is the same as enhanced. Same price.","enum":["auto","basic","enhanced","stealth"],"type":"string"},"redactPII":{"anyOf":[{"type":"boolean"},{"additionalProperties":false,"description":"Options for redactPII.","properties":{"entities":{"default":["PERSON","EMAIL","PHONE","LOCATION","FINANCIAL","SECRET"],"description":"What to hide: PERSON, EMAIL, PHONE, LOCATION, FINANCIAL, SECRET. All by default.","items":{"enum":["PERSON","EMAIL","PHONE","LOCATION","FINANCIAL","SECRET"],"type":"string"},"minItems":1,"type":"array"},"mode":{"default":"accurate","description":"accurate finds names and places with the model and the rest by pattern. aggressive adds guesses that catch more and may hide a little too much. fast uses patterns only, so it finds no ordinary names or places.","enum":["accurate","aggressive","fast"],"type":"string"},"replaceStyle":{"default":"tag","description":"tag writes <EMAIL>, mask writes * for each character, remove deletes it.","enum":["tag","mask","remove"],"type":"string"}},"type":"object"}],"description":"Send true, or an object, to hide personal data in the markdown and in everything made from it (summary, answers, highlights, json). Links, html and rawHtml are not changed. A page the model cannot scan is refused rather than returned unredacted."},"removeBase64Images":{"description":"Images inside the page that carry their data in the address (data:image) are dropped by default. Send false to keep them in markdown and html.","type":"boolean"},"skipTlsVerification":{"description":"Send true to read a page whose certificate is expired, self-signed or for another name. The read is not private against someone between us and the site.","type":"boolean"},"storeInCache":{"default":true,"description":"Send false to neither read nor keep a stored copy of this page.","type":"boolean"},"timeout":{"default":60000,"description":"How long to keep trying, in milliseconds, from 1 second to 5 minutes; 60 seconds by default. A page that needs a browser needs at least 5 seconds, and pages behind a bot check can need 10 to 30 seconds the first time. A read that runs out of time is an error and costs nothing.","maximum":300000,"minimum":1000,"type":"integer"},"waitFor":{"description":"Extra milliseconds to wait before reading, up to 60000, for pages that load their content late. To wait for an element, add a wait action with a selector. A read that waits costs 1 credit, the same as any page.","maximum":60000,"minimum":0,"type":"integer"},"zeroDataRetention":{"default":false,"description":"Send true to keep nothing from this call: no stored copy is read or made, and nothing from it is logged. Costs 1 credit more per page. Not with a screenshot.","type":"boolean"}},"type":"object"},"sitemap":{"default":"include","description":"include also uses the site's sitemaps. only reads just the pages the sitemaps name. skip ignores them.","enum":["skip","include","only"],"type":"string"},"url":{"description":"The page to start from, such as https://bun.com/docs.","type":"string"},"webhook":{"anyOf":[{"type":"string"},{"additionalProperties":false,"properties":{"events":{"items":{"enum":["started","page","action","completed","failed","cancelled"],"type":"string"},"minItems":1,"type":"array"},"headers":{"additionalProperties":{"maxLength":1000,"type":"string"},"propertyNames":{"pattern":"^[A-Za-z0-9-]{1,64}$","type":"string"},"type":"object"},"metadata":{"additionalProperties":{"$ref":"#/definitions/__schema0"},"propertyNames":{"type":"string"},"type":"object"},"url":{"type":"string"}},"required":["url"],"type":"object"}],"description":"Where to be told about the job: a plain address, or { url } which gets a JSON POST when the job starts, for each finished page, and when the job ends. headers are sent with every call, metadata comes back in every call, and events picks which of started, page, action, completed, failed and cancelled to send (all by default). An agent run sends action for each step it takes, and page too. Every call is signed: read Stophy-Signature (t=<unix seconds>,v1=<hex>), where v1 is the HMAC-SHA256 of \"<t>.<body>\" with your webhook secret from webhook.secret. A call that gets no 2xx is sent again, up to 3 times. If your address answers slowly, a page event can carry only the page url. Read that page with the status call."},"zeroDataRetention":{"default":false,"description":"Send true to keep nothing from this crawl: no stored copy is read or made, page results are held for one hour at most, and nothing is logged. Costs 1 credit more per page.","type":"boolean"}},"required":["url"],"type":"object"}before
{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"definitions":{"__schema0":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"items":{"allOf":[{"$ref":"#/definitions/__schema0"}]},"type":"array"},{"additionalProperties":{"allOf":[{"$ref":"#/definitions/__schema0"}]},"propertyNames":{"type":"string"},"type":"object"}]}},"properties":{"agent":{"additionalProperties":false,"description":"Accepted so a client that sends { model: \"FIRE-1\" } works. An extract reads the pages it is given and checks every value; it does not browse or click, and the answer says so in warning. To navigate a site, use the agent endpoint.","properties":{"model":{"maxLength":40,"minLength":1,"type":"string"}},"required":["model"],"type":"object"},"allowExternalLinks":{"default":false,"description":"Send true to also read pages on other sites that the pages link to, up to 5, picking the links whose address mentions your prompt. Each page read costs 1 credit.","type":"boolean"},"enableWebSearch":{"default":false,"description":"Send true to also search the web for your prompt and read the best pages it finds, up to 3 more. Needs a prompt. Costs 2 credits for the search. With no urls, the search runs without this.","type":"boolean"},"ignoreInvalidURLs":{"default":true,"description":"Skip addresses that are not public website URLs. Send false to refuse the call instead.","type":"boolean"},"ignoreSitemap":{"default":false,"description":"For an address ending in /*: skip the site's sitemaps and find pages by links.","type":"boolean"},"includeSubdomains":{"default":true,"description":"For an address ending in /*: also read pages on subdomains of the site. Send false to stay on the exact host.","type":"boolean"},"prompt":{"description":"What to pull from the pages in plain words, such as the version and the release date, up to 10000 characters. With no urls, the web is searched for the first 400 characters of it.","maxLength":10000,"minLength":1,"type":"string"},"schema":{"additionalProperties":{"$ref":"#/definitions/__schema0"},"description":"The fields to fill, as a JSON Schema (draft-07 or 2020-12) object with properties. Pydantic's model_json_schema() and zod's toJSONSchema() output work as they are. enum, const, anyOf, oneOf, nullable types, $ref with $defs, required, descriptions and any key names are read. Up to 100 top-level fields and 32 KB. A field the page does not state comes back null.","propertyNames":{"type":"string"},"type":"object"},"scrapeOptions":{"additionalProperties":false,"description":"How to read each page, the same options as scrape.","properties":{"actions":{"description":"Up to 50 steps to run on the page, in order, before reading it: { \"type\": \"wait\", \"milliseconds\": 500 } (up to 30 seconds), { \"type\": \"wait\", \"selector\": \".results\" }, { \"type\": \"click\", \"selector\": \"button.more\" }, { \"type\": \"write\", \"text\": \"tides\" }, { \"type\": \"press\", \"key\": \"Enter\" }, { \"type\": \"scroll\", \"direction\": \"down\" } (also up, left or right; amount is pixels, \"viewport\" or \"max\"; maxScrolls 1 to 50; selector scrolls an inner container; \"max\" keeps scrolling until the page stops growing, for feeds that load as you go), { \"type\": \"screenshot\", \"fullPage\": true } (links come back in actions.screenshots), { \"type\": \"scrape\" } (the page at that point, in actions.scrapes), { \"type\": \"executeJavascript\", \"script\": \"document.title\" } (results in actions.javascriptReturns), { \"type\": \"pdf\", \"format\": \"A4\" } (links in actions.pdfs) or { \"type\": \"perform\", \"action\": \"Click the Load more button\" } (a step in plain words, up to 5 browser steps on this page, never leaving the site; at most 5 per call). A read with actions costs 1 credit, the same as any page; the actions themselves add nothing. If an action fails, you still get the page as it stood, with a warning that names the action and says why.","items":{"anyOf":[{"additionalProperties":false,"properties":{"milliseconds":{"maximum":30000,"minimum":1,"type":"integer"},"type":{"const":"wait","type":"string"}},"required":["type","milliseconds"],"type":"object"},{"additionalProperties":false,"properties":{"selector":{"minLength":1,"type":"string"},"type":{"const":"wait","type":"string"}},"required":["type","selector"],"type":"object"},{"additionalProperties":false,"properties":{"all":{"const":false,"type":"boolean"},"selector":{"minLength":1,"type":"string"},"type":{"const":"click","type":"string"}},"required":["type","selector"],"type":"object"},{"additionalProperties":false,"properties":{"text":{"minLength":1,"type":"string"},"type":{"const":"write","type":"string"}},"required":["type","text"],"type":"object"},{"additionalProperties":false,"properties":{"key":{"maxLength":40,"minLength":1,"type":"string"},"type":{"const":"press","type":"string"}},"required":["type","key"],"type":"object"},{"additionalProperties":false,"properties":{"amount":{"anyOf":[{"maximum":100000,"minimum":1,"type":"integer"},{"enum":["viewport","max"],"type":"string"}]},"direction":{"default":"down","enum":["up","down","left","right"],"type":"string"},"maxScrolls":{"maximum":50,"minimum":1,"type":"integer"},"selector":{"minLength":1,"type":"string"},"type":{"const":"scroll","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"fullPage":{"type":"boolean"},"quality":{"maximum":100,"minimum":1,"type":"integer"},"type":{"const":"screenshot","type":"string"},"viewport":{"additionalProperties":false,"properties":{"height":{"maximum":2160,"minimum":200,"type":"integer"},"width":{"maximum":3840,"minimum":200,"type":"integer"}},"required":["width","height"],"type":"object"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"type":{"const":"scrape","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"script":{"maxLength":20000,"minLength":1,"type":"string"},"type":{"const":"executeJavascript","type":"string"}},"required":["type","script"],"type":"object"},{"additionalProperties":false,"properties":{"format":{"enum":["Letter","Legal","Tabloid","Ledger","A0","A1","A2","A3","A4","A5","A6"],"type":"string"},"landscape":{"type":"boolean"},"scale":{"maximum":2,"minimum":0.1,"type":"number"},"type":{"const":"pdf","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"action":{"maxLength":500,"minLength":1,"type":"string"},"type":{"const":"perform","type":"string"}},"required":["type","action"],"type":"object"}]},"maxItems":50,"minItems":1,"type":"array"},"blockAds":{"description":"Ads and trackers are not loaded when a page runs in a browser. Send false to load them.","type":"boolean"},"checkPromptInjection":{"description":"Send true to scan the page text for instructions aimed at an AI model before anything is built from it. A page that has them is refused with 403 promptInjectionDetected and costs nothing. The scan adds 4 credits when it runs; a page it cannot scan fully comes back with a warning and no charge.","type":"boolean"},"excludeTags":{"description":"Remove the parts of the page that match these CSS selectors, such as .comments.","items":{"minLength":1,"type":"string"},"minItems":1,"type":"array"},"fastMode":{"description":"Send true to read the page without opening a browser: the answer comes sooner, but a page that needs a browser, or that refuses a plain request, comes back as an error instead of being retried. Ignored when the call needs a browser (actions, screenshot, waitFor, mobile, profile, network, branding).","type":"boolean"},"headers":{"additionalProperties":{"maxLength":2000,"pattern":"^[\\t\\x20-\\x7e]*$","type":"string"},"description":"Extra request headers to send to the site, such as { \"x-plan\": \"pro\" }. A read with headers is never answered from or saved to a stored copy.","propertyNames":{"pattern":"^[A-Za-z0-9-]{1,64}$","type":"string"},"type":"object"},"includeTags":{"description":"Keep only the parts of the page that match these CSS selectors, such as article or .price. When set, onlyMainContent is not applied.","items":{"minLength":1,"type":"string"},"minItems":1,"type":"array"},"location":{"additionalProperties":false,"description":"Where to read the page from. The default is the United States.","properties":{"country":{"description":"Two-letter country code to read the page from, such as DE or JP.","type":"string"},"languages":{"description":"Languages to ask the site for, best first, such as [\"de\", \"en\"]. Sent as Accept-Language. A read with languages is never answered from or saved to a stored copy.","items":{"pattern":"^[A-Za-z]{2,3}(?:-[A-Za-z0-9]{2,8})*$","type":"string"},"maxItems":5,"minItems":1,"type":"array"}},"type":"object"},"lockdown":{"description":"Send true to answer only from a stored copy of the page and never read it live, whatever its age. A page with no stored copy is notFound. The same as minAge 0.","type":"boolean"},"maxAge":{"description":"Accept a stored answer up to this many milliseconds old, at most 30 days. Without it, 2 days, or less for a site whose pages change often, and a copy up to twice that age (at most 7 days) comes back at once as stale while a fresh read runs. 0 always reads the page live. metadata.cacheState says which one you got.","maximum":9007199254740991,"minimum":0,"type":"integer"},"minAge":{"description":"Answer only from a stored copy that is at least this many milliseconds old, and never read the page live. 0 accepts any stored copy. A page with no such copy is notFound.","maximum":9007199254740991,"minimum":0,"type":"integer"},"mobile":{"description":"Read the page as a phone would: a phone-sized screen and the mobile version of the site. The page loads in a browser.","type":"boolean"},"onlyCleanContent":{"description":"Send true to have a model remove what onlyMainContent leaves behind in the markdown: cookie banners, ads, share widgets, breadcrumbs, sign-up prompts, comment prompts and related-article lists. It only removes whole paragraphs and lists; it never rewrites or adds text, and code blocks are always kept. Skipped with a warning when the page is too long to clean or the model does not answer. Not with zeroDataRetention. Summary, answers and highlights are made from the cleaned markdown.","type":"boolean"},"onlyMainContent":{"default":true,"description":"Keep only the page's main content, without menus, headers, footers and ads.","type":"boolean"},"parsers":{"description":"Only the pdf parser exists. Send \"pdf\" or { \"type\": \"pdf\", mode, maxPages, pages, blocks, pageMarkers } with the same meaning as in parse. Without mode a PDF is read from its text layer only; auto reads the picture of a page that has no text, and ocr reads the picture of every page, up to 20 pages. Each page of text that comes back costs 1 credit.","items":{"anyOf":[{"const":"pdf","type":"string"},{"additionalProperties":false,"properties":{"blocks":{"description":"Send true to also get the page's layout in blocks: each title, section header or run of text, with its page, reading order, position on the page (bbox as left, top, right, bottom from 0 to 1) and where its text sits in that page's markdown (span, as in pages). Tables, figures and formulas are not told apart. A page read from its picture is one block. No extra charge.","type":"boolean"},"maxPages":{"description":"Read at most this many pages, up to 100.","maximum":100,"minimum":1,"type":"integer"},"mode":{"description":"fast reads the text layer only. auto (the default) reads the text layer and reads the picture of any page that has none. ocr reads the picture of every page.","enum":["fast","auto","ocr"],"type":"string"},"pageMarkers":{"description":"Send true to mark page breaks in the markdown: pages are joined with \"---\" and a line, where N is the page that follows. No extra charge.","type":"boolean"},"pages":{"description":"Send true to also get each page's markdown in pages, as { pageNumber, markdown }. No extra charge.","type":"boolean"},"type":{"const":"pdf","type":"string"}},"required":["type"],"type":"object"}]},"minItems":1,"type":"array"},"profile":{"additionalProperties":false,"description":"Read the page with the cookies and local storage that earlier calls saved under this name, kept for your account for 30 days after the last use. A call with a profile always loads the page in a browser, costs 1 credit, the same as any page, and is never answered from a stored copy. Only one call at a time can save to a profile.","properties":{"name":{"description":"A name you choose, such as shop-login. Calls with the same name share state.","maxLength":128,"minLength":1,"type":"string"},"saveChanges":{"default":true,"description":"Keep the cookies and local storage this read leaves behind for the next call with this name. Send false to read with the profile without changing it.","type":"boolean"}},"required":["name"],"type":"object"},"proxy":{"description":"auto: basic first, enhanced once if the site refuses. basic: one plain attempt. enhanced: the stronger read from the start. Same price.","enum":["auto","basic","enhanced"],"type":"string"},"redactPII":{"anyOf":[{"type":"boolean"},{"additionalProperties":false,"description":"Options for redactPII.","properties":{"entities":{"default":["PERSON","EMAIL","PHONE","LOCATION","FINANCIAL","SECRET"],"description":"What to hide: PERSON, EMAIL, PHONE, LOCATION, FINANCIAL, SECRET. All by default.","items":{"enum":["PERSON","EMAIL","PHONE","LOCATION","FINANCIAL","SECRET"],"type":"string"},"minItems":1,"type":"array"},"mode":{"default":"accurate","description":"accurate finds names and places with the model and the rest by pattern. aggressive adds guesses that catch more and may hide a little too much. fast uses patterns only, so it finds no ordinary names or places.","enum":["accurate","aggressive","fast"],"type":"string"},"replaceStyle":{"default":"tag","description":"tag writes <EMAIL>, mask writes * for each character, remove deletes it.","enum":["tag","mask","remove"],"type":"string"}},"type":"object"}],"description":"Send true, or an object, to hide personal data in the markdown and in everything made from it (summary, answers, highlights, json). Links, html and rawHtml are not changed. A page the model cannot scan is refused rather than returned unredacted."},"removeBase64Images":{"description":"Images inside the page that carry their data in the address (data:image) are dropped by default. Send false to keep them in markdown and html.","type":"boolean"},"skipTlsVerification":{"description":"Send true to read a page whose certificate is expired, self-signed or for another name. The read is not private against someone between us and the site.","type":"boolean"},"storeInCache":{"default":true,"description":"Send false to neither read nor keep a stored copy of this page.","type":"boolean"},"timeout":{"description":"How long to keep trying, in milliseconds, between 10 seconds and 2 minutes. Pages behind a bot check can need 10 to 30 seconds the first time.","maximum":300000,"minimum":1000,"type":"integer"},"waitFor":{"description":"Extra milliseconds to wait before reading, up to 60000, for pages that load their content late. To wait for an element, add a wait action with a selector. A read that waits costs 1 credit, the same as any page.","maximum":60000,"minimum":0,"type":"integer"},"zeroDataRetention":{"default":false,"description":"Send true to keep nothing from this call: no stored copy is read or made, and nothing from it is logged. Costs 1 credit more per page. Not with a screenshot.","type":"boolean"}},"type":"object"},"showSources":{"default":false,"description":"Send true to get sources: for each field, the pages that state its value.","type":"boolean"},"systemPrompt":{"description":"Standing instructions for how to fill the fields, such as units or how to write dates, up to 10000 characters. They add to the rules of the extract: a value is still copied from the page and is null when the page does not state it.","maxLength":10000,"minLength":1,"type":"string"},"urls":{"default":[],"description":"The pages to read, up to 25, such as [\"https://bun.com/blog/bun-v1.3\"]. An address ending in /* reads pages under it, found through the site's sitemap. With more than one, the fields are filled from all of them together. A page that cannot be read is skipped and named in warning, and costs nothing. A page is read up to 50000 characters. With several pages each one gets a smaller share, and all together are read up to 150000 characters. A page that is cut is counted in warning. The call fails only when no page can be read. Leave it out and send a prompt to search the web instead.","items":{"maxLength":2048,"type":"string"},"maxItems":25,"type":"array"},"webhook":{"anyOf":[{"type":"string"},{"additionalProperties":false,"properties":{"events":{"items":{"enum":["started","page","action","completed","failed","cancelled"],"type":"string"},"minItems":1,"type":"array"},"headers":{"additionalProperties":{"maxLength":1000,"type":"string"},"propertyNames":{"pattern":"^[A-Za-z0-9-]{1,64}$","type":"string"},"type":"object"},"metadata":{"additionalProperties":{"$ref":"#/definitions/__schema0"},"propertyNames":{"type":"string"},"type":"object"},"url":{"type":"string"}},"required":["url"],"type":"object"}],"description":"Where to be told when the extract ends: a plain address, or { url } which gets one JSON POST with the id, the status, the data and creditsUsed. headers are sent with the call, metadata comes back in it, and events picks completed, failed or both (both by default). The call is signed: read Stophy-Signature (t=<unix seconds>,v1=<hex>), the HMAC-SHA256 of \"<t>.<body>\" with your webhook secret from webhook.secret. A call that gets no 2xx is sent again, up to 3 times."},"zeroDataRetention":{"default":false,"description":"Send true to keep nothing from this call: pages are read live, the result is held for one hour at most, and nothing is logged. Costs 1 credit more per page.","type":"boolean"}},"type":"object"}after
{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"definitions":{"__schema0":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"items":{"allOf":[{"$ref":"#/definitions/__schema0"}]},"type":"array"},{"additionalProperties":{"allOf":[{"$ref":"#/definitions/__schema0"}]},"propertyNames":{"type":"string"},"type":"object"}]}},"properties":{"agent":{"additionalProperties":false,"description":"Accepted so a client that sends { model: \"FIRE-1\" } works. An extract reads the pages it is given and checks every value; it does not browse or click, and the answer says so in warning. To navigate a site, use the agent endpoint.","properties":{"model":{"maxLength":40,"minLength":1,"type":"string"}},"required":["model"],"type":"object"},"allowExternalLinks":{"default":false,"description":"Send true to also read pages on other sites that the pages link to, up to 5, picking the links whose address mentions your prompt. Each page read costs 1 credit.","type":"boolean"},"enableWebSearch":{"default":false,"description":"Send true to also search the web for your prompt and read the best pages it finds, up to 3 more. Needs a prompt. Costs 2 credits for the search. With no urls, the search runs without this.","type":"boolean"},"ignoreInvalidURLs":{"default":true,"description":"Skip addresses that are not public website URLs. Send false to refuse the call instead.","type":"boolean"},"ignoreSitemap":{"default":false,"description":"For an address ending in /*: skip the site's sitemaps and find pages by links.","type":"boolean"},"includeSubdomains":{"default":true,"description":"For an address ending in /*: also read pages on subdomains of the site. Send false to stay on the exact host.","type":"boolean"},"limit":{"description":"For an address ending in /*: read at most this many pages under it. At most 25 pages are read in all.","maximum":9007199254740991,"minimum":1,"type":"integer"},"prompt":{"description":"What to pull from the pages in plain words, such as the version and the release date, up to 10000 characters. With no urls, the web is searched for the first 400 characters of it.","maxLength":10000,"minLength":1,"type":"string"},"schema":{"additionalProperties":{"$ref":"#/definitions/__schema0"},"description":"The fields to fill, as a JSON Schema (draft-07 or 2020-12) object with properties. Pydantic's model_json_schema() and zod's toJSONSchema() output work as they are. enum, const, anyOf, oneOf, nullable types, $ref with $defs, required, descriptions and any key names are read. Up to 100 top-level fields and 32 KB. A field the page does not state comes back null.","propertyNames":{"type":"string"},"type":"object"},"scrapeOptions":{"additionalProperties":false,"description":"How to read each page, the same options as scrape.","properties":{"actions":{"description":"Up to 50 steps to run on the page, in order, before reading it: { \"type\": \"wait\", \"milliseconds\": 500 } (up to 60 seconds), { \"type\": \"wait\", \"selector\": \".results\" }, { \"type\": \"click\", \"selector\": \"button.more\" }, { \"type\": \"write\", \"text\": \"tides\" }, { \"type\": \"press\", \"key\": \"Enter\" }, { \"type\": \"scroll\", \"direction\": \"down\" } (also up, left or right; amount is pixels, \"viewport\" or \"max\"; maxScrolls 1 to 50; selector scrolls an inner container; \"max\" keeps scrolling until the page stops growing, for feeds that load as you go), { \"type\": \"screenshot\", \"fullPage\": true } (links come back in actions.screenshots), { \"type\": \"scrape\" } (the page at that point, in actions.scrapes), { \"type\": \"executeJavascript\", \"script\": \"document.title\" } (results in actions.javascriptReturns), { \"type\": \"pdf\", \"format\": \"A4\" } (links in actions.pdfs) or { \"type\": \"perform\", \"action\": \"Click the Load more button\" } (a step in plain words, up to 5 browser steps on this page, never leaving the site; at most 5 per call). A read with actions costs 1 credit, the same as any page; the actions themselves add nothing. If an action fails, you still get the page as it stood, with a warning that names the action and says why.","items":{"anyOf":[{"additionalProperties":false,"properties":{"milliseconds":{"maximum":60000,"minimum":1,"type":"integer"},"type":{"const":"wait","type":"string"}},"required":["type","milliseconds"],"type":"object"},{"additionalProperties":false,"properties":{"selector":{"minLength":1,"type":"string"},"type":{"const":"wait","type":"string"}},"required":["type","selector"],"type":"object"},{"additionalProperties":false,"properties":{"all":{"const":false,"type":"boolean"},"selector":{"minLength":1,"type":"string"},"type":{"const":"click","type":"string"}},"required":["type","selector"],"type":"object"},{"additionalProperties":false,"properties":{"text":{"minLength":1,"type":"string"},"type":{"const":"write","type":"string"}},"required":["type","text"],"type":"object"},{"additionalProperties":false,"properties":{"key":{"maxLength":40,"minLength":1,"type":"string"},"type":{"const":"press","type":"string"}},"required":["type","key"],"type":"object"},{"additionalProperties":false,"properties":{"amount":{"anyOf":[{"maximum":100000,"minimum":1,"type":"integer"},{"enum":["viewport","max"],"type":"string"}]},"direction":{"default":"down","enum":["up","down","left","right"],"type":"string"},"maxScrolls":{"maximum":50,"minimum":1,"type":"integer"},"selector":{"minLength":1,"type":"string"},"type":{"const":"scroll","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"fullPage":{"type":"boolean"},"quality":{"maximum":100,"minimum":1,"type":"integer"},"type":{"const":"screenshot","type":"string"},"viewport":{"additionalProperties":false,"properties":{"height":{"maximum":2160,"minimum":200,"type":"integer"},"width":{"maximum":3840,"minimum":200,"type":"integer"}},"required":["width","height"],"type":"object"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"type":{"const":"scrape","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"script":{"maxLength":20000,"minLength":1,"type":"string"},"type":{"const":"executeJavascript","type":"string"}},"required":["type","script"],"type":"object"},{"additionalProperties":false,"properties":{"format":{"enum":["Letter","Legal","Tabloid","Ledger","A0","A1","A2","A3","A4","A5","A6"],"type":"string"},"landscape":{"type":"boolean"},"scale":{"maximum":2,"minimum":0.1,"type":"number"},"type":{"const":"pdf","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"action":{"maxLength":500,"minLength":1,"type":"string"},"type":{"const":"perform","type":"string"}},"required":["type","action"],"type":"object"}]},"maxItems":50,"minItems":1,"type":"array"},"blockAds":{"description":"Ads and trackers are not loaded when a page runs in a browser. Send false to load them.","type":"boolean"},"checkPromptInjection":{"description":"Send true to scan the page text for instructions aimed at an AI model before anything is built from it. A page that has them is refused with 403 promptInjectionDetected and costs nothing. The scan adds 4 credits when it runs; a page it cannot scan fully comes back with a warning and no charge.","type":"boolean"},"excludeTags":{"description":"Remove the parts of the page that match these CSS selectors, such as .comments.","items":{"minLength":1,"type":"string"},"minItems":1,"type":"array"},"fastMode":{"description":"Send true to read the page without opening a browser: the answer comes sooner, but a page that needs a browser, or that refuses a plain request, comes back as an error instead of being retried. Ignored when the call needs a browser (actions, screenshot, waitFor, mobile, profile, network, branding).","type":"boolean"},"headers":{"additionalProperties":{"maxLength":2000,"pattern":"^[\\t\\x20-\\x7e]*$","type":"string"},"description":"Extra request headers to send to the site, such as { \"x-plan\": \"pro\" }. A read with headers is never answered from or saved to a stored copy.","propertyNames":{"pattern":"^[A-Za-z0-9-]{1,64}$","type":"string"},"type":"object"},"includeTags":{"description":"Keep only the parts of the page that match these CSS selectors, such as article or .price. When set, onlyMainContent is not applied.","items":{"minLength":1,"type":"string"},"minItems":1,"type":"array"},"location":{"additionalProperties":false,"description":"Where to read the page from. The default is the United States.","properties":{"country":{"description":"Two-letter country code to read the page from, such as DE or JP.","type":"string"},"languages":{"description":"Languages to ask the site for, best first, such as [\"de\", \"en\"]. Sent as Accept-Language. A read with languages is never answered from or saved to a stored copy.","items":{"pattern":"^[A-Za-z]{2,3}(?:-[A-Za-z0-9]{2,8})*$","type":"string"},"maxItems":5,"minItems":1,"type":"array"}},"type":"object"},"lockdown":{"description":"Send true to answer only from a stored copy of the page and never read it live, whatever its age. A page with no stored copy is notFound. The same as minAge 0.","type":"boolean"},"maxAge":{"description":"Accept a stored answer up to this many milliseconds old, at most 30 days. Without it, 2 days, or less for a site whose pages change often, and a copy up to twice that age (at most 7 days) comes back at once as stale while a fresh read runs. 0 always reads the page live. metadata.cacheState says which one you got.","maximum":9007199254740991,"minimum":0,"type":"integer"},"minAge":{"description":"Answer only from a stored copy that is at least this many milliseconds old, and never read the page live. 0 accepts any stored copy. A page with no such copy is notFound.","maximum":9007199254740991,"minimum":0,"type":"integer"},"mobile":{"description":"Read the page as a phone would: a phone-sized screen and the mobile version of the site. The page loads in a browser.","type":"boolean"},"onlyCleanContent":{"description":"Send true to have a model remove what onlyMainContent leaves behind in the markdown: cookie banners, ads, share widgets, breadcrumbs, sign-up prompts, comment prompts and related-article lists. It only removes whole paragraphs and lists; it never rewrites or adds text, and code blocks are always kept. Skipped with a warning when the page is too long to clean or the model does not answer. Not with zeroDataRetention. Summary, answers and highlights are made from the cleaned markdown.","type":"boolean"},"onlyMainContent":{"default":true,"description":"Keep only the page's main content, without menus, headers, footers and ads.","type":"boolean"},"parsers":{"description":"Only the pdf parser exists. Send \"pdf\" or { \"type\": \"pdf\", mode, maxPages, pages, blocks, pageMarkers } with the same meaning as in parse. Without mode a PDF is read as auto: from its text layer, and from the picture of any page that has no text. fast reads the text layer only, and ocr reads the picture of every page, up to 20 pages. Each page of text that comes back costs 1 credit. Pictures are read only with an API key.","items":{"anyOf":[{"const":"pdf","type":"string"},{"additionalProperties":false,"properties":{"blocks":{"description":"Send true to also get the page's layout in blocks: each title, section header or run of text, with its page, reading order, position on the page (bbox as left, top, right, bottom from 0 to 1) and where its text sits in that page's markdown (span, as in pages). Tables, figures and formulas are not told apart. A page read from its picture is one block. No extra charge.","type":"boolean"},"maxPages":{"description":"Read at most this many pages, up to 500, which is also the default.","maximum":500,"minimum":1,"type":"integer"},"mode":{"description":"fast reads the text layer only. auto (the default) reads the text layer and reads the picture of any page that has none. ocr reads the picture of every page.","enum":["fast","auto","ocr"],"type":"string"},"pageMarkers":{"description":"Send true to mark page breaks in the markdown: pages are joined with \"---\" and a line, where N is the page that follows. No extra charge.","type":"boolean"},"pages":{"description":"Send true to also get each page's markdown in pages, as { pageNumber, markdown }. No extra charge.","type":"boolean"},"type":{"const":"pdf","type":"string"}},"required":["type"],"type":"object"}]},"minItems":1,"type":"array"},"profile":{"additionalProperties":false,"description":"Read the page with the cookies and local storage that earlier calls saved under this name, kept for your account for 30 days after the last use. A call with a profile always loads the page in a browser, costs 1 credit, the same as any page, and is never answered from a stored copy. Only one call at a time can save to a profile.","properties":{"name":{"description":"A name you choose, such as shop-login. Calls with the same name share state.","maxLength":128,"minLength":1,"type":"string"},"saveChanges":{"default":true,"description":"Keep the cookies and local storage this read leaves behind for the next call with this name. Send false to read with the profile without changing it.","type":"boolean"}},"required":["name"],"type":"object"},"proxy":{"description":"auto: basic first, enhanced once if the site refuses. basic: one plain attempt. enhanced: the stronger read from the start. stealth is the same as enhanced. Same price.","enum":["auto","basic","enhanced","stealth"],"type":"string"},"redactPII":{"anyOf":[{"type":"boolean"},{"additionalProperties":false,"description":"Options for redactPII.","properties":{"entities":{"default":["PERSON","EMAIL","PHONE","LOCATION","FINANCIAL","SECRET"],"description":"What to hide: PERSON, EMAIL, PHONE, LOCATION, FINANCIAL, SECRET. All by default.","items":{"enum":["PERSON","EMAIL","PHONE","LOCATION","FINANCIAL","SECRET"],"type":"string"},"minItems":1,"type":"array"},"mode":{"default":"accurate","description":"accurate finds names and places with the model and the rest by pattern. aggressive adds guesses that catch more and may hide a little too much. fast uses patterns only, so it finds no ordinary names or places.","enum":["accurate","aggressive","fast"],"type":"string"},"replaceStyle":{"default":"tag","description":"tag writes <EMAIL>, mask writes * for each character, remove deletes it.","enum":["tag","mask","remove"],"type":"string"}},"type":"object"}],"description":"Send true, or an object, to hide personal data in the markdown and in everything made from it (summary, answers, highlights, json). Links, html and rawHtml are not changed. A page the model cannot scan is refused rather than returned unredacted."},"removeBase64Images":{"description":"Images inside the page that carry their data in the address (data:image) are dropped by default. Send false to keep them in markdown and html.","type":"boolean"},"skipTlsVerification":{"description":"Send true to read a page whose certificate is expired, self-signed or for another name. The read is not private against someone between us and the site.","type":"boolean"},"storeInCache":{"default":true,"description":"Send false to neither read nor keep a stored copy of this page.","type":"boolean"},"timeout":{"default":60000,"description":"How long to keep trying, in milliseconds, from 1 second to 5 minutes; 60 seconds by default. A page that needs a browser needs at least 5 seconds, and pages behind a bot check can need 10 to 30 seconds the first time. A read that runs out of time is an error and costs nothing.","maximum":300000,"minimum":1000,"type":"integer"},"waitFor":{"description":"Extra milliseconds to wait before reading, up to 60000, for pages that load their content late. To wait for an element, add a wait action with a selector. A read that waits costs 1 credit, the same as any page.","maximum":60000,"minimum":0,"type":"integer"},"zeroDataRetention":{"default":false,"description":"Send true to keep nothing from this call: no stored copy is read or made, and nothing from it is logged. Costs 1 credit more per page. Not with a screenshot.","type":"boolean"}},"type":"object"},"showSources":{"default":false,"description":"Send true to get sources: for each field, the pages that state its value.","type":"boolean"},"systemPrompt":{"description":"Standing instructions for how to fill the fields, such as units or how to write dates, up to 10000 characters. They add to the rules of the extract: a value is still copied from the page and is null when the page does not state it.","maxLength":10000,"minLength":1,"type":"string"},"timeout":{"default":30000,"description":"How long to keep reading the pages, in milliseconds, from 1 second to 5 minutes; 30 seconds by default. A page not read by then is skipped and named in warning, and costs nothing.","maximum":300000,"minimum":1000,"type":"integer"},"urls":{"default":[],"description":"The pages to read, up to 25, such as [\"https://bun.com/blog/bun-v1.3\"]. An address ending in /* reads pages under it, found through the site's sitemap. With more than one, the fields are filled from all of them together. A page that cannot be read is skipped and named in warning, and costs nothing. A page is read up to 50000 characters. With several pages each one gets a smaller share, and all together are read up to 150000 characters. A page that is cut is counted in warning. The call fails only when no page can be read. Leave it out and send a prompt to search the web instead.","items":{"maxLength":2048,"type":"string"},"maxItems":25,"type":"array"},"webhook":{"anyOf":[{"type":"string"},{"additionalProperties":false,"properties":{"events":{"items":{"enum":["started","page","action","completed","failed","cancelled"],"type":"string"},"minItems":1,"type":"array"},"headers":{"additionalProperties":{"maxLength":1000,"type":"string"},"propertyNames":{"pattern":"^[A-Za-z0-9-]{1,64}$","type":"string"},"type":"object"},"metadata":{"additionalProperties":{"$ref":"#/definitions/__schema0"},"propertyNames":{"type":"string"},"type":"object"},"url":{"type":"string"}},"required":["url"],"type":"object"}],"description":"Where to be told when the extract ends: a plain address, or { url } which gets one JSON POST with the id, the status, the data and creditsUsed. headers are sent with the call, metadata comes back in it, and events picks completed, failed or both (both by default). The call is signed: read Stophy-Signature (t=<unix seconds>,v1=<hex>), the HMAC-SHA256 of \"<t>.<body>\" with your webhook secret from webhook.secret. A call that gets no 2xx is sent again, up to 3 times."},"zeroDataRetention":{"default":false,"description":"Send true to keep nothing from this call: pages are read live, the result is held for one hour at most, and nothing is logged. Costs 1 credit more per page.","type":"boolean"}},"type":"object"}before
{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"definitions":{"__schema0":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"items":{"allOf":[{"$ref":"#/definitions/__schema0"}]},"type":"array"},{"additionalProperties":{"allOf":[{"$ref":"#/definitions/__schema0"}]},"propertyNames":{"type":"string"},"type":"object"}]},"__schema1":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"items":{"allOf":[{"$ref":"#/definitions/__schema1"}]},"type":"array"},{"additionalProperties":{"allOf":[{"$ref":"#/definitions/__schema1"}]},"propertyNames":{"type":"string"},"type":"object"}]},"__schema2":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"items":{"allOf":[{"$ref":"#/definitions/__schema2"}]},"type":"array"},{"additionalProperties":{"allOf":[{"$ref":"#/definitions/__schema2"}]},"propertyNames":{"type":"string"},"type":"object"}]}},"properties":{"actions":{"description":"Up to 50 steps to run on the page, in order, before reading it: { \"type\": \"wait\", \"milliseconds\": 500 } (up to 30 seconds), { \"type\": \"wait\", \"selector\": \".results\" }, { \"type\": \"click\", \"selector\": \"button.more\" }, { \"type\": \"write\", \"text\": \"tides\" }, { \"type\": \"press\", \"key\": \"Enter\" }, { \"type\": \"scroll\", \"direction\": \"down\" } (also up, left or right; amount is pixels, \"viewport\" or \"max\"; maxScrolls 1 to 50; selector scrolls an inner container; \"max\" keeps scrolling until the page stops growing, for feeds that load as you go), { \"type\": \"screenshot\", \"fullPage\": true } (links come back in actions.screenshots), { \"type\": \"scrape\" } (the page at that point, in actions.scrapes), { \"type\": \"executeJavascript\", \"script\": \"document.title\" } (results in actions.javascriptReturns), { \"type\": \"pdf\", \"format\": \"A4\" } (links in actions.pdfs) or { \"type\": \"perform\", \"action\": \"Click the Load more button\" } (a step in plain words, up to 5 browser steps on this page, never leaving the site; at most 5 per call). A read with actions costs 1 credit, the same as any page; the actions themselves add nothing. If an action fails, you still get the page as it stood, with a warning that names the action and says why.","items":{"anyOf":[{"additionalProperties":false,"properties":{"milliseconds":{"maximum":30000,"minimum":1,"type":"integer"},"type":{"const":"wait","type":"string"}},"required":["type","milliseconds"],"type":"object"},{"additionalProperties":false,"properties":{"selector":{"minLength":1,"type":"string"},"type":{"const":"wait","type":"string"}},"required":["type","selector"],"type":"object"},{"additionalProperties":false,"properties":{"all":{"const":false,"type":"boolean"},"selector":{"minLength":1,"type":"string"},"type":{"const":"click","type":"string"}},"required":["type","selector"],"type":"object"},{"additionalProperties":false,"properties":{"text":{"minLength":1,"type":"string"},"type":{"const":"write","type":"string"}},"required":["type","text"],"type":"object"},{"additionalProperties":false,"properties":{"key":{"maxLength":40,"minLength":1,"type":"string"},"type":{"const":"press","type":"string"}},"required":["type","key"],"type":"object"},{"additionalProperties":false,"properties":{"amount":{"anyOf":[{"maximum":100000,"minimum":1,"type":"integer"},{"enum":["viewport","max"],"type":"string"}]},"direction":{"default":"down","enum":["up","down","left","right"],"type":"string"},"maxScrolls":{"maximum":50,"minimum":1,"type":"integer"},"selector":{"minLength":1,"type":"string"},"type":{"const":"scroll","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"fullPage":{"type":"boolean"},"quality":{"maximum":100,"minimum":1,"type":"integer"},"type":{"const":"screenshot","type":"string"},"viewport":{"additionalProperties":false,"properties":{"height":{"maximum":2160,"minimum":200,"type":"integer"},"width":{"maximum":3840,"minimum":200,"type":"integer"}},"required":["width","height"],"type":"object"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"type":{"const":"scrape","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"script":{"maxLength":20000,"minLength":1,"type":"string"},"type":{"const":"executeJavascript","type":"string"}},"required":["type","script"],"type":"object"},{"additionalProperties":false,"properties":{"format":{"enum":["Letter","Legal","Tabloid","Ledger","A0","A1","A2","A3","A4","A5","A6"],"type":"string"},"landscape":{"type":"boolean"},"scale":{"maximum":2,"minimum":0.1,"type":"number"},"type":{"const":"pdf","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"action":{"maxLength":500,"minLength":1,"type":"string"},"type":{"const":"perform","type":"string"}},"required":["type","action"],"type":"object"}]},"maxItems":50,"minItems":1,"type":"array"},"blockAds":{"description":"Ads and trackers are not loaded when a page runs in a browser. Send false to load them.","type":"boolean"},"checkPromptInjection":{"description":"Send true to scan the page text for instructions aimed at an AI model before anything is built from it. A page that has them is refused with 403 promptInjectionDetected and costs nothing. The scan adds 4 credits when it runs; a page it cannot scan fully comes back with a warning and no charge.","type":"boolean"},"excludeTags":{"description":"Remove the parts of the page that match these CSS selectors, such as .comments.","items":{"minLength":1,"type":"string"},"minItems":1,"type":"array"},"fastMode":{"description":"Send true to read the page without opening a browser: the answer comes sooner, but a page that needs a browser, or that refuses a plain request, comes back as an error instead of being retried. Ignored when the call needs a browser (actions, screenshot, waitFor, mobile, profile, network, branding).","type":"boolean"},"formats":{"default":["markdown"],"description":"What to return: markdown (clean page text), summary (a short summary of the page), html (the cleaned page), rawHtml (the page as sent), audio and video (for a YouTube link: the audio track as an M4A file, or the video as an MP4 file, as a link that works for 1 hour), rawBase64 (the bytes the site sent, Base64 encoded, from a live read; metadata.contentType says what they are), links (every link on the page), images (every image address), screenshot (a link to a JPEG of the visible page, kept for 7 days), changeTracking (what changed in the markdown since your key last read this page with the same options, kept 30 days; add modes [\"git-diff\",\"json\"] with a schema or prompt to compare fields too), question (send { \"type\": \"question\", \"question\": \"...\" } to get answer, null when the page does not state one), product (title, brand, category, url, description and variants with price, sale, availability and images, or null) and menu (merchant, currency and sections of items with prices, or null) network (the JSON the page loaded while it rendered, up to 30 responses) and branding (the page's colors, fonts, typography, spacing, button and input styles, logo and brand images, read from how the page looks, with a field left out when the page does not show it). Send { \"type\": \"screenshot\", \"fullPage\": true } for the whole page. Send { \"type\": \"highlights\", \"query\": \"refund policy\" } for the passages that best match a query. Send { \"type\": \"json\", \"schema\": { \"type\": \"object\", \"properties\": { \"price\": { \"type\": \"number\" } } } } or { \"type\": \"json\", \"prompt\": \"the price and the stock\" } for fields filled from the page, each checked against it. Send { \"type\": \"json\", \"parser\": \"amazon-product\" } to get a site's own data as json instead of reading the page; GET /v1/parsers lists the parsers. Send { \"type\": \"json\", \"rules\": { \"title\": \"h1\", \"links\": { \"selector\": \"a\", \"type\": \"list\", \"output\": \"@href\" } } } to read the page with CSS rules and no model, at the page's own price. Send { \"type\": \"attributes\", \"selectors\": [{ \"selector\": \"a\", \"attribute\": \"href\" }] } for attribute values, returned in attributes. Without a parser or rules, json needs a schema or a prompt and is filled from the page. json with a schema or a prompt, summary, highlights, question, product, menu and changeTracking in json mode cost 4 credits more each when they return something. json with rules or a parser, and attributes, cost nothing more. A screenshot, network or branding read costs 1 credit, the same as any page. A PDF comes back as markdown only, and costs 1 credit more for each page of text that comes back. A CSV or an Excel .xlsx file comes back as markdown tables.","items":{"anyOf":[{"enum":["markdown","summary","html","rawHtml","rawBase64","links","images","network","branding","audio","video","screenshot","changeTracking","product","menu"],"type":"string"},{"additionalProperties":false,"properties":{"type":{"enum":["markdown","summary","html","rawHtml","rawBase64","links","images","network","branding","audio","video"],"type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"modes":{"description":"git-diff returns a unified diff of the markdown. json compares the fields in schema or prompt between this read and the last one. Without modes you get git-diff.","items":{"enum":["git-diff","json"],"type":"string"},"maxItems":2,"type":"array"},"prompt":{"description":"With json mode: what to compare, in plain words, such as the price and stock.","maxLength":10000,"minLength":1,"type":"string"},"schema":{"additionalProperties":{"$ref":"#/definitions/__schema0"},"description":"The fields to fill, as a JSON Schema (draft-07 or 2020-12) object with properties. Pydantic's model_json_schema() and zod's toJSONSchema() output work as they are. enum, const, anyOf, oneOf, nullable types, $ref with $defs, required, descriptions and any key names are read. Up to 100 top-level fields and 32 KB. A field the page does not state comes back null.","propertyNames":{"type":"string"},"type":"object"},"tag":{"type":"null"},"type":{"const":"changeTracking","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"question":{"description":"A question to answer from the page, such as what the refund window is.","maxLength":10000,"minLength":1,"type":"string"},"type":{"const":"question","type":"string"}},"required":["type","question"],"type":"object"},{"additionalProperties":false,"properties":{"type":{"const":"product","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"type":{"const":"menu","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"fullPage":{"default":false,"description":"Capture the whole page from top to bottom instead of the visible part.","type":"boolean"},"quality":{"description":"JPEG quality from 1 to 100. The default is 70.","maximum":100,"minimum":1,"type":"integer"},"type":{"const":"screenshot","type":"string"},"viewport":{"additionalProperties":false,"description":"The window size in pixels, such as { width: 390, height: 844 }.","properties":{"height":{"maximum":2160,"minimum":200,"type":"integer"},"width":{"maximum":3840,"minimum":200,"type":"integer"}},"required":["width","height"],"type":"object"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"count":{"default":5,"description":"How many passages to return, best match first.","maximum":20,"minimum":1,"type":"integer"},"query":{"description":"What you are looking for on the page, such as refund policy.","maxLength":10000,"minLength":1,"type":"string"},"type":{"const":"highlights","type":"string"}},"required":["type","query"],"type":"object"},{"additionalProperties":false,"properties":{"checkPromptInjection":{"description":"Deprecated: send checkPromptInjection at the top level of the call.","type":"boolean"},"options":{"additionalProperties":{"$ref":"#/definitions/__schema1"},"description":"Only with parser: extra inputs for it, such as { \"page\": 2 } for the next page of results or { \"minRating\": 4.5 } for a filter. GET /v1/parsers lists what each parser accepts.","propertyNames":{"type":"string"},"type":"object"},"parser":{"description":"Read the page with a named parser, which gives the site's own data as json. The url must be the kind of page the parser reads. Parsers are the only way to read some sites. GET /v1/parsers lists them.","type":"string"},"prompt":{"description":"What to pull from the page in plain words, such as the version and the release date.","maxLength":10000,"minLength":1,"type":"string"},"rules":{"additionalProperties":{"$ref":"#/definitions/__schema2"},"description":"Read the page with CSS rules instead of a model, no extra fee. Each field is a selector such as \"h1\" (the first match's text), \"a@href\" (an attribute) or { \"selector\": \"li\", \"type\": \"list\", \"output\": \"text\" | \"html\" | \"@attribute\" | { nested fields } }. A missing item is null and an unmatched list is []. Relative links become absolute. Up to 100 fields, 5 levels deep. Not with schema, prompt or parser.","propertyNames":{"type":"string"},"type":"object"},"schema":{"additionalProperties":{"$ref":"#/definitions/__schema0"},"description":"The fields to fill, as a JSON Schema (draft-07 or 2020-12) object with properties. Pydantic's model_json_schema() and zod's toJSONSchema() output work as they are. enum, const, anyOf, oneOf, nullable types, $ref with $defs, required, descriptions and any key names are read. Up to 100 top-level fields and 32 KB. A field the page does not state comes back null.","propertyNames":{"type":"string"},"type":"object"},"type":{"const":"json","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"selectors":{"description":"The elements and attributes to read, such as { selector: 'a.buy', attribute: 'href' }.","items":{"additionalProperties":false,"properties":{"attribute":{"maxLength":100,"minLength":1,"type":"string"},"selector":{"minLength":1,"type":"string"}},"required":["selector","attribute"],"type":"object"},"maxItems":50,"minItems":1,"type":"array"},"type":{"const":"attributes","type":"string"}},"required":["type","selectors"],"type":"object"}]},"maxItems":20,"minItems":1,"type":"array"},"headers":{"additionalProperties":{"maxLength":2000,"pattern":"^[\\t\\x20-\\x7e]*$","type":"string"},"description":"Extra request headers to send to the site, such as { \"x-plan\": \"pro\" }. A read with headers is never answered from or saved to a stored copy.","propertyNames":{"pattern":"^[A-Za-z0-9-]{1,64}$","type":"string"},"type":"object"},"includeTags":{"description":"Keep only the parts of the page that match these CSS selectors, such as article or .price. When set, onlyMainContent is not applied.","items":{"minLength":1,"type":"string"},"minItems":1,"type":"array"},"linkStyle":{"default":"inline","description":"How links appear in the markdown. inline keeps [text](address). numbered writes Pricing⟨3⟩ and lists each address once at the end. none keeps only the link text, which makes link-heavy pages 10 to 70% shorter; ask for the links format to get the addresses.","enum":["inline","numbered","none"],"type":"string"},"location":{"additionalProperties":false,"description":"Where to read the page from. The default is the United States.","properties":{"country":{"description":"Two-letter country code to read the page from, such as DE or JP.","type":"string"},"languages":{"description":"Languages to ask the site for, best first, such as [\"de\", \"en\"]. Sent as Accept-Language. A read with languages is never answered from or saved to a stored copy.","items":{"pattern":"^[A-Za-z]{2,3}(?:-[A-Za-z0-9]{2,8})*$","type":"string"},"maxItems":5,"minItems":1,"type":"array"}},"type":"object"},"lockdown":{"description":"Send true to answer only from a stored copy of the page and never read it live, whatever its age. A page with no stored copy is notFound. The same as minAge 0.","type":"boolean"},"maxAge":{"description":"Accept a stored answer up to this many milliseconds old, at most 30 days. Without it, 2 days, or less for a site whose pages change often, and a copy up to twice that age (at most 7 days) comes back at once as stale while a fresh read runs. 0 always reads the page live. metadata.cacheState says which one you got.","maximum":9007199254740991,"minimum":0,"type":"integer"},"maxChars":{"description":"Cut the markdown at this many characters; isTruncated says when that happened and nextOffset where to read on. With query, how much of the page to keep, 8000 by default.","maximum":1000000,"minimum":500,"type":"integer"},"minAge":{"description":"Answer only from a stored copy that is at least this many milliseconds old, and never read the page live. 0 accepts any stored copy. A page with no such copy is notFound.","maximum":9007199254740991,"minimum":0,"type":"integer"},"mobile":{"description":"Read the page as a phone would: a phone-sized screen and the mobile version of the site. The page loads in a browser.","type":"boolean"},"offset":{"description":"Start the markdown this many characters into the page, PDF or file. Send the nextOffset of the last answer, with the same maxChars, to read on. Not with query.","maximum":9007199254740991,"minimum":0,"type":"integer"},"onlyCleanContent":{"description":"Send true to have a model remove what onlyMainContent leaves behind in the markdown: cookie banners, ads, share widgets, breadcrumbs, sign-up prompts, comment prompts and related-article lists. It only removes whole paragraphs and lists; it never rewrites or adds text, and code blocks are always kept. Skipped with a warning when the page is too long to clean or the model does not answer. Not with zeroDataRetention. Summary, answers and highlights are made from the cleaned markdown.","type":"boolean"},"onlyMainContent":{"default":true,"description":"Keep only the page's main content, without menus, headers, footers and ads.","type":"boolean"},"parsers":{"description":"Only the pdf parser exists. Send \"pdf\" or { \"type\": \"pdf\", mode, maxPages, pages, blocks, pageMarkers } with the same meaning as in parse. Without mode a PDF is read from its text layer only; auto reads the picture of a page that has no text, and ocr reads the picture of every page, up to 20 pages. Each page of text that comes back costs 1 credit.","items":{"anyOf":[{"const":"pdf","type":"string"},{"additionalProperties":false,"properties":{"blocks":{"description":"Send true to also get the page's layout in blocks: each title, section header or run of text, with its page, reading order, position on the page (bbox as left, top, right, bottom from 0 to 1) and where its text sits in that page's markdown (span, as in pages). Tables, figures and formulas are not told apart. A page read from its picture is one block. No extra charge.","type":"boolean"},"maxPages":{"description":"Read at most this many pages, up to 100.","maximum":100,"minimum":1,"type":"integer"},"mode":{"description":"fast reads the text layer only. auto (the default) reads the text layer and reads the picture of any page that has none. ocr reads the picture of every page.","enum":["fast","auto","ocr"],"type":"string"},"pageMarkers":{"description":"Send true to mark page breaks in the markdown: pages are joined with \"---\" and a line, where N is the page that follows. No extra charge.","type":"boolean"},"pages":{"description":"Send true to also get each page's markdown in pages, as { pageNumber, markdown }. No extra charge.","type":"boolean"},"type":{"const":"pdf","type":"string"}},"required":["type"],"type":"object"}]},"minItems":1,"type":"array"},"profile":{"additionalProperties":false,"description":"Read the page with the cookies and local storage that earlier calls saved under this name, kept for your account for 30 days after the last use. A call with a profile always loads the page in a browser, costs 1 credit, the same as any page, and is never answered from a stored copy. Only one call at a time can save to a profile.","properties":{"name":{"description":"A name you choose, such as shop-login. Calls with the same name share state.","maxLength":128,"minLength":1,"type":"string"},"saveChanges":{"default":true,"description":"Keep the cookies and local storage this read leaves behind for the next call with this name. Send false to read with the profile without changing it.","type":"boolean"}},"required":["name"],"type":"object"},"proxy":{"description":"auto: basic first, enhanced once if the site refuses. basic: one plain attempt. enhanced: the stronger read from the start. Same price.","enum":["auto","basic","enhanced"],"type":"string"},"query":{"description":"What you are looking for on the page, such as refund window. A page longer than maxChars (8000 by default) comes back as the passages that match, in page order, each with the text around it and its table header; a shorter page comes back whole. Costs nothing extra, and a PDF is charged for the share of its pages that comes back. Not with offset.","maxLength":10000,"minLength":1,"type":"string"},"redactPII":{"anyOf":[{"type":"boolean"},{"additionalProperties":false,"description":"Options for redactPII.","properties":{"entities":{"default":["PERSON","EMAIL","PHONE","LOCATION","FINANCIAL","SECRET"],"description":"What to hide: PERSON, EMAIL, PHONE, LOCATION, FINANCIAL, SECRET. All by default.","items":{"enum":["PERSON","EMAIL","PHONE","LOCATION","FINANCIAL","SECRET"],"type":"string"},"minItems":1,"type":"array"},"mode":{"default":"accurate","description":"accurate finds names and places with the model and the rest by pattern. aggressive adds guesses that catch more and may hide a little too much. fast uses patterns only, so it finds no ordinary names or places.","enum":["accurate","aggressive","fast"],"type":"string"},"replaceStyle":{"default":"tag","description":"tag writes <EMAIL>, mask writes * for each character, remove deletes it.","enum":["tag","mask","remove"],"type":"string"}},"type":"object"}],"description":"Send true, or an object, to hide personal data in the markdown and in everything made from it (summary, answers, highlights, json). Links, html and rawHtml are not changed. A page the model cannot scan is refused rather than returned unredacted."},"removeBase64Images":{"description":"Images inside the page that carry their data in the address (data:image) are dropped by default. Send false to keep them in markdown and html.","type":"boolean"},"skipTlsVerification":{"description":"Send true to read a page whose certificate is expired, self-signed or for another name. The read is not private against someone between us and the site.","type":"boolean"},"storeInCache":{"default":true,"description":"Send false to neither read nor keep a stored copy of this page.","type":"boolean"},"timeout":{"description":"How long to keep trying, in milliseconds, between 10 seconds and 2 minutes. Pages behind a bot check can need 10 to 30 seconds the first time.","maximum":300000,"minimum":1000,"type":"integer"},"url":{"description":"The page or PDF to read, such as https://bun.com/docs.","type":"string"},"urls":{"not":{}},"waitFor":{"description":"Extra milliseconds to wait before reading, up to 60000, for pages that load their content late. To wait for an element, add a wait action with a selector. A read that waits costs 1 credit, the same as any page.","maximum":60000,"minimum":0,"type":"integer"},"zeroDataRetention":{"default":false,"description":"Send true to keep nothing from this call: no stored copy is read or made, and nothing from it is logged. Costs 1 credit more per page. Not with a screenshot.","type":"boolean"}},"required":["url"],"type":"object"}after
{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"definitions":{"__schema0":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"items":{"allOf":[{"$ref":"#/definitions/__schema0"}]},"type":"array"},{"additionalProperties":{"allOf":[{"$ref":"#/definitions/__schema0"}]},"propertyNames":{"type":"string"},"type":"object"}]},"__schema1":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"items":{"allOf":[{"$ref":"#/definitions/__schema1"}]},"type":"array"},{"additionalProperties":{"allOf":[{"$ref":"#/definitions/__schema1"}]},"propertyNames":{"type":"string"},"type":"object"}]},"__schema2":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"items":{"allOf":[{"$ref":"#/definitions/__schema2"}]},"type":"array"},{"additionalProperties":{"allOf":[{"$ref":"#/definitions/__schema2"}]},"propertyNames":{"type":"string"},"type":"object"}]}},"properties":{"actions":{"description":"Up to 50 steps to run on the page, in order, before reading it: { \"type\": \"wait\", \"milliseconds\": 500 } (up to 60 seconds), { \"type\": \"wait\", \"selector\": \".results\" }, { \"type\": \"click\", \"selector\": \"button.more\" }, { \"type\": \"write\", \"text\": \"tides\" }, { \"type\": \"press\", \"key\": \"Enter\" }, { \"type\": \"scroll\", \"direction\": \"down\" } (also up, left or right; amount is pixels, \"viewport\" or \"max\"; maxScrolls 1 to 50; selector scrolls an inner container; \"max\" keeps scrolling until the page stops growing, for feeds that load as you go), { \"type\": \"screenshot\", \"fullPage\": true } (links come back in actions.screenshots), { \"type\": \"scrape\" } (the page at that point, in actions.scrapes), { \"type\": \"executeJavascript\", \"script\": \"document.title\" } (results in actions.javascriptReturns), { \"type\": \"pdf\", \"format\": \"A4\" } (links in actions.pdfs) or { \"type\": \"perform\", \"action\": \"Click the Load more button\" } (a step in plain words, up to 5 browser steps on this page, never leaving the site; at most 5 per call). A read with actions costs 1 credit, the same as any page; the actions themselves add nothing. If an action fails, you still get the page as it stood, with a warning that names the action and says why.","items":{"anyOf":[{"additionalProperties":false,"properties":{"milliseconds":{"maximum":60000,"minimum":1,"type":"integer"},"type":{"const":"wait","type":"string"}},"required":["type","milliseconds"],"type":"object"},{"additionalProperties":false,"properties":{"selector":{"minLength":1,"type":"string"},"type":{"const":"wait","type":"string"}},"required":["type","selector"],"type":"object"},{"additionalProperties":false,"properties":{"all":{"const":false,"type":"boolean"},"selector":{"minLength":1,"type":"string"},"type":{"const":"click","type":"string"}},"required":["type","selector"],"type":"object"},{"additionalProperties":false,"properties":{"text":{"minLength":1,"type":"string"},"type":{"const":"write","type":"string"}},"required":["type","text"],"type":"object"},{"additionalProperties":false,"properties":{"key":{"maxLength":40,"minLength":1,"type":"string"},"type":{"const":"press","type":"string"}},"required":["type","key"],"type":"object"},{"additionalProperties":false,"properties":{"amount":{"anyOf":[{"maximum":100000,"minimum":1,"type":"integer"},{"enum":["viewport","max"],"type":"string"}]},"direction":{"default":"down","enum":["up","down","left","right"],"type":"string"},"maxScrolls":{"maximum":50,"minimum":1,"type":"integer"},"selector":{"minLength":1,"type":"string"},"type":{"const":"scroll","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"fullPage":{"type":"boolean"},"quality":{"maximum":100,"minimum":1,"type":"integer"},"type":{"const":"screenshot","type":"string"},"viewport":{"additionalProperties":false,"properties":{"height":{"maximum":2160,"minimum":200,"type":"integer"},"width":{"maximum":3840,"minimum":200,"type":"integer"}},"required":["width","height"],"type":"object"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"type":{"const":"scrape","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"script":{"maxLength":20000,"minLength":1,"type":"string"},"type":{"const":"executeJavascript","type":"string"}},"required":["type","script"],"type":"object"},{"additionalProperties":false,"properties":{"format":{"enum":["Letter","Legal","Tabloid","Ledger","A0","A1","A2","A3","A4","A5","A6"],"type":"string"},"landscape":{"type":"boolean"},"scale":{"maximum":2,"minimum":0.1,"type":"number"},"type":{"const":"pdf","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"action":{"maxLength":500,"minLength":1,"type":"string"},"type":{"const":"perform","type":"string"}},"required":["type","action"],"type":"object"}]},"maxItems":50,"minItems":1,"type":"array"},"blockAds":{"description":"Ads and trackers are not loaded when a page runs in a browser. Send false to load them.","type":"boolean"},"checkPromptInjection":{"description":"Send true to scan the page text for instructions aimed at an AI model before anything is built from it. A page that has them is refused with 403 promptInjectionDetected and costs nothing. The scan adds 4 credits when it runs; a page it cannot scan fully comes back with a warning and no charge.","type":"boolean"},"excludeTags":{"description":"Remove the parts of the page that match these CSS selectors, such as .comments.","items":{"minLength":1,"type":"string"},"minItems":1,"type":"array"},"fastMode":{"description":"Send true to read the page without opening a browser: the answer comes sooner, but a page that needs a browser, or that refuses a plain request, comes back as an error instead of being retried. Ignored when the call needs a browser (actions, screenshot, waitFor, mobile, profile, network, branding).","type":"boolean"},"formats":{"default":["markdown"],"description":"What to return: markdown (clean page text), summary (a short summary of the page), html (the cleaned page), rawHtml (the page as sent), audio and video (for a YouTube link: the audio track as an M4A file, or the video as an MP4 file, as a link that works for 1 hour), rawBase64 (the bytes the site sent, Base64 encoded, from a live read; metadata.contentType says what they are), links (every link on the page), images (every image address), screenshot (a link to a JPEG of the visible page, kept for 7 days), changeTracking (what changed in the markdown since your key last read this page with the same options, kept 30 days; add modes [\"git-diff\",\"json\"] with a schema or prompt to compare fields too), question (send { \"type\": \"question\", \"question\": \"...\" } to get answer, null when the page does not state one), product (title, brand, category, url, description and variants with price, sale, availability and images, or null) and menu (merchant, currency and sections of items with prices, or null) network (the JSON the page loaded while it rendered, up to 30 responses) and branding (the page's colors, fonts, typography, spacing, button and input styles, logo and brand images, read from how the page looks, with a field left out when the page does not show it). Send { \"type\": \"screenshot\", \"fullPage\": true } for the whole page. Send { \"type\": \"highlights\", \"query\": \"refund policy\" } for the passages that best match a query. Send { \"type\": \"json\", \"schema\": { \"type\": \"object\", \"properties\": { \"price\": { \"type\": \"number\" } } } } or { \"type\": \"json\", \"prompt\": \"the price and the stock\" } for fields filled from the page, each checked against it. Send { \"type\": \"json\", \"parser\": \"amazon-product\" } to get a site's own data as json instead of reading the page; GET /v1/parsers lists the parsers. Send { \"type\": \"json\", \"rules\": { \"title\": \"h1\", \"links\": { \"selector\": \"a\", \"type\": \"list\", \"output\": \"@href\" } } } to read the page with CSS rules and no model, at the page's own price. Send { \"type\": \"attributes\", \"selectors\": [{ \"selector\": \"a\", \"attribute\": \"href\" }] } for attribute values, returned in attributes. Without a parser or rules, json needs a schema or a prompt and is filled from the page. json with a schema or a prompt, summary, highlights, question, product, menu and changeTracking in json mode cost 4 credits more each when they return something. json with rules or a parser, and attributes, cost nothing more. A screenshot, network or branding read costs 1 credit, the same as any page. A PDF comes back as markdown only, and costs 1 credit more for each page of text that comes back. A CSV or an Excel .xlsx file comes back as markdown tables.","items":{"anyOf":[{"enum":["markdown","summary","html","rawHtml","rawBase64","links","images","network","branding","audio","video","screenshot","changeTracking","product","menu"],"type":"string"},{"additionalProperties":false,"properties":{"type":{"enum":["markdown","summary","html","rawHtml","rawBase64","links","images","network","branding","audio","video"],"type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"modes":{"description":"git-diff returns a unified diff of the markdown. json compares the fields in schema or prompt between this read and the last one. Without modes you get git-diff.","items":{"enum":["git-diff","json"],"type":"string"},"maxItems":2,"type":"array"},"prompt":{"description":"With json mode: what to compare, in plain words, such as the price and stock.","maxLength":10000,"minLength":1,"type":"string"},"schema":{"additionalProperties":{"$ref":"#/definitions/__schema0"},"description":"The fields to fill, as a JSON Schema (draft-07 or 2020-12) object with properties. Pydantic's model_json_schema() and zod's toJSONSchema() output work as they are. enum, const, anyOf, oneOf, nullable types, $ref with $defs, required, descriptions and any key names are read. Up to 100 top-level fields and 32 KB. A field the page does not state comes back null.","propertyNames":{"type":"string"},"type":"object"},"tag":{"type":"null"},"type":{"const":"changeTracking","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"question":{"description":"A question to answer from the page, such as what the refund window is.","maxLength":10000,"minLength":1,"type":"string"},"type":{"const":"question","type":"string"}},"required":["type","question"],"type":"object"},{"additionalProperties":false,"properties":{"type":{"const":"product","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"type":{"const":"menu","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"fullPage":{"default":false,"description":"Capture the whole page from top to bottom instead of the visible part.","type":"boolean"},"quality":{"description":"JPEG quality from 1 to 100. The default is 70.","maximum":100,"minimum":1,"type":"integer"},"type":{"const":"screenshot","type":"string"},"viewport":{"additionalProperties":false,"description":"The window size in pixels, such as { width: 390, height: 844 }.","properties":{"height":{"maximum":2160,"minimum":200,"type":"integer"},"width":{"maximum":3840,"minimum":200,"type":"integer"}},"required":["width","height"],"type":"object"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"count":{"default":5,"description":"How many passages to return, best match first.","maximum":20,"minimum":1,"type":"integer"},"query":{"description":"What you are looking for on the page, such as refund policy.","maxLength":10000,"minLength":1,"type":"string"},"type":{"const":"highlights","type":"string"}},"required":["type","query"],"type":"object"},{"additionalProperties":false,"properties":{"checkPromptInjection":{"description":"Deprecated: send checkPromptInjection at the top level of the call.","type":"boolean"},"options":{"additionalProperties":{"$ref":"#/definitions/__schema1"},"description":"Only with parser: extra inputs for it, such as { \"page\": 2 } for the next page of results or { \"minRating\": 4.5 } for a filter. GET /v1/parsers lists what each parser accepts.","propertyNames":{"type":"string"},"type":"object"},"parser":{"description":"Read the page with a named parser, which gives the site's own data as json. The url must be the kind of page the parser reads. Parsers are the only way to read some sites. GET /v1/parsers lists them.","type":"string"},"prompt":{"description":"What to pull from the page in plain words, such as the version and the release date.","maxLength":10000,"minLength":1,"type":"string"},"rules":{"additionalProperties":{"$ref":"#/definitions/__schema2"},"description":"Read the page with CSS rules instead of a model, no extra fee. Each field is a selector such as \"h1\" (the first match's text), \"a@href\" (an attribute) or { \"selector\": \"li\", \"type\": \"list\", \"output\": \"text\" | \"html\" | \"@attribute\" | { nested fields } }. A missing item is null and an unmatched list is []. Relative links become absolute. Up to 100 fields, 5 levels deep. Not with schema, prompt or parser.","propertyNames":{"type":"string"},"type":"object"},"schema":{"additionalProperties":{"$ref":"#/definitions/__schema0"},"description":"The fields to fill, as a JSON Schema (draft-07 or 2020-12) object with properties. Pydantic's model_json_schema() and zod's toJSONSchema() output work as they are. enum, const, anyOf, oneOf, nullable types, $ref with $defs, required, descriptions and any key names are read. Up to 100 top-level fields and 32 KB. A field the page does not state comes back null.","propertyNames":{"type":"string"},"type":"object"},"type":{"const":"json","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"selectors":{"description":"The elements and attributes to read, such as { selector: 'a.buy', attribute: 'href' }.","items":{"additionalProperties":false,"properties":{"attribute":{"maxLength":100,"minLength":1,"type":"string"},"selector":{"minLength":1,"type":"string"}},"required":["selector","attribute"],"type":"object"},"maxItems":50,"minItems":1,"type":"array"},"type":{"const":"attributes","type":"string"}},"required":["type","selectors"],"type":"object"}]},"maxItems":20,"minItems":1,"type":"array"},"headers":{"additionalProperties":{"maxLength":2000,"pattern":"^[\\t\\x20-\\x7e]*$","type":"string"},"description":"Extra request headers to send to the site, such as { \"x-plan\": \"pro\" }. A read with headers is never answered from or saved to a stored copy.","propertyNames":{"pattern":"^[A-Za-z0-9-]{1,64}$","type":"string"},"type":"object"},"includeTags":{"description":"Keep only the parts of the page that match these CSS selectors, such as article or .price. When set, onlyMainContent is not applied.","items":{"minLength":1,"type":"string"},"minItems":1,"type":"array"},"linkStyle":{"default":"inline","description":"How links appear in the markdown. inline keeps [text](address). numbered writes Pricing⟨3⟩ and lists each address once at the end. none keeps only the link text, which makes link-heavy pages 10 to 70% shorter; ask for the links format to get the addresses.","enum":["inline","numbered","none"],"type":"string"},"location":{"additionalProperties":false,"description":"Where to read the page from. The default is the United States.","properties":{"country":{"description":"Two-letter country code to read the page from, such as DE or JP.","type":"string"},"languages":{"description":"Languages to ask the site for, best first, such as [\"de\", \"en\"]. Sent as Accept-Language. A read with languages is never answered from or saved to a stored copy.","items":{"pattern":"^[A-Za-z]{2,3}(?:-[A-Za-z0-9]{2,8})*$","type":"string"},"maxItems":5,"minItems":1,"type":"array"}},"type":"object"},"lockdown":{"description":"Send true to answer only from a stored copy of the page and never read it live, whatever its age. A page with no stored copy is notFound. The same as minAge 0.","type":"boolean"},"maxAge":{"description":"Accept a stored answer up to this many milliseconds old, at most 30 days. Without it, 2 days, or less for a site whose pages change often, and a copy up to twice that age (at most 7 days) comes back at once as stale while a fresh read runs. 0 always reads the page live. metadata.cacheState says which one you got.","maximum":9007199254740991,"minimum":0,"type":"integer"},"maxChars":{"description":"Cut the markdown at this many characters; isTruncated says when that happened and nextOffset where to read on. With query, how much of the page to keep, 8000 by default.","maximum":1000000,"minimum":500,"type":"integer"},"minAge":{"description":"Answer only from a stored copy that is at least this many milliseconds old, and never read the page live. 0 accepts any stored copy. A page with no such copy is notFound.","maximum":9007199254740991,"minimum":0,"type":"integer"},"mobile":{"description":"Read the page as a phone would: a phone-sized screen and the mobile version of the site. The page loads in a browser.","type":"boolean"},"offset":{"description":"Start the markdown this many characters into the page, PDF or file. Send the nextOffset of the last answer, with the same maxChars, to read on. Not with query.","maximum":9007199254740991,"minimum":0,"type":"integer"},"onlyCleanContent":{"description":"Send true to have a model remove what onlyMainContent leaves behind in the markdown: cookie banners, ads, share widgets, breadcrumbs, sign-up prompts, comment prompts and related-article lists. It only removes whole paragraphs and lists; it never rewrites or adds text, and code blocks are always kept. Skipped with a warning when the page is too long to clean or the model does not answer. Not with zeroDataRetention. Summary, answers and highlights are made from the cleaned markdown.","type":"boolean"},"onlyMainContent":{"default":true,"description":"Keep only the page's main content, without menus, headers, footers and ads.","type":"boolean"},"parsers":{"description":"Only the pdf parser exists. Send \"pdf\" or { \"type\": \"pdf\", mode, maxPages, pages, blocks, pageMarkers } with the same meaning as in parse. Without mode a PDF is read as auto: from its text layer, and from the picture of any page that has no text. fast reads the text layer only, and ocr reads the picture of every page, up to 20 pages. Each page of text that comes back costs 1 credit. Pictures are read only with an API key.","items":{"anyOf":[{"const":"pdf","type":"string"},{"additionalProperties":false,"properties":{"blocks":{"description":"Send true to also get the page's layout in blocks: each title, section header or run of text, with its page, reading order, position on the page (bbox as left, top, right, bottom from 0 to 1) and where its text sits in that page's markdown (span, as in pages). Tables, figures and formulas are not told apart. A page read from its picture is one block. No extra charge.","type":"boolean"},"maxPages":{"description":"Read at most this many pages, up to 500, which is also the default.","maximum":500,"minimum":1,"type":"integer"},"mode":{"description":"fast reads the text layer only. auto (the default) reads the text layer and reads the picture of any page that has none. ocr reads the picture of every page.","enum":["fast","auto","ocr"],"type":"string"},"pageMarkers":{"description":"Send true to mark page breaks in the markdown: pages are joined with \"---\" and a line, where N is the page that follows. No extra charge.","type":"boolean"},"pages":{"description":"Send true to also get each page's markdown in pages, as { pageNumber, markdown }. No extra charge.","type":"boolean"},"type":{"const":"pdf","type":"string"}},"required":["type"],"type":"object"}]},"minItems":1,"type":"array"},"profile":{"additionalProperties":false,"description":"Read the page with the cookies and local storage that earlier calls saved under this name, kept for your account for 30 days after the last use. A call with a profile always loads the page in a browser, costs 1 credit, the same as any page, and is never answered from a stored copy. Only one call at a time can save to a profile.","properties":{"name":{"description":"A name you choose, such as shop-login. Calls with the same name share state.","maxLength":128,"minLength":1,"type":"string"},"saveChanges":{"default":true,"description":"Keep the cookies and local storage this read leaves behind for the next call with this name. Send false to read with the profile without changing it.","type":"boolean"}},"required":["name"],"type":"object"},"proxy":{"description":"auto: basic first, enhanced once if the site refuses. basic: one plain attempt. enhanced: the stronger read from the start. stealth is the same as enhanced. Same price.","enum":["auto","basic","enhanced","stealth"],"type":"string"},"query":{"description":"What you are looking for on the page, such as refund window. A page longer than maxChars (8000 by default) comes back as the passages that match, in page order, each with the text around it and its table header; a shorter page comes back whole. Costs nothing extra, and a PDF is charged for the share of its pages that comes back. Not with offset.","maxLength":10000,"minLength":1,"type":"string"},"redactPII":{"anyOf":[{"type":"boolean"},{"additionalProperties":false,"description":"Options for redactPII.","properties":{"entities":{"default":["PERSON","EMAIL","PHONE","LOCATION","FINANCIAL","SECRET"],"description":"What to hide: PERSON, EMAIL, PHONE, LOCATION, FINANCIAL, SECRET. All by default.","items":{"enum":["PERSON","EMAIL","PHONE","LOCATION","FINANCIAL","SECRET"],"type":"string"},"minItems":1,"type":"array"},"mode":{"default":"accurate","description":"accurate finds names and places with the model and the rest by pattern. aggressive adds guesses that catch more and may hide a little too much. fast uses patterns only, so it finds no ordinary names or places.","enum":["accurate","aggressive","fast"],"type":"string"},"replaceStyle":{"default":"tag","description":"tag writes <EMAIL>, mask writes * for each character, remove deletes it.","enum":["tag","mask","remove"],"type":"string"}},"type":"object"}],"description":"Send true, or an object, to hide personal data in the markdown and in everything made from it (summary, answers, highlights, json). Links, html and rawHtml are not changed. A page the model cannot scan is refused rather than returned unredacted."},"removeBase64Images":{"description":"Images inside the page that carry their data in the address (data:image) are dropped by default. Send false to keep them in markdown and html.","type":"boolean"},"skipTlsVerification":{"description":"Send true to read a page whose certificate is expired, self-signed or for another name. The read is not private against someone between us and the site.","type":"boolean"},"storeInCache":{"default":true,"description":"Send false to neither read nor keep a stored copy of this page.","type":"boolean"},"timeout":{"default":60000,"description":"How long to keep trying, in milliseconds, from 1 second to 5 minutes; 60 seconds by default. A page that needs a browser needs at least 5 seconds, and pages behind a bot check can need 10 to 30 seconds the first time. A read that runs out of time is an error and costs nothing.","maximum":300000,"minimum":1000,"type":"integer"},"url":{"description":"The page or PDF to read, such as https://bun.com/docs.","type":"string"},"urls":{"not":{}},"waitFor":{"description":"Extra milliseconds to wait before reading, up to 60000, for pages that load their content late. To wait for an element, add a wait action with a selector. A read that waits costs 1 credit, the same as any page.","maximum":60000,"minimum":0,"type":"integer"},"zeroDataRetention":{"default":false,"description":"Send true to keep nothing from this call: no stored copy is read or made, and nothing from it is logged. Costs 1 credit more per page. Not with a screenshot.","type":"boolean"}},"required":["url"],"type":"object"}before
{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"definitions":{"__schema0":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"items":{"allOf":[{"$ref":"#/definitions/__schema0"}]},"type":"array"},{"additionalProperties":{"allOf":[{"$ref":"#/definitions/__schema0"}]},"propertyNames":{"type":"string"},"type":"object"}]},"__schema1":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"items":{"allOf":[{"$ref":"#/definitions/__schema1"}]},"type":"array"},{"additionalProperties":{"allOf":[{"$ref":"#/definitions/__schema1"}]},"propertyNames":{"type":"string"},"type":"object"}]},"__schema2":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"items":{"allOf":[{"$ref":"#/definitions/__schema2"}]},"type":"array"},{"additionalProperties":{"allOf":[{"$ref":"#/definitions/__schema2"}]},"propertyNames":{"type":"string"},"type":"object"}]}},"properties":{"categories":{"description":"pdf: web results that are PDF files. research: scholarly papers, in a research list, ranked by relevance then citations. companies: companies that match the query, in a companies list, best matches first. The query can name a place, industry, employee count, founding year and funding stage, like fintech startups in Berlin, 50-200 employees. people: people that match the query, in a people list, best matches first. The query can name a role, company, place or research topic, like CFO of Stripe, founders of fintech startups in Berlin, or researchers on CRISPR base editing. Each person has roles, affiliations and public profile links, never contact details. developer: passages from GitHub READMEs, issues, merged pull requests, releases, developer docs and API operations, in a developer list; send it as an object to filter by repos, types, language and minStars. gov: statutes, regulations, register notices and bills from government sources, in the web group with category gov and the kind, jurisdiction and citation of each. videos: passages from what is said in YouTube videos shared under a Creative Commons license, in a videos list, one result per video, with the channel, the license and the watch link; the link carries &t= only when the passage's start is exact. The index is a June 2024 snapshot of English videos, so a link may be dead.","items":{"anyOf":[{"enum":["developer","gov","research","pdf","companies","people","videos"],"type":"string"},{"additionalProperties":false,"properties":{"type":{"enum":["developer","gov","research","pdf","companies","people","videos"],"type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"language":{"description":"Only repositories whose main language is this, like TypeScript.","minLength":1,"type":"string"},"minStars":{"description":"Only repositories with at least this many GitHub stars.","maximum":9007199254740991,"minimum":0,"type":"integer"},"repos":{"default":[],"description":"Only results from these GitHub repositories, as owner/name.","items":{"pattern":"^[\\w.-]+\\/[\\w.-]+$","type":"string"},"maxItems":5,"type":"array"},"type":{"const":"developer","type":"string"},"types":{"default":[],"description":"Only these result types: readme, issue, pull_request, release, operation, doc.","items":{"enum":["readme","issue","pull_request","release","operation","doc"],"type":"string"},"type":"array"}},"required":["type"],"type":"object"}]},"type":"array"},"country":{"description":"Two-letter country to search from, like us. uk is read as gb. Image results are always US.","pattern":"^[A-Za-z]{2}$","type":"string"},"excludeDomains":{"items":{"type":"string"},"maxItems":10,"type":"array"},"highlights":{"default":true,"description":"On by default. When a web result's page is already stored, its description is the passages of that page that best match the query. Send false for the snippet the search engine shows.","type":"boolean"},"ignoreInvalidURLs":{"default":false,"description":"Leave out results whose address cannot be read as a page.","type":"boolean"},"includeDomains":{"items":{"type":"string"},"maxItems":10,"type":"array"},"limit":{"description":"Most results to return for each source. Default 10, or 5 with scrapeOptions, which reads every web and news result returned. News returns at most 50.","maximum":100,"minimum":1,"type":"integer"},"location":{"description":"Where to search from, like Germany or San Francisco,California,United States. The last part is the country and replaces country. A city before it narrows web results to that place.","minLength":1,"type":"string"},"maxAge":{"description":"Accept a stored answer up to this many milliseconds old, at most 30 days. Without it, 15 minutes for news and 1 hour for web and images. 0 always searches live.","maximum":9007199254740991,"minimum":0,"type":"integer"},"query":{"description":"What to search for, up to 500 characters. Search operators work in web results: quotes for an exact phrase, -word, site:, -site:, filetype:, inurl:, allinurl:, intitle: and allintitle:. In image results, imagesize:WIDTHxHEIGHT keeps images of exactly that size and larger:WIDTHxHEIGHT keeps images at least that large.","maxLength":500,"minLength":1,"type":"string"},"safe":{"description":"Hide explicit web, news and image results when true.","type":"boolean"},"scrapeOptions":{"additionalProperties":false,"description":"Reads each web and news result, as many as limit asks for, within timeout, and puts the passages that best match the query in each web description. Takes the options of scrape: formats (markdown, html, rawHtml, links, images, summary, screenshot, json and the rest), onlyMainContent, includeTags, excludeTags, maxAge, minAge, waitFor, mobile, timeout (per page), headers, actions, location, parsers, profile and zeroDataRetention. Costs what scrape costs for each page read: 1 credit, plus 4 for each summary or json with a schema or prompt that returns something.","properties":{"actions":{"description":"Up to 50 steps to run on the page, in order, before reading it: { \"type\": \"wait\", \"milliseconds\": 500 } (up to 30 seconds), { \"type\": \"wait\", \"selector\": \".results\" }, { \"type\": \"click\", \"selector\": \"button.more\" }, { \"type\": \"write\", \"text\": \"tides\" }, { \"type\": \"press\", \"key\": \"Enter\" }, { \"type\": \"scroll\", \"direction\": \"down\" } (also up, left or right; amount is pixels, \"viewport\" or \"max\"; maxScrolls 1 to 50; selector scrolls an inner container; \"max\" keeps scrolling until the page stops growing, for feeds that load as you go), { \"type\": \"screenshot\", \"fullPage\": true } (links come back in actions.screenshots), { \"type\": \"scrape\" } (the page at that point, in actions.scrapes), { \"type\": \"executeJavascript\", \"script\": \"document.title\" } (results in actions.javascriptReturns), { \"type\": \"pdf\", \"format\": \"A4\" } (links in actions.pdfs) or { \"type\": \"perform\", \"action\": \"Click the Load more button\" } (a step in plain words, up to 5 browser steps on this page, never leaving the site; at most 5 per call). A read with actions costs 1 credit, the same as any page; the actions themselves add nothing. If an action fails, you still get the page as it stood, with a warning that names the action and says why.","items":{"anyOf":[{"additionalProperties":false,"properties":{"milliseconds":{"maximum":30000,"minimum":1,"type":"integer"},"type":{"const":"wait","type":"string"}},"required":["type","milliseconds"],"type":"object"},{"additionalProperties":false,"properties":{"selector":{"minLength":1,"type":"string"},"type":{"const":"wait","type":"string"}},"required":["type","selector"],"type":"object"},{"additionalProperties":false,"properties":{"all":{"const":false,"type":"boolean"},"selector":{"minLength":1,"type":"string"},"type":{"const":"click","type":"string"}},"required":["type","selector"],"type":"object"},{"additionalProperties":false,"properties":{"text":{"minLength":1,"type":"string"},"type":{"const":"write","type":"string"}},"required":["type","text"],"type":"object"},{"additionalProperties":false,"properties":{"key":{"maxLength":40,"minLength":1,"type":"string"},"type":{"const":"press","type":"string"}},"required":["type","key"],"type":"object"},{"additionalProperties":false,"properties":{"amount":{"anyOf":[{"maximum":100000,"minimum":1,"type":"integer"},{"enum":["viewport","max"],"type":"string"}]},"direction":{"default":"down","enum":["up","down","left","right"],"type":"string"},"maxScrolls":{"maximum":50,"minimum":1,"type":"integer"},"selector":{"minLength":1,"type":"string"},"type":{"const":"scroll","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"fullPage":{"type":"boolean"},"quality":{"maximum":100,"minimum":1,"type":"integer"},"type":{"const":"screenshot","type":"string"},"viewport":{"additionalProperties":false,"properties":{"height":{"maximum":2160,"minimum":200,"type":"integer"},"width":{"maximum":3840,"minimum":200,"type":"integer"}},"required":["width","height"],"type":"object"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"type":{"const":"scrape","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"script":{"maxLength":20000,"minLength":1,"type":"string"},"type":{"const":"executeJavascript","type":"string"}},"required":["type","script"],"type":"object"},{"additionalProperties":false,"properties":{"format":{"enum":["Letter","Legal","Tabloid","Ledger","A0","A1","A2","A3","A4","A5","A6"],"type":"string"},"landscape":{"type":"boolean"},"scale":{"maximum":2,"minimum":0.1,"type":"number"},"type":{"const":"pdf","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"action":{"maxLength":500,"minLength":1,"type":"string"},"type":{"const":"perform","type":"string"}},"required":["type","action"],"type":"object"}]},"maxItems":50,"minItems":1,"type":"array"},"blockAds":{"description":"Ads and trackers are not loaded when a page runs in a browser. Send false to load them.","type":"boolean"},"checkPromptInjection":{"description":"Send true to scan the page text for instructions aimed at an AI model before anything is built from it. A page that has them is refused with 403 promptInjectionDetected and costs nothing. The scan adds 4 credits when it runs; a page it cannot scan fully comes back with a warning and no charge.","type":"boolean"},"excludeTags":{"description":"Remove the parts of the page that match these CSS selectors, such as .comments.","items":{"minLength":1,"type":"string"},"minItems":1,"type":"array"},"fastMode":{"description":"Send true to read the page without opening a browser: the answer comes sooner, but a page that needs a browser, or that refuses a plain request, comes back as an error instead of being retried. Ignored when the call needs a browser (actions, screenshot, waitFor, mobile, profile, network, branding).","type":"boolean"},"formats":{"default":["markdown"],"description":"What to return: markdown (clean page text), summary (a short summary of the page), html (the cleaned page), rawHtml (the page as sent), audio and video (for a YouTube link: the audio track as an M4A file, or the video as an MP4 file, as a link that works for 1 hour), rawBase64 (the bytes the site sent, Base64 encoded, from a live read; metadata.contentType says what they are), links (every link on the page), images (every image address), screenshot (a link to a JPEG of the visible page, kept for 7 days), changeTracking (what changed in the markdown since your key last read this page with the same options, kept 30 days; add modes [\"git-diff\",\"json\"] with a schema or prompt to compare fields too), question (send { \"type\": \"question\", \"question\": \"...\" } to get answer, null when the page does not state one), product (title, brand, category, url, description and variants with price, sale, availability and images, or null) and menu (merchant, currency and sections of items with prices, or null) network (the JSON the page loaded while it rendered, up to 30 responses) and branding (the page's colors, fonts, typography, spacing, button and input styles, logo and brand images, read from how the page looks, with a field left out when the page does not show it). Send { \"type\": \"screenshot\", \"fullPage\": true } for the whole page. Send { \"type\": \"highlights\", \"query\": \"refund policy\" } for the passages that best match a query. Send { \"type\": \"json\", \"schema\": { \"type\": \"object\", \"properties\": { \"price\": { \"type\": \"number\" } } } } or { \"type\": \"json\", \"prompt\": \"the price and the stock\" } for fields filled from the page, each checked against it. Send { \"type\": \"json\", \"parser\": \"amazon-product\" } to get a site's own data as json instead of reading the page; GET /v1/parsers lists the parsers. Send { \"type\": \"json\", \"rules\": { \"title\": \"h1\", \"links\": { \"selector\": \"a\", \"type\": \"list\", \"output\": \"@href\" } } } to read the page with CSS rules and no model, at the page's own price. Send { \"type\": \"attributes\", \"selectors\": [{ \"selector\": \"a\", \"attribute\": \"href\" }] } for attribute values, returned in attributes. Without a parser or rules, json needs a schema or a prompt and is filled from the page. json with a schema or a prompt, summary, highlights, question, product, menu and changeTracking in json mode cost 4 credits more each when they return something. json with rules or a parser, and attributes, cost nothing more. A screenshot, network or branding read costs 1 credit, the same as any page. A PDF comes back as markdown only, and costs 1 credit more for each page of text that comes back. A CSV or an Excel .xlsx file comes back as markdown tables.","items":{"anyOf":[{"enum":["markdown","summary","html","rawHtml","rawBase64","links","images","network","branding","audio","video","screenshot","changeTracking","product","menu"],"type":"string"},{"additionalProperties":false,"properties":{"type":{"enum":["markdown","summary","html","rawHtml","rawBase64","links","images","network","branding","audio","video"],"type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"modes":{"description":"git-diff returns a unified diff of the markdown. json compares the fields in schema or prompt between this read and the last one. Without modes you get git-diff.","items":{"enum":["git-diff","json"],"type":"string"},"maxItems":2,"type":"array"},"prompt":{"description":"With json mode: what to compare, in plain words, such as the price and stock.","maxLength":10000,"minLength":1,"type":"string"},"schema":{"additionalProperties":{"$ref":"#/definitions/__schema0"},"description":"The fields to fill, as a JSON Schema (draft-07 or 2020-12) object with properties. Pydantic's model_json_schema() and zod's toJSONSchema() output work as they are. enum, const, anyOf, oneOf, nullable types, $ref with $defs, required, descriptions and any key names are read. Up to 100 top-level fields and 32 KB. A field the page does not state comes back null.","propertyNames":{"type":"string"},"type":"object"},"tag":{"type":"null"},"type":{"const":"changeTracking","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"question":{"description":"A question to answer from the page, such as what the refund window is.","maxLength":10000,"minLength":1,"type":"string"},"type":{"const":"question","type":"string"}},"required":["type","question"],"type":"object"},{"additionalProperties":false,"properties":{"type":{"const":"product","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"type":{"const":"menu","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"fullPage":{"default":false,"description":"Capture the whole page from top to bottom instead of the visible part.","type":"boolean"},"quality":{"description":"JPEG quality from 1 to 100. The default is 70.","maximum":100,"minimum":1,"type":"integer"},"type":{"const":"screenshot","type":"string"},"viewport":{"additionalProperties":false,"description":"The window size in pixels, such as { width: 390, height: 844 }.","properties":{"height":{"maximum":2160,"minimum":200,"type":"integer"},"width":{"maximum":3840,"minimum":200,"type":"integer"}},"required":["width","height"],"type":"object"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"count":{"default":5,"description":"How many passages to return, best match first.","maximum":20,"minimum":1,"type":"integer"},"query":{"description":"What you are looking for on the page, such as refund policy.","maxLength":10000,"minLength":1,"type":"string"},"type":{"const":"highlights","type":"string"}},"required":["type","query"],"type":"object"},{"additionalProperties":false,"properties":{"checkPromptInjection":{"description":"Deprecated: send checkPromptInjection at the top level of the call.","type":"boolean"},"options":{"additionalProperties":{"$ref":"#/definitions/__schema1"},"description":"Only with parser: extra inputs for it, such as { \"page\": 2 } for the next page of results or { \"minRating\": 4.5 } for a filter. GET /v1/parsers lists what each parser accepts.","propertyNames":{"type":"string"},"type":"object"},"parser":{"description":"Read the page with a named parser, which gives the site's own data as json. The url must be the kind of page the parser reads. Parsers are the only way to read some sites. GET /v1/parsers lists them.","type":"string"},"prompt":{"description":"What to pull from the page in plain words, such as the version and the release date.","maxLength":10000,"minLength":1,"type":"string"},"rules":{"additionalProperties":{"$ref":"#/definitions/__schema2"},"description":"Read the page with CSS rules instead of a model, no extra fee. Each field is a selector such as \"h1\" (the first match's text), \"a@href\" (an attribute) or { \"selector\": \"li\", \"type\": \"list\", \"output\": \"text\" | \"html\" | \"@attribute\" | { nested fields } }. A missing item is null and an unmatched list is []. Relative links become absolute. Up to 100 fields, 5 levels deep. Not with schema, prompt or parser.","propertyNames":{"type":"string"},"type":"object"},"schema":{"additionalProperties":{"$ref":"#/definitions/__schema0"},"description":"The fields to fill, as a JSON Schema (draft-07 or 2020-12) object with properties. Pydantic's model_json_schema() and zod's toJSONSchema() output work as they are. enum, const, anyOf, oneOf, nullable types, $ref with $defs, required, descriptions and any key names are read. Up to 100 top-level fields and 32 KB. A field the page does not state comes back null.","propertyNames":{"type":"string"},"type":"object"},"type":{"const":"json","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"selectors":{"description":"The elements and attributes to read, such as { selector: 'a.buy', attribute: 'href' }.","items":{"additionalProperties":false,"properties":{"attribute":{"maxLength":100,"minLength":1,"type":"string"},"selector":{"minLength":1,"type":"string"}},"required":["selector","attribute"],"type":"object"},"maxItems":50,"minItems":1,"type":"array"},"type":{"const":"attributes","type":"string"}},"required":["type","selectors"],"type":"object"}]},"maxItems":20,"minItems":1,"type":"array"},"headers":{"additionalProperties":{"maxLength":2000,"pattern":"^[\\t\\x20-\\x7e]*$","type":"string"},"description":"Extra request headers to send to the site, such as { \"x-plan\": \"pro\" }. A read with headers is never answered from or saved to a stored copy.","propertyNames":{"pattern":"^[A-Za-z0-9-]{1,64}$","type":"string"},"type":"object"},"includeTags":{"description":"Keep only the parts of the page that match these CSS selectors, such as article or .price. When set, onlyMainContent is not applied.","items":{"minLength":1,"type":"string"},"minItems":1,"type":"array"},"location":{"additionalProperties":false,"description":"Where to read the page from. The default is the United States.","properties":{"country":{"description":"Two-letter country code to read the page from, such as DE or JP.","type":"string"},"languages":{"description":"Languages to ask the site for, best first, such as [\"de\", \"en\"]. Sent as Accept-Language. A read with languages is never answered from or saved to a stored copy.","items":{"pattern":"^[A-Za-z]{2,3}(?:-[A-Za-z0-9]{2,8})*$","type":"string"},"maxItems":5,"minItems":1,"type":"array"}},"type":"object"},"lockdown":{"description":"Send true to answer only from a stored copy of the page and never read it live, whatever its age. A page with no stored copy is notFound. The same as minAge 0.","type":"boolean"},"maxAge":{"description":"Accept a stored answer up to this many milliseconds old, at most 30 days. Without it, 2 days, or less for a site whose pages change often, and a copy up to twice that age (at most 7 days) comes back at once as stale while a fresh read runs. 0 always reads the page live. metadata.cacheState says which one you got.","maximum":9007199254740991,"minimum":0,"type":"integer"},"minAge":{"description":"Answer only from a stored copy that is at least this many milliseconds old, and never read the page live. 0 accepts any stored copy. A page with no such copy is notFound.","maximum":9007199254740991,"minimum":0,"type":"integer"},"mobile":{"description":"Read the page as a phone would: a phone-sized screen and the mobile version of the site. The page loads in a browser.","type":"boolean"},"onlyCleanContent":{"description":"Send true to have a model remove what onlyMainContent leaves behind in the markdown: cookie banners, ads, share widgets, breadcrumbs, sign-up prompts, comment prompts and related-article lists. It only removes whole paragraphs and lists; it never rewrites or adds text, and code blocks are always kept. Skipped with a warning when the page is too long to clean or the model does not answer. Not with zeroDataRetention. Summary, answers and highlights are made from the cleaned markdown.","type":"boolean"},"onlyMainContent":{"default":true,"description":"Keep only the page's main content, without menus, headers, footers and ads.","type":"boolean"},"parsers":{"description":"Only the pdf parser exists. Send \"pdf\" or { \"type\": \"pdf\", mode, maxPages, pages, blocks, pageMarkers } with the same meaning as in parse. Without mode a PDF is read from its text layer only; auto reads the picture of a page that has no text, and ocr reads the picture of every page, up to 20 pages. Each page of text that comes back costs 1 credit.","items":{"anyOf":[{"const":"pdf","type":"string"},{"additionalProperties":false,"properties":{"blocks":{"description":"Send true to also get the page's layout in blocks: each title, section header or run of text, with its page, reading order, position on the page (bbox as left, top, right, bottom from 0 to 1) and where its text sits in that page's markdown (span, as in pages). Tables, figures and formulas are not told apart. A page read from its picture is one block. No extra charge.","type":"boolean"},"maxPages":{"description":"Read at most this many pages, up to 100.","maximum":100,"minimum":1,"type":"integer"},"mode":{"description":"fast reads the text layer only. auto (the default) reads the text layer and reads the picture of any page that has none. ocr reads the picture of every page.","enum":["fast","auto","ocr"],"type":"string"},"pageMarkers":{"description":"Send true to mark page breaks in the markdown: pages are joined with \"---\" and a line, where N is the page that follows. No extra charge.","type":"boolean"},"pages":{"description":"Send true to also get each page's markdown in pages, as { pageNumber, markdown }. No extra charge.","type":"boolean"},"type":{"const":"pdf","type":"string"}},"required":["type"],"type":"object"}]},"minItems":1,"type":"array"},"profile":{"additionalProperties":false,"description":"Read the page with the cookies and local storage that earlier calls saved under this name, kept for your account for 30 days after the last use. A call with a profile always loads the page in a browser, costs 1 credit, the same as any page, and is never answered from a stored copy. Only one call at a time can save to a profile.","properties":{"name":{"description":"A name you choose, such as shop-login. Calls with the same name share state.","maxLength":128,"minLength":1,"type":"string"},"saveChanges":{"default":true,"description":"Keep the cookies and local storage this read leaves behind for the next call with this name. Send false to read with the profile without changing it.","type":"boolean"}},"required":["name"],"type":"object"},"proxy":{"description":"auto: basic first, enhanced once if the site refuses. basic: one plain attempt. enhanced: the stronger read from the start. Same price.","enum":["auto","basic","enhanced"],"type":"string"},"redactPII":{"anyOf":[{"type":"boolean"},{"additionalProperties":false,"description":"Options for redactPII.","properties":{"entities":{"default":["PERSON","EMAIL","PHONE","LOCATION","FINANCIAL","SECRET"],"description":"What to hide: PERSON, EMAIL, PHONE, LOCATION, FINANCIAL, SECRET. All by default.","items":{"enum":["PERSON","EMAIL","PHONE","LOCATION","FINANCIAL","SECRET"],"type":"string"},"minItems":1,"type":"array"},"mode":{"default":"accurate","description":"accurate finds names and places with the model and the rest by pattern. aggressive adds guesses that catch more and may hide a little too much. fast uses patterns only, so it finds no ordinary names or places.","enum":["accurate","aggressive","fast"],"type":"string"},"replaceStyle":{"default":"tag","description":"tag writes <EMAIL>, mask writes * for each character, remove deletes it.","enum":["tag","mask","remove"],"type":"string"}},"type":"object"}],"description":"Send true, or an object, to hide personal data in the markdown and in everything made from it (summary, answers, highlights, json). Links, html and rawHtml are not changed. A page the model cannot scan is refused rather than returned unredacted."},"removeBase64Images":{"description":"Images inside the page that carry their data in the address (data:image) are dropped by default. Send false to keep them in markdown and html.","type":"boolean"},"skipTlsVerification":{"description":"Send true to read a page whose certificate is expired, self-signed or for another name. The read is not private against someone between us and the site.","type":"boolean"},"storeInCache":{"default":true,"description":"Send false to neither read nor keep a stored copy of this page.","type":"boolean"},"timeout":{"description":"How long to keep trying, in milliseconds, between 10 seconds and 2 minutes. Pages behind a bot check can need 10 to 30 seconds the first time.","maximum":300000,"minimum":1000,"type":"integer"},"waitFor":{"description":"Extra milliseconds to wait before reading, up to 60000, for pages that load their content late. To wait for an element, add a wait action with a selector. A read that waits costs 1 credit, the same as any page.","maximum":60000,"minimum":0,"type":"integer"},"zeroDataRetention":{"default":false,"description":"Send true to keep nothing from this call: no stored copy is read or made, and nothing from it is logged. Costs 1 credit more per page. Not with a screenshot.","type":"boolean"}},"type":"object"},"sources":{"description":"What to search: web, news, images. Each is a string or {type}. Default web, or none when categories asks for research, companies, people, developer, gov or videos.","items":{"anyOf":[{"enum":["web","news","images"],"type":"string"},{"additionalProperties":false,"properties":{"location":{"type":"string"},"tbs":{"type":"string"},"type":{"const":"web","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"type":{"enum":["news","images"],"type":"string"}},"required":["type"],"type":"object"}]},"maxItems":5,"minItems":1,"type":"array"},"tbs":{"description":"Time filter: qdr:d, qdr:w, qdr:m or qdr:y, or cdr:1,cd_min:MM/DD/YYYY,cd_max:MM/DD/YYYY, plus sbd:1, like sbd:1,qdr:w. sbd:1 sorts newest first; results without a date come last. Web takes all of them; news takes qdr and sbd; images take none.","minLength":1,"type":"string"},"timeout":{"default":60000,"description":"Milliseconds to wait for the sources, from 1,000 to 120,000; more is read as 120,000. Default 60,000. A source that has not answered by then is left out with a warning. When none has, the call fails and costs nothing.","maximum":9007199254740991,"minimum":1000,"type":"integer"}},"required":["query"],"type":"object"}after
{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"definitions":{"__schema0":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"items":{"allOf":[{"$ref":"#/definitions/__schema0"}]},"type":"array"},{"additionalProperties":{"allOf":[{"$ref":"#/definitions/__schema0"}]},"propertyNames":{"type":"string"},"type":"object"}]},"__schema1":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"items":{"allOf":[{"$ref":"#/definitions/__schema1"}]},"type":"array"},{"additionalProperties":{"allOf":[{"$ref":"#/definitions/__schema1"}]},"propertyNames":{"type":"string"},"type":"object"}]},"__schema2":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"items":{"allOf":[{"$ref":"#/definitions/__schema2"}]},"type":"array"},{"additionalProperties":{"allOf":[{"$ref":"#/definitions/__schema2"}]},"propertyNames":{"type":"string"},"type":"object"}]}},"properties":{"categories":{"description":"pdf: web results that are PDF files. research: scholarly papers, in a research list, ranked by relevance then citations. companies: companies that match the query, in a companies list, best matches first. The query can name a place, industry, employee count, founding year and funding stage, like fintech startups in Berlin, 50-200 employees. people: people that match the query, in a people list, best matches first. The query can name a role, company, place or research topic, like CFO of Stripe, founders of fintech startups in Berlin, or researchers on CRISPR base editing. Each person has roles, affiliations and public profile links, never contact details. developer: passages from GitHub READMEs, issues, merged pull requests, releases, developer docs and API operations, in a developer list; send it as an object to filter by repos, types, language and minStars. gov: statutes, regulations, register notices and bills from government sources, in the web group with category gov and the kind, jurisdiction and citation of each. videos: passages from what is said in YouTube videos shared under a Creative Commons license, in a videos list, one result per video, with the channel, the license and the watch link; the link carries &t= only when the passage's start is exact. The index is a June 2024 snapshot of English videos, so a link may be dead.","items":{"anyOf":[{"enum":["developer","gov","research","pdf","companies","people","videos"],"type":"string"},{"additionalProperties":false,"properties":{"type":{"enum":["developer","gov","research","pdf","companies","people","videos"],"type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"language":{"description":"Only repositories whose main language is this, like TypeScript.","minLength":1,"type":"string"},"minStars":{"description":"Only repositories with at least this many GitHub stars.","maximum":9007199254740991,"minimum":0,"type":"integer"},"repos":{"default":[],"description":"Only results from these GitHub repositories, as owner/name.","items":{"pattern":"^[\\w.-]+\\/[\\w.-]+$","type":"string"},"maxItems":5,"type":"array"},"type":{"const":"developer","type":"string"},"types":{"default":[],"description":"Only these result types: readme, issue, pull_request, release, operation, doc.","items":{"enum":["readme","issue","pull_request","release","operation","doc"],"type":"string"},"type":"array"}},"required":["type"],"type":"object"}]},"type":"array"},"country":{"description":"Two-letter country to search from, like us. uk is read as gb. Image results are always US.","pattern":"^[A-Za-z]{2}$","type":"string"},"excludeDomains":{"items":{"type":"string"},"maxItems":10,"type":"array"},"highlights":{"default":true,"description":"On by default. Adds highlights to a web result when its page can be read quickly: the passages that best match the query, up to about 2,000 characters for the first 3 results and one passage for the rest. description stays the search engine's snippet; a result without one gets the start of its best passage. Send false to leave highlights out.","type":"boolean"},"ignoreInvalidURLs":{"default":false,"description":"Leave out results whose address cannot be read as a page.","type":"boolean"},"includeDomains":{"items":{"type":"string"},"maxItems":10,"type":"array"},"lang":{"description":"Two-letter language for web results, like de. It steers which pages come back; some results can still be in other languages.","pattern":"^[A-Za-z]{2}$","type":"string"},"limit":{"description":"Most results to return for each source. Default 10, or 5 when scrapeOptions has formats, which reads every web and news result returned. News returns at most 50.","maximum":100,"minimum":1,"type":"integer"},"location":{"description":"Where to search from, like Germany or San Francisco,California,United States. The last part is the country and replaces country. A city before it narrows web results to that place.","minLength":1,"type":"string"},"maxAge":{"description":"Accept a stored answer up to this many milliseconds old, at most 30 days. Without it, 15 minutes for news and 1 hour for web and images. 0 always searches live.","maximum":9007199254740991,"minimum":0,"type":"integer"},"query":{"description":"What to search for, up to 500 characters. Search operators work in web results: quotes for an exact phrase, -word, site:, -site:, filetype:, inurl:, allinurl:, intitle: and allintitle:. In image results, imagesize:WIDTHxHEIGHT keeps images of exactly that size and larger:WIDTHxHEIGHT keeps images at least that large.","maxLength":500,"minLength":1,"type":"string"},"safe":{"description":"Hide explicit web, news and image results when true.","type":"boolean"},"scrapeOptions":{"additionalProperties":false,"description":"With formats, reads each web and news result, as many as limit asks for, within timeout, and puts the passages that best match the query in each web result's highlights. Without formats no page is read and nothing more is charged. Takes the options of scrape: formats (markdown, html, rawHtml, links, images, summary, screenshot, json and the rest), onlyMainContent, includeTags, excludeTags, maxAge, minAge, waitFor, mobile, timeout (per page), headers, actions, location, parsers, profile and zeroDataRetention. Costs what scrape costs for each page read: 1 credit, plus 4 for each summary or json with a schema or prompt that returns something.","properties":{"actions":{"description":"Up to 50 steps to run on the page, in order, before reading it: { \"type\": \"wait\", \"milliseconds\": 500 } (up to 60 seconds), { \"type\": \"wait\", \"selector\": \".results\" }, { \"type\": \"click\", \"selector\": \"button.more\" }, { \"type\": \"write\", \"text\": \"tides\" }, { \"type\": \"press\", \"key\": \"Enter\" }, { \"type\": \"scroll\", \"direction\": \"down\" } (also up, left or right; amount is pixels, \"viewport\" or \"max\"; maxScrolls 1 to 50; selector scrolls an inner container; \"max\" keeps scrolling until the page stops growing, for feeds that load as you go), { \"type\": \"screenshot\", \"fullPage\": true } (links come back in actions.screenshots), { \"type\": \"scrape\" } (the page at that point, in actions.scrapes), { \"type\": \"executeJavascript\", \"script\": \"document.title\" } (results in actions.javascriptReturns), { \"type\": \"pdf\", \"format\": \"A4\" } (links in actions.pdfs) or { \"type\": \"perform\", \"action\": \"Click the Load more button\" } (a step in plain words, up to 5 browser steps on this page, never leaving the site; at most 5 per call). A read with actions costs 1 credit, the same as any page; the actions themselves add nothing. If an action fails, you still get the page as it stood, with a warning that names the action and says why.","items":{"anyOf":[{"additionalProperties":false,"properties":{"milliseconds":{"maximum":60000,"minimum":1,"type":"integer"},"type":{"const":"wait","type":"string"}},"required":["type","milliseconds"],"type":"object"},{"additionalProperties":false,"properties":{"selector":{"minLength":1,"type":"string"},"type":{"const":"wait","type":"string"}},"required":["type","selector"],"type":"object"},{"additionalProperties":false,"properties":{"all":{"const":false,"type":"boolean"},"selector":{"minLength":1,"type":"string"},"type":{"const":"click","type":"string"}},"required":["type","selector"],"type":"object"},{"additionalProperties":false,"properties":{"text":{"minLength":1,"type":"string"},"type":{"const":"write","type":"string"}},"required":["type","text"],"type":"object"},{"additionalProperties":false,"properties":{"key":{"maxLength":40,"minLength":1,"type":"string"},"type":{"const":"press","type":"string"}},"required":["type","key"],"type":"object"},{"additionalProperties":false,"properties":{"amount":{"anyOf":[{"maximum":100000,"minimum":1,"type":"integer"},{"enum":["viewport","max"],"type":"string"}]},"direction":{"default":"down","enum":["up","down","left","right"],"type":"string"},"maxScrolls":{"maximum":50,"minimum":1,"type":"integer"},"selector":{"minLength":1,"type":"string"},"type":{"const":"scroll","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"fullPage":{"type":"boolean"},"quality":{"maximum":100,"minimum":1,"type":"integer"},"type":{"const":"screenshot","type":"string"},"viewport":{"additionalProperties":false,"properties":{"height":{"maximum":2160,"minimum":200,"type":"integer"},"width":{"maximum":3840,"minimum":200,"type":"integer"}},"required":["width","height"],"type":"object"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"type":{"const":"scrape","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"script":{"maxLength":20000,"minLength":1,"type":"string"},"type":{"const":"executeJavascript","type":"string"}},"required":["type","script"],"type":"object"},{"additionalProperties":false,"properties":{"format":{"enum":["Letter","Legal","Tabloid","Ledger","A0","A1","A2","A3","A4","A5","A6"],"type":"string"},"landscape":{"type":"boolean"},"scale":{"maximum":2,"minimum":0.1,"type":"number"},"type":{"const":"pdf","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"action":{"maxLength":500,"minLength":1,"type":"string"},"type":{"const":"perform","type":"string"}},"required":["type","action"],"type":"object"}]},"maxItems":50,"minItems":1,"type":"array"},"blockAds":{"description":"Ads and trackers are not loaded when a page runs in a browser. Send false to load them.","type":"boolean"},"checkPromptInjection":{"description":"Send true to scan the page text for instructions aimed at an AI model before anything is built from it. A page that has them is refused with 403 promptInjectionDetected and costs nothing. The scan adds 4 credits when it runs; a page it cannot scan fully comes back with a warning and no charge.","type":"boolean"},"excludeTags":{"description":"Remove the parts of the page that match these CSS selectors, such as .comments.","items":{"minLength":1,"type":"string"},"minItems":1,"type":"array"},"fastMode":{"description":"Send true to read the page without opening a browser: the answer comes sooner, but a page that needs a browser, or that refuses a plain request, comes back as an error instead of being retried. Ignored when the call needs a browser (actions, screenshot, waitFor, mobile, profile, network, branding).","type":"boolean"},"formats":{"default":["markdown"],"description":"What to return: markdown (clean page text), summary (a short summary of the page), html (the cleaned page), rawHtml (the page as sent), audio and video (for a YouTube link: the audio track as an M4A file, or the video as an MP4 file, as a link that works for 1 hour), rawBase64 (the bytes the site sent, Base64 encoded, from a live read; metadata.contentType says what they are), links (every link on the page), images (every image address), screenshot (a link to a JPEG of the visible page, kept for 7 days), changeTracking (what changed in the markdown since your key last read this page with the same options, kept 30 days; add modes [\"git-diff\",\"json\"] with a schema or prompt to compare fields too), question (send { \"type\": \"question\", \"question\": \"...\" } to get answer, null when the page does not state one), product (title, brand, category, url, description and variants with price, sale, availability and images, or null) and menu (merchant, currency and sections of items with prices, or null) network (the JSON the page loaded while it rendered, up to 30 responses) and branding (the page's colors, fonts, typography, spacing, button and input styles, logo and brand images, read from how the page looks, with a field left out when the page does not show it). Send { \"type\": \"screenshot\", \"fullPage\": true } for the whole page. Send { \"type\": \"highlights\", \"query\": \"refund policy\" } for the passages that best match a query. Send { \"type\": \"json\", \"schema\": { \"type\": \"object\", \"properties\": { \"price\": { \"type\": \"number\" } } } } or { \"type\": \"json\", \"prompt\": \"the price and the stock\" } for fields filled from the page, each checked against it. Send { \"type\": \"json\", \"parser\": \"amazon-product\" } to get a site's own data as json instead of reading the page; GET /v1/parsers lists the parsers. Send { \"type\": \"json\", \"rules\": { \"title\": \"h1\", \"links\": { \"selector\": \"a\", \"type\": \"list\", \"output\": \"@href\" } } } to read the page with CSS rules and no model, at the page's own price. Send { \"type\": \"attributes\", \"selectors\": [{ \"selector\": \"a\", \"attribute\": \"href\" }] } for attribute values, returned in attributes. Without a parser or rules, json needs a schema or a prompt and is filled from the page. json with a schema or a prompt, summary, highlights, question, product, menu and changeTracking in json mode cost 4 credits more each when they return something. json with rules or a parser, and attributes, cost nothing more. A screenshot, network or branding read costs 1 credit, the same as any page. A PDF comes back as markdown only, and costs 1 credit more for each page of text that comes back. A CSV or an Excel .xlsx file comes back as markdown tables.","items":{"anyOf":[{"enum":["markdown","summary","html","rawHtml","rawBase64","links","images","network","branding","audio","video","screenshot","changeTracking","product","menu"],"type":"string"},{"additionalProperties":false,"properties":{"type":{"enum":["markdown","summary","html","rawHtml","rawBase64","links","images","network","branding","audio","video"],"type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"modes":{"description":"git-diff returns a unified diff of the markdown. json compares the fields in schema or prompt between this read and the last one. Without modes you get git-diff.","items":{"enum":["git-diff","json"],"type":"string"},"maxItems":2,"type":"array"},"prompt":{"description":"With json mode: what to compare, in plain words, such as the price and stock.","maxLength":10000,"minLength":1,"type":"string"},"schema":{"additionalProperties":{"$ref":"#/definitions/__schema0"},"description":"The fields to fill, as a JSON Schema (draft-07 or 2020-12) object with properties. Pydantic's model_json_schema() and zod's toJSONSchema() output work as they are. enum, const, anyOf, oneOf, nullable types, $ref with $defs, required, descriptions and any key names are read. Up to 100 top-level fields and 32 KB. A field the page does not state comes back null.","propertyNames":{"type":"string"},"type":"object"},"tag":{"type":"null"},"type":{"const":"changeTracking","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"question":{"description":"A question to answer from the page, such as what the refund window is.","maxLength":10000,"minLength":1,"type":"string"},"type":{"const":"question","type":"string"}},"required":["type","question"],"type":"object"},{"additionalProperties":false,"properties":{"type":{"const":"product","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"type":{"const":"menu","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"fullPage":{"default":false,"description":"Capture the whole page from top to bottom instead of the visible part.","type":"boolean"},"quality":{"description":"JPEG quality from 1 to 100. The default is 70.","maximum":100,"minimum":1,"type":"integer"},"type":{"const":"screenshot","type":"string"},"viewport":{"additionalProperties":false,"description":"The window size in pixels, such as { width: 390, height: 844 }.","properties":{"height":{"maximum":2160,"minimum":200,"type":"integer"},"width":{"maximum":3840,"minimum":200,"type":"integer"}},"required":["width","height"],"type":"object"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"count":{"default":5,"description":"How many passages to return, best match first.","maximum":20,"minimum":1,"type":"integer"},"query":{"description":"What you are looking for on the page, such as refund policy.","maxLength":10000,"minLength":1,"type":"string"},"type":{"const":"highlights","type":"string"}},"required":["type","query"],"type":"object"},{"additionalProperties":false,"properties":{"checkPromptInjection":{"description":"Deprecated: send checkPromptInjection at the top level of the call.","type":"boolean"},"options":{"additionalProperties":{"$ref":"#/definitions/__schema1"},"description":"Only with parser: extra inputs for it, such as { \"page\": 2 } for the next page of results or { \"minRating\": 4.5 } for a filter. GET /v1/parsers lists what each parser accepts.","propertyNames":{"type":"string"},"type":"object"},"parser":{"description":"Read the page with a named parser, which gives the site's own data as json. The url must be the kind of page the parser reads. Parsers are the only way to read some sites. GET /v1/parsers lists them.","type":"string"},"prompt":{"description":"What to pull from the page in plain words, such as the version and the release date.","maxLength":10000,"minLength":1,"type":"string"},"rules":{"additionalProperties":{"$ref":"#/definitions/__schema2"},"description":"Read the page with CSS rules instead of a model, no extra fee. Each field is a selector such as \"h1\" (the first match's text), \"a@href\" (an attribute) or { \"selector\": \"li\", \"type\": \"list\", \"output\": \"text\" | \"html\" | \"@attribute\" | { nested fields } }. A missing item is null and an unmatched list is []. Relative links become absolute. Up to 100 fields, 5 levels deep. Not with schema, prompt or parser.","propertyNames":{"type":"string"},"type":"object"},"schema":{"additionalProperties":{"$ref":"#/definitions/__schema0"},"description":"The fields to fill, as a JSON Schema (draft-07 or 2020-12) object with properties. Pydantic's model_json_schema() and zod's toJSONSchema() output work as they are. enum, const, anyOf, oneOf, nullable types, $ref with $defs, required, descriptions and any key names are read. Up to 100 top-level fields and 32 KB. A field the page does not state comes back null.","propertyNames":{"type":"string"},"type":"object"},"type":{"const":"json","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"selectors":{"description":"The elements and attributes to read, such as { selector: 'a.buy', attribute: 'href' }.","items":{"additionalProperties":false,"properties":{"attribute":{"maxLength":100,"minLength":1,"type":"string"},"selector":{"minLength":1,"type":"string"}},"required":["selector","attribute"],"type":"object"},"maxItems":50,"minItems":1,"type":"array"},"type":{"const":"attributes","type":"string"}},"required":["type","selectors"],"type":"object"}]},"maxItems":20,"minItems":1,"type":"array"},"headers":{"additionalProperties":{"maxLength":2000,"pattern":"^[\\t\\x20-\\x7e]*$","type":"string"},"description":"Extra request headers to send to the site, such as { \"x-plan\": \"pro\" }. A read with headers is never answered from or saved to a stored copy.","propertyNames":{"pattern":"^[A-Za-z0-9-]{1,64}$","type":"string"},"type":"object"},"includeTags":{"description":"Keep only the parts of the page that match these CSS selectors, such as article or .price. When set, onlyMainContent is not applied.","items":{"minLength":1,"type":"string"},"minItems":1,"type":"array"},"location":{"additionalProperties":false,"description":"Where to read the page from. The default is the United States.","properties":{"country":{"description":"Two-letter country code to read the page from, such as DE or JP.","type":"string"},"languages":{"description":"Languages to ask the site for, best first, such as [\"de\", \"en\"]. Sent as Accept-Language. A read with languages is never answered from or saved to a stored copy.","items":{"pattern":"^[A-Za-z]{2,3}(?:-[A-Za-z0-9]{2,8})*$","type":"string"},"maxItems":5,"minItems":1,"type":"array"}},"type":"object"},"lockdown":{"description":"Send true to answer only from a stored copy of the page and never read it live, whatever its age. A page with no stored copy is notFound. The same as minAge 0.","type":"boolean"},"maxAge":{"description":"Accept a stored answer up to this many milliseconds old, at most 30 days. Without it, 2 days, or less for a site whose pages change often, and a copy up to twice that age (at most 7 days) comes back at once as stale while a fresh read runs. 0 always reads the page live. metadata.cacheState says which one you got.","maximum":9007199254740991,"minimum":0,"type":"integer"},"minAge":{"description":"Answer only from a stored copy that is at least this many milliseconds old, and never read the page live. 0 accepts any stored copy. A page with no such copy is notFound.","maximum":9007199254740991,"minimum":0,"type":"integer"},"mobile":{"description":"Read the page as a phone would: a phone-sized screen and the mobile version of the site. The page loads in a browser.","type":"boolean"},"onlyCleanContent":{"description":"Send true to have a model remove what onlyMainContent leaves behind in the markdown: cookie banners, ads, share widgets, breadcrumbs, sign-up prompts, comment prompts and related-article lists. It only removes whole paragraphs and lists; it never rewrites or adds text, and code blocks are always kept. Skipped with a warning when the page is too long to clean or the model does not answer. Not with zeroDataRetention. Summary, answers and highlights are made from the cleaned markdown.","type":"boolean"},"onlyMainContent":{"default":true,"description":"Keep only the page's main content, without menus, headers, footers and ads.","type":"boolean"},"parsers":{"description":"Only the pdf parser exists. Send \"pdf\" or { \"type\": \"pdf\", mode, maxPages, pages, blocks, pageMarkers } with the same meaning as in parse. Without mode a PDF is read as auto: from its text layer, and from the picture of any page that has no text. fast reads the text layer only, and ocr reads the picture of every page, up to 20 pages. Each page of text that comes back costs 1 credit. Pictures are read only with an API key.","items":{"anyOf":[{"const":"pdf","type":"string"},{"additionalProperties":false,"properties":{"blocks":{"description":"Send true to also get the page's layout in blocks: each title, section header or run of text, with its page, reading order, position on the page (bbox as left, top, right, bottom from 0 to 1) and where its text sits in that page's markdown (span, as in pages). Tables, figures and formulas are not told apart. A page read from its picture is one block. No extra charge.","type":"boolean"},"maxPages":{"description":"Read at most this many pages, up to 500, which is also the default.","maximum":500,"minimum":1,"type":"integer"},"mode":{"description":"fast reads the text layer only. auto (the default) reads the text layer and reads the picture of any page that has none. ocr reads the picture of every page.","enum":["fast","auto","ocr"],"type":"string"},"pageMarkers":{"description":"Send true to mark page breaks in the markdown: pages are joined with \"---\" and a line, where N is the page that follows. No extra charge.","type":"boolean"},"pages":{"description":"Send true to also get each page's markdown in pages, as { pageNumber, markdown }. No extra charge.","type":"boolean"},"type":{"const":"pdf","type":"string"}},"required":["type"],"type":"object"}]},"minItems":1,"type":"array"},"profile":{"additionalProperties":false,"description":"Read the page with the cookies and local storage that earlier calls saved under this name, kept for your account for 30 days after the last use. A call with a profile always loads the page in a browser, costs 1 credit, the same as any page, and is never answered from a stored copy. Only one call at a time can save to a profile.","properties":{"name":{"description":"A name you choose, such as shop-login. Calls with the same name share state.","maxLength":128,"minLength":1,"type":"string"},"saveChanges":{"default":true,"description":"Keep the cookies and local storage this read leaves behind for the next call with this name. Send false to read with the profile without changing it.","type":"boolean"}},"required":["name"],"type":"object"},"proxy":{"description":"auto: basic first, enhanced once if the site refuses. basic: one plain attempt. enhanced: the stronger read from the start. stealth is the same as enhanced. Same price.","enum":["auto","basic","enhanced","stealth"],"type":"string"},"redactPII":{"anyOf":[{"type":"boolean"},{"additionalProperties":false,"description":"Options for redactPII.","properties":{"entities":{"default":["PERSON","EMAIL","PHONE","LOCATION","FINANCIAL","SECRET"],"description":"What to hide: PERSON, EMAIL, PHONE, LOCATION, FINANCIAL, SECRET. All by default.","items":{"enum":["PERSON","EMAIL","PHONE","LOCATION","FINANCIAL","SECRET"],"type":"string"},"minItems":1,"type":"array"},"mode":{"default":"accurate","description":"accurate finds names and places with the model and the rest by pattern. aggressive adds guesses that catch more and may hide a little too much. fast uses patterns only, so it finds no ordinary names or places.","enum":["accurate","aggressive","fast"],"type":"string"},"replaceStyle":{"default":"tag","description":"tag writes <EMAIL>, mask writes * for each character, remove deletes it.","enum":["tag","mask","remove"],"type":"string"}},"type":"object"}],"description":"Send true, or an object, to hide personal data in the markdown and in everything made from it (summary, answers, highlights, json). Links, html and rawHtml are not changed. A page the model cannot scan is refused rather than returned unredacted."},"removeBase64Images":{"description":"Images inside the page that carry their data in the address (data:image) are dropped by default. Send false to keep them in markdown and html.","type":"boolean"},"skipTlsVerification":{"description":"Send true to read a page whose certificate is expired, self-signed or for another name. The read is not private against someone between us and the site.","type":"boolean"},"storeInCache":{"default":true,"description":"Send false to neither read nor keep a stored copy of this page.","type":"boolean"},"timeout":{"default":30000,"description":"How long to keep trying, in milliseconds, from 1 second to 5 minutes; 30 seconds by default. A page that needs a browser needs at least 5 seconds, and pages behind a bot check can need 10 to 30 seconds the first time. A read that runs out of time is an error and costs nothing.","maximum":300000,"minimum":1000,"type":"integer"},"waitFor":{"description":"Extra milliseconds to wait before reading, up to 60000, for pages that load their content late. To wait for an element, add a wait action with a selector. A read that waits costs 1 credit, the same as any page.","maximum":60000,"minimum":0,"type":"integer"},"zeroDataRetention":{"default":false,"description":"Send true to keep nothing from this call: no stored copy is read or made, and nothing from it is logged. Costs 1 credit more per page. Not with a screenshot.","type":"boolean"}},"type":"object"},"sources":{"description":"What to search: web, news, images. Each is a string or {type}. Default web, or none when categories asks for research, companies, people, developer, gov or videos.","items":{"anyOf":[{"enum":["web","news","images"],"type":"string"},{"additionalProperties":false,"properties":{"country":{"description":"ISO 3166-1 alpha-2 country code, e.g. us. Any case is accepted.","pattern":"^[A-Za-z]{2}$","type":"string"},"lang":{"description":"Two-letter language for web results, like de. It steers which pages come back; some results can still be in other languages.","pattern":"^[A-Za-z]{2}$","type":"string"},"location":{"type":"string"},"tbs":{"type":"string"},"type":{"const":"web","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"type":{"enum":["news","images"],"type":"string"}},"required":["type"],"type":"object"}]},"maxItems":5,"minItems":1,"type":"array"},"tbs":{"description":"Time filter: qdr:d, qdr:w, qdr:m or qdr:y, or cdr:1,cd_min:MM/DD/YYYY,cd_max:MM/DD/YYYY, plus sbd:1, like sbd:1,qdr:w. sbd:1 sorts newest first; results without a date come last. Web takes all of them; news takes qdr and sbd; images take none.","minLength":1,"type":"string"},"timeout":{"default":60000,"description":"Milliseconds to wait for the sources, from 1,000 to 120,000; more is read as 120,000. Default 60,000. A source that has not answered by then is left out with a warning. When none has, the call fails and costs nothing.","maximum":9007199254740991,"minimum":1000,"type":"integer"}},"required":["query"],"type":"object"}after
{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"definitions":{"__schema0":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"items":{"allOf":[{"$ref":"#/definitions/__schema0"}]},"type":"array"},{"additionalProperties":{"allOf":[{"$ref":"#/definitions/__schema0"}]},"propertyNames":{"type":"string"},"type":"object"}]},"__schema1":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"items":{"allOf":[{"$ref":"#/definitions/__schema1"}]},"type":"array"},{"additionalProperties":{"allOf":[{"$ref":"#/definitions/__schema1"}]},"propertyNames":{"type":"string"},"type":"object"}]},"__schema2":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"items":{"allOf":[{"$ref":"#/definitions/__schema2"}]},"type":"array"},{"additionalProperties":{"allOf":[{"$ref":"#/definitions/__schema2"}]},"propertyNames":{"type":"string"},"type":"object"}]}},"properties":{"allowExternalLinks":{"default":false,"description":"Also follow links to other sites. They count toward limit and maxDiscoveryDepth. Only the start site's robots.txt is read.","type":"boolean"},"allowSubdomains":{"default":false,"description":"Also read pages on subdomains, such as docs.bun.com for bun.com.","type":"boolean"},"crawlEntireDomain":{"default":false,"description":"Read the whole site, not only pages under the start page's path.","type":"boolean"},"deduplicateSimilarURLs":{"default":true,"description":"Read one page when addresses differ only by www, a trailing slash, a #fragment, tracking parameters such as utm_source, or the order of the ?query. Send false to read each address.","type":"boolean"},"delay":{"description":"Seconds to wait between pages. With delay the crawl reads one page at a time. At most 30.","maximum":30,"minimum":0,"type":"number"},"excludePaths":{"default":[],"description":"Skip pages whose path matches one of these regular expressions, such as tag/.*.","items":{"maxLength":200,"minLength":1,"type":"string"},"maxItems":100,"type":"array"},"ignoreQueryParameters":{"default":false,"description":"Treat addresses that differ only in their ?query part as one page.","type":"boolean"},"includePaths":{"default":[],"description":"Read only pages whose path matches one of these regular expressions, such as blog/.*.","items":{"maxLength":200,"minLength":1,"type":"string"},"maxItems":100,"type":"array"},"limit":{"default":10000,"description":"Stop after reading this many pages in total.","maximum":10000,"minimum":1,"type":"integer"},"maxConcurrency":{"description":"Most pages read at once. We read at most 4 at once, so a larger number gives the same speed.","maximum":100,"minimum":1,"type":"integer"},"maxDiscoveryDepth":{"default":3,"description":"How many links away from the start page to go, up to 10.","maximum":10,"minimum":0,"type":"integer"},"prompt":{"description":"What you are looking for, such as sqlite performance. Pages about it are read first, and the crawl stops once new pages stop mentioning it.","maxLength":1000,"minLength":1,"type":"string"},"regexOnFullURL":{"default":false,"description":"Match includePaths and excludePaths against the whole address, not only the path.","type":"boolean"},"scrapeOptions":{"additionalProperties":{},"description":"How to read each page, the same options and formats as scrape. Without formats, each page comes back as markdown.","properties":{"actions":{"description":"Up to 50 steps to run on the page, in order, before reading it: { \"type\": \"wait\", \"milliseconds\": 500 } (up to 30 seconds), { \"type\": \"wait\", \"selector\": \".results\" }, { \"type\": \"click\", \"selector\": \"button.more\" }, { \"type\": \"write\", \"text\": \"tides\" }, { \"type\": \"press\", \"key\": \"Enter\" }, { \"type\": \"scroll\", \"direction\": \"down\" } (also up, left or right; amount is pixels, \"viewport\" or \"max\"; maxScrolls 1 to 50; selector scrolls an inner container; \"max\" keeps scrolling until the page stops growing, for feeds that load as you go), { \"type\": \"screenshot\", \"fullPage\": true } (links come back in actions.screenshots), { \"type\": \"scrape\" } (the page at that point, in actions.scrapes), { \"type\": \"executeJavascript\", \"script\": \"document.title\" } (results in actions.javascriptReturns), { \"type\": \"pdf\", \"format\": \"A4\" } (links in actions.pdfs) or { \"type\": \"perform\", \"action\": \"Click the Load more button\" } (a step in plain words, up to 5 browser steps on this page, never leaving the site; at most 5 per call). A read with actions costs 1 credit, the same as any page; the actions themselves add nothing. If an action fails, you still get the page as it stood, with a warning that names the action and says why.","items":{"anyOf":[{"additionalProperties":false,"properties":{"milliseconds":{"maximum":30000,"minimum":1,"type":"integer"},"type":{"const":"wait","type":"string"}},"required":["type","milliseconds"],"type":"object"},{"additionalProperties":false,"properties":{"selector":{"minLength":1,"type":"string"},"type":{"const":"wait","type":"string"}},"required":["type","selector"],"type":"object"},{"additionalProperties":false,"properties":{"all":{"const":false,"type":"boolean"},"selector":{"minLength":1,"type":"string"},"type":{"const":"click","type":"string"}},"required":["type","selector"],"type":"object"},{"additionalProperties":false,"properties":{"text":{"minLength":1,"type":"string"},"type":{"const":"write","type":"string"}},"required":["type","text"],"type":"object"},{"additionalProperties":false,"properties":{"key":{"maxLength":40,"minLength":1,"type":"string"},"type":{"const":"press","type":"string"}},"required":["type","key"],"type":"object"},{"additionalProperties":false,"properties":{"amount":{"anyOf":[{"maximum":100000,"minimum":1,"type":"integer"},{"enum":["viewport","max"],"type":"string"}]},"direction":{"default":"down","enum":["up","down","left","right"],"type":"string"},"maxScrolls":{"maximum":50,"minimum":1,"type":"integer"},"selector":{"minLength":1,"type":"string"},"type":{"const":"scroll","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"fullPage":{"type":"boolean"},"quality":{"maximum":100,"minimum":1,"type":"integer"},"type":{"const":"screenshot","type":"string"},"viewport":{"additionalProperties":false,"properties":{"height":{"maximum":2160,"minimum":200,"type":"integer"},"width":{"maximum":3840,"minimum":200,"type":"integer"}},"required":["width","height"],"type":"object"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"type":{"const":"scrape","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"script":{"maxLength":20000,"minLength":1,"type":"string"},"type":{"const":"executeJavascript","type":"string"}},"required":["type","script"],"type":"object"},{"additionalProperties":false,"properties":{"format":{"enum":["Letter","Legal","Tabloid","Ledger","A0","A1","A2","A3","A4","A5","A6"],"type":"string"},"landscape":{"type":"boolean"},"scale":{"maximum":2,"minimum":0.1,"type":"number"},"type":{"const":"pdf","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"action":{"maxLength":500,"minLength":1,"type":"string"},"type":{"const":"perform","type":"string"}},"required":["type","action"],"type":"object"}]},"maxItems":50,"minItems":1,"type":"array"},"blockAds":{"description":"Ads and trackers are not loaded when a page runs in a browser. Send false to load them.","type":"boolean"},"checkPromptInjection":{"description":"Send true to scan the page text for instructions aimed at an AI model before anything is built from it. A page that has them is refused with 403 promptInjectionDetected and costs nothing. The scan adds 4 credits when it runs; a page it cannot scan fully comes back with a warning and no charge.","type":"boolean"},"excludeTags":{"description":"Remove the parts of the page that match these CSS selectors, such as .comments.","items":{"minLength":1,"type":"string"},"minItems":1,"type":"array"},"fastMode":{"description":"Send true to read the page without opening a browser: the answer comes sooner, but a page that needs a browser, or that refuses a plain request, comes back as an error instead of being retried. Ignored when the call needs a browser (actions, screenshot, waitFor, mobile, profile, network, branding).","type":"boolean"},"formats":{"default":["markdown"],"description":"What to return: markdown (clean page text), summary (a short summary of the page), html (the cleaned page), rawHtml (the page as sent), audio and video (for a YouTube link: the audio track as an M4A file, or the video as an MP4 file, as a link that works for 1 hour), rawBase64 (the bytes the site sent, Base64 encoded, from a live read; metadata.contentType says what they are), links (every link on the page), images (every image address), screenshot (a link to a JPEG of the visible page, kept for 7 days), changeTracking (what changed in the markdown since your key last read this page with the same options, kept 30 days; add modes [\"git-diff\",\"json\"] with a schema or prompt to compare fields too), question (send { \"type\": \"question\", \"question\": \"...\" } to get answer, null when the page does not state one), product (title, brand, category, url, description and variants with price, sale, availability and images, or null) and menu (merchant, currency and sections of items with prices, or null) network (the JSON the page loaded while it rendered, up to 30 responses) and branding (the page's colors, fonts, typography, spacing, button and input styles, logo and brand images, read from how the page looks, with a field left out when the page does not show it). Send { \"type\": \"screenshot\", \"fullPage\": true } for the whole page. Send { \"type\": \"highlights\", \"query\": \"refund policy\" } for the passages that best match a query. Send { \"type\": \"json\", \"schema\": { \"type\": \"object\", \"properties\": { \"price\": { \"type\": \"number\" } } } } or { \"type\": \"json\", \"prompt\": \"the price and the stock\" } for fields filled from the page, each checked against it. Send { \"type\": \"json\", \"parser\": \"amazon-product\" } to get a site's own data as json instead of reading the page; GET /v1/parsers lists the parsers. Send { \"type\": \"json\", \"rules\": { \"title\": \"h1\", \"links\": { \"selector\": \"a\", \"type\": \"list\", \"output\": \"@href\" } } } to read the page with CSS rules and no model, at the page's own price. Send { \"type\": \"attributes\", \"selectors\": [{ \"selector\": \"a\", \"attribute\": \"href\" }] } for attribute values, returned in attributes. Without a parser or rules, json needs a schema or a prompt and is filled from the page. json with a schema or a prompt, summary, highlights, question, product, menu and changeTracking in json mode cost 4 credits more each when they return something. json with rules or a parser, and attributes, cost nothing more. A screenshot, network or branding read costs 1 credit, the same as any page. A PDF comes back as markdown only, and costs 1 credit more for each page of text that comes back. A CSV or an Excel .xlsx file comes back as markdown tables.","items":{"anyOf":[{"enum":["markdown","summary","html","rawHtml","rawBase64","links","images","network","branding","audio","video","screenshot","changeTracking","product","menu"],"type":"string"},{"additionalProperties":false,"properties":{"type":{"enum":["markdown","summary","html","rawHtml","rawBase64","links","images","network","branding","audio","video"],"type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"modes":{"description":"git-diff returns a unified diff of the markdown. json compares the fields in schema or prompt between this read and the last one. Without modes you get git-diff.","items":{"enum":["git-diff","json"],"type":"string"},"maxItems":2,"type":"array"},"prompt":{"description":"With json mode: what to compare, in plain words, such as the price and stock.","maxLength":10000,"minLength":1,"type":"string"},"schema":{"additionalProperties":{"$ref":"#/definitions/__schema0"},"description":"The fields to fill, as a JSON Schema (draft-07 or 2020-12) object with properties. Pydantic's model_json_schema() and zod's toJSONSchema() output work as they are. enum, const, anyOf, oneOf, nullable types, $ref with $defs, required, descriptions and any key names are read. Up to 100 top-level fields and 32 KB. A field the page does not state comes back null.","propertyNames":{"type":"string"},"type":"object"},"tag":{"type":"null"},"type":{"const":"changeTracking","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"question":{"description":"A question to answer from the page, such as what the refund window is.","maxLength":10000,"minLength":1,"type":"string"},"type":{"const":"question","type":"string"}},"required":["type","question"],"type":"object"},{"additionalProperties":false,"properties":{"type":{"const":"product","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"type":{"const":"menu","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"fullPage":{"default":false,"description":"Capture the whole page from top to bottom instead of the visible part.","type":"boolean"},"quality":{"description":"JPEG quality from 1 to 100. The default is 70.","maximum":100,"minimum":1,"type":"integer"},"type":{"const":"screenshot","type":"string"},"viewport":{"additionalProperties":false,"description":"The window size in pixels, such as { width: 390, height: 844 }.","properties":{"height":{"maximum":2160,"minimum":200,"type":"integer"},"width":{"maximum":3840,"minimum":200,"type":"integer"}},"required":["width","height"],"type":"object"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"count":{"default":5,"description":"How many passages to return, best match first.","maximum":20,"minimum":1,"type":"integer"},"query":{"description":"What you are looking for on the page, such as refund policy.","maxLength":10000,"minLength":1,"type":"string"},"type":{"const":"highlights","type":"string"}},"required":["type","query"],"type":"object"},{"additionalProperties":false,"properties":{"checkPromptInjection":{"description":"Deprecated: send checkPromptInjection at the top level of the call.","type":"boolean"},"options":{"additionalProperties":{"$ref":"#/definitions/__schema1"},"description":"Only with parser: extra inputs for it, such as { \"page\": 2 } for the next page of results or { \"minRating\": 4.5 } for a filter. GET /v1/parsers lists what each parser accepts.","propertyNames":{"type":"string"},"type":"object"},"parser":{"description":"Read the page with a named parser, which gives the site's own data as json. The url must be the kind of page the parser reads. Parsers are the only way to read some sites. GET /v1/parsers lists them.","type":"string"},"prompt":{"description":"What to pull from the page in plain words, such as the version and the release date.","maxLength":10000,"minLength":1,"type":"string"},"rules":{"additionalProperties":{"$ref":"#/definitions/__schema2"},"description":"Read the page with CSS rules instead of a model, no extra fee. Each field is a selector such as \"h1\" (the first match's text), \"a@href\" (an attribute) or { \"selector\": \"li\", \"type\": \"list\", \"output\": \"text\" | \"html\" | \"@attribute\" | { nested fields } }. A missing item is null and an unmatched list is []. Relative links become absolute. Up to 100 fields, 5 levels deep. Not with schema, prompt or parser.","propertyNames":{"type":"string"},"type":"object"},"schema":{"additionalProperties":{"$ref":"#/definitions/__schema0"},"description":"The fields to fill, as a JSON Schema (draft-07 or 2020-12) object with properties. Pydantic's model_json_schema() and zod's toJSONSchema() output work as they are. enum, const, anyOf, oneOf, nullable types, $ref with $defs, required, descriptions and any key names are read. Up to 100 top-level fields and 32 KB. A field the page does not state comes back null.","propertyNames":{"type":"string"},"type":"object"},"type":{"const":"json","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"selectors":{"description":"The elements and attributes to read, such as { selector: 'a.buy', attribute: 'href' }.","items":{"additionalProperties":false,"properties":{"attribute":{"maxLength":100,"minLength":1,"type":"string"},"selector":{"minLength":1,"type":"string"}},"required":["selector","attribute"],"type":"object"},"maxItems":50,"minItems":1,"type":"array"},"type":{"const":"attributes","type":"string"}},"required":["type","selectors"],"type":"object"}]},"maxItems":20,"minItems":1,"type":"array"},"headers":{"additionalProperties":{"maxLength":2000,"pattern":"^[\\t\\x20-\\x7e]*$","type":"string"},"description":"Extra request headers to send to the site, such as { \"x-plan\": \"pro\" }. A read with headers is never answered from or saved to a stored copy.","propertyNames":{"pattern":"^[A-Za-z0-9-]{1,64}$","type":"string"},"type":"object"},"includeTags":{"description":"Keep only the parts of the page that match these CSS selectors, such as article or .price. When set, onlyMainContent is not applied.","items":{"minLength":1,"type":"string"},"minItems":1,"type":"array"},"location":{"additionalProperties":false,"description":"Where to read the page from. The default is the United States.","properties":{"country":{"description":"Two-letter country code to read the page from, such as DE or JP.","type":"string"},"languages":{"description":"Languages to ask the site for, best first, such as [\"de\", \"en\"]. Sent as Accept-Language. A read with languages is never answered from or saved to a stored copy.","items":{"pattern":"^[A-Za-z]{2,3}(?:-[A-Za-z0-9]{2,8})*$","type":"string"},"maxItems":5,"minItems":1,"type":"array"}},"type":"object"},"lockdown":{"description":"Send true to answer only from a stored copy of the page and never read it live, whatever its age. A page with no stored copy is notFound. The same as minAge 0.","type":"boolean"},"maxAge":{"description":"Accept a stored answer up to this many milliseconds old, at most 30 days. Without it, 2 days, or less for a site whose pages change often, and a copy up to twice that age (at most 7 days) comes back at once as stale while a fresh read runs. 0 always reads the page live. metadata.cacheState says which one you got.","maximum":9007199254740991,"minimum":0,"type":"integer"},"minAge":{"description":"Answer only from a stored copy that is at least this many milliseconds old, and never read the page live. 0 accepts any stored copy. A page with no such copy is notFound.","maximum":9007199254740991,"minimum":0,"type":"integer"},"mobile":{"description":"Read the page as a phone would: a phone-sized screen and the mobile version of the site. The page loads in a browser.","type":"boolean"},"onlyCleanContent":{"description":"Send true to have a model remove what onlyMainContent leaves behind in the markdown: cookie banners, ads, share widgets, breadcrumbs, sign-up prompts, comment prompts and related-article lists. It only removes whole paragraphs and lists; it never rewrites or adds text, and code blocks are always kept. Skipped with a warning when the page is too long to clean or the model does not answer. Not with zeroDataRetention. Summary, answers and highlights are made from the cleaned markdown.","type":"boolean"},"onlyMainContent":{"default":true,"description":"Keep only the page's main content, without menus, headers, footers and ads.","type":"boolean"},"parsers":{"description":"Only the pdf parser exists. Send \"pdf\" or { \"type\": \"pdf\", mode, maxPages, pages, blocks, pageMarkers } with the same meaning as in parse. Without mode a PDF is read from its text layer only; auto reads the picture of a page that has no text, and ocr reads the picture of every page, up to 20 pages. Each page of text that comes back costs 1 credit.","items":{"anyOf":[{"const":"pdf","type":"string"},{"additionalProperties":false,"properties":{"blocks":{"description":"Send true to also get the page's layout in blocks: each title, section header or run of text, with its page, reading order, position on the page (bbox as left, top, right, bottom from 0 to 1) and where its text sits in that page's markdown (span, as in pages). Tables, figures and formulas are not told apart. A page read from its picture is one block. No extra charge.","type":"boolean"},"maxPages":{"description":"Read at most this many pages, up to 100.","maximum":100,"minimum":1,"type":"integer"},"mode":{"description":"fast reads the text layer only. auto (the default) reads the text layer and reads the picture of any page that has none. ocr reads the picture of every page.","enum":["fast","auto","ocr"],"type":"string"},"pageMarkers":{"description":"Send true to mark page breaks in the markdown: pages are joined with \"---\" and a line, where N is the page that follows. No extra charge.","type":"boolean"},"pages":{"description":"Send true to also get each page's markdown in pages, as { pageNumber, markdown }. No extra charge.","type":"boolean"},"type":{"const":"pdf","type":"string"}},"required":["type"],"type":"object"}]},"minItems":1,"type":"array"},"profile":{"additionalProperties":false,"description":"Read the page with the cookies and local storage that earlier calls saved under this name, kept for your account for 30 days after the last use. A call with a profile always loads the page in a browser, costs 1 credit, the same as any page, and is never answered from a stored copy. Only one call at a time can save to a profile.","properties":{"name":{"description":"A name you choose, such as shop-login. Calls with the same name share state.","maxLength":128,"minLength":1,"type":"string"},"saveChanges":{"default":true,"description":"Keep the cookies and local storage this read leaves behind for the next call with this name. Send false to read with the profile without changing it.","type":"boolean"}},"required":["name"],"type":"object"},"proxy":{"description":"auto: basic first, enhanced once if the site refuses. basic: one plain attempt. enhanced: the stronger read from the start. Same price.","enum":["auto","basic","enhanced"],"type":"string"},"redactPII":{"anyOf":[{"type":"boolean"},{"additionalProperties":false,"description":"Options for redactPII.","properties":{"entities":{"default":["PERSON","EMAIL","PHONE","LOCATION","FINANCIAL","SECRET"],"description":"What to hide: PERSON, EMAIL, PHONE, LOCATION, FINANCIAL, SECRET. All by default.","items":{"enum":["PERSON","EMAIL","PHONE","LOCATION","FINANCIAL","SECRET"],"type":"string"},"minItems":1,"type":"array"},"mode":{"default":"accurate","description":"accurate finds names and places with the model and the rest by pattern. aggressive adds guesses that catch more and may hide a little too much. fast uses patterns only, so it finds no ordinary names or places.","enum":["accurate","aggressive","fast"],"type":"string"},"replaceStyle":{"default":"tag","description":"tag writes <EMAIL>, mask writes * for each character, remove deletes it.","enum":["tag","mask","remove"],"type":"string"}},"type":"object"}],"description":"Send true, or an object, to hide personal data in the markdown and in everything made from it (summary, answers, highlights, json). Links, html and rawHtml are not changed. A page the model cannot scan is refused rather than returned unredacted."},"removeBase64Images":{"description":"Images inside the page that carry their data in the address (data:image) are dropped by default. Send false to keep them in markdown and html.","type":"boolean"},"skipTlsVerification":{"description":"Send true to read a page whose certificate is expired, self-signed or for another name. The read is not private against someone between us and the site.","type":"boolean"},"storeInCache":{"default":true,"description":"Send false to neither read nor keep a stored copy of this page.","type":"boolean"},"timeout":{"description":"How long to keep trying, in milliseconds, between 10 seconds and 2 minutes. Pages behind a bot check can need 10 to 30 seconds the first time.","maximum":300000,"minimum":1000,"type":"integer"},"waitFor":{"description":"Extra milliseconds to wait before reading, up to 60000, for pages that load their content late. To wait for an element, add a wait action with a selector. A read that waits costs 1 credit, the same as any page.","maximum":60000,"minimum":0,"type":"integer"},"zeroDataRetention":{"default":false,"description":"Send true to keep nothing from this call: no stored copy is read or made, and nothing from it is logged. Costs 1 credit more per page. Not with a screenshot.","type":"boolean"}},"type":"object"},"sitemap":{"default":"include","description":"include also uses the site's sitemaps. only reads just the pages the sitemaps name. skip ignores them.","enum":["skip","include","only"],"type":"string"},"url":{"description":"The page to start from, such as https://bun.com/docs.","type":"string"},"webhook":{"anyOf":[{"type":"string"},{"additionalProperties":false,"properties":{"events":{"items":{"enum":["started","page","action","completed","failed","cancelled"],"type":"string"},"minItems":1,"type":"array"},"headers":{"additionalProperties":{"maxLength":1000,"type":"string"},"propertyNames":{"pattern":"^[A-Za-z0-9-]{1,64}$","type":"string"},"type":"object"},"metadata":{"additionalProperties":{"$ref":"#/definitions/__schema0"},"propertyNames":{"type":"string"},"type":"object"},"url":{"type":"string"}},"required":["url"],"type":"object"}],"description":"Where to be told about the job: a plain address, or { url } which gets a JSON POST when the job starts, for each finished page, and when the job ends. headers are sent with every call, metadata comes back in every call, and events picks which of started, page, action, completed, failed and cancelled to send (all by default). An agent run sends action for each step it takes, and page too. Every call is signed: read Stophy-Signature (t=<unix seconds>,v1=<hex>), where v1 is the HMAC-SHA256 of \"<t>.<body>\" with your webhook secret from webhook.secret. A call that gets no 2xx is sent again, up to 3 times. If your address answers slowly, a page event can carry only the page url. Read that page with the status call."},"zeroDataRetention":{"default":false,"description":"Send true to keep nothing from this crawl: no stored copy is read or made, page results are held for one hour at most, and nothing is logged. Costs 1 credit more per page.","type":"boolean"}},"required":["url"],"type":"object"}before
{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"definitions":{"__schema0":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"items":{"allOf":[{"$ref":"#/definitions/__schema0"}]},"type":"array"},{"additionalProperties":{"allOf":[{"$ref":"#/definitions/__schema0"}]},"propertyNames":{"type":"string"},"type":"object"}]},"__schema1":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"items":{"allOf":[{"$ref":"#/definitions/__schema1"}]},"type":"array"},{"additionalProperties":{"allOf":[{"$ref":"#/definitions/__schema1"}]},"propertyNames":{"type":"string"},"type":"object"}]},"__schema2":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"items":{"allOf":[{"$ref":"#/definitions/__schema2"}]},"type":"array"},{"additionalProperties":{"allOf":[{"$ref":"#/definitions/__schema2"}]},"propertyNames":{"type":"string"},"type":"object"}]}},"properties":{"agent":{"additionalProperties":false,"description":"Accepted so a client that sends { model: \"FIRE-1\" } works. An extract reads the pages it is given and checks every value; it does not browse or click, and the answer says so in warning. To navigate a site, use the agent endpoint.","properties":{"model":{"maxLength":40,"minLength":1,"type":"string"}},"required":["model"],"type":"object"},"alexandria":{"not":{}},"allowExternalLinks":{"default":false,"description":"Send true to also read pages on other sites that the pages link to, up to 5, picking the links whose address mentions your prompt. Each page read costs 1 credit.","type":"boolean"},"auditMetadata":{"not":{}},"domainTools":{"const":false,"type":"boolean"},"enableWebSearch":{"default":false,"description":"Send true to also search the web for your prompt and read the best pages it finds, up to 3 more. Needs a prompt. Costs 2 credits for the search. With no urls, the search runs without this.","type":"boolean"},"ignoreInvalidURLs":{"default":true,"description":"Skip addresses that are not public website URLs. Send false to refuse the call instead.","type":"boolean"},"ignoreRobotsTxt":{"const":false,"type":"boolean"},"ignoreSitemap":{"default":false,"description":"For an address ending in /*: skip the site's sitemaps and find pages by links.","type":"boolean"},"includeSubdomains":{"default":true,"description":"For an address ending in /*: also read pages on subdomains of the site. Send false to stay on the exact host.","type":"boolean"},"prompt":{"description":"What to pull from the pages in plain words, such as the version and the release date, up to 10000 characters. With no urls, the web is searched for the first 400 characters of it.","maxLength":10000,"minLength":1,"type":"string"},"robotsUserAgent":{"not":{}},"schema":{"additionalProperties":{"$ref":"#/definitions/__schema0"},"description":"The fields to fill, as a JSON Schema (draft-07 or 2020-12) object with properties. Pydantic's model_json_schema() and zod's toJSONSchema() output work as they are. enum, const, anyOf, oneOf, nullable types, $ref with $defs, required, descriptions and any key names are read. Up to 100 top-level fields and 32 KB. A field the page does not state comes back null.","propertyNames":{"type":"string"},"type":"object"},"scrapeOptions":{"additionalProperties":{},"description":"How to read each page, the same options as scrape.","properties":{"actions":{"description":"Up to 50 steps to run on the page, in order, before reading it: { \"type\": \"wait\", \"milliseconds\": 500 } (up to 30 seconds), { \"type\": \"wait\", \"selector\": \".results\" }, { \"type\": \"click\", \"selector\": \"button.more\" }, { \"type\": \"write\", \"text\": \"tides\" }, { \"type\": \"press\", \"key\": \"Enter\" }, { \"type\": \"scroll\", \"direction\": \"down\" } (also up, left or right; amount is pixels, \"viewport\" or \"max\"; maxScrolls 1 to 50; selector scrolls an inner container; \"max\" keeps scrolling until the page stops growing, for feeds that load as you go), { \"type\": \"screenshot\", \"fullPage\": true } (links come back in actions.screenshots), { \"type\": \"scrape\" } (the page at that point, in actions.scrapes), { \"type\": \"executeJavascript\", \"script\": \"document.title\" } (results in actions.javascriptReturns), { \"type\": \"pdf\", \"format\": \"A4\" } (links in actions.pdfs) or { \"type\": \"perform\", \"action\": \"Click the Load more button\" } (a step in plain words, up to 5 browser steps on this page, never leaving the site; at most 5 per call). A read with actions costs 1 credit, the same as any page; the actions themselves add nothing. If an action fails, you still get the page as it stood, with a warning that names the action and says why.","items":{"anyOf":[{"additionalProperties":false,"properties":{"milliseconds":{"maximum":30000,"minimum":1,"type":"integer"},"type":{"const":"wait","type":"string"}},"required":["type","milliseconds"],"type":"object"},{"additionalProperties":false,"properties":{"selector":{"minLength":1,"type":"string"},"type":{"const":"wait","type":"string"}},"required":["type","selector"],"type":"object"},{"additionalProperties":false,"properties":{"all":{"const":false,"type":"boolean"},"selector":{"minLength":1,"type":"string"},"type":{"const":"click","type":"string"}},"required":["type","selector"],"type":"object"},{"additionalProperties":false,"properties":{"text":{"minLength":1,"type":"string"},"type":{"const":"write","type":"string"}},"required":["type","text"],"type":"object"},{"additionalProperties":false,"properties":{"key":{"maxLength":40,"minLength":1,"type":"string"},"type":{"const":"press","type":"string"}},"required":["type","key"],"type":"object"},{"additionalProperties":false,"properties":{"amount":{"anyOf":[{"maximum":100000,"minimum":1,"type":"integer"},{"enum":["viewport","max"],"type":"string"}]},"direction":{"default":"down","enum":["up","down","left","right"],"type":"string"},"maxScrolls":{"maximum":50,"minimum":1,"type":"integer"},"selector":{"minLength":1,"type":"string"},"type":{"const":"scroll","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"fullPage":{"type":"boolean"},"quality":{"maximum":100,"minimum":1,"type":"integer"},"type":{"const":"screenshot","type":"string"},"viewport":{"additionalProperties":false,"properties":{"height":{"maximum":2160,"minimum":200,"type":"integer"},"width":{"maximum":3840,"minimum":200,"type":"integer"}},"required":["width","height"],"type":"object"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"type":{"const":"scrape","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"script":{"maxLength":20000,"minLength":1,"type":"string"},"type":{"const":"executeJavascript","type":"string"}},"required":["type","script"],"type":"object"},{"additionalProperties":false,"properties":{"format":{"enum":["Letter","Legal","Tabloid","Ledger","A0","A1","A2","A3","A4","A5","A6"],"type":"string"},"landscape":{"type":"boolean"},"scale":{"maximum":2,"minimum":0.1,"type":"number"},"type":{"const":"pdf","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"action":{"maxLength":500,"minLength":1,"type":"string"},"type":{"const":"perform","type":"string"}},"required":["type","action"],"type":"object"}]},"maxItems":50,"minItems":1,"type":"array"},"alexandria":{"not":{}},"auditMetadata":{"not":{}},"blockAds":{"description":"Ads and trackers are not loaded when a page runs in a browser. Send false to load them.","type":"boolean"},"checkPromptInjection":{"description":"Send true to scan the page text for instructions aimed at an AI model before anything is built from it. A page that has them is refused with 403 promptInjectionDetected and costs nothing. The scan adds 4 credits when it runs; a page it cannot scan fully comes back with a warning and no charge.","type":"boolean"},"domainTools":{"const":false,"type":"boolean"},"excludeTags":{"description":"Remove the parts of the page that match these CSS selectors, such as .comments.","items":{"minLength":1,"type":"string"},"minItems":1,"type":"array"},"fastMode":{"description":"Send true to read the page without opening a browser: the answer comes sooner, but a page that needs a browser, or that refuses a plain request, comes back as an error instead of being retried. Ignored when the call needs a browser (actions, screenshot, waitFor, mobile, profile, network, branding).","type":"boolean"},"formats":{"default":["markdown"],"description":"What to return: markdown (clean page text), summary (a short summary of the page), html (the cleaned page), rawHtml (the page as sent), audio and video (for a YouTube link: the audio track as an M4A file, or the video as an MP4 file, as a link that works for 1 hour), rawBase64 (the bytes the site sent, Base64 encoded, from a live read; metadata.contentType says what they are), links (every link on the page), images (every image address), screenshot (a link to a JPEG of the visible page, kept for 7 days), changeTracking (what changed in the markdown since your key last read this page with the same options, kept 30 days; add modes [\"git-diff\",\"json\"] with a schema or prompt to compare fields too), question (send { \"type\": \"question\", \"question\": \"...\" } to get answer, null when the page does not state one), product (title, brand, category, url, description and variants with price, sale, availability and images, or null) and menu (merchant, currency and sections of items with prices, or null) network (the JSON the page loaded while it rendered, up to 30 responses) and branding (the page's colors, fonts, typography, spacing, button and input styles, logo and brand images, read from how the page looks, with a field left out when the page does not show it). Send { \"type\": \"screenshot\", \"fullPage\": true } for the whole page. Send { \"type\": \"highlights\", \"query\": \"refund policy\" } for the passages that best match a query. Send { \"type\": \"json\", \"schema\": { \"type\": \"object\", \"properties\": { \"price\": { \"type\": \"number\" } } } } or { \"type\": \"json\", \"prompt\": \"the price and the stock\" } for fields filled from the page, each checked against it. Send { \"type\": \"json\", \"parser\": \"amazon-product\" } to get a site's own data as json instead of reading the page; GET /v1/parsers lists the parsers. Send { \"type\": \"json\", \"rules\": { \"title\": \"h1\", \"links\": { \"selector\": \"a\", \"type\": \"list\", \"output\": \"@href\" } } } to read the page with CSS rules and no model, at the page's own price. Send { \"type\": \"attributes\", \"selectors\": [{ \"selector\": \"a\", \"attribute\": \"href\" }] } for attribute values, returned in attributes. Without a parser or rules, json needs a schema or a prompt and is filled from the page. json with a schema or a prompt, summary, highlights, question, product, menu and changeTracking in json mode cost 4 credits more each when they return something. json with rules or a parser, and attributes, cost nothing more. A screenshot, network or branding read costs 1 credit, the same as any page. A PDF comes back as markdown only, and costs 1 credit more for each page of text that comes back. A CSV or an Excel .xlsx file comes back as markdown tables.","items":{"anyOf":[{"enum":["markdown","summary","html","rawHtml","rawBase64","links","images","network","branding","audio","video","screenshot","changeTracking","product","menu"],"type":"string"},{"additionalProperties":false,"properties":{"type":{"enum":["markdown","summary","html","rawHtml","rawBase64","links","images","network","branding","audio","video"],"type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"modes":{"description":"git-diff returns a unified diff of the markdown. json compares the fields in schema or prompt between this read and the last one. Without modes you get git-diff.","items":{"enum":["git-diff","json"],"type":"string"},"maxItems":2,"type":"array"},"prompt":{"description":"With json mode: what to compare, in plain words, such as the price and stock.","maxLength":10000,"minLength":1,"type":"string"},"schema":{"additionalProperties":{"$ref":"#/definitions/__schema0"},"description":"The fields to fill, as a JSON Schema (draft-07 or 2020-12) object with properties. Pydantic's model_json_schema() and zod's toJSONSchema() output work as they are. enum, const, anyOf, oneOf, nullable types, $ref with $defs, required, descriptions and any key names are read. Up to 100 top-level fields and 32 KB. A field the page does not state comes back null.","propertyNames":{"type":"string"},"type":"object"},"tag":{"type":"null"},"type":{"const":"changeTracking","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"question":{"description":"A question to answer from the page, such as what the refund window is.","maxLength":10000,"minLength":1,"type":"string"},"type":{"const":"question","type":"string"}},"required":["type","question"],"type":"object"},{"additionalProperties":false,"properties":{"type":{"const":"product","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"type":{"const":"menu","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"fullPage":{"default":false,"description":"Capture the whole page from top to bottom instead of the visible part.","type":"boolean"},"quality":{"description":"JPEG quality from 1 to 100. The default is 70.","maximum":100,"minimum":1,"type":"integer"},"type":{"const":"screenshot","type":"string"},"viewport":{"additionalProperties":false,"description":"The window size in pixels, such as { width: 390, height: 844 }.","properties":{"height":{"maximum":2160,"minimum":200,"type":"integer"},"width":{"maximum":3840,"minimum":200,"type":"integer"}},"required":["width","height"],"type":"object"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"count":{"default":5,"description":"How many passages to return, best match first.","maximum":20,"minimum":1,"type":"integer"},"query":{"description":"What you are looking for on the page, such as refund policy.","maxLength":10000,"minLength":1,"type":"string"},"type":{"const":"highlights","type":"string"}},"required":["type","query"],"type":"object"},{"additionalProperties":false,"properties":{"checkPromptInjection":{"description":"Deprecated: send checkPromptInjection at the top level of the call.","type":"boolean"},"options":{"additionalProperties":{"$ref":"#/definitions/__schema1"},"description":"Only with parser: extra inputs for it, such as { \"page\": 2 } for the next page of results or { \"minRating\": 4.5 } for a filter. GET /v1/parsers lists what each parser accepts.","propertyNames":{"type":"string"},"type":"object"},"parser":{"description":"Read the page with a named parser, which gives the site's own data as json. The url must be the kind of page the parser reads. Parsers are the only way to read some sites. GET /v1/parsers lists them.","type":"string"},"prompt":{"description":"What to pull from the page in plain words, such as the version and the release date.","maxLength":10000,"minLength":1,"type":"string"},"rules":{"additionalProperties":{"$ref":"#/definitions/__schema2"},"description":"Read the page with CSS rules instead of a model, no extra fee. Each field is a selector such as \"h1\" (the first match's text), \"a@href\" (an attribute) or { \"selector\": \"li\", \"type\": \"list\", \"output\": \"text\" | \"html\" | \"@attribute\" | { nested fields } }. A missing item is null and an unmatched list is []. Relative links become absolute. Up to 100 fields, 5 levels deep. Not with schema, prompt or parser.","propertyNames":{"type":"string"},"type":"object"},"schema":{"additionalProperties":{"$ref":"#/definitions/__schema0"},"description":"The fields to fill, as a JSON Schema (draft-07 or 2020-12) object with properties. Pydantic's model_json_schema() and zod's toJSONSchema() output work as they are. enum, const, anyOf, oneOf, nullable types, $ref with $defs, required, descriptions and any key names are read. Up to 100 top-level fields and 32 KB. A field the page does not state comes back null.","propertyNames":{"type":"string"},"type":"object"},"type":{"const":"json","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"selectors":{"description":"The elements and attributes to read, such as { selector: 'a.buy', attribute: 'href' }.","items":{"additionalProperties":false,"properties":{"attribute":{"maxLength":100,"minLength":1,"type":"string"},"selector":{"minLength":1,"type":"string"}},"required":["selector","attribute"],"type":"object"},"maxItems":50,"minItems":1,"type":"array"},"type":{"const":"attributes","type":"string"}},"required":["type","selectors"],"type":"object"}]},"maxItems":20,"minItems":1,"type":"array"},"headers":{"additionalProperties":{"maxLength":2000,"pattern":"^[\\t\\x20-\\x7e]*$","type":"string"},"description":"Extra request headers to send to the site, such as { \"x-plan\": \"pro\" }. A read with headers is never answered from or saved to a stored copy.","propertyNames":{"pattern":"^[A-Za-z0-9-]{1,64}$","type":"string"},"type":"object"},"ignoreRobotsTxt":{"const":false,"type":"boolean"},"includeTags":{"description":"Keep only the parts of the page that match these CSS selectors, such as article or .price. When set, onlyMainContent is not applied.","items":{"minLength":1,"type":"string"},"minItems":1,"type":"array"},"location":{"additionalProperties":false,"description":"Where to read the page from. The default is the United States.","properties":{"country":{"description":"Two-letter country code to read the page from, such as DE or JP.","type":"string"},"languages":{"description":"Languages to ask the site for, best first, such as [\"de\", \"en\"]. Sent as Accept-Language. A read with languages is never answered from or saved to a stored copy.","items":{"pattern":"^[A-Za-z]{2,3}(?:-[A-Za-z0-9]{2,8})*$","type":"string"},"maxItems":5,"minItems":1,"type":"array"}},"type":"object"},"lockdown":{"description":"Send true to answer only from a stored copy of the page and never read it live, whatever its age. A page with no stored copy is notFound. The same as minAge 0.","type":"boolean"},"maxAge":{"description":"Accept a stored answer up to this many milliseconds old, at most 30 days. Without it, 2 days, or less for a site whose pages change often, and a copy up to twice that age (at most 7 days) comes back at once as stale while a fresh read runs. 0 always reads the page live. metadata.cacheState says which one you got.","maximum":9007199254740991,"minimum":0,"type":"integer"},"minAge":{"description":"Answer only from a stored copy that is at least this many milliseconds old, and never read the page live. 0 accepts any stored copy. A page with no such copy is notFound.","maximum":9007199254740991,"minimum":0,"type":"integer"},"mobile":{"description":"Read the page as a phone would: a phone-sized screen and the mobile version of the site. The page loads in a browser.","type":"boolean"},"onlyCleanContent":{"description":"Send true to have a model remove what onlyMainContent leaves behind in the markdown: cookie banners, ads, share widgets, breadcrumbs, sign-up prompts, comment prompts and related-article lists. It only removes whole paragraphs and lists; it never rewrites or adds text, and code blocks are always kept. Skipped with a warning when the page is too long to clean or the model does not answer. Not with zeroDataRetention. Summary, answers and highlights are made from the cleaned markdown.","type":"boolean"},"onlyMainContent":{"default":true,"description":"Keep only the page's main content, without menus, headers, footers and ads.","type":"boolean"},"parsers":{"description":"Only the pdf parser exists. Send \"pdf\" or { \"type\": \"pdf\", mode, maxPages, pages, blocks, pageMarkers } with the same meaning as in parse. Without mode a PDF is read from its text layer only; auto reads the picture of a page that has no text, and ocr reads the picture of every page, up to 20 pages. Each page of text that comes back costs 1 credit.","items":{"anyOf":[{"const":"pdf","type":"string"},{"additionalProperties":false,"properties":{"blocks":{"description":"Send true to also get the page's layout in blocks: each title, section header or run of text, with its page, reading order, position on the page (bbox as left, top, right, bottom from 0 to 1) and where its text sits in that page's markdown (span, as in pages). Tables, figures and formulas are not told apart. A page read from its picture is one block. No extra charge.","type":"boolean"},"maxPages":{"description":"Read at most this many pages, up to 100.","maximum":100,"minimum":1,"type":"integer"},"mode":{"description":"fast reads the text layer only. auto (the default) reads the text layer and reads the picture of any page that has none. ocr reads the picture of every page.","enum":["fast","auto","ocr"],"type":"string"},"pageMarkers":{"description":"Send true to mark page breaks in the markdown: pages are joined with \"---\" and a line, where N is the page that follows. No extra charge.","type":"boolean"},"pages":{"description":"Send true to also get each page's markdown in pages, as { pageNumber, markdown }. No extra charge.","type":"boolean"},"type":{"const":"pdf","type":"string"}},"required":["type"],"type":"object"}]},"minItems":1,"type":"array"},"profile":{"additionalProperties":false,"description":"Read the page with the cookies and local storage that earlier calls saved under this name, kept for your account for 30 days after the last use. A call with a profile always loads the page in a browser, costs 1 credit, the same as any page, and is never answered from a stored copy. Only one call at a time can save to a profile.","properties":{"name":{"description":"A name you choose, such as shop-login. Calls with the same name share state.","maxLength":128,"minLength":1,"type":"string"},"saveChanges":{"default":true,"description":"Keep the cookies and local storage this read leaves behind for the next call with this name. Send false to read with the profile without changing it.","type":"boolean"}},"required":["name"],"type":"object"},"proxy":{"description":"auto: basic first, enhanced once if the site refuses. basic: one plain attempt. enhanced: the stronger read from the start. Same price.","enum":["auto","basic","enhanced"],"type":"string"},"redactPII":{"anyOf":[{"type":"boolean"},{"additionalProperties":false,"description":"Options for redactPII.","properties":{"entities":{"default":["PERSON","EMAIL","PHONE","LOCATION","FINANCIAL","SECRET"],"description":"What to hide: PERSON, EMAIL, PHONE, LOCATION, FINANCIAL, SECRET. All by default.","items":{"enum":["PERSON","EMAIL","PHONE","LOCATION","FINANCIAL","SECRET"],"type":"string"},"minItems":1,"type":"array"},"mode":{"default":"accurate","description":"accurate finds names and places with the model and the rest by pattern. aggressive adds guesses that catch more and may hide a little too much. fast uses patterns only, so it finds no ordinary names or places.","enum":["accurate","aggressive","fast"],"type":"string"},"replaceStyle":{"default":"tag","description":"tag writes <EMAIL>, mask writes * for each character, remove deletes it.","enum":["tag","mask","remove"],"type":"string"}},"type":"object"}],"description":"Send true, or an object, to hide personal data in the markdown and in everything made from it (summary, answers, highlights, json). Links, html and rawHtml are not changed. A page the model cannot scan is refused rather than returned unredacted."},"removeBase64Images":{"description":"Images inside the page that carry their data in the address (data:image) are dropped by default. Send false to keep them in markdown and html.","type":"boolean"},"robotsUserAgent":{"not":{}},"skipTlsVerification":{"description":"Send true to read a page whose certificate is expired, self-signed or for another name. The read is not private against someone between us and the site.","type":"boolean"},"storeInCache":{"default":true,"description":"Send false to neither read nor keep a stored copy of this page.","type":"boolean"},"threatProtection":{"not":{}},"timeout":{"description":"How long to keep trying, in milliseconds, between 10 seconds and 2 minutes. Pages behind a bot check can need 10 to 30 seconds the first time.","maximum":300000,"minimum":1000,"type":"integer"},"toolDetail":{"not":{}},"waitFor":{"description":"Extra milliseconds to wait before reading, up to 60000, for pages that load their content late. To wait for an element, add a wait action with a selector. A read that waits costs 1 credit, the same as any page.","maximum":60000,"minimum":0,"type":"integer"},"zeroDataRetention":{"default":false,"description":"Send true to keep nothing from this call: no stored copy is read or made, and nothing from it is logged. Costs 1 credit more per page. Not with a screenshot.","type":"boolean"}},"type":"object"},"showSources":{"default":false,"description":"Send true to get sources: for each field, the pages that state its value.","type":"boolean"},"systemPrompt":{"description":"Standing instructions for how to fill the fields, such as units or how to write dates, up to 10000 characters. They add to the rules of the extract: a value is still copied from the page and is null when the page does not state it.","maxLength":10000,"minLength":1,"type":"string"},"threatProtection":{"not":{}},"urls":{"default":[],"description":"The pages to read, up to 25, such as [\"https://bun.com/blog/bun-v1.3\"]. An address ending in /* reads pages under it, found through the site's sitemap. With more than one, the fields are filled from all of them together. A page that cannot be read is skipped and named in warning, and costs nothing. A page is read up to 50000 characters. With several pages each one gets a smaller share, and all together are read up to 150000 characters. A page that is cut is counted in warning. The call fails only when no page can be read. Leave it out and send a prompt to search the web instead.","items":{"maxLength":2048,"type":"string"},"maxItems":25,"type":"array"},"webhook":{"anyOf":[{"type":"string"},{"additionalProperties":false,"properties":{"events":{"items":{"enum":["started","page","action","completed","failed","cancelled"],"type":"string"},"minItems":1,"type":"array"},"headers":{"additionalProperties":{"maxLength":1000,"type":"string"},"propertyNames":{"pattern":"^[A-Za-z0-9-]{1,64}$","type":"string"},"type":"object"},"metadata":{"additionalProperties":{"$ref":"#/definitions/__schema0"},"propertyNames":{"type":"string"},"type":"object"},"url":{"type":"string"}},"required":["url"],"type":"object"}],"description":"Where to be told when the extract ends: a plain address, or { url } which gets one JSON POST with the id, the status, the data and creditsUsed. headers are sent with the call, metadata comes back in it, and events picks completed, failed or both (both by default). The call is signed: read Stophy-Signature (t=<unix seconds>,v1=<hex>), the HMAC-SHA256 of \"<t>.<body>\" with your webhook secret from webhook.secret. A call that gets no 2xx is sent again, up to 3 times."},"zeroDataRetention":{"default":false,"description":"Send true to keep nothing from this call: pages are read live, the result is held for one hour at most, and nothing is logged. Costs 1 credit more per page.","type":"boolean"}},"type":"object"}after
{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"definitions":{"__schema0":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"items":{"allOf":[{"$ref":"#/definitions/__schema0"}]},"type":"array"},{"additionalProperties":{"allOf":[{"$ref":"#/definitions/__schema0"}]},"propertyNames":{"type":"string"},"type":"object"}]}},"properties":{"agent":{"additionalProperties":false,"description":"Accepted so a client that sends { model: \"FIRE-1\" } works. An extract reads the pages it is given and checks every value; it does not browse or click, and the answer says so in warning. To navigate a site, use the agent endpoint.","properties":{"model":{"maxLength":40,"minLength":1,"type":"string"}},"required":["model"],"type":"object"},"allowExternalLinks":{"default":false,"description":"Send true to also read pages on other sites that the pages link to, up to 5, picking the links whose address mentions your prompt. Each page read costs 1 credit.","type":"boolean"},"enableWebSearch":{"default":false,"description":"Send true to also search the web for your prompt and read the best pages it finds, up to 3 more. Needs a prompt. Costs 2 credits for the search. With no urls, the search runs without this.","type":"boolean"},"ignoreInvalidURLs":{"default":true,"description":"Skip addresses that are not public website URLs. Send false to refuse the call instead.","type":"boolean"},"ignoreSitemap":{"default":false,"description":"For an address ending in /*: skip the site's sitemaps and find pages by links.","type":"boolean"},"includeSubdomains":{"default":true,"description":"For an address ending in /*: also read pages on subdomains of the site. Send false to stay on the exact host.","type":"boolean"},"prompt":{"description":"What to pull from the pages in plain words, such as the version and the release date, up to 10000 characters. With no urls, the web is searched for the first 400 characters of it.","maxLength":10000,"minLength":1,"type":"string"},"schema":{"additionalProperties":{"$ref":"#/definitions/__schema0"},"description":"The fields to fill, as a JSON Schema (draft-07 or 2020-12) object with properties. Pydantic's model_json_schema() and zod's toJSONSchema() output work as they are. enum, const, anyOf, oneOf, nullable types, $ref with $defs, required, descriptions and any key names are read. Up to 100 top-level fields and 32 KB. A field the page does not state comes back null.","propertyNames":{"type":"string"},"type":"object"},"scrapeOptions":{"additionalProperties":false,"description":"How to read each page, the same options as scrape.","properties":{"actions":{"description":"Up to 50 steps to run on the page, in order, before reading it: { \"type\": \"wait\", \"milliseconds\": 500 } (up to 30 seconds), { \"type\": \"wait\", \"selector\": \".results\" }, { \"type\": \"click\", \"selector\": \"button.more\" }, { \"type\": \"write\", \"text\": \"tides\" }, { \"type\": \"press\", \"key\": \"Enter\" }, { \"type\": \"scroll\", \"direction\": \"down\" } (also up, left or right; amount is pixels, \"viewport\" or \"max\"; maxScrolls 1 to 50; selector scrolls an inner container; \"max\" keeps scrolling until the page stops growing, for feeds that load as you go), { \"type\": \"screenshot\", \"fullPage\": true } (links come back in actions.screenshots), { \"type\": \"scrape\" } (the page at that point, in actions.scrapes), { \"type\": \"executeJavascript\", \"script\": \"document.title\" } (results in actions.javascriptReturns), { \"type\": \"pdf\", \"format\": \"A4\" } (links in actions.pdfs) or { \"type\": \"perform\", \"action\": \"Click the Load more button\" } (a step in plain words, up to 5 browser steps on this page, never leaving the site; at most 5 per call). A read with actions costs 1 credit, the same as any page; the actions themselves add nothing. If an action fails, you still get the page as it stood, with a warning that names the action and says why.","items":{"anyOf":[{"additionalProperties":false,"properties":{"milliseconds":{"maximum":30000,"minimum":1,"type":"integer"},"type":{"const":"wait","type":"string"}},"required":["type","milliseconds"],"type":"object"},{"additionalProperties":false,"properties":{"selector":{"minLength":1,"type":"string"},"type":{"const":"wait","type":"string"}},"required":["type","selector"],"type":"object"},{"additionalProperties":false,"properties":{"all":{"const":false,"type":"boolean"},"selector":{"minLength":1,"type":"string"},"type":{"const":"click","type":"string"}},"required":["type","selector"],"type":"object"},{"additionalProperties":false,"properties":{"text":{"minLength":1,"type":"string"},"type":{"const":"write","type":"string"}},"required":["type","text"],"type":"object"},{"additionalProperties":false,"properties":{"key":{"maxLength":40,"minLength":1,"type":"string"},"type":{"const":"press","type":"string"}},"required":["type","key"],"type":"object"},{"additionalProperties":false,"properties":{"amount":{"anyOf":[{"maximum":100000,"minimum":1,"type":"integer"},{"enum":["viewport","max"],"type":"string"}]},"direction":{"default":"down","enum":["up","down","left","right"],"type":"string"},"maxScrolls":{"maximum":50,"minimum":1,"type":"integer"},"selector":{"minLength":1,"type":"string"},"type":{"const":"scroll","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"fullPage":{"type":"boolean"},"quality":{"maximum":100,"minimum":1,"type":"integer"},"type":{"const":"screenshot","type":"string"},"viewport":{"additionalProperties":false,"properties":{"height":{"maximum":2160,"minimum":200,"type":"integer"},"width":{"maximum":3840,"minimum":200,"type":"integer"}},"required":["width","height"],"type":"object"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"type":{"const":"scrape","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"script":{"maxLength":20000,"minLength":1,"type":"string"},"type":{"const":"executeJavascript","type":"string"}},"required":["type","script"],"type":"object"},{"additionalProperties":false,"properties":{"format":{"enum":["Letter","Legal","Tabloid","Ledger","A0","A1","A2","A3","A4","A5","A6"],"type":"string"},"landscape":{"type":"boolean"},"scale":{"maximum":2,"minimum":0.1,"type":"number"},"type":{"const":"pdf","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"action":{"maxLength":500,"minLength":1,"type":"string"},"type":{"const":"perform","type":"string"}},"required":["type","action"],"type":"object"}]},"maxItems":50,"minItems":1,"type":"array"},"blockAds":{"description":"Ads and trackers are not loaded when a page runs in a browser. Send false to load them.","type":"boolean"},"checkPromptInjection":{"description":"Send true to scan the page text for instructions aimed at an AI model before anything is built from it. A page that has them is refused with 403 promptInjectionDetected and costs nothing. The scan adds 4 credits when it runs; a page it cannot scan fully comes back with a warning and no charge.","type":"boolean"},"excludeTags":{"description":"Remove the parts of the page that match these CSS selectors, such as .comments.","items":{"minLength":1,"type":"string"},"minItems":1,"type":"array"},"fastMode":{"description":"Send true to read the page without opening a browser: the answer comes sooner, but a page that needs a browser, or that refuses a plain request, comes back as an error instead of being retried. Ignored when the call needs a browser (actions, screenshot, waitFor, mobile, profile, network, branding).","type":"boolean"},"headers":{"additionalProperties":{"maxLength":2000,"pattern":"^[\\t\\x20-\\x7e]*$","type":"string"},"description":"Extra request headers to send to the site, such as { \"x-plan\": \"pro\" }. A read with headers is never answered from or saved to a stored copy.","propertyNames":{"pattern":"^[A-Za-z0-9-]{1,64}$","type":"string"},"type":"object"},"includeTags":{"description":"Keep only the parts of the page that match these CSS selectors, such as article or .price. When set, onlyMainContent is not applied.","items":{"minLength":1,"type":"string"},"minItems":1,"type":"array"},"location":{"additionalProperties":false,"description":"Where to read the page from. The default is the United States.","properties":{"country":{"description":"Two-letter country code to read the page from, such as DE or JP.","type":"string"},"languages":{"description":"Languages to ask the site for, best first, such as [\"de\", \"en\"]. Sent as Accept-Language. A read with languages is never answered from or saved to a stored copy.","items":{"pattern":"^[A-Za-z]{2,3}(?:-[A-Za-z0-9]{2,8})*$","type":"string"},"maxItems":5,"minItems":1,"type":"array"}},"type":"object"},"lockdown":{"description":"Send true to answer only from a stored copy of the page and never read it live, whatever its age. A page with no stored copy is notFound. The same as minAge 0.","type":"boolean"},"maxAge":{"description":"Accept a stored answer up to this many milliseconds old, at most 30 days. Without it, 2 days, or less for a site whose pages change often, and a copy up to twice that age (at most 7 days) comes back at once as stale while a fresh read runs. 0 always reads the page live. metadata.cacheState says which one you got.","maximum":9007199254740991,"minimum":0,"type":"integer"},"minAge":{"description":"Answer only from a stored copy that is at least this many milliseconds old, and never read the page live. 0 accepts any stored copy. A page with no such copy is notFound.","maximum":9007199254740991,"minimum":0,"type":"integer"},"mobile":{"description":"Read the page as a phone would: a phone-sized screen and the mobile version of the site. The page loads in a browser.","type":"boolean"},"onlyCleanContent":{"description":"Send true to have a model remove what onlyMainContent leaves behind in the markdown: cookie banners, ads, share widgets, breadcrumbs, sign-up prompts, comment prompts and related-article lists. It only removes whole paragraphs and lists; it never rewrites or adds text, and code blocks are always kept. Skipped with a warning when the page is too long to clean or the model does not answer. Not with zeroDataRetention. Summary, answers and highlights are made from the cleaned markdown.","type":"boolean"},"onlyMainContent":{"default":true,"description":"Keep only the page's main content, without menus, headers, footers and ads.","type":"boolean"},"parsers":{"description":"Only the pdf parser exists. Send \"pdf\" or { \"type\": \"pdf\", mode, maxPages, pages, blocks, pageMarkers } with the same meaning as in parse. Without mode a PDF is read from its text layer only; auto reads the picture of a page that has no text, and ocr reads the picture of every page, up to 20 pages. Each page of text that comes back costs 1 credit.","items":{"anyOf":[{"const":"pdf","type":"string"},{"additionalProperties":false,"properties":{"blocks":{"description":"Send true to also get the page's layout in blocks: each title, section header or run of text, with its page, reading order, position on the page (bbox as left, top, right, bottom from 0 to 1) and where its text sits in that page's markdown (span, as in pages). Tables, figures and formulas are not told apart. A page read from its picture is one block. No extra charge.","type":"boolean"},"maxPages":{"description":"Read at most this many pages, up to 100.","maximum":100,"minimum":1,"type":"integer"},"mode":{"description":"fast reads the text layer only. auto (the default) reads the text layer and reads the picture of any page that has none. ocr reads the picture of every page.","enum":["fast","auto","ocr"],"type":"string"},"pageMarkers":{"description":"Send true to mark page breaks in the markdown: pages are joined with \"---\" and a line, where N is the page that follows. No extra charge.","type":"boolean"},"pages":{"description":"Send true to also get each page's markdown in pages, as { pageNumber, markdown }. No extra charge.","type":"boolean"},"type":{"const":"pdf","type":"string"}},"required":["type"],"type":"object"}]},"minItems":1,"type":"array"},"profile":{"additionalProperties":false,"description":"Read the page with the cookies and local storage that earlier calls saved under this name, kept for your account for 30 days after the last use. A call with a profile always loads the page in a browser, costs 1 credit, the same as any page, and is never answered from a stored copy. Only one call at a time can save to a profile.","properties":{"name":{"description":"A name you choose, such as shop-login. Calls with the same name share state.","maxLength":128,"minLength":1,"type":"string"},"saveChanges":{"default":true,"description":"Keep the cookies and local storage this read leaves behind for the next call with this name. Send false to read with the profile without changing it.","type":"boolean"}},"required":["name"],"type":"object"},"proxy":{"description":"auto: basic first, enhanced once if the site refuses. basic: one plain attempt. enhanced: the stronger read from the start. Same price.","enum":["auto","basic","enhanced"],"type":"string"},"redactPII":{"anyOf":[{"type":"boolean"},{"additionalProperties":false,"description":"Options for redactPII.","properties":{"entities":{"default":["PERSON","EMAIL","PHONE","LOCATION","FINANCIAL","SECRET"],"description":"What to hide: PERSON, EMAIL, PHONE, LOCATION, FINANCIAL, SECRET. All by default.","items":{"enum":["PERSON","EMAIL","PHONE","LOCATION","FINANCIAL","SECRET"],"type":"string"},"minItems":1,"type":"array"},"mode":{"default":"accurate","description":"accurate finds names and places with the model and the rest by pattern. aggressive adds guesses that catch more and may hide a little too much. fast uses patterns only, so it finds no ordinary names or places.","enum":["accurate","aggressive","fast"],"type":"string"},"replaceStyle":{"default":"tag","description":"tag writes <EMAIL>, mask writes * for each character, remove deletes it.","enum":["tag","mask","remove"],"type":"string"}},"type":"object"}],"description":"Send true, or an object, to hide personal data in the markdown and in everything made from it (summary, answers, highlights, json). Links, html and rawHtml are not changed. A page the model cannot scan is refused rather than returned unredacted."},"removeBase64Images":{"description":"Images inside the page that carry their data in the address (data:image) are dropped by default. Send false to keep them in markdown and html.","type":"boolean"},"skipTlsVerification":{"description":"Send true to read a page whose certificate is expired, self-signed or for another name. The read is not private against someone between us and the site.","type":"boolean"},"storeInCache":{"default":true,"description":"Send false to neither read nor keep a stored copy of this page.","type":"boolean"},"timeout":{"description":"How long to keep trying, in milliseconds, between 10 seconds and 2 minutes. Pages behind a bot check can need 10 to 30 seconds the first time.","maximum":300000,"minimum":1000,"type":"integer"},"waitFor":{"description":"Extra milliseconds to wait before reading, up to 60000, for pages that load their content late. To wait for an element, add a wait action with a selector. A read that waits costs 1 credit, the same as any page.","maximum":60000,"minimum":0,"type":"integer"},"zeroDataRetention":{"default":false,"description":"Send true to keep nothing from this call: no stored copy is read or made, and nothing from it is logged. Costs 1 credit more per page. Not with a screenshot.","type":"boolean"}},"type":"object"},"showSources":{"default":false,"description":"Send true to get sources: for each field, the pages that state its value.","type":"boolean"},"systemPrompt":{"description":"Standing instructions for how to fill the fields, such as units or how to write dates, up to 10000 characters. They add to the rules of the extract: a value is still copied from the page and is null when the page does not state it.","maxLength":10000,"minLength":1,"type":"string"},"urls":{"default":[],"description":"The pages to read, up to 25, such as [\"https://bun.com/blog/bun-v1.3\"]. An address ending in /* reads pages under it, found through the site's sitemap. With more than one, the fields are filled from all of them together. A page that cannot be read is skipped and named in warning, and costs nothing. A page is read up to 50000 characters. With several pages each one gets a smaller share, and all together are read up to 150000 characters. A page that is cut is counted in warning. The call fails only when no page can be read. Leave it out and send a prompt to search the web instead.","items":{"maxLength":2048,"type":"string"},"maxItems":25,"type":"array"},"webhook":{"anyOf":[{"type":"string"},{"additionalProperties":false,"properties":{"events":{"items":{"enum":["started","page","action","completed","failed","cancelled"],"type":"string"},"minItems":1,"type":"array"},"headers":{"additionalProperties":{"maxLength":1000,"type":"string"},"propertyNames":{"pattern":"^[A-Za-z0-9-]{1,64}$","type":"string"},"type":"object"},"metadata":{"additionalProperties":{"$ref":"#/definitions/__schema0"},"propertyNames":{"type":"string"},"type":"object"},"url":{"type":"string"}},"required":["url"],"type":"object"}],"description":"Where to be told when the extract ends: a plain address, or { url } which gets one JSON POST with the id, the status, the data and creditsUsed. headers are sent with the call, metadata comes back in it, and events picks completed, failed or both (both by default). The call is signed: read Stophy-Signature (t=<unix seconds>,v1=<hex>), the HMAC-SHA256 of \"<t>.<body>\" with your webhook secret from webhook.secret. A call that gets no 2xx is sent again, up to 3 times."},"zeroDataRetention":{"default":false,"description":"Send true to keep nothing from this call: pages are read live, the result is held for one hour at most, and nothing is logged. Costs 1 credit more per page.","type":"boolean"}},"type":"object"}{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"alexandria":{"not":{}},"auditMetadata":{"not":{}},"domainTools":{"const":false,"type":"boolean"},"ignoreCache":{"default":false,"description":"Send ⟨28 unchanged words⟩ ?query part.","type":"boolean"},"ignoreRobotsTxt":{"const":false,"type":"boolean"},"includeSubdomains":{"default":true,"description":"Also ⟨116 unchanged words⟩ "array"}},"type":"object"},"robotsUserAgent":{"not":{}},"search":{"description":"Keep only addresses that ⟨38 unchanged words⟩ "include","only"],"type":"string"},"threatProtection":{"not":{}},"timeout":{"description":"Stop looking ⟨34 unchanged words⟩
before
{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"definitions":{"__schema0":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"items":{"allOf":[{"$ref":"#/definitions/__schema0"}]},"type":"array"},{"additionalProperties":{"allOf":[{"$ref":"#/definitions/__schema0"}]},"propertyNames":{"type":"string"},"type":"object"}]},"__schema1":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"items":{"allOf":[{"$ref":"#/definitions/__schema1"}]},"type":"array"},{"additionalProperties":{"allOf":[{"$ref":"#/definitions/__schema1"}]},"propertyNames":{"type":"string"},"type":"object"}]},"__schema2":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"items":{"allOf":[{"$ref":"#/definitions/__schema2"}]},"type":"array"},{"additionalProperties":{"allOf":[{"$ref":"#/definitions/__schema2"}]},"propertyNames":{"type":"string"},"type":"object"}]}},"properties":{"actions":{"description":"Up to 50 steps to run on the page, in order, before reading it: { \"type\": \"wait\", \"milliseconds\": 500 } (up to 30 seconds), { \"type\": \"wait\", \"selector\": \".results\" }, { \"type\": \"click\", \"selector\": \"button.more\" }, { \"type\": \"write\", \"text\": \"tides\" }, { \"type\": \"press\", \"key\": \"Enter\" }, { \"type\": \"scroll\", \"direction\": \"down\" } (also up, left or right; amount is pixels, \"viewport\" or \"max\"; maxScrolls 1 to 50; selector scrolls an inner container; \"max\" keeps scrolling until the page stops growing, for feeds that load as you go), { \"type\": \"screenshot\", \"fullPage\": true } (links come back in actions.screenshots), { \"type\": \"scrape\" } (the page at that point, in actions.scrapes), { \"type\": \"executeJavascript\", \"script\": \"document.title\" } (results in actions.javascriptReturns), { \"type\": \"pdf\", \"format\": \"A4\" } (links in actions.pdfs) or { \"type\": \"perform\", \"action\": \"Click the Load more button\" } (a step in plain words, up to 5 browser steps on this page, never leaving the site; at most 5 per call). A read with actions costs 1 credit, the same as any page; the actions themselves add nothing. If an action fails, you still get the page as it stood, with a warning that names the action and says why.","items":{"anyOf":[{"additionalProperties":false,"properties":{"milliseconds":{"maximum":30000,"minimum":1,"type":"integer"},"type":{"const":"wait","type":"string"}},"required":["type","milliseconds"],"type":"object"},{"additionalProperties":false,"properties":{"selector":{"minLength":1,"type":"string"},"type":{"const":"wait","type":"string"}},"required":["type","selector"],"type":"object"},{"additionalProperties":false,"properties":{"all":{"const":false,"type":"boolean"},"selector":{"minLength":1,"type":"string"},"type":{"const":"click","type":"string"}},"required":["type","selector"],"type":"object"},{"additionalProperties":false,"properties":{"text":{"minLength":1,"type":"string"},"type":{"const":"write","type":"string"}},"required":["type","text"],"type":"object"},{"additionalProperties":false,"properties":{"key":{"maxLength":40,"minLength":1,"type":"string"},"type":{"const":"press","type":"string"}},"required":["type","key"],"type":"object"},{"additionalProperties":false,"properties":{"amount":{"anyOf":[{"maximum":100000,"minimum":1,"type":"integer"},{"enum":["viewport","max"],"type":"string"}]},"direction":{"default":"down","enum":["up","down","left","right"],"type":"string"},"maxScrolls":{"maximum":50,"minimum":1,"type":"integer"},"selector":{"minLength":1,"type":"string"},"type":{"const":"scroll","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"fullPage":{"type":"boolean"},"quality":{"maximum":100,"minimum":1,"type":"integer"},"type":{"const":"screenshot","type":"string"},"viewport":{"additionalProperties":false,"properties":{"height":{"maximum":2160,"minimum":200,"type":"integer"},"width":{"maximum":3840,"minimum":200,"type":"integer"}},"required":["width","height"],"type":"object"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"type":{"const":"scrape","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"script":{"maxLength":20000,"minLength":1,"type":"string"},"type":{"const":"executeJavascript","type":"string"}},"required":["type","script"],"type":"object"},{"additionalProperties":false,"properties":{"format":{"enum":["Letter","Legal","Tabloid","Ledger","A0","A1","A2","A3","A4","A5","A6"],"type":"string"},"landscape":{"type":"boolean"},"scale":{"maximum":2,"minimum":0.1,"type":"number"},"type":{"const":"pdf","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"action":{"maxLength":500,"minLength":1,"type":"string"},"type":{"const":"perform","type":"string"}},"required":["type","action"],"type":"object"}]},"maxItems":50,"minItems":1,"type":"array"},"alexandria":{"not":{}},"auditMetadata":{"not":{}},"blockAds":{"description":"Ads and trackers are not loaded when a page runs in a browser. Send false to load them.","type":"boolean"},"checkPromptInjection":{"description":"Send true to scan the page text for instructions aimed at an AI model before anything is built from it. A page that has them is refused with 403 promptInjectionDetected and costs nothing. The scan adds 4 credits when it runs; a page it cannot scan fully comes back with a warning and no charge.","type":"boolean"},"domainTools":{"const":false,"type":"boolean"},"excludeTags":{"description":"Remove the parts of the page that match these CSS selectors, such as .comments.","items":{"minLength":1,"type":"string"},"minItems":1,"type":"array"},"fastMode":{"description":"Send true to read the page without opening a browser: the answer comes sooner, but a page that needs a browser, or that refuses a plain request, comes back as an error instead of being retried. Ignored when the call needs a browser (actions, screenshot, waitFor, mobile, profile, network, branding).","type":"boolean"},"formats":{"default":["markdown"],"description":"What to return: markdown (clean page text), summary (a short summary of the page), html (the cleaned page), rawHtml (the page as sent), audio and video (for a YouTube link: the audio track as an M4A file, or the video as an MP4 file, as a link that works for 1 hour), rawBase64 (the bytes the site sent, Base64 encoded, from a live read; metadata.contentType says what they are), links (every link on the page), images (every image address), screenshot (a link to a JPEG of the visible page, kept for 7 days), changeTracking (what changed in the markdown since your key last read this page with the same options, kept 30 days; add modes [\"git-diff\",\"json\"] with a schema or prompt to compare fields too), question (send { \"type\": \"question\", \"question\": \"...\" } to get answer, null when the page does not state one), product (title, brand, category, url, description and variants with price, sale, availability and images, or null) and menu (merchant, currency and sections of items with prices, or null) network (the JSON the page loaded while it rendered, up to 30 responses) and branding (the page's colors, fonts, typography, spacing, button and input styles, logo and brand images, read from how the page looks, with a field left out when the page does not show it). Send { \"type\": \"screenshot\", \"fullPage\": true } for the whole page. Send { \"type\": \"highlights\", \"query\": \"refund policy\" } for the passages that best match a query. Send { \"type\": \"json\", \"schema\": { \"type\": \"object\", \"properties\": { \"price\": { \"type\": \"number\" } } } } or { \"type\": \"json\", \"prompt\": \"the price and the stock\" } for fields filled from the page, each checked against it. Send { \"type\": \"json\", \"parser\": \"amazon-product\" } to get a site's own data as json instead of reading the page; GET /v1/parsers lists the parsers. Send { \"type\": \"json\", \"rules\": { \"title\": \"h1\", \"links\": { \"selector\": \"a\", \"type\": \"list\", \"output\": \"@href\" } } } to read the page with CSS rules and no model, at the page's own price. Send { \"type\": \"attributes\", \"selectors\": [{ \"selector\": \"a\", \"attribute\": \"href\" }] } for attribute values, returned in attributes. Without a parser or rules, json needs a schema or a prompt and is filled from the page. json with a schema or a prompt, summary, highlights, question, product, menu and changeTracking in json mode cost 4 credits more each when they return something. json with rules or a parser, and attributes, cost nothing more. A screenshot, network or branding read costs 1 credit, the same as any page. A PDF comes back as markdown only, and costs 1 credit more for each page of text that comes back. A CSV or an Excel .xlsx file comes back as markdown tables.","items":{"anyOf":[{"enum":["markdown","summary","html","rawHtml","rawBase64","links","images","network","branding","audio","video","screenshot","changeTracking","product","menu"],"type":"string"},{"additionalProperties":false,"properties":{"type":{"enum":["markdown","summary","html","rawHtml","rawBase64","links","images","network","branding","audio","video"],"type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"modes":{"description":"git-diff returns a unified diff of the markdown. json compares the fields in schema or prompt between this read and the last one. Without modes you get git-diff.","items":{"enum":["git-diff","json"],"type":"string"},"maxItems":2,"type":"array"},"prompt":{"description":"With json mode: what to compare, in plain words, such as the price and stock.","maxLength":10000,"minLength":1,"type":"string"},"schema":{"additionalProperties":{"$ref":"#/definitions/__schema0"},"description":"The fields to fill, as a JSON Schema (draft-07 or 2020-12) object with properties. Pydantic's model_json_schema() and zod's toJSONSchema() output work as they are. enum, const, anyOf, oneOf, nullable types, $ref with $defs, required, descriptions and any key names are read. Up to 100 top-level fields and 32 KB. A field the page does not state comes back null.","propertyNames":{"type":"string"},"type":"object"},"tag":{"type":"null"},"type":{"const":"changeTracking","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"question":{"description":"A question to answer from the page, such as what the refund window is.","maxLength":10000,"minLength":1,"type":"string"},"type":{"const":"question","type":"string"}},"required":["type","question"],"type":"object"},{"additionalProperties":false,"properties":{"type":{"const":"product","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"type":{"const":"menu","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"fullPage":{"default":false,"description":"Capture the whole page from top to bottom instead of the visible part.","type":"boolean"},"quality":{"description":"JPEG quality from 1 to 100. The default is 70.","maximum":100,"minimum":1,"type":"integer"},"type":{"const":"screenshot","type":"string"},"viewport":{"additionalProperties":false,"description":"The window size in pixels, such as { width: 390, height: 844 }.","properties":{"height":{"maximum":2160,"minimum":200,"type":"integer"},"width":{"maximum":3840,"minimum":200,"type":"integer"}},"required":["width","height"],"type":"object"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"count":{"default":5,"description":"How many passages to return, best match first.","maximum":20,"minimum":1,"type":"integer"},"query":{"description":"What you are looking for on the page, such as refund policy.","maxLength":10000,"minLength":1,"type":"string"},"type":{"const":"highlights","type":"string"}},"required":["type","query"],"type":"object"},{"additionalProperties":false,"properties":{"checkPromptInjection":{"description":"Deprecated: send checkPromptInjection at the top level of the call.","type":"boolean"},"options":{"additionalProperties":{"$ref":"#/definitions/__schema1"},"description":"Only with parser: extra inputs for it, such as { \"page\": 2 } for the next page of results or { \"minRating\": 4.5 } for a filter. GET /v1/parsers lists what each parser accepts.","propertyNames":{"type":"string"},"type":"object"},"parser":{"description":"Read the page with a named parser, which gives the site's own data as json. The url must be the kind of page the parser reads. Parsers are the only way to read some sites. GET /v1/parsers lists them.","type":"string"},"prompt":{"description":"What to pull from the page in plain words, such as the version and the release date.","maxLength":10000,"minLength":1,"type":"string"},"rules":{"additionalProperties":{"$ref":"#/definitions/__schema2"},"description":"Read the page with CSS rules instead of a model, no extra fee. Each field is a selector such as \"h1\" (the first match's text), \"a@href\" (an attribute) or { \"selector\": \"li\", \"type\": \"list\", \"output\": \"text\" | \"html\" | \"@attribute\" | { nested fields } }. A missing item is null and an unmatched list is []. Relative links become absolute. Up to 100 fields, 5 levels deep. Not with schema, prompt or parser.","propertyNames":{"type":"string"},"type":"object"},"schema":{"additionalProperties":{"$ref":"#/definitions/__schema0"},"description":"The fields to fill, as a JSON Schema (draft-07 or 2020-12) object with properties. Pydantic's model_json_schema() and zod's toJSONSchema() output work as they are. enum, const, anyOf, oneOf, nullable types, $ref with $defs, required, descriptions and any key names are read. Up to 100 top-level fields and 32 KB. A field the page does not state comes back null.","propertyNames":{"type":"string"},"type":"object"},"type":{"const":"json","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"selectors":{"description":"The elements and attributes to read, such as { selector: 'a.buy', attribute: 'href' }.","items":{"additionalProperties":false,"properties":{"attribute":{"maxLength":100,"minLength":1,"type":"string"},"selector":{"minLength":1,"type":"string"}},"required":["selector","attribute"],"type":"object"},"maxItems":50,"minItems":1,"type":"array"},"type":{"const":"attributes","type":"string"}},"required":["type","selectors"],"type":"object"}]},"maxItems":20,"minItems":1,"type":"array"},"headers":{"additionalProperties":{"maxLength":2000,"pattern":"^[\\t\\x20-\\x7e]*$","type":"string"},"description":"Extra request headers to send to the site, such as { \"x-plan\": \"pro\" }. A read with headers is never answered from or saved to a stored copy.","propertyNames":{"pattern":"^[A-Za-z0-9-]{1,64}$","type":"string"},"type":"object"},"ignoreRobotsTxt":{"const":false,"type":"boolean"},"includeTags":{"description":"Keep only the parts of the page that match these CSS selectors, such as article or .price. When set, onlyMainContent is not applied.","items":{"minLength":1,"type":"string"},"minItems":1,"type":"array"},"linkStyle":{"default":"inline","description":"How links appear in the markdown. inline keeps [text](address). numbered writes Pricing⟨3⟩ and lists each address once at the end. none keeps only the link text, which makes link-heavy pages 10 to 70% shorter; ask for the links format to get the addresses.","enum":["inline","numbered","none"],"type":"string"},"location":{"additionalProperties":false,"description":"Where to read the page from. The default is the United States.","properties":{"country":{"description":"Two-letter country code to read the page from, such as DE or JP.","type":"string"},"languages":{"description":"Languages to ask the site for, best first, such as [\"de\", \"en\"]. Sent as Accept-Language. A read with languages is never answered from or saved to a stored copy.","items":{"pattern":"^[A-Za-z]{2,3}(?:-[A-Za-z0-9]{2,8})*$","type":"string"},"maxItems":5,"minItems":1,"type":"array"}},"type":"object"},"lockdown":{"description":"Send true to answer only from a stored copy of the page and never read it live, whatever its age. A page with no stored copy is notFound. The same as minAge 0.","type":"boolean"},"maxAge":{"description":"Accept a stored answer up to this many milliseconds old, at most 30 days. Without it, 2 days, or less for a site whose pages change often, and a copy up to twice that age (at most 7 days) comes back at once as stale while a fresh read runs. 0 always reads the page live. metadata.cacheState says which one you got.","maximum":9007199254740991,"minimum":0,"type":"integer"},"maxChars":{"description":"Cut the markdown at this many characters; isTruncated says when that happened and nextOffset where to read on. With query, how much of the page to keep, 8000 by default.","maximum":1000000,"minimum":500,"type":"integer"},"minAge":{"description":"Answer only from a stored copy that is at least this many milliseconds old, and never read the page live. 0 accepts any stored copy. A page with no such copy is notFound.","maximum":9007199254740991,"minimum":0,"type":"integer"},"mobile":{"description":"Read the page as a phone would: a phone-sized screen and the mobile version of the site. The page loads in a browser.","type":"boolean"},"offset":{"description":"Start the markdown this many characters into the page, PDF or file. Send the nextOffset of the last answer, with the same maxChars, to read on. Not with query.","maximum":9007199254740991,"minimum":0,"type":"integer"},"onlyCleanContent":{"description":"Send true to have a model remove what onlyMainContent leaves behind in the markdown: cookie banners, ads, share widgets, breadcrumbs, sign-up prompts, comment prompts and related-article lists. It only removes whole paragraphs and lists; it never rewrites or adds text, and code blocks are always kept. Skipped with a warning when the page is too long to clean or the model does not answer. Not with zeroDataRetention. Summary, answers and highlights are made from the cleaned markdown.","type":"boolean"},"onlyMainContent":{"default":true,"description":"Keep only the page's main content, without menus, headers, footers and ads.","type":"boolean"},"parsers":{"description":"Only the pdf parser exists. Send \"pdf\" or { \"type\": \"pdf\", mode, maxPages, pages, blocks, pageMarkers } with the same meaning as in parse. Without mode a PDF is read from its text layer only; auto reads the picture of a page that has no text, and ocr reads the picture of every page, up to 20 pages. Each page of text that comes back costs 1 credit.","items":{"anyOf":[{"const":"pdf","type":"string"},{"additionalProperties":false,"properties":{"blocks":{"description":"Send true to also get the page's layout in blocks: each title, section header or run of text, with its page, reading order, position on the page (bbox as left, top, right, bottom from 0 to 1) and where its text sits in that page's markdown (span, as in pages). Tables, figures and formulas are not told apart. A page read from its picture is one block. No extra charge.","type":"boolean"},"maxPages":{"description":"Read at most this many pages, up to 100.","maximum":100,"minimum":1,"type":"integer"},"mode":{"description":"fast reads the text layer only. auto (the default) reads the text layer and reads the picture of any page that has none. ocr reads the picture of every page.","enum":["fast","auto","ocr"],"type":"string"},"pageMarkers":{"description":"Send true to mark page breaks in the markdown: pages are joined with \"---\" and a line, where N is the page that follows. No extra charge.","type":"boolean"},"pages":{"description":"Send true to also get each page's markdown in pages, as { pageNumber, markdown }. No extra charge.","type":"boolean"},"type":{"const":"pdf","type":"string"}},"required":["type"],"type":"object"}]},"minItems":1,"type":"array"},"profile":{"additionalProperties":false,"description":"Read the page with the cookies and local storage that earlier calls saved under this name, kept for your account for 30 days after the last use. A call with a profile always loads the page in a browser, costs 1 credit, the same as any page, and is never answered from a stored copy. Only one call at a time can save to a profile.","properties":{"name":{"description":"A name you choose, such as shop-login. Calls with the same name share state.","maxLength":128,"minLength":1,"type":"string"},"saveChanges":{"default":true,"description":"Keep the cookies and local storage this read leaves behind for the next call with this name. Send false to read with the profile without changing it.","type":"boolean"}},"required":["name"],"type":"object"},"proxy":{"description":"auto: basic first, enhanced once if the site refuses. basic: one plain attempt. enhanced: the stronger read from the start. Same price.","enum":["auto","basic","enhanced"],"type":"string"},"query":{"description":"What you are looking for on the page, such as refund window. A page longer than maxChars (8000 by default) comes back as the passages that match, in page order, each with the text around it and its table header; a shorter page comes back whole. Costs nothing extra, and a PDF is charged for the share of its pages that comes back. Not with offset.","maxLength":10000,"minLength":1,"type":"string"},"redactPII":{"anyOf":[{"type":"boolean"},{"additionalProperties":false,"description":"Options for redactPII.","properties":{"entities":{"default":["PERSON","EMAIL","PHONE","LOCATION","FINANCIAL","SECRET"],"description":"What to hide: PERSON, EMAIL, PHONE, LOCATION, FINANCIAL, SECRET. All by default.","items":{"enum":["PERSON","EMAIL","PHONE","LOCATION","FINANCIAL","SECRET"],"type":"string"},"minItems":1,"type":"array"},"mode":{"default":"accurate","description":"accurate finds names and places with the model and the rest by pattern. aggressive adds guesses that catch more and may hide a little too much. fast uses patterns only, so it finds no ordinary names or places.","enum":["accurate","aggressive","fast"],"type":"string"},"replaceStyle":{"default":"tag","description":"tag writes <EMAIL>, mask writes * for each character, remove deletes it.","enum":["tag","mask","remove"],"type":"string"}},"type":"object"}],"description":"Send true, or an object, to hide personal data in the markdown and in everything made from it (summary, answers, highlights, json). Links, html and rawHtml are not changed. A page the model cannot scan is refused rather than returned unredacted."},"removeBase64Images":{"description":"Images inside the page that carry their data in the address (data:image) are dropped by default. Send false to keep them in markdown and html.","type":"boolean"},"robotsUserAgent":{"not":{}},"skipTlsVerification":{"description":"Send true to read a page whose certificate is expired, self-signed or for another name. The read is not private against someone between us and the site.","type":"boolean"},"storeInCache":{"default":true,"description":"Send false to neither read nor keep a stored copy of this page.","type":"boolean"},"threatProtection":{"not":{}},"timeout":{"description":"How long to keep trying, in milliseconds, between 10 seconds and 2 minutes. Pages behind a bot check can need 10 to 30 seconds the first time.","maximum":300000,"minimum":1000,"type":"integer"},"toolDetail":{"not":{}},"url":{"description":"The page or PDF to read, such as https://bun.com/docs.","type":"string"},"urls":{"not":{}},"waitFor":{"description":"Extra milliseconds to wait before reading, up to 60000, for pages that load their content late. To wait for an element, add a wait action with a selector. A read that waits costs 1 credit, the same as any page.","maximum":60000,"minimum":0,"type":"integer"},"zeroDataRetention":{"default":false,"description":"Send true to keep nothing from this call: no stored copy is read or made, and nothing from it is logged. Costs 1 credit more per page. Not with a screenshot.","type":"boolean"}},"required":["url"],"type":"object"}after
{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"definitions":{"__schema0":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"items":{"allOf":[{"$ref":"#/definitions/__schema0"}]},"type":"array"},{"additionalProperties":{"allOf":[{"$ref":"#/definitions/__schema0"}]},"propertyNames":{"type":"string"},"type":"object"}]},"__schema1":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"items":{"allOf":[{"$ref":"#/definitions/__schema1"}]},"type":"array"},{"additionalProperties":{"allOf":[{"$ref":"#/definitions/__schema1"}]},"propertyNames":{"type":"string"},"type":"object"}]},"__schema2":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"items":{"allOf":[{"$ref":"#/definitions/__schema2"}]},"type":"array"},{"additionalProperties":{"allOf":[{"$ref":"#/definitions/__schema2"}]},"propertyNames":{"type":"string"},"type":"object"}]}},"properties":{"actions":{"description":"Up to 50 steps to run on the page, in order, before reading it: { \"type\": \"wait\", \"milliseconds\": 500 } (up to 30 seconds), { \"type\": \"wait\", \"selector\": \".results\" }, { \"type\": \"click\", \"selector\": \"button.more\" }, { \"type\": \"write\", \"text\": \"tides\" }, { \"type\": \"press\", \"key\": \"Enter\" }, { \"type\": \"scroll\", \"direction\": \"down\" } (also up, left or right; amount is pixels, \"viewport\" or \"max\"; maxScrolls 1 to 50; selector scrolls an inner container; \"max\" keeps scrolling until the page stops growing, for feeds that load as you go), { \"type\": \"screenshot\", \"fullPage\": true } (links come back in actions.screenshots), { \"type\": \"scrape\" } (the page at that point, in actions.scrapes), { \"type\": \"executeJavascript\", \"script\": \"document.title\" } (results in actions.javascriptReturns), { \"type\": \"pdf\", \"format\": \"A4\" } (links in actions.pdfs) or { \"type\": \"perform\", \"action\": \"Click the Load more button\" } (a step in plain words, up to 5 browser steps on this page, never leaving the site; at most 5 per call). A read with actions costs 1 credit, the same as any page; the actions themselves add nothing. If an action fails, you still get the page as it stood, with a warning that names the action and says why.","items":{"anyOf":[{"additionalProperties":false,"properties":{"milliseconds":{"maximum":30000,"minimum":1,"type":"integer"},"type":{"const":"wait","type":"string"}},"required":["type","milliseconds"],"type":"object"},{"additionalProperties":false,"properties":{"selector":{"minLength":1,"type":"string"},"type":{"const":"wait","type":"string"}},"required":["type","selector"],"type":"object"},{"additionalProperties":false,"properties":{"all":{"const":false,"type":"boolean"},"selector":{"minLength":1,"type":"string"},"type":{"const":"click","type":"string"}},"required":["type","selector"],"type":"object"},{"additionalProperties":false,"properties":{"text":{"minLength":1,"type":"string"},"type":{"const":"write","type":"string"}},"required":["type","text"],"type":"object"},{"additionalProperties":false,"properties":{"key":{"maxLength":40,"minLength":1,"type":"string"},"type":{"const":"press","type":"string"}},"required":["type","key"],"type":"object"},{"additionalProperties":false,"properties":{"amount":{"anyOf":[{"maximum":100000,"minimum":1,"type":"integer"},{"enum":["viewport","max"],"type":"string"}]},"direction":{"default":"down","enum":["up","down","left","right"],"type":"string"},"maxScrolls":{"maximum":50,"minimum":1,"type":"integer"},"selector":{"minLength":1,"type":"string"},"type":{"const":"scroll","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"fullPage":{"type":"boolean"},"quality":{"maximum":100,"minimum":1,"type":"integer"},"type":{"const":"screenshot","type":"string"},"viewport":{"additionalProperties":false,"properties":{"height":{"maximum":2160,"minimum":200,"type":"integer"},"width":{"maximum":3840,"minimum":200,"type":"integer"}},"required":["width","height"],"type":"object"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"type":{"const":"scrape","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"script":{"maxLength":20000,"minLength":1,"type":"string"},"type":{"const":"executeJavascript","type":"string"}},"required":["type","script"],"type":"object"},{"additionalProperties":false,"properties":{"format":{"enum":["Letter","Legal","Tabloid","Ledger","A0","A1","A2","A3","A4","A5","A6"],"type":"string"},"landscape":{"type":"boolean"},"scale":{"maximum":2,"minimum":0.1,"type":"number"},"type":{"const":"pdf","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"action":{"maxLength":500,"minLength":1,"type":"string"},"type":{"const":"perform","type":"string"}},"required":["type","action"],"type":"object"}]},"maxItems":50,"minItems":1,"type":"array"},"blockAds":{"description":"Ads and trackers are not loaded when a page runs in a browser. Send false to load them.","type":"boolean"},"checkPromptInjection":{"description":"Send true to scan the page text for instructions aimed at an AI model before anything is built from it. A page that has them is refused with 403 promptInjectionDetected and costs nothing. The scan adds 4 credits when it runs; a page it cannot scan fully comes back with a warning and no charge.","type":"boolean"},"excludeTags":{"description":"Remove the parts of the page that match these CSS selectors, such as .comments.","items":{"minLength":1,"type":"string"},"minItems":1,"type":"array"},"fastMode":{"description":"Send true to read the page without opening a browser: the answer comes sooner, but a page that needs a browser, or that refuses a plain request, comes back as an error instead of being retried. Ignored when the call needs a browser (actions, screenshot, waitFor, mobile, profile, network, branding).","type":"boolean"},"formats":{"default":["markdown"],"description":"What to return: markdown (clean page text), summary (a short summary of the page), html (the cleaned page), rawHtml (the page as sent), audio and video (for a YouTube link: the audio track as an M4A file, or the video as an MP4 file, as a link that works for 1 hour), rawBase64 (the bytes the site sent, Base64 encoded, from a live read; metadata.contentType says what they are), links (every link on the page), images (every image address), screenshot (a link to a JPEG of the visible page, kept for 7 days), changeTracking (what changed in the markdown since your key last read this page with the same options, kept 30 days; add modes [\"git-diff\",\"json\"] with a schema or prompt to compare fields too), question (send { \"type\": \"question\", \"question\": \"...\" } to get answer, null when the page does not state one), product (title, brand, category, url, description and variants with price, sale, availability and images, or null) and menu (merchant, currency and sections of items with prices, or null) network (the JSON the page loaded while it rendered, up to 30 responses) and branding (the page's colors, fonts, typography, spacing, button and input styles, logo and brand images, read from how the page looks, with a field left out when the page does not show it). Send { \"type\": \"screenshot\", \"fullPage\": true } for the whole page. Send { \"type\": \"highlights\", \"query\": \"refund policy\" } for the passages that best match a query. Send { \"type\": \"json\", \"schema\": { \"type\": \"object\", \"properties\": { \"price\": { \"type\": \"number\" } } } } or { \"type\": \"json\", \"prompt\": \"the price and the stock\" } for fields filled from the page, each checked against it. Send { \"type\": \"json\", \"parser\": \"amazon-product\" } to get a site's own data as json instead of reading the page; GET /v1/parsers lists the parsers. Send { \"type\": \"json\", \"rules\": { \"title\": \"h1\", \"links\": { \"selector\": \"a\", \"type\": \"list\", \"output\": \"@href\" } } } to read the page with CSS rules and no model, at the page's own price. Send { \"type\": \"attributes\", \"selectors\": [{ \"selector\": \"a\", \"attribute\": \"href\" }] } for attribute values, returned in attributes. Without a parser or rules, json needs a schema or a prompt and is filled from the page. json with a schema or a prompt, summary, highlights, question, product, menu and changeTracking in json mode cost 4 credits more each when they return something. json with rules or a parser, and attributes, cost nothing more. A screenshot, network or branding read costs 1 credit, the same as any page. A PDF comes back as markdown only, and costs 1 credit more for each page of text that comes back. A CSV or an Excel .xlsx file comes back as markdown tables.","items":{"anyOf":[{"enum":["markdown","summary","html","rawHtml","rawBase64","links","images","network","branding","audio","video","screenshot","changeTracking","product","menu"],"type":"string"},{"additionalProperties":false,"properties":{"type":{"enum":["markdown","summary","html","rawHtml","rawBase64","links","images","network","branding","audio","video"],"type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"modes":{"description":"git-diff returns a unified diff of the markdown. json compares the fields in schema or prompt between this read and the last one. Without modes you get git-diff.","items":{"enum":["git-diff","json"],"type":"string"},"maxItems":2,"type":"array"},"prompt":{"description":"With json mode: what to compare, in plain words, such as the price and stock.","maxLength":10000,"minLength":1,"type":"string"},"schema":{"additionalProperties":{"$ref":"#/definitions/__schema0"},"description":"The fields to fill, as a JSON Schema (draft-07 or 2020-12) object with properties. Pydantic's model_json_schema() and zod's toJSONSchema() output work as they are. enum, const, anyOf, oneOf, nullable types, $ref with $defs, required, descriptions and any key names are read. Up to 100 top-level fields and 32 KB. A field the page does not state comes back null.","propertyNames":{"type":"string"},"type":"object"},"tag":{"type":"null"},"type":{"const":"changeTracking","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"question":{"description":"A question to answer from the page, such as what the refund window is.","maxLength":10000,"minLength":1,"type":"string"},"type":{"const":"question","type":"string"}},"required":["type","question"],"type":"object"},{"additionalProperties":false,"properties":{"type":{"const":"product","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"type":{"const":"menu","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"fullPage":{"default":false,"description":"Capture the whole page from top to bottom instead of the visible part.","type":"boolean"},"quality":{"description":"JPEG quality from 1 to 100. The default is 70.","maximum":100,"minimum":1,"type":"integer"},"type":{"const":"screenshot","type":"string"},"viewport":{"additionalProperties":false,"description":"The window size in pixels, such as { width: 390, height: 844 }.","properties":{"height":{"maximum":2160,"minimum":200,"type":"integer"},"width":{"maximum":3840,"minimum":200,"type":"integer"}},"required":["width","height"],"type":"object"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"count":{"default":5,"description":"How many passages to return, best match first.","maximum":20,"minimum":1,"type":"integer"},"query":{"description":"What you are looking for on the page, such as refund policy.","maxLength":10000,"minLength":1,"type":"string"},"type":{"const":"highlights","type":"string"}},"required":["type","query"],"type":"object"},{"additionalProperties":false,"properties":{"checkPromptInjection":{"description":"Deprecated: send checkPromptInjection at the top level of the call.","type":"boolean"},"options":{"additionalProperties":{"$ref":"#/definitions/__schema1"},"description":"Only with parser: extra inputs for it, such as { \"page\": 2 } for the next page of results or { \"minRating\": 4.5 } for a filter. GET /v1/parsers lists what each parser accepts.","propertyNames":{"type":"string"},"type":"object"},"parser":{"description":"Read the page with a named parser, which gives the site's own data as json. The url must be the kind of page the parser reads. Parsers are the only way to read some sites. GET /v1/parsers lists them.","type":"string"},"prompt":{"description":"What to pull from the page in plain words, such as the version and the release date.","maxLength":10000,"minLength":1,"type":"string"},"rules":{"additionalProperties":{"$ref":"#/definitions/__schema2"},"description":"Read the page with CSS rules instead of a model, no extra fee. Each field is a selector such as \"h1\" (the first match's text), \"a@href\" (an attribute) or { \"selector\": \"li\", \"type\": \"list\", \"output\": \"text\" | \"html\" | \"@attribute\" | { nested fields } }. A missing item is null and an unmatched list is []. Relative links become absolute. Up to 100 fields, 5 levels deep. Not with schema, prompt or parser.","propertyNames":{"type":"string"},"type":"object"},"schema":{"additionalProperties":{"$ref":"#/definitions/__schema0"},"description":"The fields to fill, as a JSON Schema (draft-07 or 2020-12) object with properties. Pydantic's model_json_schema() and zod's toJSONSchema() output work as they are. enum, const, anyOf, oneOf, nullable types, $ref with $defs, required, descriptions and any key names are read. Up to 100 top-level fields and 32 KB. A field the page does not state comes back null.","propertyNames":{"type":"string"},"type":"object"},"type":{"const":"json","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"selectors":{"description":"The elements and attributes to read, such as { selector: 'a.buy', attribute: 'href' }.","items":{"additionalProperties":false,"properties":{"attribute":{"maxLength":100,"minLength":1,"type":"string"},"selector":{"minLength":1,"type":"string"}},"required":["selector","attribute"],"type":"object"},"maxItems":50,"minItems":1,"type":"array"},"type":{"const":"attributes","type":"string"}},"required":["type","selectors"],"type":"object"}]},"maxItems":20,"minItems":1,"type":"array"},"headers":{"additionalProperties":{"maxLength":2000,"pattern":"^[\\t\\x20-\\x7e]*$","type":"string"},"description":"Extra request headers to send to the site, such as { \"x-plan\": \"pro\" }. A read with headers is never answered from or saved to a stored copy.","propertyNames":{"pattern":"^[A-Za-z0-9-]{1,64}$","type":"string"},"type":"object"},"includeTags":{"description":"Keep only the parts of the page that match these CSS selectors, such as article or .price. When set, onlyMainContent is not applied.","items":{"minLength":1,"type":"string"},"minItems":1,"type":"array"},"linkStyle":{"default":"inline","description":"How links appear in the markdown. inline keeps [text](address). numbered writes Pricing⟨3⟩ and lists each address once at the end. none keeps only the link text, which makes link-heavy pages 10 to 70% shorter; ask for the links format to get the addresses.","enum":["inline","numbered","none"],"type":"string"},"location":{"additionalProperties":false,"description":"Where to read the page from. The default is the United States.","properties":{"country":{"description":"Two-letter country code to read the page from, such as DE or JP.","type":"string"},"languages":{"description":"Languages to ask the site for, best first, such as [\"de\", \"en\"]. Sent as Accept-Language. A read with languages is never answered from or saved to a stored copy.","items":{"pattern":"^[A-Za-z]{2,3}(?:-[A-Za-z0-9]{2,8})*$","type":"string"},"maxItems":5,"minItems":1,"type":"array"}},"type":"object"},"lockdown":{"description":"Send true to answer only from a stored copy of the page and never read it live, whatever its age. A page with no stored copy is notFound. The same as minAge 0.","type":"boolean"},"maxAge":{"description":"Accept a stored answer up to this many milliseconds old, at most 30 days. Without it, 2 days, or less for a site whose pages change often, and a copy up to twice that age (at most 7 days) comes back at once as stale while a fresh read runs. 0 always reads the page live. metadata.cacheState says which one you got.","maximum":9007199254740991,"minimum":0,"type":"integer"},"maxChars":{"description":"Cut the markdown at this many characters; isTruncated says when that happened and nextOffset where to read on. With query, how much of the page to keep, 8000 by default.","maximum":1000000,"minimum":500,"type":"integer"},"minAge":{"description":"Answer only from a stored copy that is at least this many milliseconds old, and never read the page live. 0 accepts any stored copy. A page with no such copy is notFound.","maximum":9007199254740991,"minimum":0,"type":"integer"},"mobile":{"description":"Read the page as a phone would: a phone-sized screen and the mobile version of the site. The page loads in a browser.","type":"boolean"},"offset":{"description":"Start the markdown this many characters into the page, PDF or file. Send the nextOffset of the last answer, with the same maxChars, to read on. Not with query.","maximum":9007199254740991,"minimum":0,"type":"integer"},"onlyCleanContent":{"description":"Send true to have a model remove what onlyMainContent leaves behind in the markdown: cookie banners, ads, share widgets, breadcrumbs, sign-up prompts, comment prompts and related-article lists. It only removes whole paragraphs and lists; it never rewrites or adds text, and code blocks are always kept. Skipped with a warning when the page is too long to clean or the model does not answer. Not with zeroDataRetention. Summary, answers and highlights are made from the cleaned markdown.","type":"boolean"},"onlyMainContent":{"default":true,"description":"Keep only the page's main content, without menus, headers, footers and ads.","type":"boolean"},"parsers":{"description":"Only the pdf parser exists. Send \"pdf\" or { \"type\": \"pdf\", mode, maxPages, pages, blocks, pageMarkers } with the same meaning as in parse. Without mode a PDF is read from its text layer only; auto reads the picture of a page that has no text, and ocr reads the picture of every page, up to 20 pages. Each page of text that comes back costs 1 credit.","items":{"anyOf":[{"const":"pdf","type":"string"},{"additionalProperties":false,"properties":{"blocks":{"description":"Send true to also get the page's layout in blocks: each title, section header or run of text, with its page, reading order, position on the page (bbox as left, top, right, bottom from 0 to 1) and where its text sits in that page's markdown (span, as in pages). Tables, figures and formulas are not told apart. A page read from its picture is one block. No extra charge.","type":"boolean"},"maxPages":{"description":"Read at most this many pages, up to 100.","maximum":100,"minimum":1,"type":"integer"},"mode":{"description":"fast reads the text layer only. auto (the default) reads the text layer and reads the picture of any page that has none. ocr reads the picture of every page.","enum":["fast","auto","ocr"],"type":"string"},"pageMarkers":{"description":"Send true to mark page breaks in the markdown: pages are joined with \"---\" and a line, where N is the page that follows. No extra charge.","type":"boolean"},"pages":{"description":"Send true to also get each page's markdown in pages, as { pageNumber, markdown }. No extra charge.","type":"boolean"},"type":{"const":"pdf","type":"string"}},"required":["type"],"type":"object"}]},"minItems":1,"type":"array"},"profile":{"additionalProperties":false,"description":"Read the page with the cookies and local storage that earlier calls saved under this name, kept for your account for 30 days after the last use. A call with a profile always loads the page in a browser, costs 1 credit, the same as any page, and is never answered from a stored copy. Only one call at a time can save to a profile.","properties":{"name":{"description":"A name you choose, such as shop-login. Calls with the same name share state.","maxLength":128,"minLength":1,"type":"string"},"saveChanges":{"default":true,"description":"Keep the cookies and local storage this read leaves behind for the next call with this name. Send false to read with the profile without changing it.","type":"boolean"}},"required":["name"],"type":"object"},"proxy":{"description":"auto: basic first, enhanced once if the site refuses. basic: one plain attempt. enhanced: the stronger read from the start. Same price.","enum":["auto","basic","enhanced"],"type":"string"},"query":{"description":"What you are looking for on the page, such as refund window. A page longer than maxChars (8000 by default) comes back as the passages that match, in page order, each with the text around it and its table header; a shorter page comes back whole. Costs nothing extra, and a PDF is charged for the share of its pages that comes back. Not with offset.","maxLength":10000,"minLength":1,"type":"string"},"redactPII":{"anyOf":[{"type":"boolean"},{"additionalProperties":false,"description":"Options for redactPII.","properties":{"entities":{"default":["PERSON","EMAIL","PHONE","LOCATION","FINANCIAL","SECRET"],"description":"What to hide: PERSON, EMAIL, PHONE, LOCATION, FINANCIAL, SECRET. All by default.","items":{"enum":["PERSON","EMAIL","PHONE","LOCATION","FINANCIAL","SECRET"],"type":"string"},"minItems":1,"type":"array"},"mode":{"default":"accurate","description":"accurate finds names and places with the model and the rest by pattern. aggressive adds guesses that catch more and may hide a little too much. fast uses patterns only, so it finds no ordinary names or places.","enum":["accurate","aggressive","fast"],"type":"string"},"replaceStyle":{"default":"tag","description":"tag writes <EMAIL>, mask writes * for each character, remove deletes it.","enum":["tag","mask","remove"],"type":"string"}},"type":"object"}],"description":"Send true, or an object, to hide personal data in the markdown and in everything made from it (summary, answers, highlights, json). Links, html and rawHtml are not changed. A page the model cannot scan is refused rather than returned unredacted."},"removeBase64Images":{"description":"Images inside the page that carry their data in the address (data:image) are dropped by default. Send false to keep them in markdown and html.","type":"boolean"},"skipTlsVerification":{"description":"Send true to read a page whose certificate is expired, self-signed or for another name. The read is not private against someone between us and the site.","type":"boolean"},"storeInCache":{"default":true,"description":"Send false to neither read nor keep a stored copy of this page.","type":"boolean"},"timeout":{"description":"How long to keep trying, in milliseconds, between 10 seconds and 2 minutes. Pages behind a bot check can need 10 to 30 seconds the first time.","maximum":300000,"minimum":1000,"type":"integer"},"url":{"description":"The page or PDF to read, such as https://bun.com/docs.","type":"string"},"urls":{"not":{}},"waitFor":{"description":"Extra milliseconds to wait before reading, up to 60000, for pages that load their content late. To wait for an element, add a wait action with a selector. A read that waits costs 1 credit, the same as any page.","maximum":60000,"minimum":0,"type":"integer"},"zeroDataRetention":{"default":false,"description":"Send true to keep nothing from this call: no stored copy is read or made, and nothing from it is logged. Costs 1 credit more per page. Not with a screenshot.","type":"boolean"}},"required":["url"],"type":"object"}before
{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"definitions":{"__schema0":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"items":{"allOf":[{"$ref":"#/definitions/__schema0"}]},"type":"array"},{"additionalProperties":{"allOf":[{"$ref":"#/definitions/__schema0"}]},"propertyNames":{"type":"string"},"type":"object"}]},"__schema1":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"items":{"allOf":[{"$ref":"#/definitions/__schema1"}]},"type":"array"},{"additionalProperties":{"allOf":[{"$ref":"#/definitions/__schema1"}]},"propertyNames":{"type":"string"},"type":"object"}]},"__schema2":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"items":{"allOf":[{"$ref":"#/definitions/__schema2"}]},"type":"array"},{"additionalProperties":{"allOf":[{"$ref":"#/definitions/__schema2"}]},"propertyNames":{"type":"string"},"type":"object"}]}},"properties":{"categories":{"description":"pdf: web results that are PDF files. research: scholarly papers, in a research list, ranked by relevance then citations. companies: companies that match the query, in a companies list, best matches first. The query can name a place, industry, employee count, founding year and funding stage, like fintech startups in Berlin, 50-200 employees. people: people that match the query, in a people list, best matches first. The query can name a role, company, place or research topic, like CFO of Stripe, founders of fintech startups in Berlin, or researchers on CRISPR base editing. Each person has roles, affiliations and public profile links, never contact details. developer: passages from GitHub READMEs, issues, merged pull requests, releases, developer docs and API operations, in a developer list; send it as an object to filter by repos, types, language and minStars. gov: statutes, regulations, register notices and bills from government sources, in the web group with category gov and the kind, jurisdiction and citation of each. videos: passages from what is said in YouTube videos shared under a Creative Commons license, in a videos list, one result per video, with the channel, the license and the watch link; the link carries &t= only when the passage's start is exact. The index is a June 2024 snapshot of English videos, so a link may be dead.","items":{"anyOf":[{"enum":["developer","gov","research","pdf","companies","people","videos"],"type":"string"},{"additionalProperties":false,"properties":{"type":{"enum":["developer","gov","research","pdf","companies","people","videos"],"type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"language":{"description":"Only repositories whose main language is this, like TypeScript.","minLength":1,"type":"string"},"minStars":{"description":"Only repositories with at least this many GitHub stars.","maximum":9007199254740991,"minimum":0,"type":"integer"},"repos":{"default":[],"description":"Only results from these GitHub repositories, as owner/name.","items":{"pattern":"^[\\w.-]+\\/[\\w.-]+$","type":"string"},"maxItems":5,"type":"array"},"type":{"const":"developer","type":"string"},"types":{"default":[],"description":"Only these result types: readme, issue, pull_request, release, operation, doc.","items":{"enum":["readme","issue","pull_request","release","operation","doc"],"type":"string"},"type":"array"}},"required":["type"],"type":"object"}]},"type":"array"},"country":{"description":"Two-letter country to search from, like us. uk is read as gb. Image results are always US.","pattern":"^[A-Za-z]{2}$","type":"string"},"domainTools":{"description":"Accepted for compatibility. We have no domain-matched tools to add, so true and false give the same results.","type":"boolean"},"enterprise":{"items":{"type":"string"},"maxItems":0,"type":"array"},"excludeDomains":{"items":{"type":"string"},"maxItems":10,"type":"array"},"highlights":{"default":true,"description":"On by default. When a web result's page is already stored, its description is the passages of that page that best match the query. Send false for the snippet the search engine shows.","type":"boolean"},"ignoreInvalidURLs":{"default":false,"description":"Leave out results whose address cannot be read as a page.","type":"boolean"},"includeDomains":{"items":{"type":"string"},"maxItems":10,"type":"array"},"limit":{"description":"Most results to return for each source. Default 10, or 5 with scrapeOptions, which reads every web and news result returned. News returns at most 50.","maximum":100,"minimum":1,"type":"integer"},"location":{"description":"Where to search from, like Germany or San Francisco,California,United States. The last part is the country and replaces country. A city before it narrows web results to that place.","minLength":1,"type":"string"},"maxAge":{"description":"Accept a stored answer up to this many milliseconds old, at most 30 days. Without it, 15 minutes for news and 1 hour for web and images. 0 always searches live.","maximum":9007199254740991,"minimum":0,"type":"integer"},"query":{"description":"What to search for, up to 500 characters. Search operators work in web results: quotes for an exact phrase, -word, site:, -site:, filetype:, inurl:, allinurl:, intitle: and allintitle:. In image results, imagesize:WIDTHxHEIGHT keeps images of exactly that size and larger:WIDTHxHEIGHT keeps images at least that large.","maxLength":500,"minLength":1,"type":"string"},"safe":{"description":"Hide explicit web, news and image results when true.","type":"boolean"},"scrapeOptions":{"additionalProperties":false,"description":"Reads each web and news result, as many as limit asks for, within timeout, and puts the passages that best match the query in each web description. Takes the options of scrape: formats (markdown, html, rawHtml, links, images, summary, screenshot, json and the rest), onlyMainContent, includeTags, excludeTags, maxAge, minAge, waitFor, mobile, timeout (per page), headers, actions, location, parsers, profile and zeroDataRetention. Costs what scrape costs for each page read: 1 credit, plus 4 for each summary or json with a schema or prompt that returns something.","properties":{"actions":{"description":"Up to 50 steps to run on the page, in order, before reading it: { \"type\": \"wait\", \"milliseconds\": 500 } (up to 30 seconds), { \"type\": \"wait\", \"selector\": \".results\" }, { \"type\": \"click\", \"selector\": \"button.more\" }, { \"type\": \"write\", \"text\": \"tides\" }, { \"type\": \"press\", \"key\": \"Enter\" }, { \"type\": \"scroll\", \"direction\": \"down\" } (also up, left or right; amount is pixels, \"viewport\" or \"max\"; maxScrolls 1 to 50; selector scrolls an inner container; \"max\" keeps scrolling until the page stops growing, for feeds that load as you go), { \"type\": \"screenshot\", \"fullPage\": true } (links come back in actions.screenshots), { \"type\": \"scrape\" } (the page at that point, in actions.scrapes), { \"type\": \"executeJavascript\", \"script\": \"document.title\" } (results in actions.javascriptReturns), { \"type\": \"pdf\", \"format\": \"A4\" } (links in actions.pdfs) or { \"type\": \"perform\", \"action\": \"Click the Load more button\" } (a step in plain words, up to 5 browser steps on this page, never leaving the site; at most 5 per call). A read with actions costs 1 credit, the same as any page; the actions themselves add nothing. If an action fails, you still get the page as it stood, with a warning that names the action and says why.","items":{"anyOf":[{"additionalProperties":false,"properties":{"milliseconds":{"maximum":30000,"minimum":1,"type":"integer"},"type":{"const":"wait","type":"string"}},"required":["type","milliseconds"],"type":"object"},{"additionalProperties":false,"properties":{"selector":{"minLength":1,"type":"string"},"type":{"const":"wait","type":"string"}},"required":["type","selector"],"type":"object"},{"additionalProperties":false,"properties":{"all":{"const":false,"type":"boolean"},"selector":{"minLength":1,"type":"string"},"type":{"const":"click","type":"string"}},"required":["type","selector"],"type":"object"},{"additionalProperties":false,"properties":{"text":{"minLength":1,"type":"string"},"type":{"const":"write","type":"string"}},"required":["type","text"],"type":"object"},{"additionalProperties":false,"properties":{"key":{"maxLength":40,"minLength":1,"type":"string"},"type":{"const":"press","type":"string"}},"required":["type","key"],"type":"object"},{"additionalProperties":false,"properties":{"amount":{"anyOf":[{"maximum":100000,"minimum":1,"type":"integer"},{"enum":["viewport","max"],"type":"string"}]},"direction":{"default":"down","enum":["up","down","left","right"],"type":"string"},"maxScrolls":{"maximum":50,"minimum":1,"type":"integer"},"selector":{"minLength":1,"type":"string"},"type":{"const":"scroll","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"fullPage":{"type":"boolean"},"quality":{"maximum":100,"minimum":1,"type":"integer"},"type":{"const":"screenshot","type":"string"},"viewport":{"additionalProperties":false,"properties":{"height":{"maximum":2160,"minimum":200,"type":"integer"},"width":{"maximum":3840,"minimum":200,"type":"integer"}},"required":["width","height"],"type":"object"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"type":{"const":"scrape","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"script":{"maxLength":20000,"minLength":1,"type":"string"},"type":{"const":"executeJavascript","type":"string"}},"required":["type","script"],"type":"object"},{"additionalProperties":false,"properties":{"format":{"enum":["Letter","Legal","Tabloid","Ledger","A0","A1","A2","A3","A4","A5","A6"],"type":"string"},"landscape":{"type":"boolean"},"scale":{"maximum":2,"minimum":0.1,"type":"number"},"type":{"const":"pdf","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"action":{"maxLength":500,"minLength":1,"type":"string"},"type":{"const":"perform","type":"string"}},"required":["type","action"],"type":"object"}]},"maxItems":50,"minItems":1,"type":"array"},"alexandria":{"not":{}},"auditMetadata":{"not":{}},"blockAds":{"description":"Ads and trackers are not loaded when a page runs in a browser. Send false to load them.","type":"boolean"},"checkPromptInjection":{"description":"Send true to scan the page text for instructions aimed at an AI model before anything is built from it. A page that has them is refused with 403 promptInjectionDetected and costs nothing. The scan adds 4 credits when it runs; a page it cannot scan fully comes back with a warning and no charge.","type":"boolean"},"domainTools":{"const":false,"type":"boolean"},"excludeTags":{"description":"Remove the parts of the page that match these CSS selectors, such as .comments.","items":{"minLength":1,"type":"string"},"minItems":1,"type":"array"},"fastMode":{"description":"Send true to read the page without opening a browser: the answer comes sooner, but a page that needs a browser, or that refuses a plain request, comes back as an error instead of being retried. Ignored when the call needs a browser (actions, screenshot, waitFor, mobile, profile, network, branding).","type":"boolean"},"formats":{"default":["markdown"],"description":"What to return: markdown (clean page text), summary (a short summary of the page), html (the cleaned page), rawHtml (the page as sent), audio and video (for a YouTube link: the audio track as an M4A file, or the video as an MP4 file, as a link that works for 1 hour), rawBase64 (the bytes the site sent, Base64 encoded, from a live read; metadata.contentType says what they are), links (every link on the page), images (every image address), screenshot (a link to a JPEG of the visible page, kept for 7 days), changeTracking (what changed in the markdown since your key last read this page with the same options, kept 30 days; add modes [\"git-diff\",\"json\"] with a schema or prompt to compare fields too), question (send { \"type\": \"question\", \"question\": \"...\" } to get answer, null when the page does not state one), product (title, brand, category, url, description and variants with price, sale, availability and images, or null) and menu (merchant, currency and sections of items with prices, or null) network (the JSON the page loaded while it rendered, up to 30 responses) and branding (the page's colors, fonts, typography, spacing, button and input styles, logo and brand images, read from how the page looks, with a field left out when the page does not show it). Send { \"type\": \"screenshot\", \"fullPage\": true } for the whole page. Send { \"type\": \"highlights\", \"query\": \"refund policy\" } for the passages that best match a query. Send { \"type\": \"json\", \"schema\": { \"type\": \"object\", \"properties\": { \"price\": { \"type\": \"number\" } } } } or { \"type\": \"json\", \"prompt\": \"the price and the stock\" } for fields filled from the page, each checked against it. Send { \"type\": \"json\", \"parser\": \"amazon-product\" } to get a site's own data as json instead of reading the page; GET /v1/parsers lists the parsers. Send { \"type\": \"json\", \"rules\": { \"title\": \"h1\", \"links\": { \"selector\": \"a\", \"type\": \"list\", \"output\": \"@href\" } } } to read the page with CSS rules and no model, at the page's own price. Send { \"type\": \"attributes\", \"selectors\": [{ \"selector\": \"a\", \"attribute\": \"href\" }] } for attribute values, returned in attributes. Without a parser or rules, json needs a schema or a prompt and is filled from the page. json with a schema or a prompt, summary, highlights, question, product, menu and changeTracking in json mode cost 4 credits more each when they return something. json with rules or a parser, and attributes, cost nothing more. A screenshot, network or branding read costs 1 credit, the same as any page. A PDF comes back as markdown only, and costs 1 credit more for each page of text that comes back. A CSV or an Excel .xlsx file comes back as markdown tables.","items":{"anyOf":[{"enum":["markdown","summary","html","rawHtml","rawBase64","links","images","network","branding","audio","video","screenshot","changeTracking","product","menu"],"type":"string"},{"additionalProperties":false,"properties":{"type":{"enum":["markdown","summary","html","rawHtml","rawBase64","links","images","network","branding","audio","video"],"type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"modes":{"description":"git-diff returns a unified diff of the markdown. json compares the fields in schema or prompt between this read and the last one. Without modes you get git-diff.","items":{"enum":["git-diff","json"],"type":"string"},"maxItems":2,"type":"array"},"prompt":{"description":"With json mode: what to compare, in plain words, such as the price and stock.","maxLength":10000,"minLength":1,"type":"string"},"schema":{"additionalProperties":{"$ref":"#/definitions/__schema0"},"description":"The fields to fill, as a JSON Schema (draft-07 or 2020-12) object with properties. Pydantic's model_json_schema() and zod's toJSONSchema() output work as they are. enum, const, anyOf, oneOf, nullable types, $ref with $defs, required, descriptions and any key names are read. Up to 100 top-level fields and 32 KB. A field the page does not state comes back null.","propertyNames":{"type":"string"},"type":"object"},"tag":{"type":"null"},"type":{"const":"changeTracking","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"question":{"description":"A question to answer from the page, such as what the refund window is.","maxLength":10000,"minLength":1,"type":"string"},"type":{"const":"question","type":"string"}},"required":["type","question"],"type":"object"},{"additionalProperties":false,"properties":{"type":{"const":"product","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"type":{"const":"menu","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"fullPage":{"default":false,"description":"Capture the whole page from top to bottom instead of the visible part.","type":"boolean"},"quality":{"description":"JPEG quality from 1 to 100. The default is 70.","maximum":100,"minimum":1,"type":"integer"},"type":{"const":"screenshot","type":"string"},"viewport":{"additionalProperties":false,"description":"The window size in pixels, such as { width: 390, height: 844 }.","properties":{"height":{"maximum":2160,"minimum":200,"type":"integer"},"width":{"maximum":3840,"minimum":200,"type":"integer"}},"required":["width","height"],"type":"object"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"count":{"default":5,"description":"How many passages to return, best match first.","maximum":20,"minimum":1,"type":"integer"},"query":{"description":"What you are looking for on the page, such as refund policy.","maxLength":10000,"minLength":1,"type":"string"},"type":{"const":"highlights","type":"string"}},"required":["type","query"],"type":"object"},{"additionalProperties":false,"properties":{"checkPromptInjection":{"description":"Deprecated: send checkPromptInjection at the top level of the call.","type":"boolean"},"options":{"additionalProperties":{"$ref":"#/definitions/__schema1"},"description":"Only with parser: extra inputs for it, such as { \"page\": 2 } for the next page of results or { \"minRating\": 4.5 } for a filter. GET /v1/parsers lists what each parser accepts.","propertyNames":{"type":"string"},"type":"object"},"parser":{"description":"Read the page with a named parser, which gives the site's own data as json. The url must be the kind of page the parser reads. Parsers are the only way to read some sites. GET /v1/parsers lists them.","type":"string"},"prompt":{"description":"What to pull from the page in plain words, such as the version and the release date.","maxLength":10000,"minLength":1,"type":"string"},"rules":{"additionalProperties":{"$ref":"#/definitions/__schema2"},"description":"Read the page with CSS rules instead of a model, no extra fee. Each field is a selector such as \"h1\" (the first match's text), \"a@href\" (an attribute) or { \"selector\": \"li\", \"type\": \"list\", \"output\": \"text\" | \"html\" | \"@attribute\" | { nested fields } }. A missing item is null and an unmatched list is []. Relative links become absolute. Up to 100 fields, 5 levels deep. Not with schema, prompt or parser.","propertyNames":{"type":"string"},"type":"object"},"schema":{"additionalProperties":{"$ref":"#/definitions/__schema0"},"description":"The fields to fill, as a JSON Schema (draft-07 or 2020-12) object with properties. Pydantic's model_json_schema() and zod's toJSONSchema() output work as they are. enum, const, anyOf, oneOf, nullable types, $ref with $defs, required, descriptions and any key names are read. Up to 100 top-level fields and 32 KB. A field the page does not state comes back null.","propertyNames":{"type":"string"},"type":"object"},"type":{"const":"json","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"selectors":{"description":"The elements and attributes to read, such as { selector: 'a.buy', attribute: 'href' }.","items":{"additionalProperties":false,"properties":{"attribute":{"maxLength":100,"minLength":1,"type":"string"},"selector":{"minLength":1,"type":"string"}},"required":["selector","attribute"],"type":"object"},"maxItems":50,"minItems":1,"type":"array"},"type":{"const":"attributes","type":"string"}},"required":["type","selectors"],"type":"object"}]},"maxItems":20,"minItems":1,"type":"array"},"headers":{"additionalProperties":{"maxLength":2000,"pattern":"^[\\t\\x20-\\x7e]*$","type":"string"},"description":"Extra request headers to send to the site, such as { \"x-plan\": \"pro\" }. A read with headers is never answered from or saved to a stored copy.","propertyNames":{"pattern":"^[A-Za-z0-9-]{1,64}$","type":"string"},"type":"object"},"ignoreRobotsTxt":{"const":false,"type":"boolean"},"includeTags":{"description":"Keep only the parts of the page that match these CSS selectors, such as article or .price. When set, onlyMainContent is not applied.","items":{"minLength":1,"type":"string"},"minItems":1,"type":"array"},"location":{"additionalProperties":false,"description":"Where to read the page from. The default is the United States.","properties":{"country":{"description":"Two-letter country code to read the page from, such as DE or JP.","type":"string"},"languages":{"description":"Languages to ask the site for, best first, such as [\"de\", \"en\"]. Sent as Accept-Language. A read with languages is never answered from or saved to a stored copy.","items":{"pattern":"^[A-Za-z]{2,3}(?:-[A-Za-z0-9]{2,8})*$","type":"string"},"maxItems":5,"minItems":1,"type":"array"}},"type":"object"},"lockdown":{"description":"Send true to answer only from a stored copy of the page and never read it live, whatever its age. A page with no stored copy is notFound. The same as minAge 0.","type":"boolean"},"maxAge":{"description":"Accept a stored answer up to this many milliseconds old, at most 30 days. Without it, 2 days, or less for a site whose pages change often, and a copy up to twice that age (at most 7 days) comes back at once as stale while a fresh read runs. 0 always reads the page live. metadata.cacheState says which one you got.","maximum":9007199254740991,"minimum":0,"type":"integer"},"minAge":{"description":"Answer only from a stored copy that is at least this many milliseconds old, and never read the page live. 0 accepts any stored copy. A page with no such copy is notFound.","maximum":9007199254740991,"minimum":0,"type":"integer"},"mobile":{"description":"Read the page as a phone would: a phone-sized screen and the mobile version of the site. The page loads in a browser.","type":"boolean"},"onlyCleanContent":{"description":"Send true to have a model remove what onlyMainContent leaves behind in the markdown: cookie banners, ads, share widgets, breadcrumbs, sign-up prompts, comment prompts and related-article lists. It only removes whole paragraphs and lists; it never rewrites or adds text, and code blocks are always kept. Skipped with a warning when the page is too long to clean or the model does not answer. Not with zeroDataRetention. Summary, answers and highlights are made from the cleaned markdown.","type":"boolean"},"onlyMainContent":{"default":true,"description":"Keep only the page's main content, without menus, headers, footers and ads.","type":"boolean"},"parsers":{"description":"Only the pdf parser exists. Send \"pdf\" or { \"type\": \"pdf\", mode, maxPages, pages, blocks, pageMarkers } with the same meaning as in parse. Without mode a PDF is read from its text layer only; auto reads the picture of a page that has no text, and ocr reads the picture of every page, up to 20 pages. Each page of text that comes back costs 1 credit.","items":{"anyOf":[{"const":"pdf","type":"string"},{"additionalProperties":false,"properties":{"blocks":{"description":"Send true to also get the page's layout in blocks: each title, section header or run of text, with its page, reading order, position on the page (bbox as left, top, right, bottom from 0 to 1) and where its text sits in that page's markdown (span, as in pages). Tables, figures and formulas are not told apart. A page read from its picture is one block. No extra charge.","type":"boolean"},"maxPages":{"description":"Read at most this many pages, up to 100.","maximum":100,"minimum":1,"type":"integer"},"mode":{"description":"fast reads the text layer only. auto (the default) reads the text layer and reads the picture of any page that has none. ocr reads the picture of every page.","enum":["fast","auto","ocr"],"type":"string"},"pageMarkers":{"description":"Send true to mark page breaks in the markdown: pages are joined with \"---\" and a line, where N is the page that follows. No extra charge.","type":"boolean"},"pages":{"description":"Send true to also get each page's markdown in pages, as { pageNumber, markdown }. No extra charge.","type":"boolean"},"type":{"const":"pdf","type":"string"}},"required":["type"],"type":"object"}]},"minItems":1,"type":"array"},"profile":{"additionalProperties":false,"description":"Read the page with the cookies and local storage that earlier calls saved under this name, kept for your account for 30 days after the last use. A call with a profile always loads the page in a browser, costs 1 credit, the same as any page, and is never answered from a stored copy. Only one call at a time can save to a profile.","properties":{"name":{"description":"A name you choose, such as shop-login. Calls with the same name share state.","maxLength":128,"minLength":1,"type":"string"},"saveChanges":{"default":true,"description":"Keep the cookies and local storage this read leaves behind for the next call with this name. Send false to read with the profile without changing it.","type":"boolean"}},"required":["name"],"type":"object"},"proxy":{"description":"auto: basic first, enhanced once if the site refuses. basic: one plain attempt. enhanced: the stronger read from the start. Same price.","enum":["auto","basic","enhanced"],"type":"string"},"redactPII":{"anyOf":[{"type":"boolean"},{"additionalProperties":false,"description":"Options for redactPII.","properties":{"entities":{"default":["PERSON","EMAIL","PHONE","LOCATION","FINANCIAL","SECRET"],"description":"What to hide: PERSON, EMAIL, PHONE, LOCATION, FINANCIAL, SECRET. All by default.","items":{"enum":["PERSON","EMAIL","PHONE","LOCATION","FINANCIAL","SECRET"],"type":"string"},"minItems":1,"type":"array"},"mode":{"default":"accurate","description":"accurate finds names and places with the model and the rest by pattern. aggressive adds guesses that catch more and may hide a little too much. fast uses patterns only, so it finds no ordinary names or places.","enum":["accurate","aggressive","fast"],"type":"string"},"replaceStyle":{"default":"tag","description":"tag writes <EMAIL>, mask writes * for each character, remove deletes it.","enum":["tag","mask","remove"],"type":"string"}},"type":"object"}],"description":"Send true, or an object, to hide personal data in the markdown and in everything made from it (summary, answers, highlights, json). Links, html and rawHtml are not changed. A page the model cannot scan is refused rather than returned unredacted."},"removeBase64Images":{"description":"Images inside the page that carry their data in the address (data:image) are dropped by default. Send false to keep them in markdown and html.","type":"boolean"},"robotsUserAgent":{"not":{}},"skipTlsVerification":{"description":"Send true to read a page whose certificate is expired, self-signed or for another name. The read is not private against someone between us and the site.","type":"boolean"},"storeInCache":{"default":true,"description":"Send false to neither read nor keep a stored copy of this page.","type":"boolean"},"threatProtection":{"not":{}},"timeout":{"description":"How long to keep trying, in milliseconds, between 10 seconds and 2 minutes. Pages behind a bot check can need 10 to 30 seconds the first time.","maximum":300000,"minimum":1000,"type":"integer"},"toolDetail":{"not":{}},"waitFor":{"description":"Extra milliseconds to wait before reading, up to 60000, for pages that load their content late. To wait for an element, add a wait action with a selector. A read that waits costs 1 credit, the same as any page.","maximum":60000,"minimum":0,"type":"integer"},"zeroDataRetention":{"default":false,"description":"Send true to keep nothing from this call: no stored copy is read or made, and nothing from it is logged. Costs 1 credit more per page. Not with a screenshot.","type":"boolean"}},"type":"object"},"sources":{"description":"What to search: web, news, images. Each is a string or {type}. Default web, or none when categories asks for research, companies, people, developer, gov or videos.","items":{"anyOf":[{"anyOf":[{"enum":["web","news","images"],"type":"string"},{"additionalProperties":false,"properties":{"location":{"type":"string"},"tbs":{"type":"string"},"type":{"const":"web","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"type":{"enum":["news","images"],"type":"string"}},"required":["type"],"type":"object"}]},{"anyOf":[{"enum":["alexandria","exchange"],"type":"string"},{"additionalProperties":false,"properties":{"type":{"enum":["alexandria","exchange"],"type":"string"}},"required":["type"],"type":"object"}]}]},"maxItems":5,"minItems":1,"type":"array"},"tbs":{"description":"Time filter: qdr:d, qdr:w, qdr:m or qdr:y, or cdr:1,cd_min:MM/DD/YYYY,cd_max:MM/DD/YYYY, plus sbd:1, like sbd:1,qdr:w. sbd:1 sorts newest first; results without a date come last. Web takes all of them; news takes qdr and sbd; images take none.","minLength":1,"type":"string"},"threatProtection":{"additionalProperties":{},"properties":{},"type":"object"},"timeout":{"default":60000,"description":"Milliseconds to wait for the sources, from 1,000 to 120,000; more is read as 120,000. Default 60,000. A source that has not answered by then is left out with a warning. When none has, the call fails and costs nothing.","maximum":9007199254740991,"minimum":1000,"type":"integer"},"toolDetail":{"const":"compact","type":"string"}},"required":["query"],"type":"object"}after
{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"definitions":{"__schema0":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"items":{"allOf":[{"$ref":"#/definitions/__schema0"}]},"type":"array"},{"additionalProperties":{"allOf":[{"$ref":"#/definitions/__schema0"}]},"propertyNames":{"type":"string"},"type":"object"}]},"__schema1":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"items":{"allOf":[{"$ref":"#/definitions/__schema1"}]},"type":"array"},{"additionalProperties":{"allOf":[{"$ref":"#/definitions/__schema1"}]},"propertyNames":{"type":"string"},"type":"object"}]},"__schema2":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"items":{"allOf":[{"$ref":"#/definitions/__schema2"}]},"type":"array"},{"additionalProperties":{"allOf":[{"$ref":"#/definitions/__schema2"}]},"propertyNames":{"type":"string"},"type":"object"}]}},"properties":{"categories":{"description":"pdf: web results that are PDF files. research: scholarly papers, in a research list, ranked by relevance then citations. companies: companies that match the query, in a companies list, best matches first. The query can name a place, industry, employee count, founding year and funding stage, like fintech startups in Berlin, 50-200 employees. people: people that match the query, in a people list, best matches first. The query can name a role, company, place or research topic, like CFO of Stripe, founders of fintech startups in Berlin, or researchers on CRISPR base editing. Each person has roles, affiliations and public profile links, never contact details. developer: passages from GitHub READMEs, issues, merged pull requests, releases, developer docs and API operations, in a developer list; send it as an object to filter by repos, types, language and minStars. gov: statutes, regulations, register notices and bills from government sources, in the web group with category gov and the kind, jurisdiction and citation of each. videos: passages from what is said in YouTube videos shared under a Creative Commons license, in a videos list, one result per video, with the channel, the license and the watch link; the link carries &t= only when the passage's start is exact. The index is a June 2024 snapshot of English videos, so a link may be dead.","items":{"anyOf":[{"enum":["developer","gov","research","pdf","companies","people","videos"],"type":"string"},{"additionalProperties":false,"properties":{"type":{"enum":["developer","gov","research","pdf","companies","people","videos"],"type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"language":{"description":"Only repositories whose main language is this, like TypeScript.","minLength":1,"type":"string"},"minStars":{"description":"Only repositories with at least this many GitHub stars.","maximum":9007199254740991,"minimum":0,"type":"integer"},"repos":{"default":[],"description":"Only results from these GitHub repositories, as owner/name.","items":{"pattern":"^[\\w.-]+\\/[\\w.-]+$","type":"string"},"maxItems":5,"type":"array"},"type":{"const":"developer","type":"string"},"types":{"default":[],"description":"Only these result types: readme, issue, pull_request, release, operation, doc.","items":{"enum":["readme","issue","pull_request","release","operation","doc"],"type":"string"},"type":"array"}},"required":["type"],"type":"object"}]},"type":"array"},"country":{"description":"Two-letter country to search from, like us. uk is read as gb. Image results are always US.","pattern":"^[A-Za-z]{2}$","type":"string"},"excludeDomains":{"items":{"type":"string"},"maxItems":10,"type":"array"},"highlights":{"default":true,"description":"On by default. When a web result's page is already stored, its description is the passages of that page that best match the query. Send false for the snippet the search engine shows.","type":"boolean"},"ignoreInvalidURLs":{"default":false,"description":"Leave out results whose address cannot be read as a page.","type":"boolean"},"includeDomains":{"items":{"type":"string"},"maxItems":10,"type":"array"},"limit":{"description":"Most results to return for each source. Default 10, or 5 with scrapeOptions, which reads every web and news result returned. News returns at most 50.","maximum":100,"minimum":1,"type":"integer"},"location":{"description":"Where to search from, like Germany or San Francisco,California,United States. The last part is the country and replaces country. A city before it narrows web results to that place.","minLength":1,"type":"string"},"maxAge":{"description":"Accept a stored answer up to this many milliseconds old, at most 30 days. Without it, 15 minutes for news and 1 hour for web and images. 0 always searches live.","maximum":9007199254740991,"minimum":0,"type":"integer"},"query":{"description":"What to search for, up to 500 characters. Search operators work in web results: quotes for an exact phrase, -word, site:, -site:, filetype:, inurl:, allinurl:, intitle: and allintitle:. In image results, imagesize:WIDTHxHEIGHT keeps images of exactly that size and larger:WIDTHxHEIGHT keeps images at least that large.","maxLength":500,"minLength":1,"type":"string"},"safe":{"description":"Hide explicit web, news and image results when true.","type":"boolean"},"scrapeOptions":{"additionalProperties":false,"description":"Reads each web and news result, as many as limit asks for, within timeout, and puts the passages that best match the query in each web description. Takes the options of scrape: formats (markdown, html, rawHtml, links, images, summary, screenshot, json and the rest), onlyMainContent, includeTags, excludeTags, maxAge, minAge, waitFor, mobile, timeout (per page), headers, actions, location, parsers, profile and zeroDataRetention. Costs what scrape costs for each page read: 1 credit, plus 4 for each summary or json with a schema or prompt that returns something.","properties":{"actions":{"description":"Up to 50 steps to run on the page, in order, before reading it: { \"type\": \"wait\", \"milliseconds\": 500 } (up to 30 seconds), { \"type\": \"wait\", \"selector\": \".results\" }, { \"type\": \"click\", \"selector\": \"button.more\" }, { \"type\": \"write\", \"text\": \"tides\" }, { \"type\": \"press\", \"key\": \"Enter\" }, { \"type\": \"scroll\", \"direction\": \"down\" } (also up, left or right; amount is pixels, \"viewport\" or \"max\"; maxScrolls 1 to 50; selector scrolls an inner container; \"max\" keeps scrolling until the page stops growing, for feeds that load as you go), { \"type\": \"screenshot\", \"fullPage\": true } (links come back in actions.screenshots), { \"type\": \"scrape\" } (the page at that point, in actions.scrapes), { \"type\": \"executeJavascript\", \"script\": \"document.title\" } (results in actions.javascriptReturns), { \"type\": \"pdf\", \"format\": \"A4\" } (links in actions.pdfs) or { \"type\": \"perform\", \"action\": \"Click the Load more button\" } (a step in plain words, up to 5 browser steps on this page, never leaving the site; at most 5 per call). A read with actions costs 1 credit, the same as any page; the actions themselves add nothing. If an action fails, you still get the page as it stood, with a warning that names the action and says why.","items":{"anyOf":[{"additionalProperties":false,"properties":{"milliseconds":{"maximum":30000,"minimum":1,"type":"integer"},"type":{"const":"wait","type":"string"}},"required":["type","milliseconds"],"type":"object"},{"additionalProperties":false,"properties":{"selector":{"minLength":1,"type":"string"},"type":{"const":"wait","type":"string"}},"required":["type","selector"],"type":"object"},{"additionalProperties":false,"properties":{"all":{"const":false,"type":"boolean"},"selector":{"minLength":1,"type":"string"},"type":{"const":"click","type":"string"}},"required":["type","selector"],"type":"object"},{"additionalProperties":false,"properties":{"text":{"minLength":1,"type":"string"},"type":{"const":"write","type":"string"}},"required":["type","text"],"type":"object"},{"additionalProperties":false,"properties":{"key":{"maxLength":40,"minLength":1,"type":"string"},"type":{"const":"press","type":"string"}},"required":["type","key"],"type":"object"},{"additionalProperties":false,"properties":{"amount":{"anyOf":[{"maximum":100000,"minimum":1,"type":"integer"},{"enum":["viewport","max"],"type":"string"}]},"direction":{"default":"down","enum":["up","down","left","right"],"type":"string"},"maxScrolls":{"maximum":50,"minimum":1,"type":"integer"},"selector":{"minLength":1,"type":"string"},"type":{"const":"scroll","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"fullPage":{"type":"boolean"},"quality":{"maximum":100,"minimum":1,"type":"integer"},"type":{"const":"screenshot","type":"string"},"viewport":{"additionalProperties":false,"properties":{"height":{"maximum":2160,"minimum":200,"type":"integer"},"width":{"maximum":3840,"minimum":200,"type":"integer"}},"required":["width","height"],"type":"object"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"type":{"const":"scrape","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"script":{"maxLength":20000,"minLength":1,"type":"string"},"type":{"const":"executeJavascript","type":"string"}},"required":["type","script"],"type":"object"},{"additionalProperties":false,"properties":{"format":{"enum":["Letter","Legal","Tabloid","Ledger","A0","A1","A2","A3","A4","A5","A6"],"type":"string"},"landscape":{"type":"boolean"},"scale":{"maximum":2,"minimum":0.1,"type":"number"},"type":{"const":"pdf","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"action":{"maxLength":500,"minLength":1,"type":"string"},"type":{"const":"perform","type":"string"}},"required":["type","action"],"type":"object"}]},"maxItems":50,"minItems":1,"type":"array"},"blockAds":{"description":"Ads and trackers are not loaded when a page runs in a browser. Send false to load them.","type":"boolean"},"checkPromptInjection":{"description":"Send true to scan the page text for instructions aimed at an AI model before anything is built from it. A page that has them is refused with 403 promptInjectionDetected and costs nothing. The scan adds 4 credits when it runs; a page it cannot scan fully comes back with a warning and no charge.","type":"boolean"},"excludeTags":{"description":"Remove the parts of the page that match these CSS selectors, such as .comments.","items":{"minLength":1,"type":"string"},"minItems":1,"type":"array"},"fastMode":{"description":"Send true to read the page without opening a browser: the answer comes sooner, but a page that needs a browser, or that refuses a plain request, comes back as an error instead of being retried. Ignored when the call needs a browser (actions, screenshot, waitFor, mobile, profile, network, branding).","type":"boolean"},"formats":{"default":["markdown"],"description":"What to return: markdown (clean page text), summary (a short summary of the page), html (the cleaned page), rawHtml (the page as sent), audio and video (for a YouTube link: the audio track as an M4A file, or the video as an MP4 file, as a link that works for 1 hour), rawBase64 (the bytes the site sent, Base64 encoded, from a live read; metadata.contentType says what they are), links (every link on the page), images (every image address), screenshot (a link to a JPEG of the visible page, kept for 7 days), changeTracking (what changed in the markdown since your key last read this page with the same options, kept 30 days; add modes [\"git-diff\",\"json\"] with a schema or prompt to compare fields too), question (send { \"type\": \"question\", \"question\": \"...\" } to get answer, null when the page does not state one), product (title, brand, category, url, description and variants with price, sale, availability and images, or null) and menu (merchant, currency and sections of items with prices, or null) network (the JSON the page loaded while it rendered, up to 30 responses) and branding (the page's colors, fonts, typography, spacing, button and input styles, logo and brand images, read from how the page looks, with a field left out when the page does not show it). Send { \"type\": \"screenshot\", \"fullPage\": true } for the whole page. Send { \"type\": \"highlights\", \"query\": \"refund policy\" } for the passages that best match a query. Send { \"type\": \"json\", \"schema\": { \"type\": \"object\", \"properties\": { \"price\": { \"type\": \"number\" } } } } or { \"type\": \"json\", \"prompt\": \"the price and the stock\" } for fields filled from the page, each checked against it. Send { \"type\": \"json\", \"parser\": \"amazon-product\" } to get a site's own data as json instead of reading the page; GET /v1/parsers lists the parsers. Send { \"type\": \"json\", \"rules\": { \"title\": \"h1\", \"links\": { \"selector\": \"a\", \"type\": \"list\", \"output\": \"@href\" } } } to read the page with CSS rules and no model, at the page's own price. Send { \"type\": \"attributes\", \"selectors\": [{ \"selector\": \"a\", \"attribute\": \"href\" }] } for attribute values, returned in attributes. Without a parser or rules, json needs a schema or a prompt and is filled from the page. json with a schema or a prompt, summary, highlights, question, product, menu and changeTracking in json mode cost 4 credits more each when they return something. json with rules or a parser, and attributes, cost nothing more. A screenshot, network or branding read costs 1 credit, the same as any page. A PDF comes back as markdown only, and costs 1 credit more for each page of text that comes back. A CSV or an Excel .xlsx file comes back as markdown tables.","items":{"anyOf":[{"enum":["markdown","summary","html","rawHtml","rawBase64","links","images","network","branding","audio","video","screenshot","changeTracking","product","menu"],"type":"string"},{"additionalProperties":false,"properties":{"type":{"enum":["markdown","summary","html","rawHtml","rawBase64","links","images","network","branding","audio","video"],"type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"modes":{"description":"git-diff returns a unified diff of the markdown. json compares the fields in schema or prompt between this read and the last one. Without modes you get git-diff.","items":{"enum":["git-diff","json"],"type":"string"},"maxItems":2,"type":"array"},"prompt":{"description":"With json mode: what to compare, in plain words, such as the price and stock.","maxLength":10000,"minLength":1,"type":"string"},"schema":{"additionalProperties":{"$ref":"#/definitions/__schema0"},"description":"The fields to fill, as a JSON Schema (draft-07 or 2020-12) object with properties. Pydantic's model_json_schema() and zod's toJSONSchema() output work as they are. enum, const, anyOf, oneOf, nullable types, $ref with $defs, required, descriptions and any key names are read. Up to 100 top-level fields and 32 KB. A field the page does not state comes back null.","propertyNames":{"type":"string"},"type":"object"},"tag":{"type":"null"},"type":{"const":"changeTracking","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"question":{"description":"A question to answer from the page, such as what the refund window is.","maxLength":10000,"minLength":1,"type":"string"},"type":{"const":"question","type":"string"}},"required":["type","question"],"type":"object"},{"additionalProperties":false,"properties":{"type":{"const":"product","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"type":{"const":"menu","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"fullPage":{"default":false,"description":"Capture the whole page from top to bottom instead of the visible part.","type":"boolean"},"quality":{"description":"JPEG quality from 1 to 100. The default is 70.","maximum":100,"minimum":1,"type":"integer"},"type":{"const":"screenshot","type":"string"},"viewport":{"additionalProperties":false,"description":"The window size in pixels, such as { width: 390, height: 844 }.","properties":{"height":{"maximum":2160,"minimum":200,"type":"integer"},"width":{"maximum":3840,"minimum":200,"type":"integer"}},"required":["width","height"],"type":"object"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"count":{"default":5,"description":"How many passages to return, best match first.","maximum":20,"minimum":1,"type":"integer"},"query":{"description":"What you are looking for on the page, such as refund policy.","maxLength":10000,"minLength":1,"type":"string"},"type":{"const":"highlights","type":"string"}},"required":["type","query"],"type":"object"},{"additionalProperties":false,"properties":{"checkPromptInjection":{"description":"Deprecated: send checkPromptInjection at the top level of the call.","type":"boolean"},"options":{"additionalProperties":{"$ref":"#/definitions/__schema1"},"description":"Only with parser: extra inputs for it, such as { \"page\": 2 } for the next page of results or { \"minRating\": 4.5 } for a filter. GET /v1/parsers lists what each parser accepts.","propertyNames":{"type":"string"},"type":"object"},"parser":{"description":"Read the page with a named parser, which gives the site's own data as json. The url must be the kind of page the parser reads. Parsers are the only way to read some sites. GET /v1/parsers lists them.","type":"string"},"prompt":{"description":"What to pull from the page in plain words, such as the version and the release date.","maxLength":10000,"minLength":1,"type":"string"},"rules":{"additionalProperties":{"$ref":"#/definitions/__schema2"},"description":"Read the page with CSS rules instead of a model, no extra fee. Each field is a selector such as \"h1\" (the first match's text), \"a@href\" (an attribute) or { \"selector\": \"li\", \"type\": \"list\", \"output\": \"text\" | \"html\" | \"@attribute\" | { nested fields } }. A missing item is null and an unmatched list is []. Relative links become absolute. Up to 100 fields, 5 levels deep. Not with schema, prompt or parser.","propertyNames":{"type":"string"},"type":"object"},"schema":{"additionalProperties":{"$ref":"#/definitions/__schema0"},"description":"The fields to fill, as a JSON Schema (draft-07 or 2020-12) object with properties. Pydantic's model_json_schema() and zod's toJSONSchema() output work as they are. enum, const, anyOf, oneOf, nullable types, $ref with $defs, required, descriptions and any key names are read. Up to 100 top-level fields and 32 KB. A field the page does not state comes back null.","propertyNames":{"type":"string"},"type":"object"},"type":{"const":"json","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"selectors":{"description":"The elements and attributes to read, such as { selector: 'a.buy', attribute: 'href' }.","items":{"additionalProperties":false,"properties":{"attribute":{"maxLength":100,"minLength":1,"type":"string"},"selector":{"minLength":1,"type":"string"}},"required":["selector","attribute"],"type":"object"},"maxItems":50,"minItems":1,"type":"array"},"type":{"const":"attributes","type":"string"}},"required":["type","selectors"],"type":"object"}]},"maxItems":20,"minItems":1,"type":"array"},"headers":{"additionalProperties":{"maxLength":2000,"pattern":"^[\\t\\x20-\\x7e]*$","type":"string"},"description":"Extra request headers to send to the site, such as { \"x-plan\": \"pro\" }. A read with headers is never answered from or saved to a stored copy.","propertyNames":{"pattern":"^[A-Za-z0-9-]{1,64}$","type":"string"},"type":"object"},"includeTags":{"description":"Keep only the parts of the page that match these CSS selectors, such as article or .price. When set, onlyMainContent is not applied.","items":{"minLength":1,"type":"string"},"minItems":1,"type":"array"},"location":{"additionalProperties":false,"description":"Where to read the page from. The default is the United States.","properties":{"country":{"description":"Two-letter country code to read the page from, such as DE or JP.","type":"string"},"languages":{"description":"Languages to ask the site for, best first, such as [\"de\", \"en\"]. Sent as Accept-Language. A read with languages is never answered from or saved to a stored copy.","items":{"pattern":"^[A-Za-z]{2,3}(?:-[A-Za-z0-9]{2,8})*$","type":"string"},"maxItems":5,"minItems":1,"type":"array"}},"type":"object"},"lockdown":{"description":"Send true to answer only from a stored copy of the page and never read it live, whatever its age. A page with no stored copy is notFound. The same as minAge 0.","type":"boolean"},"maxAge":{"description":"Accept a stored answer up to this many milliseconds old, at most 30 days. Without it, 2 days, or less for a site whose pages change often, and a copy up to twice that age (at most 7 days) comes back at once as stale while a fresh read runs. 0 always reads the page live. metadata.cacheState says which one you got.","maximum":9007199254740991,"minimum":0,"type":"integer"},"minAge":{"description":"Answer only from a stored copy that is at least this many milliseconds old, and never read the page live. 0 accepts any stored copy. A page with no such copy is notFound.","maximum":9007199254740991,"minimum":0,"type":"integer"},"mobile":{"description":"Read the page as a phone would: a phone-sized screen and the mobile version of the site. The page loads in a browser.","type":"boolean"},"onlyCleanContent":{"description":"Send true to have a model remove what onlyMainContent leaves behind in the markdown: cookie banners, ads, share widgets, breadcrumbs, sign-up prompts, comment prompts and related-article lists. It only removes whole paragraphs and lists; it never rewrites or adds text, and code blocks are always kept. Skipped with a warning when the page is too long to clean or the model does not answer. Not with zeroDataRetention. Summary, answers and highlights are made from the cleaned markdown.","type":"boolean"},"onlyMainContent":{"default":true,"description":"Keep only the page's main content, without menus, headers, footers and ads.","type":"boolean"},"parsers":{"description":"Only the pdf parser exists. Send \"pdf\" or { \"type\": \"pdf\", mode, maxPages, pages, blocks, pageMarkers } with the same meaning as in parse. Without mode a PDF is read from its text layer only; auto reads the picture of a page that has no text, and ocr reads the picture of every page, up to 20 pages. Each page of text that comes back costs 1 credit.","items":{"anyOf":[{"const":"pdf","type":"string"},{"additionalProperties":false,"properties":{"blocks":{"description":"Send true to also get the page's layout in blocks: each title, section header or run of text, with its page, reading order, position on the page (bbox as left, top, right, bottom from 0 to 1) and where its text sits in that page's markdown (span, as in pages). Tables, figures and formulas are not told apart. A page read from its picture is one block. No extra charge.","type":"boolean"},"maxPages":{"description":"Read at most this many pages, up to 100.","maximum":100,"minimum":1,"type":"integer"},"mode":{"description":"fast reads the text layer only. auto (the default) reads the text layer and reads the picture of any page that has none. ocr reads the picture of every page.","enum":["fast","auto","ocr"],"type":"string"},"pageMarkers":{"description":"Send true to mark page breaks in the markdown: pages are joined with \"---\" and a line, where N is the page that follows. No extra charge.","type":"boolean"},"pages":{"description":"Send true to also get each page's markdown in pages, as { pageNumber, markdown }. No extra charge.","type":"boolean"},"type":{"const":"pdf","type":"string"}},"required":["type"],"type":"object"}]},"minItems":1,"type":"array"},"profile":{"additionalProperties":false,"description":"Read the page with the cookies and local storage that earlier calls saved under this name, kept for your account for 30 days after the last use. A call with a profile always loads the page in a browser, costs 1 credit, the same as any page, and is never answered from a stored copy. Only one call at a time can save to a profile.","properties":{"name":{"description":"A name you choose, such as shop-login. Calls with the same name share state.","maxLength":128,"minLength":1,"type":"string"},"saveChanges":{"default":true,"description":"Keep the cookies and local storage this read leaves behind for the next call with this name. Send false to read with the profile without changing it.","type":"boolean"}},"required":["name"],"type":"object"},"proxy":{"description":"auto: basic first, enhanced once if the site refuses. basic: one plain attempt. enhanced: the stronger read from the start. Same price.","enum":["auto","basic","enhanced"],"type":"string"},"redactPII":{"anyOf":[{"type":"boolean"},{"additionalProperties":false,"description":"Options for redactPII.","properties":{"entities":{"default":["PERSON","EMAIL","PHONE","LOCATION","FINANCIAL","SECRET"],"description":"What to hide: PERSON, EMAIL, PHONE, LOCATION, FINANCIAL, SECRET. All by default.","items":{"enum":["PERSON","EMAIL","PHONE","LOCATION","FINANCIAL","SECRET"],"type":"string"},"minItems":1,"type":"array"},"mode":{"default":"accurate","description":"accurate finds names and places with the model and the rest by pattern. aggressive adds guesses that catch more and may hide a little too much. fast uses patterns only, so it finds no ordinary names or places.","enum":["accurate","aggressive","fast"],"type":"string"},"replaceStyle":{"default":"tag","description":"tag writes <EMAIL>, mask writes * for each character, remove deletes it.","enum":["tag","mask","remove"],"type":"string"}},"type":"object"}],"description":"Send true, or an object, to hide personal data in the markdown and in everything made from it (summary, answers, highlights, json). Links, html and rawHtml are not changed. A page the model cannot scan is refused rather than returned unredacted."},"removeBase64Images":{"description":"Images inside the page that carry their data in the address (data:image) are dropped by default. Send false to keep them in markdown and html.","type":"boolean"},"skipTlsVerification":{"description":"Send true to read a page whose certificate is expired, self-signed or for another name. The read is not private against someone between us and the site.","type":"boolean"},"storeInCache":{"default":true,"description":"Send false to neither read nor keep a stored copy of this page.","type":"boolean"},"timeout":{"description":"How long to keep trying, in milliseconds, between 10 seconds and 2 minutes. Pages behind a bot check can need 10 to 30 seconds the first time.","maximum":300000,"minimum":1000,"type":"integer"},"waitFor":{"description":"Extra milliseconds to wait before reading, up to 60000, for pages that load their content late. To wait for an element, add a wait action with a selector. A read that waits costs 1 credit, the same as any page.","maximum":60000,"minimum":0,"type":"integer"},"zeroDataRetention":{"default":false,"description":"Send true to keep nothing from this call: no stored copy is read or made, and nothing from it is logged. Costs 1 credit more per page. Not with a screenshot.","type":"boolean"}},"type":"object"},"sources":{"description":"What to search: web, news, images. Each is a string or {type}. Default web, or none when categories asks for research, companies, people, developer, gov or videos.","items":{"anyOf":[{"enum":["web","news","images"],"type":"string"},{"additionalProperties":false,"properties":{"location":{"type":"string"},"tbs":{"type":"string"},"type":{"const":"web","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"type":{"enum":["news","images"],"type":"string"}},"required":["type"],"type":"object"}]},"maxItems":5,"minItems":1,"type":"array"},"tbs":{"description":"Time filter: qdr:d, qdr:w, qdr:m or qdr:y, or cdr:1,cd_min:MM/DD/YYYY,cd_max:MM/DD/YYYY, plus sbd:1, like sbd:1,qdr:w. sbd:1 sorts newest first; results without a date come last. Web takes all of them; news takes qdr and sbd; images take none.","minLength":1,"type":"string"},"timeout":{"default":60000,"description":"Milliseconds to wait for the sources, from 1,000 to 120,000; more is read as 120,000. Default 60,000. A source that has not answered by then is left out with a warning. When none has, the call fails and costs nothing.","maximum":9007199254740991,"minimum":1000,"type":"integer"}},"required":["query"],"type":"object"}after
{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"definitions":{"__schema0":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"items":{"allOf":[{"$ref":"#/definitions/__schema0"}]},"type":"array"},{"additionalProperties":{"allOf":[{"$ref":"#/definitions/__schema0"}]},"propertyNames":{"type":"string"},"type":"object"}]},"__schema1":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"items":{"allOf":[{"$ref":"#/definitions/__schema1"}]},"type":"array"},{"additionalProperties":{"allOf":[{"$ref":"#/definitions/__schema1"}]},"propertyNames":{"type":"string"},"type":"object"}]},"__schema2":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"items":{"allOf":[{"$ref":"#/definitions/__schema2"}]},"type":"array"},{"additionalProperties":{"allOf":[{"$ref":"#/definitions/__schema2"}]},"propertyNames":{"type":"string"},"type":"object"}]}},"properties":{"alexandria":{"not":{}},"allowExternalLinks":{"default":false,"description":"Also follow links to other sites. They count toward limit and maxDiscoveryDepth. Only the start site's robots.txt is read.","type":"boolean"},"allowSubdomains":{"default":false,"description":"Also read pages on subdomains, such as docs.bun.com for bun.com.","type":"boolean"},"auditMetadata":{"not":{}},"crawlEntireDomain":{"default":false,"description":"Read the whole site, not only pages under the start page's path.","type":"boolean"},"deduplicateSimilarURLs":{"default":true,"description":"Read one page when addresses differ only by www, a trailing slash, a #fragment, tracking parameters such as utm_source, or the order of the ?query. Send false to read each address.","type":"boolean"},"delay":{"description":"Seconds to wait between pages. With delay the crawl reads one page at a time. At most 30.","maximum":30,"minimum":0,"type":"number"},"domainTools":{"const":false,"type":"boolean"},"excludePaths":{"default":[],"description":"Skip pages whose path matches one of these regular expressions, such as tag/.*.","items":{"maxLength":200,"minLength":1,"type":"string"},"maxItems":100,"type":"array"},"ignoreQueryParameters":{"default":false,"description":"Treat addresses that differ only in their ?query part as one page.","type":"boolean"},"ignoreRobotsTxt":{"const":false,"type":"boolean"},"includePaths":{"default":[],"description":"Read only pages whose path matches one of these regular expressions, such as blog/.*.","items":{"maxLength":200,"minLength":1,"type":"string"},"maxItems":100,"type":"array"},"limit":{"default":10000,"description":"Stop after reading this many pages in total.","maximum":10000,"minimum":1,"type":"integer"},"maxConcurrency":{"description":"Most pages read at once. We read at most 4 at once, so a larger number gives the same speed.","maximum":100,"minimum":1,"type":"integer"},"maxDiscoveryDepth":{"default":3,"description":"How many links away from the start page to go, up to 10.","maximum":10,"minimum":0,"type":"integer"},"prompt":{"description":"What you are looking for, such as sqlite performance. Pages about it are read first, and the crawl stops once new pages stop mentioning it.","maxLength":1000,"minLength":1,"type":"string"},"regexOnFullURL":{"default":false,"description":"Match includePaths and excludePaths against the whole address, not only the path.","type":"boolean"},"robotsUserAgent":{"not":{}},"scrapeOptions":{"additionalProperties":{},"description":"How to read each page, the same options and formats as scrape. Without formats, each page comes back as markdown.","properties":{"actions":{"description":"Up to 50 steps to run on the page, in order, before reading it: { \"type\": \"wait\", \"milliseconds\": 500 } (up to 30 seconds), { \"type\": \"wait\", \"selector\": \".results\" }, { \"type\": \"click\", \"selector\": \"button.more\" }, { \"type\": \"write\", \"text\": \"tides\" }, { \"type\": \"press\", \"key\": \"Enter\" }, { \"type\": \"scroll\", \"direction\": \"down\" } (also up, left or right; amount is pixels, \"viewport\" or \"max\"; maxScrolls 1 to 50; selector scrolls an inner container; \"max\" keeps scrolling until the page stops growing, for feeds that load as you go), { \"type\": \"screenshot\", \"fullPage\": true } (links come back in actions.screenshots), { \"type\": \"scrape\" } (the page at that point, in actions.scrapes), { \"type\": \"executeJavascript\", \"script\": \"document.title\" } (results in actions.javascriptReturns), { \"type\": \"pdf\", \"format\": \"A4\" } (links in actions.pdfs) or { \"type\": \"perform\", \"action\": \"Click the Load more button\" } (a step in plain words, up to 5 browser steps on this page, never leaving the site; at most 5 per call). A read with actions costs 1 credit, the same as any page; the actions themselves add nothing. If an action fails, you still get the page as it stood, with a warning that names the action and says why.","items":{"anyOf":[{"additionalProperties":false,"properties":{"milliseconds":{"maximum":30000,"minimum":1,"type":"integer"},"type":{"const":"wait","type":"string"}},"required":["type","milliseconds"],"type":"object"},{"additionalProperties":false,"properties":{"selector":{"minLength":1,"type":"string"},"type":{"const":"wait","type":"string"}},"required":["type","selector"],"type":"object"},{"additionalProperties":false,"properties":{"all":{"const":false,"type":"boolean"},"selector":{"minLength":1,"type":"string"},"type":{"const":"click","type":"string"}},"required":["type","selector"],"type":"object"},{"additionalProperties":false,"properties":{"text":{"minLength":1,"type":"string"},"type":{"const":"write","type":"string"}},"required":["type","text"],"type":"object"},{"additionalProperties":false,"properties":{"key":{"maxLength":40,"minLength":1,"type":"string"},"type":{"const":"press","type":"string"}},"required":["type","key"],"type":"object"},{"additionalProperties":false,"properties":{"amount":{"anyOf":[{"maximum":100000,"minimum":1,"type":"integer"},{"enum":["viewport","max"],"type":"string"}]},"direction":{"default":"down","enum":["up","down","left","right"],"type":"string"},"maxScrolls":{"maximum":50,"minimum":1,"type":"integer"},"selector":{"minLength":1,"type":"string"},"type":{"const":"scroll","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"fullPage":{"type":"boolean"},"quality":{"maximum":100,"minimum":1,"type":"integer"},"type":{"const":"screenshot","type":"string"},"viewport":{"additionalProperties":false,"properties":{"height":{"maximum":2160,"minimum":200,"type":"integer"},"width":{"maximum":3840,"minimum":200,"type":"integer"}},"required":["width","height"],"type":"object"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"type":{"const":"scrape","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"script":{"maxLength":20000,"minLength":1,"type":"string"},"type":{"const":"executeJavascript","type":"string"}},"required":["type","script"],"type":"object"},{"additionalProperties":false,"properties":{"format":{"enum":["Letter","Legal","Tabloid","Ledger","A0","A1","A2","A3","A4","A5","A6"],"type":"string"},"landscape":{"type":"boolean"},"scale":{"maximum":2,"minimum":0.1,"type":"number"},"type":{"const":"pdf","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"action":{"maxLength":500,"minLength":1,"type":"string"},"type":{"const":"perform","type":"string"}},"required":["type","action"],"type":"object"}]},"maxItems":50,"minItems":1,"type":"array"},"alexandria":{"not":{}},"auditMetadata":{"not":{}},"blockAds":{"description":"Ads and trackers are not loaded when a page runs in a browser. Send false to load them.","type":"boolean"},"checkPromptInjection":{"description":"Send true to scan the page text for instructions aimed at an AI model before anything is built from it. A page that has them is refused with 403 promptInjectionDetected and costs nothing. The scan adds 4 credits when it runs; a page it cannot scan fully comes back with a warning and no charge.","type":"boolean"},"domainTools":{"const":false,"type":"boolean"},"excludeTags":{"description":"Remove the parts of the page that match these CSS selectors, such as .comments.","items":{"minLength":1,"type":"string"},"minItems":1,"type":"array"},"fastMode":{"description":"Send true to read the page without opening a browser: the answer comes sooner, but a page that needs a browser, or that refuses a plain request, comes back as an error instead of being retried. Ignored when the call needs a browser (actions, screenshot, waitFor, mobile, profile, network, branding).","type":"boolean"},"formats":{"default":["markdown"],"description":"What to return: markdown (clean page text), summary (a short summary of the page), html (the cleaned page), rawHtml (the page as sent), audio and video (for a YouTube link: the audio track as an M4A file, or the video as an MP4 file, as a link that works for 1 hour), rawBase64 (the bytes the site sent, Base64 encoded, from a live read; metadata.contentType says what they are), links (every link on the page), images (every image address), screenshot (a link to a JPEG of the visible page, kept for 7 days), changeTracking (what changed in the markdown since your key last read this page with the same options, kept 30 days; add modes [\"git-diff\",\"json\"] with a schema or prompt to compare fields too), question (send { \"type\": \"question\", \"question\": \"...\" } to get answer, null when the page does not state one), product (title, brand, category, url, description and variants with price, sale, availability and images, or null) and menu (merchant, currency and sections of items with prices, or null) network (the JSON the page loaded while it rendered, up to 30 responses) and branding (the page's colors, fonts, typography, spacing, button and input styles, logo and brand images, read from how the page looks, with a field left out when the page does not show it). Send { \"type\": \"screenshot\", \"fullPage\": true } for the whole page. Send { \"type\": \"highlights\", \"query\": \"refund policy\" } for the passages that best match a query. Send { \"type\": \"json\", \"schema\": { \"type\": \"object\", \"properties\": { \"price\": { \"type\": \"number\" } } } } or { \"type\": \"json\", \"prompt\": \"the price and the stock\" } for fields filled from the page, each checked against it. Send { \"type\": \"json\", \"parser\": \"amazon-product\" } to get a site's own data as json instead of reading the page; GET /v1/parsers lists the parsers. Send { \"type\": \"json\", \"rules\": { \"title\": \"h1\", \"links\": { \"selector\": \"a\", \"type\": \"list\", \"output\": \"@href\" } } } to read the page with CSS rules and no model, at the page's own price. Send { \"type\": \"attributes\", \"selectors\": [{ \"selector\": \"a\", \"attribute\": \"href\" }] } for attribute values, returned in attributes. Without a parser or rules, json needs a schema or a prompt and is filled from the page. json with a schema or a prompt, summary, highlights, question, product, menu and changeTracking in json mode cost 4 credits more each when they return something. json with rules or a parser, and attributes, cost nothing more. A screenshot, network or branding read costs 1 credit, the same as any page. A PDF comes back as markdown only, and costs 1 credit more for each page of text that comes back. A CSV or an Excel .xlsx file comes back as markdown tables.","items":{"anyOf":[{"enum":["markdown","summary","html","rawHtml","rawBase64","links","images","network","branding","audio","video","screenshot","changeTracking","product","menu"],"type":"string"},{"additionalProperties":false,"properties":{"type":{"enum":["markdown","summary","html","rawHtml","rawBase64","links","images","network","branding","audio","video"],"type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"modes":{"description":"git-diff returns a unified diff of the markdown. json compares the fields in schema or prompt between this read and the last one. Without modes you get git-diff.","items":{"enum":["git-diff","json"],"type":"string"},"maxItems":2,"type":"array"},"prompt":{"description":"With json mode: what to compare, in plain words, such as the price and stock.","maxLength":10000,"minLength":1,"type":"string"},"schema":{"additionalProperties":{"$ref":"#/definitions/__schema0"},"description":"The fields to fill, as a JSON Schema (draft-07 or 2020-12) object with properties. Pydantic's model_json_schema() and zod's toJSONSchema() output work as they are. enum, const, anyOf, oneOf, nullable types, $ref with $defs, required, descriptions and any key names are read. Up to 100 top-level fields and 32 KB. A field the page does not state comes back null.","propertyNames":{"type":"string"},"type":"object"},"tag":{"type":"null"},"type":{"const":"changeTracking","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"question":{"description":"A question to answer from the page, such as what the refund window is.","maxLength":10000,"minLength":1,"type":"string"},"type":{"const":"question","type":"string"}},"required":["type","question"],"type":"object"},{"additionalProperties":false,"properties":{"type":{"const":"product","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"type":{"const":"menu","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"fullPage":{"default":false,"description":"Capture the whole page from top to bottom instead of the visible part.","type":"boolean"},"quality":{"description":"JPEG quality from 1 to 100. The default is 70.","maximum":100,"minimum":1,"type":"integer"},"type":{"const":"screenshot","type":"string"},"viewport":{"additionalProperties":false,"description":"The window size in pixels, such as { width: 390, height: 844 }.","properties":{"height":{"maximum":2160,"minimum":200,"type":"integer"},"width":{"maximum":3840,"minimum":200,"type":"integer"}},"required":["width","height"],"type":"object"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"count":{"default":5,"description":"How many passages to return, best match first.","maximum":20,"minimum":1,"type":"integer"},"query":{"description":"What you are looking for on the page, such as refund policy.","maxLength":10000,"minLength":1,"type":"string"},"type":{"const":"highlights","type":"string"}},"required":["type","query"],"type":"object"},{"additionalProperties":false,"properties":{"checkPromptInjection":{"description":"Deprecated: send checkPromptInjection at the top level of the call.","type":"boolean"},"options":{"additionalProperties":{"$ref":"#/definitions/__schema1"},"description":"Only with parser: extra inputs for it, such as { \"page\": 2 } for the next page of results or { \"minRating\": 4.5 } for a filter. GET /v1/parsers lists what each parser accepts.","propertyNames":{"type":"string"},"type":"object"},"parser":{"description":"Read the page with a named parser, which gives the site's own data as json. The url must be the kind of page the parser reads. Parsers are the only way to read some sites. GET /v1/parsers lists them.","type":"string"},"prompt":{"description":"What to pull from the page in plain words, such as the version and the release date.","maxLength":10000,"minLength":1,"type":"string"},"rules":{"additionalProperties":{"$ref":"#/definitions/__schema2"},"description":"Read the page with CSS rules instead of a model, no extra fee. Each field is a selector such as \"h1\" (the first match's text), \"a@href\" (an attribute) or { \"selector\": \"li\", \"type\": \"list\", \"output\": \"text\" | \"html\" | \"@attribute\" | { nested fields } }. A missing item is null and an unmatched list is []. Relative links become absolute. Up to 100 fields, 5 levels deep. Not with schema, prompt or parser.","propertyNames":{"type":"string"},"type":"object"},"schema":{"additionalProperties":{"$ref":"#/definitions/__schema0"},"description":"The fields to fill, as a JSON Schema (draft-07 or 2020-12) object with properties. Pydantic's model_json_schema() and zod's toJSONSchema() output work as they are. enum, const, anyOf, oneOf, nullable types, $ref with $defs, required, descriptions and any key names are read. Up to 100 top-level fields and 32 KB. A field the page does not state comes back null.","propertyNames":{"type":"string"},"type":"object"},"type":{"const":"json","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"selectors":{"description":"The elements and attributes to read, such as { selector: 'a.buy', attribute: 'href' }.","items":{"additionalProperties":false,"properties":{"attribute":{"maxLength":100,"minLength":1,"type":"string"},"selector":{"minLength":1,"type":"string"}},"required":["selector","attribute"],"type":"object"},"maxItems":50,"minItems":1,"type":"array"},"type":{"const":"attributes","type":"string"}},"required":["type","selectors"],"type":"object"}]},"maxItems":20,"minItems":1,"type":"array"},"headers":{"additionalProperties":{"maxLength":2000,"pattern":"^[\\t\\x20-\\x7e]*$","type":"string"},"description":"Extra request headers to send to the site, such as { \"x-plan\": \"pro\" }. A read with headers is never answered from or saved to a stored copy.","propertyNames":{"pattern":"^[A-Za-z0-9-]{1,64}$","type":"string"},"type":"object"},"ignoreRobotsTxt":{"const":false,"type":"boolean"},"includeTags":{"description":"Keep only the parts of the page that match these CSS selectors, such as article or .price. When set, onlyMainContent is not applied.","items":{"minLength":1,"type":"string"},"minItems":1,"type":"array"},"location":{"additionalProperties":false,"description":"Where to read the page from. The default is the United States.","properties":{"country":{"description":"Two-letter country code to read the page from, such as DE or JP.","type":"string"},"languages":{"description":"Languages to ask the site for, best first, such as [\"de\", \"en\"]. Sent as Accept-Language. A read with languages is never answered from or saved to a stored copy.","items":{"pattern":"^[A-Za-z]{2,3}(?:-[A-Za-z0-9]{2,8})*$","type":"string"},"maxItems":5,"minItems":1,"type":"array"}},"type":"object"},"lockdown":{"description":"Send true to answer only from a stored copy of the page and never read it live, whatever its age. A page with no stored copy is notFound. The same as minAge 0.","type":"boolean"},"maxAge":{"description":"Accept a stored answer up to this many milliseconds old, at most 30 days. Without it, 2 days, or less for a site whose pages change often, and a copy up to twice that age (at most 7 days) comes back at once as stale while a fresh read runs. 0 always reads the page live. metadata.cacheState says which one you got.","maximum":9007199254740991,"minimum":0,"type":"integer"},"minAge":{"description":"Answer only from a stored copy that is at least this many milliseconds old, and never read the page live. 0 accepts any stored copy. A page with no such copy is notFound.","maximum":9007199254740991,"minimum":0,"type":"integer"},"mobile":{"description":"Read the page as a phone would: a phone-sized screen and the mobile version of the site. The page loads in a browser.","type":"boolean"},"onlyCleanContent":{"description":"Send true to have a model remove what onlyMainContent leaves behind in the markdown: cookie banners, ads, share widgets, breadcrumbs, sign-up prompts, comment prompts and related-article lists. It only removes whole paragraphs and lists; it never rewrites or adds text, and code blocks are always kept. Skipped with a warning when the page is too long to clean or the model does not answer. Not with zeroDataRetention. Summary, answers and highlights are made from the cleaned markdown.","type":"boolean"},"onlyMainContent":{"default":true,"description":"Keep only the page's main content, without menus, headers, footers and ads.","type":"boolean"},"parsers":{"description":"Only the pdf parser exists. Send \"pdf\" or { \"type\": \"pdf\", mode, maxPages, pages, blocks, pageMarkers } with the same meaning as in parse. Without mode a PDF is read from its text layer only; auto reads the picture of a page that has no text, and ocr reads the picture of every page, up to 20 pages. Each page of text that comes back costs 1 credit.","items":{"anyOf":[{"const":"pdf","type":"string"},{"additionalProperties":false,"properties":{"blocks":{"description":"Send true to also get the page's layout in blocks: each title, section header or run of text, with its page, reading order, position on the page (bbox as left, top, right, bottom from 0 to 1) and where its text sits in that page's markdown (span, as in pages). Tables, figures and formulas are not told apart. A page read from its picture is one block. No extra charge.","type":"boolean"},"maxPages":{"description":"Read at most this many pages, up to 100.","maximum":100,"minimum":1,"type":"integer"},"mode":{"description":"fast reads the text layer only. auto (the default) reads the text layer and reads the picture of any page that has none. ocr reads the picture of every page.","enum":["fast","auto","ocr"],"type":"string"},"pageMarkers":{"description":"Send true to mark page breaks in the markdown: pages are joined with \"---\" and a line, where N is the page that follows. No extra charge.","type":"boolean"},"pages":{"description":"Send true to also get each page's markdown in pages, as { pageNumber, markdown }. No extra charge.","type":"boolean"},"type":{"const":"pdf","type":"string"}},"required":["type"],"type":"object"}]},"minItems":1,"type":"array"},"profile":{"additionalProperties":false,"description":"Read the page with the cookies and local storage that earlier calls saved under this name, kept for your account for 30 days after the last use. A call with a profile always loads the page in a browser, costs 1 credit, the same as any page, and is never answered from a stored copy. Only one call at a time can save to a profile.","properties":{"name":{"description":"A name you choose, such as shop-login. Calls with the same name share state.","maxLength":128,"minLength":1,"type":"string"},"saveChanges":{"default":true,"description":"Keep the cookies and local storage this read leaves behind for the next call with this name. Send false to read with the profile without changing it.","type":"boolean"}},"required":["name"],"type":"object"},"proxy":{"description":"auto: basic first, enhanced once if the site refuses. basic: one plain attempt. enhanced: the stronger read from the start. Same price.","enum":["auto","basic","enhanced"],"type":"string"},"redactPII":{"anyOf":[{"type":"boolean"},{"additionalProperties":false,"description":"Options for redactPII.","properties":{"entities":{"default":["PERSON","EMAIL","PHONE","LOCATION","FINANCIAL","SECRET"],"description":"What to hide: PERSON, EMAIL, PHONE, LOCATION, FINANCIAL, SECRET. All by default.","items":{"enum":["PERSON","EMAIL","PHONE","LOCATION","FINANCIAL","SECRET"],"type":"string"},"minItems":1,"type":"array"},"mode":{"default":"accurate","description":"accurate finds names and places with the model and the rest by pattern. aggressive adds guesses that catch more and may hide a little too much. fast uses patterns only, so it finds no ordinary names or places.","enum":["accurate","aggressive","fast"],"type":"string"},"replaceStyle":{"default":"tag","description":"tag writes <EMAIL>, mask writes * for each character, remove deletes it.","enum":["tag","mask","remove"],"type":"string"}},"type":"object"}],"description":"Send true, or an object, to hide personal data in the markdown and in everything made from it (summary, answers, highlights, json). Links, html and rawHtml are not changed. A page the model cannot scan is refused rather than returned unredacted."},"removeBase64Images":{"description":"Images inside the page that carry their data in the address (data:image) are dropped by default. Send false to keep them in markdown and html.","type":"boolean"},"robotsUserAgent":{"not":{}},"skipTlsVerification":{"description":"Send true to read a page whose certificate is expired, self-signed or for another name. The read is not private against someone between us and the site.","type":"boolean"},"storeInCache":{"default":true,"description":"Send false to neither read nor keep a stored copy of this page.","type":"boolean"},"threatProtection":{"not":{}},"timeout":{"description":"How long to keep trying, in milliseconds, between 10 seconds and 2 minutes. Pages behind a bot check can need 10 to 30 seconds the first time.","maximum":300000,"minimum":1000,"type":"integer"},"toolDetail":{"not":{}},"waitFor":{"description":"Extra milliseconds to wait before reading, up to 60000, for pages that load their content late. To wait for an element, add a wait action with a selector. A read that waits costs 1 credit, the same as any page.","maximum":60000,"minimum":0,"type":"integer"},"zeroDataRetention":{"default":false,"description":"Send true to keep nothing from this call: no stored copy is read or made, and nothing from it is logged. Costs 1 credit more per page. Not with a screenshot.","type":"boolean"}},"type":"object"},"sitemap":{"default":"include","description":"include also uses the site's sitemaps. only reads just the pages the sitemaps name. skip ignores them.","enum":["skip","include","only"],"type":"string"},"threatProtection":{"not":{}},"url":{"description":"The page to start from, such as https://bun.com/docs.","type":"string"},"webhook":{"anyOf":[{"type":"string"},{"additionalProperties":false,"properties":{"events":{"items":{"enum":["started","page","action","completed","failed","cancelled"],"type":"string"},"minItems":1,"type":"array"},"headers":{"additionalProperties":{"maxLength":1000,"type":"string"},"propertyNames":{"pattern":"^[A-Za-z0-9-]{1,64}$","type":"string"},"type":"object"},"metadata":{"additionalProperties":{"$ref":"#/definitions/__schema0"},"propertyNames":{"type":"string"},"type":"object"},"url":{"type":"string"}},"required":["url"],"type":"object"}],"description":"Where to be told about the job: a plain address, or { url } which gets a JSON POST when the job starts, for each finished page, and when the job ends. headers are sent with every call, metadata comes back in every call, and events picks which of started, page, action, completed, failed and cancelled to send (all by default). An agent run sends action for each step it takes, and page too. Every call is signed: read Stophy-Signature (t=<unix seconds>,v1=<hex>), where v1 is the HMAC-SHA256 of \"<t>.<body>\" with your webhook secret from webhook.secret. A call that gets no 2xx is sent again, up to 3 times. If your address answers slowly, a page event can carry only the page url. Read that page with the status call."},"zeroDataRetention":{"default":false,"description":"Send true to keep nothing from this crawl: no stored copy is read or made, page results are held for one hour at most, and nothing is logged. Costs 1 credit more per page.","type":"boolean"}},"required":["url"],"type":"object"}before
{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"definitions":{"__schema0":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"items":{"allOf":[{"$ref":"#/definitions/__schema0"}]},"type":"array"},{"additionalProperties":{"allOf":[{"$ref":"#/definitions/__schema0"}]},"propertyNames":{"type":"string"},"type":"object"}]},"__schema1":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"items":{"allOf":[{"$ref":"#/definitions/__schema1"}]},"type":"array"},{"additionalProperties":{"allOf":[{"$ref":"#/definitions/__schema1"}]},"propertyNames":{"type":"string"},"type":"object"}]},"__schema2":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"items":{"allOf":[{"$ref":"#/definitions/__schema2"}]},"type":"array"},{"additionalProperties":{"allOf":[{"$ref":"#/definitions/__schema2"}]},"propertyNames":{"type":"string"},"type":"object"}]}},"properties":{"agent":{"additionalProperties":false,"description":"Accepted so a client that sends { model: \"FIRE-1\" } works. An extract reads the pages it is given and checks every value; it does not browse or click, and the answer says so in warning. To navigate a site, use the agent endpoint.","properties":{"model":{"maxLength":40,"minLength":1,"type":"string"}},"required":["model"],"type":"object"},"alexandria":{"not":{}},"allowExternalLinks":{"default":false,"description":"Send true to also read pages on other sites that the pages link to, up to 5, picking the links whose address mentions your prompt. Each page read costs 1 credit.","type":"boolean"},"auditMetadata":{"not":{}},"domainTools":{"const":false,"type":"boolean"},"enableWebSearch":{"default":false,"description":"Send true to also search the web for your prompt and read the best pages it finds, up to 3 more. Needs a prompt. Costs 2 credits for the search. With no urls, the search runs without this.","type":"boolean"},"ignoreInvalidURLs":{"default":true,"description":"Skip addresses that are not public website URLs. Send false to refuse the call instead.","type":"boolean"},"ignoreRobotsTxt":{"const":false,"type":"boolean"},"ignoreSitemap":{"default":false,"description":"For an address ending in /*: skip the site's sitemaps and find pages by links.","type":"boolean"},"includeSubdomains":{"default":true,"description":"For an address ending in /*: also read pages on subdomains of the site. Send false to stay on the exact host.","type":"boolean"},"prompt":{"description":"What to pull from the pages in plain words, such as the version and the release date, up to 10000 characters. With no urls, the web is searched for the first 400 characters of it.","maxLength":10000,"minLength":1,"type":"string"},"robotsUserAgent":{"not":{}},"schema":{"additionalProperties":{"$ref":"#/definitions/__schema0"},"description":"The fields to fill, as a JSON Schema (draft-07 or 2020-12) object with properties. Pydantic's model_json_schema() and zod's toJSONSchema() output work as they are. enum, const, anyOf, oneOf, nullable types, $ref with $defs, required, descriptions and any key names are read. Up to 100 top-level fields and 32 KB. A field the page does not state comes back null.","propertyNames":{"type":"string"},"type":"object"},"scrapeOptions":{"additionalProperties":{},"description":"How to read each page, the same options as scrape.","properties":{"actions":{"description":"Up to 50 steps to run on the page, in order, before reading it: { \"type\": \"wait\", \"milliseconds\": 500 } (up to 30 seconds), { \"type\": \"wait\", \"selector\": \".results\" }, { \"type\": \"click\", \"selector\": \"button.more\" }, { \"type\": \"write\", \"text\": \"tides\" }, { \"type\": \"press\", \"key\": \"Enter\" }, { \"type\": \"scroll\", \"direction\": \"down\" } (also up, left or right; amount is pixels, \"viewport\" or \"max\"; maxScrolls 1 to 50; selector scrolls an inner container; \"max\" keeps scrolling until the page stops growing, for feeds that load as you go), { \"type\": \"screenshot\", \"fullPage\": true } (links come back in actions.screenshots), { \"type\": \"scrape\" } (the page at that point, in actions.scrapes), { \"type\": \"executeJavascript\", \"script\": \"document.title\" } (results in actions.javascriptReturns), { \"type\": \"pdf\", \"format\": \"A4\" } (links in actions.pdfs) or { \"type\": \"perform\", \"action\": \"Click the Load more button\" } (a step in plain words, up to 5 browser steps on this page, never leaving the site; at most 5 per call). A read with actions costs 1 credit, the same as any page; the actions themselves add nothing. If an action fails, you still get the page as it stood, with a warning that names the action and says why.","items":{"anyOf":[{"additionalProperties":false,"properties":{"milliseconds":{"maximum":30000,"minimum":1,"type":"integer"},"type":{"const":"wait","type":"string"}},"required":["type","milliseconds"],"type":"object"},{"additionalProperties":false,"properties":{"selector":{"minLength":1,"type":"string"},"type":{"const":"wait","type":"string"}},"required":["type","selector"],"type":"object"},{"additionalProperties":false,"properties":{"all":{"const":false,"type":"boolean"},"selector":{"minLength":1,"type":"string"},"type":{"const":"click","type":"string"}},"required":["type","selector"],"type":"object"},{"additionalProperties":false,"properties":{"text":{"minLength":1,"type":"string"},"type":{"const":"write","type":"string"}},"required":["type","text"],"type":"object"},{"additionalProperties":false,"properties":{"key":{"maxLength":40,"minLength":1,"type":"string"},"type":{"const":"press","type":"string"}},"required":["type","key"],"type":"object"},{"additionalProperties":false,"properties":{"amount":{"anyOf":[{"maximum":100000,"minimum":1,"type":"integer"},{"enum":["viewport","max"],"type":"string"}]},"direction":{"default":"down","enum":["up","down","left","right"],"type":"string"},"maxScrolls":{"maximum":50,"minimum":1,"type":"integer"},"selector":{"minLength":1,"type":"string"},"type":{"const":"scroll","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"fullPage":{"type":"boolean"},"quality":{"maximum":100,"minimum":1,"type":"integer"},"type":{"const":"screenshot","type":"string"},"viewport":{"additionalProperties":false,"properties":{"height":{"maximum":2160,"minimum":200,"type":"integer"},"width":{"maximum":3840,"minimum":200,"type":"integer"}},"required":["width","height"],"type":"object"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"type":{"const":"scrape","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"script":{"maxLength":20000,"minLength":1,"type":"string"},"type":{"const":"executeJavascript","type":"string"}},"required":["type","script"],"type":"object"},{"additionalProperties":false,"properties":{"format":{"enum":["Letter","Legal","Tabloid","Ledger","A0","A1","A2","A3","A4","A5","A6"],"type":"string"},"landscape":{"type":"boolean"},"scale":{"maximum":2,"minimum":0.1,"type":"number"},"type":{"const":"pdf","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"action":{"maxLength":500,"minLength":1,"type":"string"},"type":{"const":"perform","type":"string"}},"required":["type","action"],"type":"object"}]},"maxItems":50,"minItems":1,"type":"array"},"alexandria":{"not":{}},"auditMetadata":{"not":{}},"blockAds":{"description":"Ads and trackers are not loaded when a page runs in a browser. Send false to load them.","type":"boolean"},"checkPromptInjection":{"description":"Send true to scan the page text for instructions aimed at an AI model before anything is built from it. A page that has them is refused with 403 promptInjectionDetected and costs nothing. The scan adds 4 credits when it runs; a page it cannot scan fully comes back with a warning and no charge.","type":"boolean"},"domainTools":{"const":false,"type":"boolean"},"excludeTags":{"description":"Remove the parts of the page that match these CSS selectors, such as .comments.","items":{"minLength":1,"type":"string"},"minItems":1,"type":"array"},"fastMode":{"description":"Send true to read the page without opening a browser: the answer comes sooner, but a page that needs a browser, or that refuses a plain request, comes back as an error instead of being retried. Ignored when the call needs a browser (actions, screenshot, waitFor, mobile, profile, network, branding).","type":"boolean"},"formats":{"default":["markdown"],"description":"What to return: markdown (clean page text), summary (a short summary of the page), html (the cleaned page), rawHtml (the page as sent), audio and video (for a YouTube link: the audio track as an M4A file, or the video as an MP4 file, as a link that works for 1 hour), rawBase64 (the bytes the site sent, Base64 encoded, from a live read; metadata.contentType says what they are), links (every link on the page), images (every image address), screenshot (a link to a JPEG of the visible page, kept for 7 days), changeTracking (what changed in the markdown since your key last read this page with the same options, kept 30 days; add modes [\"git-diff\",\"json\"] with a schema or prompt to compare fields too), question (send { \"type\": \"question\", \"question\": \"...\" } to get answer, null when the page does not state one), product (title, brand, category, url, description and variants with price, sale, availability and images, or null) and menu (merchant, currency and sections of items with prices, or null) network (the JSON the page loaded while it rendered, up to 30 responses) and branding (the page's colors, fonts, typography, spacing, button and input styles, logo and brand images, read from how the page looks, with a field left out when the page does not show it). Send { \"type\": \"screenshot\", \"fullPage\": true } for the whole page. Send { \"type\": \"highlights\", \"query\": \"refund policy\" } for the passages that best match a query. Send { \"type\": \"json\", \"schema\": { \"type\": \"object\", \"properties\": { \"price\": { \"type\": \"number\" } } } } or { \"type\": \"json\", \"prompt\": \"the price and the stock\" } for fields filled from the page, each checked against it. Send { \"type\": \"json\", \"parser\": \"amazon-product\" } to get a site's own data as json instead of reading the page; GET /v1/parsers lists the parsers. Send { \"type\": \"json\", \"rules\": { \"title\": \"h1\", \"links\": { \"selector\": \"a\", \"type\": \"list\", \"output\": \"@href\" } } } to read the page with CSS rules and no model, at the page's own price. Send { \"type\": \"attributes\", \"selectors\": [{ \"selector\": \"a\", \"attribute\": \"href\" }] } for attribute values, returned in attributes. Without a parser or rules, json needs a schema or a prompt and is filled from the page. json with a schema or a prompt, summary, highlights, question, product, menu and changeTracking in json mode cost 4 credits more each when they return something. json with rules or a parser, and attributes, cost nothing more. A screenshot, network or branding read costs 1 credit, the same as any page. A PDF comes back as markdown only, and costs 1 credit more for each page read.","items":{"anyOf":[{"enum":["markdown","summary","html","rawHtml","rawBase64","links","images","network","branding","audio","video","screenshot","changeTracking","product","menu"],"type":"string"},{"additionalProperties":false,"properties":{"type":{"enum":["markdown","summary","html","rawHtml","rawBase64","links","images","network","branding","audio","video"],"type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"modes":{"description":"git-diff returns a unified diff of the markdown. json compares the fields in schema or prompt between this read and the last one. Without modes you get git-diff.","items":{"enum":["git-diff","json"],"type":"string"},"maxItems":2,"type":"array"},"prompt":{"description":"With json mode: what to compare, in plain words, such as the price and stock.","maxLength":10000,"minLength":1,"type":"string"},"schema":{"additionalProperties":{"$ref":"#/definitions/__schema0"},"description":"The fields to fill, as a JSON Schema (draft-07 or 2020-12) object with properties. Pydantic's model_json_schema() and zod's toJSONSchema() output work as they are. enum, const, anyOf, oneOf, nullable types, $ref with $defs, required, descriptions and any key names are read. Up to 100 top-level fields and 32 KB. A field the page does not state comes back null.","propertyNames":{"type":"string"},"type":"object"},"tag":{"type":"null"},"type":{"const":"changeTracking","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"question":{"description":"A question to answer from the page, such as what the refund window is.","maxLength":10000,"minLength":1,"type":"string"},"type":{"const":"question","type":"string"}},"required":["type","question"],"type":"object"},{"additionalProperties":false,"properties":{"type":{"const":"product","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"type":{"const":"menu","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"fullPage":{"default":false,"description":"Capture the whole page from top to bottom instead of the visible part.","type":"boolean"},"quality":{"description":"JPEG quality from 1 to 100. The default is 70.","maximum":100,"minimum":1,"type":"integer"},"type":{"const":"screenshot","type":"string"},"viewport":{"additionalProperties":false,"description":"The window size in pixels, such as { width: 390, height: 844 }.","properties":{"height":{"maximum":2160,"minimum":200,"type":"integer"},"width":{"maximum":3840,"minimum":200,"type":"integer"}},"required":["width","height"],"type":"object"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"count":{"default":5,"description":"How many passages to return, best match first.","maximum":20,"minimum":1,"type":"integer"},"query":{"description":"What you are looking for on the page, such as refund policy.","maxLength":10000,"minLength":1,"type":"string"},"type":{"const":"highlights","type":"string"}},"required":["type","query"],"type":"object"},{"additionalProperties":false,"properties":{"checkPromptInjection":{"description":"Deprecated: send checkPromptInjection at the top level of the call.","type":"boolean"},"options":{"additionalProperties":{"$ref":"#/definitions/__schema1"},"description":"Only with parser: extra inputs for it, such as { \"page\": 2 } for the next page of results or { \"minRating\": 4.5 } for a filter. GET /v1/parsers lists what each parser accepts.","propertyNames":{"type":"string"},"type":"object"},"parser":{"description":"Read the page with a named parser, which gives the site's own data as json. The url must be the kind of page the parser reads. Parsers are the only way to read some sites. GET /v1/parsers lists them.","type":"string"},"prompt":{"description":"What to pull from the page in plain words, such as the version and the release date.","maxLength":10000,"minLength":1,"type":"string"},"rules":{"additionalProperties":{"$ref":"#/definitions/__schema2"},"description":"Read the page with CSS rules instead of a model, no extra fee. Each field is a selector such as \"h1\" (the first match's text), \"a@href\" (an attribute) or { \"selector\": \"li\", \"type\": \"list\", \"output\": \"text\" | \"html\" | \"@attribute\" | { nested fields } }. A missing item is null and an unmatched list is []. Relative links become absolute. Up to 100 fields, 5 levels deep. Not with schema, prompt or parser.","propertyNames":{"type":"string"},"type":"object"},"schema":{"additionalProperties":{"$ref":"#/definitions/__schema0"},"description":"The fields to fill, as a JSON Schema (draft-07 or 2020-12) object with properties. Pydantic's model_json_schema() and zod's toJSONSchema() output work as they are. enum, const, anyOf, oneOf, nullable types, $ref with $defs, required, descriptions and any key names are read. Up to 100 top-level fields and 32 KB. A field the page does not state comes back null.","propertyNames":{"type":"string"},"type":"object"},"type":{"const":"json","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"selectors":{"description":"The elements and attributes to read, such as { selector: 'a.buy', attribute: 'href' }.","items":{"additionalProperties":false,"properties":{"attribute":{"maxLength":100,"minLength":1,"type":"string"},"selector":{"minLength":1,"type":"string"}},"required":["selector","attribute"],"type":"object"},"maxItems":50,"minItems":1,"type":"array"},"type":{"const":"attributes","type":"string"}},"required":["type","selectors"],"type":"object"}]},"maxItems":20,"minItems":1,"type":"array"},"headers":{"additionalProperties":{"maxLength":2000,"pattern":"^[\\t\\x20-\\x7e]*$","type":"string"},"description":"Extra request headers to send to the site, such as { \"x-plan\": \"pro\" }. A read with headers is never answered from or saved to a stored copy.","propertyNames":{"pattern":"^[A-Za-z0-9-]{1,64}$","type":"string"},"type":"object"},"ignoreRobotsTxt":{"const":false,"type":"boolean"},"includeTags":{"description":"Keep only the parts of the page that match these CSS selectors, such as article or .price. When set, onlyMainContent is not applied.","items":{"minLength":1,"type":"string"},"minItems":1,"type":"array"},"location":{"additionalProperties":false,"description":"Where to read the page from. The default is the United States.","properties":{"country":{"description":"Two-letter country code to read the page from, such as DE or JP.","type":"string"},"languages":{"description":"Languages to ask the site for, best first, such as [\"de\", \"en\"]. Sent as Accept-Language. A read with languages is never answered from or saved to a stored copy.","items":{"pattern":"^[A-Za-z]{2,3}(?:-[A-Za-z0-9]{2,8})*$","type":"string"},"maxItems":5,"minItems":1,"type":"array"}},"type":"object"},"lockdown":{"description":"Send true to answer only from a stored copy of the page and never read it live, whatever its age. A page with no stored copy is notFound. The same as minAge 0.","type":"boolean"},"maxAge":{"description":"Accept a stored answer up to this many milliseconds old, at most 30 days. Without it, 2 days, or less for a site whose pages change often, and a copy up to twice that age (at most 7 days) comes back at once as stale while a fresh read runs. 0 always reads the page live. metadata.cacheState says which one you got.","maximum":9007199254740991,"minimum":0,"type":"integer"},"minAge":{"description":"Answer only from a stored copy that is at least this many milliseconds old, and never read the page live. 0 accepts any stored copy. A page with no such copy is notFound.","maximum":9007199254740991,"minimum":0,"type":"integer"},"mobile":{"description":"Read the page as a phone would: a phone-sized screen and the mobile version of the site. The page loads in a browser.","type":"boolean"},"onlyCleanContent":{"description":"Send true to have a model remove what onlyMainContent leaves behind in the markdown: cookie banners, ads, share widgets, breadcrumbs, sign-up prompts, comment prompts and related-article lists. It only removes whole paragraphs and lists; it never rewrites or adds text, and code blocks are always kept. Skipped with a warning when the page is too long to clean or the model does not answer. Not with zeroDataRetention. Summary, answers and highlights are made from the cleaned markdown.","type":"boolean"},"onlyMainContent":{"default":true,"description":"Keep only the page's main content, without menus, headers, footers and ads.","type":"boolean"},"parsers":{"description":"Only the pdf parser exists. Send \"pdf\" or { \"type\": \"pdf\", mode, maxPages, pages, blocks, pageMarkers } with the same meaning as in parse. Without mode a PDF is read from its text layer only; auto reads the picture of a page that has no text, and ocr reads the picture of every page, up to 20 pages. Each page read costs 1 credit.","items":{"anyOf":[{"const":"pdf","type":"string"},{"additionalProperties":false,"properties":{"blocks":{"description":"Send true to also get the page's layout in blocks: each title, section header or run of text, with its page, reading order, position on the page (bbox as left, top, right, bottom from 0 to 1) and where its text sits in that page's markdown (span, as in pages). Tables, figures and formulas are not told apart. A page read from its picture is one block. No extra charge.","type":"boolean"},"maxPages":{"description":"Read at most this many pages, up to 100.","maximum":100,"minimum":1,"type":"integer"},"mode":{"description":"fast reads the text layer only. auto (the default) reads the text layer and reads the picture of any page that has none. ocr reads the picture of every page.","enum":["fast","auto","ocr"],"type":"string"},"pageMarkers":{"description":"Send true to mark page breaks in the markdown: pages are joined with \"---\" and a line, where N is the page that follows. No extra charge.","type":"boolean"},"pages":{"description":"Send true to also get each page's markdown in pages, as { pageNumber, markdown }. No extra charge.","type":"boolean"},"type":{"const":"pdf","type":"string"}},"required":["type"],"type":"object"}]},"minItems":1,"type":"array"},"profile":{"additionalProperties":false,"description":"Read the page with the cookies and local storage that earlier calls saved under this name, kept for your account for 30 days after the last use. A call with a profile always loads the page in a browser, costs 1 credit, the same as any page, and is never answered from a stored copy. Only one call at a time can save to a profile.","properties":{"name":{"description":"A name you choose, such as shop-login. Calls with the same name share state.","maxLength":128,"minLength":1,"type":"string"},"saveChanges":{"default":true,"description":"Keep the cookies and local storage this read leaves behind for the next call with this name. Send false to read with the profile without changing it.","type":"boolean"}},"required":["name"],"type":"object"},"proxy":{"description":"auto: basic first, enhanced once if the site refuses. basic: one plain attempt. enhanced: the stronger read from the start. Same price.","enum":["auto","basic","enhanced"],"type":"string"},"redactPII":{"anyOf":[{"type":"boolean"},{"additionalProperties":false,"description":"Options for redactPII.","properties":{"entities":{"default":["PERSON","EMAIL","PHONE","LOCATION","FINANCIAL","SECRET"],"description":"What to hide: PERSON, EMAIL, PHONE, LOCATION, FINANCIAL, SECRET. All by default.","items":{"enum":["PERSON","EMAIL","PHONE","LOCATION","FINANCIAL","SECRET"],"type":"string"},"minItems":1,"type":"array"},"mode":{"default":"accurate","description":"accurate finds names and places with the model and the rest by pattern. aggressive adds guesses that catch more and may hide a little too much. fast uses patterns only, so it finds no ordinary names or places.","enum":["accurate","aggressive","fast"],"type":"string"},"replaceStyle":{"default":"tag","description":"tag writes <EMAIL>, mask writes * for each character, remove deletes it.","enum":["tag","mask","remove"],"type":"string"}},"type":"object"}],"description":"Send true, or an object, to hide personal data in the markdown and in everything made from it (summary, answers, highlights, json). Links, html and rawHtml are not changed. A page the model cannot scan is refused rather than returned unredacted."},"removeBase64Images":{"description":"Images inside the page that carry their data in the address (data:image) are dropped by default. Send false to keep them in markdown and html.","type":"boolean"},"robotsUserAgent":{"not":{}},"skipTlsVerification":{"description":"Send true to read a page whose certificate is expired, self-signed or for another name. The read is not private against someone between us and the site.","type":"boolean"},"storeInCache":{"default":true,"description":"Send false to neither read nor keep a stored copy of this page.","type":"boolean"},"threatProtection":{"not":{}},"timeout":{"description":"How long to keep trying, in milliseconds, between 10 seconds and 2 minutes. Pages behind a bot check can need 10 to 30 seconds the first time.","maximum":300000,"minimum":1000,"type":"integer"},"toolDetail":{"not":{}},"waitFor":{"description":"Extra milliseconds to wait before reading, up to 60000, for pages that load their content late. To wait for an element, add a wait action with a selector. A read that waits costs 1 credit, the same as any page.","maximum":60000,"minimum":0,"type":"integer"},"zeroDataRetention":{"default":false,"description":"Send true to keep nothing from this call: no stored copy is read or made, and nothing from it is logged. Costs 1 credit more per page. Not with a screenshot.","type":"boolean"}},"type":"object"},"showSources":{"default":false,"description":"Send true to get sources: for each field, the pages that state its value.","type":"boolean"},"systemPrompt":{"description":"Standing instructions for how to fill the fields, such as units or how to write dates, up to 10000 characters. They add to the rules of the extract: a value is still copied from the page and is null when the page does not state it.","maxLength":10000,"minLength":1,"type":"string"},"threatProtection":{"not":{}},"urls":{"default":[],"description":"The pages to read, up to 25, such as [\"https://bun.com/blog/bun-v1.3\"]. An address ending in /* reads pages under it, found through the site's sitemap. With more than one, the fields are filled from all of them together. A page that cannot be read is skipped and named in warning, and costs nothing. A page is read up to 50000 characters. With several pages each one gets a smaller share, and all together are read up to 150000 characters. A page that is cut is counted in warning. The call fails only when no page can be read. Leave it out and send a prompt to search the web instead.","items":{"maxLength":2048,"type":"string"},"maxItems":25,"type":"array"},"webhook":{"anyOf":[{"type":"string"},{"additionalProperties":false,"properties":{"events":{"items":{"enum":["started","page","action","completed","failed","cancelled"],"type":"string"},"minItems":1,"type":"array"},"headers":{"additionalProperties":{"maxLength":1000,"type":"string"},"propertyNames":{"pattern":"^[A-Za-z0-9-]{1,64}$","type":"string"},"type":"object"},"metadata":{"additionalProperties":{"$ref":"#/definitions/__schema0"},"propertyNames":{"type":"string"},"type":"object"},"url":{"type":"string"}},"required":["url"],"type":"object"}],"description":"Where to be told when the extract ends: a plain address, or { url } which gets one JSON POST with the id, the status, the data and creditsUsed. headers are sent with the call, metadata comes back in it, and events picks completed, failed or both (both by default). The call is signed: read Stophy-Signature (t=<unix seconds>,v1=<hex>), the HMAC-SHA256 of \"<t>.<body>\" with your webhook secret from webhook.secret. A call that gets no 2xx is sent again, up to 3 times."},"zeroDataRetention":{"default":false,"description":"Send true to keep nothing from this call: pages are read live, the result is held for one hour at most, and nothing is logged. Costs 1 credit more per page.","type":"boolean"}},"type":"object"}after
{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"definitions":{"__schema0":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"items":{"allOf":[{"$ref":"#/definitions/__schema0"}]},"type":"array"},{"additionalProperties":{"allOf":[{"$ref":"#/definitions/__schema0"}]},"propertyNames":{"type":"string"},"type":"object"}]},"__schema1":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"items":{"allOf":[{"$ref":"#/definitions/__schema1"}]},"type":"array"},{"additionalProperties":{"allOf":[{"$ref":"#/definitions/__schema1"}]},"propertyNames":{"type":"string"},"type":"object"}]},"__schema2":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"items":{"allOf":[{"$ref":"#/definitions/__schema2"}]},"type":"array"},{"additionalProperties":{"allOf":[{"$ref":"#/definitions/__schema2"}]},"propertyNames":{"type":"string"},"type":"object"}]}},"properties":{"agent":{"additionalProperties":false,"description":"Accepted so a client that sends { model: \"FIRE-1\" } works. An extract reads the pages it is given and checks every value; it does not browse or click, and the answer says so in warning. To navigate a site, use the agent endpoint.","properties":{"model":{"maxLength":40,"minLength":1,"type":"string"}},"required":["model"],"type":"object"},"alexandria":{"not":{}},"allowExternalLinks":{"default":false,"description":"Send true to also read pages on other sites that the pages link to, up to 5, picking the links whose address mentions your prompt. Each page read costs 1 credit.","type":"boolean"},"auditMetadata":{"not":{}},"domainTools":{"const":false,"type":"boolean"},"enableWebSearch":{"default":false,"description":"Send true to also search the web for your prompt and read the best pages it finds, up to 3 more. Needs a prompt. Costs 2 credits for the search. With no urls, the search runs without this.","type":"boolean"},"ignoreInvalidURLs":{"default":true,"description":"Skip addresses that are not public website URLs. Send false to refuse the call instead.","type":"boolean"},"ignoreRobotsTxt":{"const":false,"type":"boolean"},"ignoreSitemap":{"default":false,"description":"For an address ending in /*: skip the site's sitemaps and find pages by links.","type":"boolean"},"includeSubdomains":{"default":true,"description":"For an address ending in /*: also read pages on subdomains of the site. Send false to stay on the exact host.","type":"boolean"},"prompt":{"description":"What to pull from the pages in plain words, such as the version and the release date, up to 10000 characters. With no urls, the web is searched for the first 400 characters of it.","maxLength":10000,"minLength":1,"type":"string"},"robotsUserAgent":{"not":{}},"schema":{"additionalProperties":{"$ref":"#/definitions/__schema0"},"description":"The fields to fill, as a JSON Schema (draft-07 or 2020-12) object with properties. Pydantic's model_json_schema() and zod's toJSONSchema() output work as they are. enum, const, anyOf, oneOf, nullable types, $ref with $defs, required, descriptions and any key names are read. Up to 100 top-level fields and 32 KB. A field the page does not state comes back null.","propertyNames":{"type":"string"},"type":"object"},"scrapeOptions":{"additionalProperties":{},"description":"How to read each page, the same options as scrape.","properties":{"actions":{"description":"Up to 50 steps to run on the page, in order, before reading it: { \"type\": \"wait\", \"milliseconds\": 500 } (up to 30 seconds), { \"type\": \"wait\", \"selector\": \".results\" }, { \"type\": \"click\", \"selector\": \"button.more\" }, { \"type\": \"write\", \"text\": \"tides\" }, { \"type\": \"press\", \"key\": \"Enter\" }, { \"type\": \"scroll\", \"direction\": \"down\" } (also up, left or right; amount is pixels, \"viewport\" or \"max\"; maxScrolls 1 to 50; selector scrolls an inner container; \"max\" keeps scrolling until the page stops growing, for feeds that load as you go), { \"type\": \"screenshot\", \"fullPage\": true } (links come back in actions.screenshots), { \"type\": \"scrape\" } (the page at that point, in actions.scrapes), { \"type\": \"executeJavascript\", \"script\": \"document.title\" } (results in actions.javascriptReturns), { \"type\": \"pdf\", \"format\": \"A4\" } (links in actions.pdfs) or { \"type\": \"perform\", \"action\": \"Click the Load more button\" } (a step in plain words, up to 5 browser steps on this page, never leaving the site; at most 5 per call). A read with actions costs 1 credit, the same as any page; the actions themselves add nothing. If an action fails, you still get the page as it stood, with a warning that names the action and says why.","items":{"anyOf":[{"additionalProperties":false,"properties":{"milliseconds":{"maximum":30000,"minimum":1,"type":"integer"},"type":{"const":"wait","type":"string"}},"required":["type","milliseconds"],"type":"object"},{"additionalProperties":false,"properties":{"selector":{"minLength":1,"type":"string"},"type":{"const":"wait","type":"string"}},"required":["type","selector"],"type":"object"},{"additionalProperties":false,"properties":{"all":{"const":false,"type":"boolean"},"selector":{"minLength":1,"type":"string"},"type":{"const":"click","type":"string"}},"required":["type","selector"],"type":"object"},{"additionalProperties":false,"properties":{"text":{"minLength":1,"type":"string"},"type":{"const":"write","type":"string"}},"required":["type","text"],"type":"object"},{"additionalProperties":false,"properties":{"key":{"maxLength":40,"minLength":1,"type":"string"},"type":{"const":"press","type":"string"}},"required":["type","key"],"type":"object"},{"additionalProperties":false,"properties":{"amount":{"anyOf":[{"maximum":100000,"minimum":1,"type":"integer"},{"enum":["viewport","max"],"type":"string"}]},"direction":{"default":"down","enum":["up","down","left","right"],"type":"string"},"maxScrolls":{"maximum":50,"minimum":1,"type":"integer"},"selector":{"minLength":1,"type":"string"},"type":{"const":"scroll","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"fullPage":{"type":"boolean"},"quality":{"maximum":100,"minimum":1,"type":"integer"},"type":{"const":"screenshot","type":"string"},"viewport":{"additionalProperties":false,"properties":{"height":{"maximum":2160,"minimum":200,"type":"integer"},"width":{"maximum":3840,"minimum":200,"type":"integer"}},"required":["width","height"],"type":"object"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"type":{"const":"scrape","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"script":{"maxLength":20000,"minLength":1,"type":"string"},"type":{"const":"executeJavascript","type":"string"}},"required":["type","script"],"type":"object"},{"additionalProperties":false,"properties":{"format":{"enum":["Letter","Legal","Tabloid","Ledger","A0","A1","A2","A3","A4","A5","A6"],"type":"string"},"landscape":{"type":"boolean"},"scale":{"maximum":2,"minimum":0.1,"type":"number"},"type":{"const":"pdf","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"action":{"maxLength":500,"minLength":1,"type":"string"},"type":{"const":"perform","type":"string"}},"required":["type","action"],"type":"object"}]},"maxItems":50,"minItems":1,"type":"array"},"alexandria":{"not":{}},"auditMetadata":{"not":{}},"blockAds":{"description":"Ads and trackers are not loaded when a page runs in a browser. Send false to load them.","type":"boolean"},"checkPromptInjection":{"description":"Send true to scan the page text for instructions aimed at an AI model before anything is built from it. A page that has them is refused with 403 promptInjectionDetected and costs nothing. The scan adds 4 credits when it runs; a page it cannot scan fully comes back with a warning and no charge.","type":"boolean"},"domainTools":{"const":false,"type":"boolean"},"excludeTags":{"description":"Remove the parts of the page that match these CSS selectors, such as .comments.","items":{"minLength":1,"type":"string"},"minItems":1,"type":"array"},"fastMode":{"description":"Send true to read the page without opening a browser: the answer comes sooner, but a page that needs a browser, or that refuses a plain request, comes back as an error instead of being retried. Ignored when the call needs a browser (actions, screenshot, waitFor, mobile, profile, network, branding).","type":"boolean"},"formats":{"default":["markdown"],"description":"What to return: markdown (clean page text), summary (a short summary of the page), html (the cleaned page), rawHtml (the page as sent), audio and video (for a YouTube link: the audio track as an M4A file, or the video as an MP4 file, as a link that works for 1 hour), rawBase64 (the bytes the site sent, Base64 encoded, from a live read; metadata.contentType says what they are), links (every link on the page), images (every image address), screenshot (a link to a JPEG of the visible page, kept for 7 days), changeTracking (what changed in the markdown since your key last read this page with the same options, kept 30 days; add modes [\"git-diff\",\"json\"] with a schema or prompt to compare fields too), question (send { \"type\": \"question\", \"question\": \"...\" } to get answer, null when the page does not state one), product (title, brand, category, url, description and variants with price, sale, availability and images, or null) and menu (merchant, currency and sections of items with prices, or null) network (the JSON the page loaded while it rendered, up to 30 responses) and branding (the page's colors, fonts, typography, spacing, button and input styles, logo and brand images, read from how the page looks, with a field left out when the page does not show it). Send { \"type\": \"screenshot\", \"fullPage\": true } for the whole page. Send { \"type\": \"highlights\", \"query\": \"refund policy\" } for the passages that best match a query. Send { \"type\": \"json\", \"schema\": { \"type\": \"object\", \"properties\": { \"price\": { \"type\": \"number\" } } } } or { \"type\": \"json\", \"prompt\": \"the price and the stock\" } for fields filled from the page, each checked against it. Send { \"type\": \"json\", \"parser\": \"amazon-product\" } to get a site's own data as json instead of reading the page; GET /v1/parsers lists the parsers. Send { \"type\": \"json\", \"rules\": { \"title\": \"h1\", \"links\": { \"selector\": \"a\", \"type\": \"list\", \"output\": \"@href\" } } } to read the page with CSS rules and no model, at the page's own price. Send { \"type\": \"attributes\", \"selectors\": [{ \"selector\": \"a\", \"attribute\": \"href\" }] } for attribute values, returned in attributes. Without a parser or rules, json needs a schema or a prompt and is filled from the page. json with a schema or a prompt, summary, highlights, question, product, menu and changeTracking in json mode cost 4 credits more each when they return something. json with rules or a parser, and attributes, cost nothing more. A screenshot, network or branding read costs 1 credit, the same as any page. A PDF comes back as markdown only, and costs 1 credit more for each page of text that comes back. A CSV or an Excel .xlsx file comes back as markdown tables.","items":{"anyOf":[{"enum":["markdown","summary","html","rawHtml","rawBase64","links","images","network","branding","audio","video","screenshot","changeTracking","product","menu"],"type":"string"},{"additionalProperties":false,"properties":{"type":{"enum":["markdown","summary","html","rawHtml","rawBase64","links","images","network","branding","audio","video"],"type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"modes":{"description":"git-diff returns a unified diff of the markdown. json compares the fields in schema or prompt between this read and the last one. Without modes you get git-diff.","items":{"enum":["git-diff","json"],"type":"string"},"maxItems":2,"type":"array"},"prompt":{"description":"With json mode: what to compare, in plain words, such as the price and stock.","maxLength":10000,"minLength":1,"type":"string"},"schema":{"additionalProperties":{"$ref":"#/definitions/__schema0"},"description":"The fields to fill, as a JSON Schema (draft-07 or 2020-12) object with properties. Pydantic's model_json_schema() and zod's toJSONSchema() output work as they are. enum, const, anyOf, oneOf, nullable types, $ref with $defs, required, descriptions and any key names are read. Up to 100 top-level fields and 32 KB. A field the page does not state comes back null.","propertyNames":{"type":"string"},"type":"object"},"tag":{"type":"null"},"type":{"const":"changeTracking","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"question":{"description":"A question to answer from the page, such as what the refund window is.","maxLength":10000,"minLength":1,"type":"string"},"type":{"const":"question","type":"string"}},"required":["type","question"],"type":"object"},{"additionalProperties":false,"properties":{"type":{"const":"product","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"type":{"const":"menu","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"fullPage":{"default":false,"description":"Capture the whole page from top to bottom instead of the visible part.","type":"boolean"},"quality":{"description":"JPEG quality from 1 to 100. The default is 70.","maximum":100,"minimum":1,"type":"integer"},"type":{"const":"screenshot","type":"string"},"viewport":{"additionalProperties":false,"description":"The window size in pixels, such as { width: 390, height: 844 }.","properties":{"height":{"maximum":2160,"minimum":200,"type":"integer"},"width":{"maximum":3840,"minimum":200,"type":"integer"}},"required":["width","height"],"type":"object"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"count":{"default":5,"description":"How many passages to return, best match first.","maximum":20,"minimum":1,"type":"integer"},"query":{"description":"What you are looking for on the page, such as refund policy.","maxLength":10000,"minLength":1,"type":"string"},"type":{"const":"highlights","type":"string"}},"required":["type","query"],"type":"object"},{"additionalProperties":false,"properties":{"checkPromptInjection":{"description":"Deprecated: send checkPromptInjection at the top level of the call.","type":"boolean"},"options":{"additionalProperties":{"$ref":"#/definitions/__schema1"},"description":"Only with parser: extra inputs for it, such as { \"page\": 2 } for the next page of results or { \"minRating\": 4.5 } for a filter. GET /v1/parsers lists what each parser accepts.","propertyNames":{"type":"string"},"type":"object"},"parser":{"description":"Read the page with a named parser, which gives the site's own data as json. The url must be the kind of page the parser reads. Parsers are the only way to read some sites. GET /v1/parsers lists them.","type":"string"},"prompt":{"description":"What to pull from the page in plain words, such as the version and the release date.","maxLength":10000,"minLength":1,"type":"string"},"rules":{"additionalProperties":{"$ref":"#/definitions/__schema2"},"description":"Read the page with CSS rules instead of a model, no extra fee. Each field is a selector such as \"h1\" (the first match's text), \"a@href\" (an attribute) or { \"selector\": \"li\", \"type\": \"list\", \"output\": \"text\" | \"html\" | \"@attribute\" | { nested fields } }. A missing item is null and an unmatched list is []. Relative links become absolute. Up to 100 fields, 5 levels deep. Not with schema, prompt or parser.","propertyNames":{"type":"string"},"type":"object"},"schema":{"additionalProperties":{"$ref":"#/definitions/__schema0"},"description":"The fields to fill, as a JSON Schema (draft-07 or 2020-12) object with properties. Pydantic's model_json_schema() and zod's toJSONSchema() output work as they are. enum, const, anyOf, oneOf, nullable types, $ref with $defs, required, descriptions and any key names are read. Up to 100 top-level fields and 32 KB. A field the page does not state comes back null.","propertyNames":{"type":"string"},"type":"object"},"type":{"const":"json","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"selectors":{"description":"The elements and attributes to read, such as { selector: 'a.buy', attribute: 'href' }.","items":{"additionalProperties":false,"properties":{"attribute":{"maxLength":100,"minLength":1,"type":"string"},"selector":{"minLength":1,"type":"string"}},"required":["selector","attribute"],"type":"object"},"maxItems":50,"minItems":1,"type":"array"},"type":{"const":"attributes","type":"string"}},"required":["type","selectors"],"type":"object"}]},"maxItems":20,"minItems":1,"type":"array"},"headers":{"additionalProperties":{"maxLength":2000,"pattern":"^[\\t\\x20-\\x7e]*$","type":"string"},"description":"Extra request headers to send to the site, such as { \"x-plan\": \"pro\" }. A read with headers is never answered from or saved to a stored copy.","propertyNames":{"pattern":"^[A-Za-z0-9-]{1,64}$","type":"string"},"type":"object"},"ignoreRobotsTxt":{"const":false,"type":"boolean"},"includeTags":{"description":"Keep only the parts of the page that match these CSS selectors, such as article or .price. When set, onlyMainContent is not applied.","items":{"minLength":1,"type":"string"},"minItems":1,"type":"array"},"location":{"additionalProperties":false,"description":"Where to read the page from. The default is the United States.","properties":{"country":{"description":"Two-letter country code to read the page from, such as DE or JP.","type":"string"},"languages":{"description":"Languages to ask the site for, best first, such as [\"de\", \"en\"]. Sent as Accept-Language. A read with languages is never answered from or saved to a stored copy.","items":{"pattern":"^[A-Za-z]{2,3}(?:-[A-Za-z0-9]{2,8})*$","type":"string"},"maxItems":5,"minItems":1,"type":"array"}},"type":"object"},"lockdown":{"description":"Send true to answer only from a stored copy of the page and never read it live, whatever its age. A page with no stored copy is notFound. The same as minAge 0.","type":"boolean"},"maxAge":{"description":"Accept a stored answer up to this many milliseconds old, at most 30 days. Without it, 2 days, or less for a site whose pages change often, and a copy up to twice that age (at most 7 days) comes back at once as stale while a fresh read runs. 0 always reads the page live. metadata.cacheState says which one you got.","maximum":9007199254740991,"minimum":0,"type":"integer"},"minAge":{"description":"Answer only from a stored copy that is at least this many milliseconds old, and never read the page live. 0 accepts any stored copy. A page with no such copy is notFound.","maximum":9007199254740991,"minimum":0,"type":"integer"},"mobile":{"description":"Read the page as a phone would: a phone-sized screen and the mobile version of the site. The page loads in a browser.","type":"boolean"},"onlyCleanContent":{"description":"Send true to have a model remove what onlyMainContent leaves behind in the markdown: cookie banners, ads, share widgets, breadcrumbs, sign-up prompts, comment prompts and related-article lists. It only removes whole paragraphs and lists; it never rewrites or adds text, and code blocks are always kept. Skipped with a warning when the page is too long to clean or the model does not answer. Not with zeroDataRetention. Summary, answers and highlights are made from the cleaned markdown.","type":"boolean"},"onlyMainContent":{"default":true,"description":"Keep only the page's main content, without menus, headers, footers and ads.","type":"boolean"},"parsers":{"description":"Only the pdf parser exists. Send \"pdf\" or { \"type\": \"pdf\", mode, maxPages, pages, blocks, pageMarkers } with the same meaning as in parse. Without mode a PDF is read from its text layer only; auto reads the picture of a page that has no text, and ocr reads the picture of every page, up to 20 pages. Each page of text that comes back costs 1 credit.","items":{"anyOf":[{"const":"pdf","type":"string"},{"additionalProperties":false,"properties":{"blocks":{"description":"Send true to also get the page's layout in blocks: each title, section header or run of text, with its page, reading order, position on the page (bbox as left, top, right, bottom from 0 to 1) and where its text sits in that page's markdown (span, as in pages). Tables, figures and formulas are not told apart. A page read from its picture is one block. No extra charge.","type":"boolean"},"maxPages":{"description":"Read at most this many pages, up to 100.","maximum":100,"minimum":1,"type":"integer"},"mode":{"description":"fast reads the text layer only. auto (the default) reads the text layer and reads the picture of any page that has none. ocr reads the picture of every page.","enum":["fast","auto","ocr"],"type":"string"},"pageMarkers":{"description":"Send true to mark page breaks in the markdown: pages are joined with \"---\" and a line, where N is the page that follows. No extra charge.","type":"boolean"},"pages":{"description":"Send true to also get each page's markdown in pages, as { pageNumber, markdown }. No extra charge.","type":"boolean"},"type":{"const":"pdf","type":"string"}},"required":["type"],"type":"object"}]},"minItems":1,"type":"array"},"profile":{"additionalProperties":false,"description":"Read the page with the cookies and local storage that earlier calls saved under this name, kept for your account for 30 days after the last use. A call with a profile always loads the page in a browser, costs 1 credit, the same as any page, and is never answered from a stored copy. Only one call at a time can save to a profile.","properties":{"name":{"description":"A name you choose, such as shop-login. Calls with the same name share state.","maxLength":128,"minLength":1,"type":"string"},"saveChanges":{"default":true,"description":"Keep the cookies and local storage this read leaves behind for the next call with this name. Send false to read with the profile without changing it.","type":"boolean"}},"required":["name"],"type":"object"},"proxy":{"description":"auto: basic first, enhanced once if the site refuses. basic: one plain attempt. enhanced: the stronger read from the start. Same price.","enum":["auto","basic","enhanced"],"type":"string"},"redactPII":{"anyOf":[{"type":"boolean"},{"additionalProperties":false,"description":"Options for redactPII.","properties":{"entities":{"default":["PERSON","EMAIL","PHONE","LOCATION","FINANCIAL","SECRET"],"description":"What to hide: PERSON, EMAIL, PHONE, LOCATION, FINANCIAL, SECRET. All by default.","items":{"enum":["PERSON","EMAIL","PHONE","LOCATION","FINANCIAL","SECRET"],"type":"string"},"minItems":1,"type":"array"},"mode":{"default":"accurate","description":"accurate finds names and places with the model and the rest by pattern. aggressive adds guesses that catch more and may hide a little too much. fast uses patterns only, so it finds no ordinary names or places.","enum":["accurate","aggressive","fast"],"type":"string"},"replaceStyle":{"default":"tag","description":"tag writes <EMAIL>, mask writes * for each character, remove deletes it.","enum":["tag","mask","remove"],"type":"string"}},"type":"object"}],"description":"Send true, or an object, to hide personal data in the markdown and in everything made from it (summary, answers, highlights, json). Links, html and rawHtml are not changed. A page the model cannot scan is refused rather than returned unredacted."},"removeBase64Images":{"description":"Images inside the page that carry their data in the address (data:image) are dropped by default. Send false to keep them in markdown and html.","type":"boolean"},"robotsUserAgent":{"not":{}},"skipTlsVerification":{"description":"Send true to read a page whose certificate is expired, self-signed or for another name. The read is not private against someone between us and the site.","type":"boolean"},"storeInCache":{"default":true,"description":"Send false to neither read nor keep a stored copy of this page.","type":"boolean"},"threatProtection":{"not":{}},"timeout":{"description":"How long to keep trying, in milliseconds, between 10 seconds and 2 minutes. Pages behind a bot check can need 10 to 30 seconds the first time.","maximum":300000,"minimum":1000,"type":"integer"},"toolDetail":{"not":{}},"waitFor":{"description":"Extra milliseconds to wait before reading, up to 60000, for pages that load their content late. To wait for an element, add a wait action with a selector. A read that waits costs 1 credit, the same as any page.","maximum":60000,"minimum":0,"type":"integer"},"zeroDataRetention":{"default":false,"description":"Send true to keep nothing from this call: no stored copy is read or made, and nothing from it is logged. Costs 1 credit more per page. Not with a screenshot.","type":"boolean"}},"type":"object"},"showSources":{"default":false,"description":"Send true to get sources: for each field, the pages that state its value.","type":"boolean"},"systemPrompt":{"description":"Standing instructions for how to fill the fields, such as units or how to write dates, up to 10000 characters. They add to the rules of the extract: a value is still copied from the page and is null when the page does not state it.","maxLength":10000,"minLength":1,"type":"string"},"threatProtection":{"not":{}},"urls":{"default":[],"description":"The pages to read, up to 25, such as [\"https://bun.com/blog/bun-v1.3\"]. An address ending in /* reads pages under it, found through the site's sitemap. With more than one, the fields are filled from all of them together. A page that cannot be read is skipped and named in warning, and costs nothing. A page is read up to 50000 characters. With several pages each one gets a smaller share, and all together are read up to 150000 characters. A page that is cut is counted in warning. The call fails only when no page can be read. Leave it out and send a prompt to search the web instead.","items":{"maxLength":2048,"type":"string"},"maxItems":25,"type":"array"},"webhook":{"anyOf":[{"type":"string"},{"additionalProperties":false,"properties":{"events":{"items":{"enum":["started","page","action","completed","failed","cancelled"],"type":"string"},"minItems":1,"type":"array"},"headers":{"additionalProperties":{"maxLength":1000,"type":"string"},"propertyNames":{"pattern":"^[A-Za-z0-9-]{1,64}$","type":"string"},"type":"object"},"metadata":{"additionalProperties":{"$ref":"#/definitions/__schema0"},"propertyNames":{"type":"string"},"type":"object"},"url":{"type":"string"}},"required":["url"],"type":"object"}],"description":"Where to be told when the extract ends: a plain address, or { url } which gets one JSON POST with the id, the status, the data and creditsUsed. headers are sent with the call, metadata comes back in it, and events picks completed, failed or both (both by default). The call is signed: read Stophy-Signature (t=<unix seconds>,v1=<hex>), the HMAC-SHA256 of \"<t>.<body>\" with your webhook secret from webhook.secret. A call that gets no 2xx is sent again, up to 3 times."},"zeroDataRetention":{"default":false,"description":"Send true to keep nothing from this call: pages are read live, the result is held for one hour at most, and nothing is logged. Costs 1 credit more per page.","type":"boolean"}},"type":"object"}⟨61 unchanged words⟩ A PDF adds 1 credit for each pageread.of text that comes back, so a PDF read with maxChars, offset or query is charged for the share of its pages that it returns, at least 1 page. Browser actions add nothing. An answer from a ⟨13 unchanged words⟩ comes back with a 404 or 410 statusis charged like any page. A page,thator cannot be read, costs nothing. creditsUsed shows what the call cost. ⟨152 unchanged words⟩
before
{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"definitions":{"__schema0":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"items":{"allOf":[{"$ref":"#/definitions/__schema0"}]},"type":"array"},{"additionalProperties":{"allOf":[{"$ref":"#/definitions/__schema0"}]},"propertyNames":{"type":"string"},"type":"object"}]},"__schema1":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"items":{"allOf":[{"$ref":"#/definitions/__schema1"}]},"type":"array"},{"additionalProperties":{"allOf":[{"$ref":"#/definitions/__schema1"}]},"propertyNames":{"type":"string"},"type":"object"}]},"__schema2":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"items":{"allOf":[{"$ref":"#/definitions/__schema2"}]},"type":"array"},{"additionalProperties":{"allOf":[{"$ref":"#/definitions/__schema2"}]},"propertyNames":{"type":"string"},"type":"object"}]}},"properties":{"actions":{"description":"Up to 50 steps to run on the page, in order, before reading it: { \"type\": \"wait\", \"milliseconds\": 500 } (up to 30 seconds), { \"type\": \"wait\", \"selector\": \".results\" }, { \"type\": \"click\", \"selector\": \"button.more\" }, { \"type\": \"write\", \"text\": \"tides\" }, { \"type\": \"press\", \"key\": \"Enter\" }, { \"type\": \"scroll\", \"direction\": \"down\" } (also up, left or right; amount is pixels, \"viewport\" or \"max\"; maxScrolls 1 to 50; selector scrolls an inner container; \"max\" keeps scrolling until the page stops growing, for feeds that load as you go), { \"type\": \"screenshot\", \"fullPage\": true } (links come back in actions.screenshots), { \"type\": \"scrape\" } (the page at that point, in actions.scrapes), { \"type\": \"executeJavascript\", \"script\": \"document.title\" } (results in actions.javascriptReturns), { \"type\": \"pdf\", \"format\": \"A4\" } (links in actions.pdfs) or { \"type\": \"perform\", \"action\": \"Click the Load more button\" } (a step in plain words, up to 5 browser steps on this page, never leaving the site; at most 5 per call). A read with actions costs 1 credit, the same as any page; the actions themselves add nothing. If an action fails, you still get the page as it stood, with a warning that names the action and says why.","items":{"anyOf":[{"additionalProperties":false,"properties":{"milliseconds":{"maximum":30000,"minimum":1,"type":"integer"},"type":{"const":"wait","type":"string"}},"required":["type","milliseconds"],"type":"object"},{"additionalProperties":false,"properties":{"selector":{"minLength":1,"type":"string"},"type":{"const":"wait","type":"string"}},"required":["type","selector"],"type":"object"},{"additionalProperties":false,"properties":{"all":{"const":false,"type":"boolean"},"selector":{"minLength":1,"type":"string"},"type":{"const":"click","type":"string"}},"required":["type","selector"],"type":"object"},{"additionalProperties":false,"properties":{"text":{"minLength":1,"type":"string"},"type":{"const":"write","type":"string"}},"required":["type","text"],"type":"object"},{"additionalProperties":false,"properties":{"key":{"maxLength":40,"minLength":1,"type":"string"},"type":{"const":"press","type":"string"}},"required":["type","key"],"type":"object"},{"additionalProperties":false,"properties":{"amount":{"anyOf":[{"maximum":100000,"minimum":1,"type":"integer"},{"enum":["viewport","max"],"type":"string"}]},"direction":{"default":"down","enum":["up","down","left","right"],"type":"string"},"maxScrolls":{"maximum":50,"minimum":1,"type":"integer"},"selector":{"minLength":1,"type":"string"},"type":{"const":"scroll","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"fullPage":{"type":"boolean"},"quality":{"maximum":100,"minimum":1,"type":"integer"},"type":{"const":"screenshot","type":"string"},"viewport":{"additionalProperties":false,"properties":{"height":{"maximum":2160,"minimum":200,"type":"integer"},"width":{"maximum":3840,"minimum":200,"type":"integer"}},"required":["width","height"],"type":"object"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"type":{"const":"scrape","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"script":{"maxLength":20000,"minLength":1,"type":"string"},"type":{"const":"executeJavascript","type":"string"}},"required":["type","script"],"type":"object"},{"additionalProperties":false,"properties":{"format":{"enum":["Letter","Legal","Tabloid","Ledger","A0","A1","A2","A3","A4","A5","A6"],"type":"string"},"landscape":{"type":"boolean"},"scale":{"maximum":2,"minimum":0.1,"type":"number"},"type":{"const":"pdf","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"action":{"maxLength":500,"minLength":1,"type":"string"},"type":{"const":"perform","type":"string"}},"required":["type","action"],"type":"object"}]},"maxItems":50,"minItems":1,"type":"array"},"alexandria":{"not":{}},"auditMetadata":{"not":{}},"blockAds":{"description":"Ads and trackers are not loaded when a page runs in a browser. Send false to load them.","type":"boolean"},"checkPromptInjection":{"description":"Send true to scan the page text for instructions aimed at an AI model before anything is built from it. A page that has them is refused with 403 promptInjectionDetected and costs nothing. The scan adds 4 credits when it runs; a page it cannot scan fully comes back with a warning and no charge.","type":"boolean"},"domainTools":{"const":false,"type":"boolean"},"excludeTags":{"description":"Remove the parts of the page that match these CSS selectors, such as .comments.","items":{"minLength":1,"type":"string"},"minItems":1,"type":"array"},"fastMode":{"description":"Send true to read the page without opening a browser: the answer comes sooner, but a page that needs a browser, or that refuses a plain request, comes back as an error instead of being retried. Ignored when the call needs a browser (actions, screenshot, waitFor, mobile, profile, network, branding).","type":"boolean"},"formats":{"default":["markdown"],"description":"What to return: markdown (clean page text), summary (a short summary of the page), html (the cleaned page), rawHtml (the page as sent), audio and video (for a YouTube link: the audio track as an M4A file, or the video as an MP4 file, as a link that works for 1 hour), rawBase64 (the bytes the site sent, Base64 encoded, from a live read; metadata.contentType says what they are), links (every link on the page), images (every image address), screenshot (a link to a JPEG of the visible page, kept for 7 days), changeTracking (what changed in the markdown since your key last read this page with the same options, kept 30 days; add modes [\"git-diff\",\"json\"] with a schema or prompt to compare fields too), question (send { \"type\": \"question\", \"question\": \"...\" } to get answer, null when the page does not state one), product (title, brand, category, url, description and variants with price, sale, availability and images, or null) and menu (merchant, currency and sections of items with prices, or null) network (the JSON the page loaded while it rendered, up to 30 responses) and branding (the page's colors, fonts, typography, spacing, button and input styles, logo and brand images, read from how the page looks, with a field left out when the page does not show it). Send { \"type\": \"screenshot\", \"fullPage\": true } for the whole page. Send { \"type\": \"highlights\", \"query\": \"refund policy\" } for the passages that best match a query. Send { \"type\": \"json\", \"schema\": { \"type\": \"object\", \"properties\": { \"price\": { \"type\": \"number\" } } } } or { \"type\": \"json\", \"prompt\": \"the price and the stock\" } for fields filled from the page, each checked against it. Send { \"type\": \"json\", \"parser\": \"amazon-product\" } to get a site's own data as json instead of reading the page; GET /v1/parsers lists the parsers. Send { \"type\": \"json\", \"rules\": { \"title\": \"h1\", \"links\": { \"selector\": \"a\", \"type\": \"list\", \"output\": \"@href\" } } } to read the page with CSS rules and no model, at the page's own price. Send { \"type\": \"attributes\", \"selectors\": [{ \"selector\": \"a\", \"attribute\": \"href\" }] } for attribute values, returned in attributes. Without a parser or rules, json needs a schema or a prompt and is filled from the page. json with a schema or a prompt, summary, highlights, question, product, menu and changeTracking in json mode cost 4 credits more each when they return something. json with rules or a parser, and attributes, cost nothing more. A screenshot, network or branding read costs 1 credit, the same as any page. A PDF comes back as markdown only, and costs 1 credit more for each page read.","items":{"anyOf":[{"enum":["markdown","summary","html","rawHtml","rawBase64","links","images","network","branding","audio","video","screenshot","changeTracking","product","menu"],"type":"string"},{"additionalProperties":false,"properties":{"type":{"enum":["markdown","summary","html","rawHtml","rawBase64","links","images","network","branding","audio","video"],"type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"modes":{"description":"git-diff returns a unified diff of the markdown. json compares the fields in schema or prompt between this read and the last one. Without modes you get git-diff.","items":{"enum":["git-diff","json"],"type":"string"},"maxItems":2,"type":"array"},"prompt":{"description":"With json mode: what to compare, in plain words, such as the price and stock.","maxLength":10000,"minLength":1,"type":"string"},"schema":{"additionalProperties":{"$ref":"#/definitions/__schema0"},"description":"The fields to fill, as a JSON Schema (draft-07 or 2020-12) object with properties. Pydantic's model_json_schema() and zod's toJSONSchema() output work as they are. enum, const, anyOf, oneOf, nullable types, $ref with $defs, required, descriptions and any key names are read. Up to 100 top-level fields and 32 KB. A field the page does not state comes back null.","propertyNames":{"type":"string"},"type":"object"},"tag":{"type":"null"},"type":{"const":"changeTracking","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"question":{"description":"A question to answer from the page, such as what the refund window is.","maxLength":10000,"minLength":1,"type":"string"},"type":{"const":"question","type":"string"}},"required":["type","question"],"type":"object"},{"additionalProperties":false,"properties":{"type":{"const":"product","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"type":{"const":"menu","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"fullPage":{"default":false,"description":"Capture the whole page from top to bottom instead of the visible part.","type":"boolean"},"quality":{"description":"JPEG quality from 1 to 100. The default is 70.","maximum":100,"minimum":1,"type":"integer"},"type":{"const":"screenshot","type":"string"},"viewport":{"additionalProperties":false,"description":"The window size in pixels, such as { width: 390, height: 844 }.","properties":{"height":{"maximum":2160,"minimum":200,"type":"integer"},"width":{"maximum":3840,"minimum":200,"type":"integer"}},"required":["width","height"],"type":"object"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"count":{"default":5,"description":"How many passages to return, best match first.","maximum":20,"minimum":1,"type":"integer"},"query":{"description":"What you are looking for on the page, such as refund policy.","maxLength":10000,"minLength":1,"type":"string"},"type":{"const":"highlights","type":"string"}},"required":["type","query"],"type":"object"},{"additionalProperties":false,"properties":{"checkPromptInjection":{"description":"Deprecated: send checkPromptInjection at the top level of the call.","type":"boolean"},"options":{"additionalProperties":{"$ref":"#/definitions/__schema1"},"description":"Only with parser: extra inputs for it, such as { \"page\": 2 } for the next page of results or { \"minRating\": 4.5 } for a filter. GET /v1/parsers lists what each parser accepts.","propertyNames":{"type":"string"},"type":"object"},"parser":{"description":"Read the page with a named parser, which gives the site's own data as json. The url must be the kind of page the parser reads. Parsers are the only way to read some sites. GET /v1/parsers lists them.","type":"string"},"prompt":{"description":"What to pull from the page in plain words, such as the version and the release date.","maxLength":10000,"minLength":1,"type":"string"},"rules":{"additionalProperties":{"$ref":"#/definitions/__schema2"},"description":"Read the page with CSS rules instead of a model, no extra fee. Each field is a selector such as \"h1\" (the first match's text), \"a@href\" (an attribute) or { \"selector\": \"li\", \"type\": \"list\", \"output\": \"text\" | \"html\" | \"@attribute\" | { nested fields } }. A missing item is null and an unmatched list is []. Relative links become absolute. Up to 100 fields, 5 levels deep. Not with schema, prompt or parser.","propertyNames":{"type":"string"},"type":"object"},"schema":{"additionalProperties":{"$ref":"#/definitions/__schema0"},"description":"The fields to fill, as a JSON Schema (draft-07 or 2020-12) object with properties. Pydantic's model_json_schema() and zod's toJSONSchema() output work as they are. enum, const, anyOf, oneOf, nullable types, $ref with $defs, required, descriptions and any key names are read. Up to 100 top-level fields and 32 KB. A field the page does not state comes back null.","propertyNames":{"type":"string"},"type":"object"},"type":{"const":"json","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"selectors":{"description":"The elements and attributes to read, such as { selector: 'a.buy', attribute: 'href' }.","items":{"additionalProperties":false,"properties":{"attribute":{"maxLength":100,"minLength":1,"type":"string"},"selector":{"minLength":1,"type":"string"}},"required":["selector","attribute"],"type":"object"},"maxItems":50,"minItems":1,"type":"array"},"type":{"const":"attributes","type":"string"}},"required":["type","selectors"],"type":"object"}]},"maxItems":20,"minItems":1,"type":"array"},"headers":{"additionalProperties":{"maxLength":2000,"pattern":"^[\\t\\x20-\\x7e]*$","type":"string"},"description":"Extra request headers to send to the site, such as { \"x-plan\": \"pro\" }. A read with headers is never answered from or saved to a stored copy.","propertyNames":{"pattern":"^[A-Za-z0-9-]{1,64}$","type":"string"},"type":"object"},"ignoreRobotsTxt":{"const":false,"type":"boolean"},"includeTags":{"description":"Keep only the parts of the page that match these CSS selectors, such as article or .price. When set, onlyMainContent is not applied.","items":{"minLength":1,"type":"string"},"minItems":1,"type":"array"},"linkStyle":{"default":"inline","description":"How links appear in the markdown. inline keeps [text](address). numbered writes Pricing⟨3⟩ and lists each address once at the end. none keeps only the link text, which makes link-heavy pages 10 to 70% shorter; ask for the links format to get the addresses.","enum":["inline","numbered","none"],"type":"string"},"location":{"additionalProperties":false,"description":"Where to read the page from. The default is the United States.","properties":{"country":{"description":"Two-letter country code to read the page from, such as DE or JP.","type":"string"},"languages":{"description":"Languages to ask the site for, best first, such as [\"de\", \"en\"]. Sent as Accept-Language. A read with languages is never answered from or saved to a stored copy.","items":{"pattern":"^[A-Za-z]{2,3}(?:-[A-Za-z0-9]{2,8})*$","type":"string"},"maxItems":5,"minItems":1,"type":"array"}},"type":"object"},"lockdown":{"description":"Send true to answer only from a stored copy of the page and never read it live, whatever its age. A page with no stored copy is notFound. The same as minAge 0.","type":"boolean"},"maxAge":{"description":"Accept a stored answer up to this many milliseconds old, at most 30 days. Without it, 2 days, or less for a site whose pages change often, and a copy up to twice that age (at most 7 days) comes back at once as stale while a fresh read runs. 0 always reads the page live. metadata.cacheState says which one you got.","maximum":9007199254740991,"minimum":0,"type":"integer"},"maxChars":{"description":"Cut the markdown at this many characters; isTruncated says when that happened.","maximum":1000000,"minimum":500,"type":"integer"},"minAge":{"description":"Answer only from a stored copy that is at least this many milliseconds old, and never read the page live. 0 accepts any stored copy. A page with no such copy is notFound.","maximum":9007199254740991,"minimum":0,"type":"integer"},"mobile":{"description":"Read the page as a phone would: a phone-sized screen and the mobile version of the site. The page loads in a browser.","type":"boolean"},"onlyCleanContent":{"description":"Send true to have a model remove what onlyMainContent leaves behind in the markdown: cookie banners, ads, share widgets, breadcrumbs, sign-up prompts, comment prompts and related-article lists. It only removes whole paragraphs and lists; it never rewrites or adds text, and code blocks are always kept. Skipped with a warning when the page is too long to clean or the model does not answer. Not with zeroDataRetention. Summary, answers and highlights are made from the cleaned markdown.","type":"boolean"},"onlyMainContent":{"default":true,"description":"Keep only the page's main content, without menus, headers, footers and ads.","type":"boolean"},"parsers":{"description":"Only the pdf parser exists. Send \"pdf\" or { \"type\": \"pdf\", mode, maxPages, pages, blocks, pageMarkers } with the same meaning as in parse. Without mode a PDF is read from its text layer only; auto reads the picture of a page that has no text, and ocr reads the picture of every page, up to 20 pages. Each page read costs 1 credit.","items":{"anyOf":[{"const":"pdf","type":"string"},{"additionalProperties":false,"properties":{"blocks":{"description":"Send true to also get the page's layout in blocks: each title, section header or run of text, with its page, reading order, position on the page (bbox as left, top, right, bottom from 0 to 1) and where its text sits in that page's markdown (span, as in pages). Tables, figures and formulas are not told apart. A page read from its picture is one block. No extra charge.","type":"boolean"},"maxPages":{"description":"Read at most this many pages, up to 100.","maximum":100,"minimum":1,"type":"integer"},"mode":{"description":"fast reads the text layer only. auto (the default) reads the text layer and reads the picture of any page that has none. ocr reads the picture of every page.","enum":["fast","auto","ocr"],"type":"string"},"pageMarkers":{"description":"Send true to mark page breaks in the markdown: pages are joined with \"---\" and a line, where N is the page that follows. No extra charge.","type":"boolean"},"pages":{"description":"Send true to also get each page's markdown in pages, as { pageNumber, markdown }. No extra charge.","type":"boolean"},"type":{"const":"pdf","type":"string"}},"required":["type"],"type":"object"}]},"minItems":1,"type":"array"},"profile":{"additionalProperties":false,"description":"Read the page with the cookies and local storage that earlier calls saved under this name, kept for your account for 30 days after the last use. A call with a profile always loads the page in a browser, costs 1 credit, the same as any page, and is never answered from a stored copy. Only one call at a time can save to a profile.","properties":{"name":{"description":"A name you choose, such as shop-login. Calls with the same name share state.","maxLength":128,"minLength":1,"type":"string"},"saveChanges":{"default":true,"description":"Keep the cookies and local storage this read leaves behind for the next call with this name. Send false to read with the profile without changing it.","type":"boolean"}},"required":["name"],"type":"object"},"proxy":{"description":"auto: basic first, enhanced once if the site refuses. basic: one plain attempt. enhanced: the stronger read from the start. Same price.","enum":["auto","basic","enhanced"],"type":"string"},"redactPII":{"anyOf":[{"type":"boolean"},{"additionalProperties":false,"description":"Options for redactPII.","properties":{"entities":{"default":["PERSON","EMAIL","PHONE","LOCATION","FINANCIAL","SECRET"],"description":"What to hide: PERSON, EMAIL, PHONE, LOCATION, FINANCIAL, SECRET. All by default.","items":{"enum":["PERSON","EMAIL","PHONE","LOCATION","FINANCIAL","SECRET"],"type":"string"},"minItems":1,"type":"array"},"mode":{"default":"accurate","description":"accurate finds names and places with the model and the rest by pattern. aggressive adds guesses that catch more and may hide a little too much. fast uses patterns only, so it finds no ordinary names or places.","enum":["accurate","aggressive","fast"],"type":"string"},"replaceStyle":{"default":"tag","description":"tag writes <EMAIL>, mask writes * for each character, remove deletes it.","enum":["tag","mask","remove"],"type":"string"}},"type":"object"}],"description":"Send true, or an object, to hide personal data in the markdown and in everything made from it (summary, answers, highlights, json). Links, html and rawHtml are not changed. A page the model cannot scan is refused rather than returned unredacted."},"removeBase64Images":{"description":"Images inside the page that carry their data in the address (data:image) are dropped by default. Send false to keep them in markdown and html.","type":"boolean"},"robotsUserAgent":{"not":{}},"skipTlsVerification":{"description":"Send true to read a page whose certificate is expired, self-signed or for another name. The read is not private against someone between us and the site.","type":"boolean"},"storeInCache":{"default":true,"description":"Send false to neither read nor keep a stored copy of this page.","type":"boolean"},"threatProtection":{"not":{}},"timeout":{"description":"How long to keep trying, in milliseconds, between 10 seconds and 2 minutes. Pages behind a bot check can need 10 to 30 seconds the first time.","maximum":300000,"minimum":1000,"type":"integer"},"toolDetail":{"not":{}},"url":{"description":"The page or PDF to read, such as https://bun.com/docs.","type":"string"},"urls":{"not":{}},"waitFor":{"description":"Extra milliseconds to wait before reading, up to 60000, for pages that load their content late. To wait for an element, add a wait action with a selector. A read that waits costs 1 credit, the same as any page.","maximum":60000,"minimum":0,"type":"integer"},"zeroDataRetention":{"default":false,"description":"Send true to keep nothing from this call: no stored copy is read or made, and nothing from it is logged. Costs 1 credit more per page. Not with a screenshot.","type":"boolean"}},"required":["url"],"type":"object"}after
{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"definitions":{"__schema0":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"items":{"allOf":[{"$ref":"#/definitions/__schema0"}]},"type":"array"},{"additionalProperties":{"allOf":[{"$ref":"#/definitions/__schema0"}]},"propertyNames":{"type":"string"},"type":"object"}]},"__schema1":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"items":{"allOf":[{"$ref":"#/definitions/__schema1"}]},"type":"array"},{"additionalProperties":{"allOf":[{"$ref":"#/definitions/__schema1"}]},"propertyNames":{"type":"string"},"type":"object"}]},"__schema2":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"items":{"allOf":[{"$ref":"#/definitions/__schema2"}]},"type":"array"},{"additionalProperties":{"allOf":[{"$ref":"#/definitions/__schema2"}]},"propertyNames":{"type":"string"},"type":"object"}]}},"properties":{"actions":{"description":"Up to 50 steps to run on the page, in order, before reading it: { \"type\": \"wait\", \"milliseconds\": 500 } (up to 30 seconds), { \"type\": \"wait\", \"selector\": \".results\" }, { \"type\": \"click\", \"selector\": \"button.more\" }, { \"type\": \"write\", \"text\": \"tides\" }, { \"type\": \"press\", \"key\": \"Enter\" }, { \"type\": \"scroll\", \"direction\": \"down\" } (also up, left or right; amount is pixels, \"viewport\" or \"max\"; maxScrolls 1 to 50; selector scrolls an inner container; \"max\" keeps scrolling until the page stops growing, for feeds that load as you go), { \"type\": \"screenshot\", \"fullPage\": true } (links come back in actions.screenshots), { \"type\": \"scrape\" } (the page at that point, in actions.scrapes), { \"type\": \"executeJavascript\", \"script\": \"document.title\" } (results in actions.javascriptReturns), { \"type\": \"pdf\", \"format\": \"A4\" } (links in actions.pdfs) or { \"type\": \"perform\", \"action\": \"Click the Load more button\" } (a step in plain words, up to 5 browser steps on this page, never leaving the site; at most 5 per call). A read with actions costs 1 credit, the same as any page; the actions themselves add nothing. If an action fails, you still get the page as it stood, with a warning that names the action and says why.","items":{"anyOf":[{"additionalProperties":false,"properties":{"milliseconds":{"maximum":30000,"minimum":1,"type":"integer"},"type":{"const":"wait","type":"string"}},"required":["type","milliseconds"],"type":"object"},{"additionalProperties":false,"properties":{"selector":{"minLength":1,"type":"string"},"type":{"const":"wait","type":"string"}},"required":["type","selector"],"type":"object"},{"additionalProperties":false,"properties":{"all":{"const":false,"type":"boolean"},"selector":{"minLength":1,"type":"string"},"type":{"const":"click","type":"string"}},"required":["type","selector"],"type":"object"},{"additionalProperties":false,"properties":{"text":{"minLength":1,"type":"string"},"type":{"const":"write","type":"string"}},"required":["type","text"],"type":"object"},{"additionalProperties":false,"properties":{"key":{"maxLength":40,"minLength":1,"type":"string"},"type":{"const":"press","type":"string"}},"required":["type","key"],"type":"object"},{"additionalProperties":false,"properties":{"amount":{"anyOf":[{"maximum":100000,"minimum":1,"type":"integer"},{"enum":["viewport","max"],"type":"string"}]},"direction":{"default":"down","enum":["up","down","left","right"],"type":"string"},"maxScrolls":{"maximum":50,"minimum":1,"type":"integer"},"selector":{"minLength":1,"type":"string"},"type":{"const":"scroll","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"fullPage":{"type":"boolean"},"quality":{"maximum":100,"minimum":1,"type":"integer"},"type":{"const":"screenshot","type":"string"},"viewport":{"additionalProperties":false,"properties":{"height":{"maximum":2160,"minimum":200,"type":"integer"},"width":{"maximum":3840,"minimum":200,"type":"integer"}},"required":["width","height"],"type":"object"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"type":{"const":"scrape","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"script":{"maxLength":20000,"minLength":1,"type":"string"},"type":{"const":"executeJavascript","type":"string"}},"required":["type","script"],"type":"object"},{"additionalProperties":false,"properties":{"format":{"enum":["Letter","Legal","Tabloid","Ledger","A0","A1","A2","A3","A4","A5","A6"],"type":"string"},"landscape":{"type":"boolean"},"scale":{"maximum":2,"minimum":0.1,"type":"number"},"type":{"const":"pdf","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"action":{"maxLength":500,"minLength":1,"type":"string"},"type":{"const":"perform","type":"string"}},"required":["type","action"],"type":"object"}]},"maxItems":50,"minItems":1,"type":"array"},"alexandria":{"not":{}},"auditMetadata":{"not":{}},"blockAds":{"description":"Ads and trackers are not loaded when a page runs in a browser. Send false to load them.","type":"boolean"},"checkPromptInjection":{"description":"Send true to scan the page text for instructions aimed at an AI model before anything is built from it. A page that has them is refused with 403 promptInjectionDetected and costs nothing. The scan adds 4 credits when it runs; a page it cannot scan fully comes back with a warning and no charge.","type":"boolean"},"domainTools":{"const":false,"type":"boolean"},"excludeTags":{"description":"Remove the parts of the page that match these CSS selectors, such as .comments.","items":{"minLength":1,"type":"string"},"minItems":1,"type":"array"},"fastMode":{"description":"Send true to read the page without opening a browser: the answer comes sooner, but a page that needs a browser, or that refuses a plain request, comes back as an error instead of being retried. Ignored when the call needs a browser (actions, screenshot, waitFor, mobile, profile, network, branding).","type":"boolean"},"formats":{"default":["markdown"],"description":"What to return: markdown (clean page text), summary (a short summary of the page), html (the cleaned page), rawHtml (the page as sent), audio and video (for a YouTube link: the audio track as an M4A file, or the video as an MP4 file, as a link that works for 1 hour), rawBase64 (the bytes the site sent, Base64 encoded, from a live read; metadata.contentType says what they are), links (every link on the page), images (every image address), screenshot (a link to a JPEG of the visible page, kept for 7 days), changeTracking (what changed in the markdown since your key last read this page with the same options, kept 30 days; add modes [\"git-diff\",\"json\"] with a schema or prompt to compare fields too), question (send { \"type\": \"question\", \"question\": \"...\" } to get answer, null when the page does not state one), product (title, brand, category, url, description and variants with price, sale, availability and images, or null) and menu (merchant, currency and sections of items with prices, or null) network (the JSON the page loaded while it rendered, up to 30 responses) and branding (the page's colors, fonts, typography, spacing, button and input styles, logo and brand images, read from how the page looks, with a field left out when the page does not show it). Send { \"type\": \"screenshot\", \"fullPage\": true } for the whole page. Send { \"type\": \"highlights\", \"query\": \"refund policy\" } for the passages that best match a query. Send { \"type\": \"json\", \"schema\": { \"type\": \"object\", \"properties\": { \"price\": { \"type\": \"number\" } } } } or { \"type\": \"json\", \"prompt\": \"the price and the stock\" } for fields filled from the page, each checked against it. Send { \"type\": \"json\", \"parser\": \"amazon-product\" } to get a site's own data as json instead of reading the page; GET /v1/parsers lists the parsers. Send { \"type\": \"json\", \"rules\": { \"title\": \"h1\", \"links\": { \"selector\": \"a\", \"type\": \"list\", \"output\": \"@href\" } } } to read the page with CSS rules and no model, at the page's own price. Send { \"type\": \"attributes\", \"selectors\": [{ \"selector\": \"a\", \"attribute\": \"href\" }] } for attribute values, returned in attributes. Without a parser or rules, json needs a schema or a prompt and is filled from the page. json with a schema or a prompt, summary, highlights, question, product, menu and changeTracking in json mode cost 4 credits more each when they return something. json with rules or a parser, and attributes, cost nothing more. A screenshot, network or branding read costs 1 credit, the same as any page. A PDF comes back as markdown only, and costs 1 credit more for each page of text that comes back. A CSV or an Excel .xlsx file comes back as markdown tables.","items":{"anyOf":[{"enum":["markdown","summary","html","rawHtml","rawBase64","links","images","network","branding","audio","video","screenshot","changeTracking","product","menu"],"type":"string"},{"additionalProperties":false,"properties":{"type":{"enum":["markdown","summary","html","rawHtml","rawBase64","links","images","network","branding","audio","video"],"type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"modes":{"description":"git-diff returns a unified diff of the markdown. json compares the fields in schema or prompt between this read and the last one. Without modes you get git-diff.","items":{"enum":["git-diff","json"],"type":"string"},"maxItems":2,"type":"array"},"prompt":{"description":"With json mode: what to compare, in plain words, such as the price and stock.","maxLength":10000,"minLength":1,"type":"string"},"schema":{"additionalProperties":{"$ref":"#/definitions/__schema0"},"description":"The fields to fill, as a JSON Schema (draft-07 or 2020-12) object with properties. Pydantic's model_json_schema() and zod's toJSONSchema() output work as they are. enum, const, anyOf, oneOf, nullable types, $ref with $defs, required, descriptions and any key names are read. Up to 100 top-level fields and 32 KB. A field the page does not state comes back null.","propertyNames":{"type":"string"},"type":"object"},"tag":{"type":"null"},"type":{"const":"changeTracking","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"question":{"description":"A question to answer from the page, such as what the refund window is.","maxLength":10000,"minLength":1,"type":"string"},"type":{"const":"question","type":"string"}},"required":["type","question"],"type":"object"},{"additionalProperties":false,"properties":{"type":{"const":"product","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"type":{"const":"menu","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"fullPage":{"default":false,"description":"Capture the whole page from top to bottom instead of the visible part.","type":"boolean"},"quality":{"description":"JPEG quality from 1 to 100. The default is 70.","maximum":100,"minimum":1,"type":"integer"},"type":{"const":"screenshot","type":"string"},"viewport":{"additionalProperties":false,"description":"The window size in pixels, such as { width: 390, height: 844 }.","properties":{"height":{"maximum":2160,"minimum":200,"type":"integer"},"width":{"maximum":3840,"minimum":200,"type":"integer"}},"required":["width","height"],"type":"object"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"count":{"default":5,"description":"How many passages to return, best match first.","maximum":20,"minimum":1,"type":"integer"},"query":{"description":"What you are looking for on the page, such as refund policy.","maxLength":10000,"minLength":1,"type":"string"},"type":{"const":"highlights","type":"string"}},"required":["type","query"],"type":"object"},{"additionalProperties":false,"properties":{"checkPromptInjection":{"description":"Deprecated: send checkPromptInjection at the top level of the call.","type":"boolean"},"options":{"additionalProperties":{"$ref":"#/definitions/__schema1"},"description":"Only with parser: extra inputs for it, such as { \"page\": 2 } for the next page of results or { \"minRating\": 4.5 } for a filter. GET /v1/parsers lists what each parser accepts.","propertyNames":{"type":"string"},"type":"object"},"parser":{"description":"Read the page with a named parser, which gives the site's own data as json. The url must be the kind of page the parser reads. Parsers are the only way to read some sites. GET /v1/parsers lists them.","type":"string"},"prompt":{"description":"What to pull from the page in plain words, such as the version and the release date.","maxLength":10000,"minLength":1,"type":"string"},"rules":{"additionalProperties":{"$ref":"#/definitions/__schema2"},"description":"Read the page with CSS rules instead of a model, no extra fee. Each field is a selector such as \"h1\" (the first match's text), \"a@href\" (an attribute) or { \"selector\": \"li\", \"type\": \"list\", \"output\": \"text\" | \"html\" | \"@attribute\" | { nested fields } }. A missing item is null and an unmatched list is []. Relative links become absolute. Up to 100 fields, 5 levels deep. Not with schema, prompt or parser.","propertyNames":{"type":"string"},"type":"object"},"schema":{"additionalProperties":{"$ref":"#/definitions/__schema0"},"description":"The fields to fill, as a JSON Schema (draft-07 or 2020-12) object with properties. Pydantic's model_json_schema() and zod's toJSONSchema() output work as they are. enum, const, anyOf, oneOf, nullable types, $ref with $defs, required, descriptions and any key names are read. Up to 100 top-level fields and 32 KB. A field the page does not state comes back null.","propertyNames":{"type":"string"},"type":"object"},"type":{"const":"json","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"selectors":{"description":"The elements and attributes to read, such as { selector: 'a.buy', attribute: 'href' }.","items":{"additionalProperties":false,"properties":{"attribute":{"maxLength":100,"minLength":1,"type":"string"},"selector":{"minLength":1,"type":"string"}},"required":["selector","attribute"],"type":"object"},"maxItems":50,"minItems":1,"type":"array"},"type":{"const":"attributes","type":"string"}},"required":["type","selectors"],"type":"object"}]},"maxItems":20,"minItems":1,"type":"array"},"headers":{"additionalProperties":{"maxLength":2000,"pattern":"^[\\t\\x20-\\x7e]*$","type":"string"},"description":"Extra request headers to send to the site, such as { \"x-plan\": \"pro\" }. A read with headers is never answered from or saved to a stored copy.","propertyNames":{"pattern":"^[A-Za-z0-9-]{1,64}$","type":"string"},"type":"object"},"ignoreRobotsTxt":{"const":false,"type":"boolean"},"includeTags":{"description":"Keep only the parts of the page that match these CSS selectors, such as article or .price. When set, onlyMainContent is not applied.","items":{"minLength":1,"type":"string"},"minItems":1,"type":"array"},"linkStyle":{"default":"inline","description":"How links appear in the markdown. inline keeps [text](address). numbered writes Pricing⟨3⟩ and lists each address once at the end. none keeps only the link text, which makes link-heavy pages 10 to 70% shorter; ask for the links format to get the addresses.","enum":["inline","numbered","none"],"type":"string"},"location":{"additionalProperties":false,"description":"Where to read the page from. The default is the United States.","properties":{"country":{"description":"Two-letter country code to read the page from, such as DE or JP.","type":"string"},"languages":{"description":"Languages to ask the site for, best first, such as [\"de\", \"en\"]. Sent as Accept-Language. A read with languages is never answered from or saved to a stored copy.","items":{"pattern":"^[A-Za-z]{2,3}(?:-[A-Za-z0-9]{2,8})*$","type":"string"},"maxItems":5,"minItems":1,"type":"array"}},"type":"object"},"lockdown":{"description":"Send true to answer only from a stored copy of the page and never read it live, whatever its age. A page with no stored copy is notFound. The same as minAge 0.","type":"boolean"},"maxAge":{"description":"Accept a stored answer up to this many milliseconds old, at most 30 days. Without it, 2 days, or less for a site whose pages change often, and a copy up to twice that age (at most 7 days) comes back at once as stale while a fresh read runs. 0 always reads the page live. metadata.cacheState says which one you got.","maximum":9007199254740991,"minimum":0,"type":"integer"},"maxChars":{"description":"Cut the markdown at this many characters; isTruncated says when that happened and nextOffset where to read on. With query, how much of the page to keep, 8000 by default.","maximum":1000000,"minimum":500,"type":"integer"},"minAge":{"description":"Answer only from a stored copy that is at least this many milliseconds old, and never read the page live. 0 accepts any stored copy. A page with no such copy is notFound.","maximum":9007199254740991,"minimum":0,"type":"integer"},"mobile":{"description":"Read the page as a phone would: a phone-sized screen and the mobile version of the site. The page loads in a browser.","type":"boolean"},"offset":{"description":"Start the markdown this many characters into the page, PDF or file. Send the nextOffset of the last answer, with the same maxChars, to read on. Not with query.","maximum":9007199254740991,"minimum":0,"type":"integer"},"onlyCleanContent":{"description":"Send true to have a model remove what onlyMainContent leaves behind in the markdown: cookie banners, ads, share widgets, breadcrumbs, sign-up prompts, comment prompts and related-article lists. It only removes whole paragraphs and lists; it never rewrites or adds text, and code blocks are always kept. Skipped with a warning when the page is too long to clean or the model does not answer. Not with zeroDataRetention. Summary, answers and highlights are made from the cleaned markdown.","type":"boolean"},"onlyMainContent":{"default":true,"description":"Keep only the page's main content, without menus, headers, footers and ads.","type":"boolean"},"parsers":{"description":"Only the pdf parser exists. Send \"pdf\" or { \"type\": \"pdf\", mode, maxPages, pages, blocks, pageMarkers } with the same meaning as in parse. Without mode a PDF is read from its text layer only; auto reads the picture of a page that has no text, and ocr reads the picture of every page, up to 20 pages. Each page of text that comes back costs 1 credit.","items":{"anyOf":[{"const":"pdf","type":"string"},{"additionalProperties":false,"properties":{"blocks":{"description":"Send true to also get the page's layout in blocks: each title, section header or run of text, with its page, reading order, position on the page (bbox as left, top, right, bottom from 0 to 1) and where its text sits in that page's markdown (span, as in pages). Tables, figures and formulas are not told apart. A page read from its picture is one block. No extra charge.","type":"boolean"},"maxPages":{"description":"Read at most this many pages, up to 100.","maximum":100,"minimum":1,"type":"integer"},"mode":{"description":"fast reads the text layer only. auto (the default) reads the text layer and reads the picture of any page that has none. ocr reads the picture of every page.","enum":["fast","auto","ocr"],"type":"string"},"pageMarkers":{"description":"Send true to mark page breaks in the markdown: pages are joined with \"---\" and a line, where N is the page that follows. No extra charge.","type":"boolean"},"pages":{"description":"Send true to also get each page's markdown in pages, as { pageNumber, markdown }. No extra charge.","type":"boolean"},"type":{"const":"pdf","type":"string"}},"required":["type"],"type":"object"}]},"minItems":1,"type":"array"},"profile":{"additionalProperties":false,"description":"Read the page with the cookies and local storage that earlier calls saved under this name, kept for your account for 30 days after the last use. A call with a profile always loads the page in a browser, costs 1 credit, the same as any page, and is never answered from a stored copy. Only one call at a time can save to a profile.","properties":{"name":{"description":"A name you choose, such as shop-login. Calls with the same name share state.","maxLength":128,"minLength":1,"type":"string"},"saveChanges":{"default":true,"description":"Keep the cookies and local storage this read leaves behind for the next call with this name. Send false to read with the profile without changing it.","type":"boolean"}},"required":["name"],"type":"object"},"proxy":{"description":"auto: basic first, enhanced once if the site refuses. basic: one plain attempt. enhanced: the stronger read from the start. Same price.","enum":["auto","basic","enhanced"],"type":"string"},"query":{"description":"What you are looking for on the page, such as refund window. A page longer than maxChars (8000 by default) comes back as the passages that match, in page order, each with the text around it and its table header; a shorter page comes back whole. Costs nothing extra, and a PDF is charged for the share of its pages that comes back. Not with offset.","maxLength":10000,"minLength":1,"type":"string"},"redactPII":{"anyOf":[{"type":"boolean"},{"additionalProperties":false,"description":"Options for redactPII.","properties":{"entities":{"default":["PERSON","EMAIL","PHONE","LOCATION","FINANCIAL","SECRET"],"description":"What to hide: PERSON, EMAIL, PHONE, LOCATION, FINANCIAL, SECRET. All by default.","items":{"enum":["PERSON","EMAIL","PHONE","LOCATION","FINANCIAL","SECRET"],"type":"string"},"minItems":1,"type":"array"},"mode":{"default":"accurate","description":"accurate finds names and places with the model and the rest by pattern. aggressive adds guesses that catch more and may hide a little too much. fast uses patterns only, so it finds no ordinary names or places.","enum":["accurate","aggressive","fast"],"type":"string"},"replaceStyle":{"default":"tag","description":"tag writes <EMAIL>, mask writes * for each character, remove deletes it.","enum":["tag","mask","remove"],"type":"string"}},"type":"object"}],"description":"Send true, or an object, to hide personal data in the markdown and in everything made from it (summary, answers, highlights, json). Links, html and rawHtml are not changed. A page the model cannot scan is refused rather than returned unredacted."},"removeBase64Images":{"description":"Images inside the page that carry their data in the address (data:image) are dropped by default. Send false to keep them in markdown and html.","type":"boolean"},"robotsUserAgent":{"not":{}},"skipTlsVerification":{"description":"Send true to read a page whose certificate is expired, self-signed or for another name. The read is not private against someone between us and the site.","type":"boolean"},"storeInCache":{"default":true,"description":"Send false to neither read nor keep a stored copy of this page.","type":"boolean"},"threatProtection":{"not":{}},"timeout":{"description":"How long to keep trying, in milliseconds, between 10 seconds and 2 minutes. Pages behind a bot check can need 10 to 30 seconds the first time.","maximum":300000,"minimum":1000,"type":"integer"},"toolDetail":{"not":{}},"url":{"description":"The page or PDF to read, such as https://bun.com/docs.","type":"string"},"urls":{"not":{}},"waitFor":{"description":"Extra milliseconds to wait before reading, up to 60000, for pages that load their content late. To wait for an element, add a wait action with a selector. A read that waits costs 1 credit, the same as any page.","maximum":60000,"minimum":0,"type":"integer"},"zeroDataRetention":{"default":false,"description":"Send true to keep nothing from this call: no stored copy is read or made, and nothing from it is logged. Costs 1 credit more per page. Not with a screenshot.","type":"boolean"}},"required":["url"],"type":"object"}before
{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"definitions":{"__schema0":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"items":{"allOf":[{"$ref":"#/definitions/__schema0"}]},"type":"array"},{"additionalProperties":{"allOf":[{"$ref":"#/definitions/__schema0"}]},"propertyNames":{"type":"string"},"type":"object"}]},"__schema1":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"items":{"allOf":[{"$ref":"#/definitions/__schema1"}]},"type":"array"},{"additionalProperties":{"allOf":[{"$ref":"#/definitions/__schema1"}]},"propertyNames":{"type":"string"},"type":"object"}]},"__schema2":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"items":{"allOf":[{"$ref":"#/definitions/__schema2"}]},"type":"array"},{"additionalProperties":{"allOf":[{"$ref":"#/definitions/__schema2"}]},"propertyNames":{"type":"string"},"type":"object"}]}},"properties":{"categories":{"description":"pdf: web results that are PDF files. research: scholarly papers, in a research list, ranked by relevance then citations. companies: companies that match the query, in a companies list, best matches first. The query can name a place, industry, employee count, founding year and funding stage, like fintech startups in Berlin, 50-200 employees. people: people that match the query, in a people list, best matches first. The query can name a role, company, place or research topic, like CFO of Stripe, founders of fintech startups in Berlin, or researchers on CRISPR base editing. Each person has roles, affiliations and public profile links, never contact details. developer: passages from GitHub READMEs, issues, merged pull requests, releases, developer docs and API operations, in a developer list; send it as an object to filter by repos, types, language and minStars. gov: statutes, regulations, register notices and bills from government sources, in the web group with category gov and the kind, jurisdiction and citation of each. videos: passages from what is said in YouTube videos shared under a Creative Commons license, in a videos list, one result per video, with the channel, the license and the watch link; the link carries &t= only when the passage's start is exact. The index is a June 2024 snapshot of English videos, so a link may be dead.","items":{"anyOf":[{"enum":["developer","gov","research","pdf","companies","people","videos"],"type":"string"},{"additionalProperties":false,"properties":{"type":{"enum":["developer","gov","research","pdf","companies","people","videos"],"type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"language":{"description":"Only repositories whose main language is this, like TypeScript.","minLength":1,"type":"string"},"minStars":{"description":"Only repositories with at least this many GitHub stars.","maximum":9007199254740991,"minimum":0,"type":"integer"},"repos":{"default":[],"description":"Only results from these GitHub repositories, as owner/name.","items":{"pattern":"^[\\w.-]+\\/[\\w.-]+$","type":"string"},"maxItems":5,"type":"array"},"type":{"const":"developer","type":"string"},"types":{"default":[],"description":"Only these result types: readme, issue, pull_request, release, operation, doc.","items":{"enum":["readme","issue","pull_request","release","operation","doc"],"type":"string"},"type":"array"}},"required":["type"],"type":"object"}]},"type":"array"},"country":{"description":"Two-letter country to search from, like us. uk is read as gb. Image results are always US.","pattern":"^[A-Za-z]{2}$","type":"string"},"domainTools":{"description":"Accepted for compatibility. We have no domain-matched tools to add, so true and false give the same results.","type":"boolean"},"enterprise":{"items":{"type":"string"},"maxItems":0,"type":"array"},"excludeDomains":{"items":{"type":"string"},"maxItems":10,"type":"array"},"highlights":{"default":true,"description":"On by default. When a web result's page is already stored, its description is the passages of that page that best match the query. Send false for the snippet the search engine shows.","type":"boolean"},"ignoreInvalidURLs":{"default":false,"description":"Leave out results whose address cannot be read as a page.","type":"boolean"},"includeDomains":{"items":{"type":"string"},"maxItems":10,"type":"array"},"limit":{"description":"Most results to return for each source. Default 10, or 5 with scrapeOptions, which reads every web and news result returned. News returns at most 50.","maximum":100,"minimum":1,"type":"integer"},"location":{"description":"Where to search from, like Germany or San Francisco,California,United States. The last part is the country and replaces country. A city before it narrows web results to that place.","minLength":1,"type":"string"},"maxAge":{"description":"Accept a stored answer up to this many milliseconds old, at most 30 days. Without it, 15 minutes for news and 1 hour for web and images. 0 always searches live.","maximum":9007199254740991,"minimum":0,"type":"integer"},"query":{"description":"What to search for, up to 500 characters. Search operators work in web results: quotes for an exact phrase, -word, site:, -site:, filetype:, inurl:, allinurl:, intitle: and allintitle:. In image results, imagesize:WIDTHxHEIGHT keeps images of exactly that size and larger:WIDTHxHEIGHT keeps images at least that large.","maxLength":500,"minLength":1,"type":"string"},"safe":{"description":"Hide explicit web, news and image results when true.","type":"boolean"},"scrapeOptions":{"additionalProperties":false,"description":"Reads each web and news result, as many as limit asks for, within timeout, and puts the passages that best match the query in each web description. Takes the options of scrape: formats (markdown, html, rawHtml, links, images, summary, screenshot, json and the rest), onlyMainContent, includeTags, excludeTags, maxAge, minAge, waitFor, mobile, timeout (per page), headers, actions, location, parsers, profile and zeroDataRetention. Costs what scrape costs for each page read: 1 credit, plus 4 for each summary or json with a schema or prompt that returns something.","properties":{"actions":{"description":"Up to 50 steps to run on the page, in order, before reading it: { \"type\": \"wait\", \"milliseconds\": 500 } (up to 30 seconds), { \"type\": \"wait\", \"selector\": \".results\" }, { \"type\": \"click\", \"selector\": \"button.more\" }, { \"type\": \"write\", \"text\": \"tides\" }, { \"type\": \"press\", \"key\": \"Enter\" }, { \"type\": \"scroll\", \"direction\": \"down\" } (also up, left or right; amount is pixels, \"viewport\" or \"max\"; maxScrolls 1 to 50; selector scrolls an inner container; \"max\" keeps scrolling until the page stops growing, for feeds that load as you go), { \"type\": \"screenshot\", \"fullPage\": true } (links come back in actions.screenshots), { \"type\": \"scrape\" } (the page at that point, in actions.scrapes), { \"type\": \"executeJavascript\", \"script\": \"document.title\" } (results in actions.javascriptReturns), { \"type\": \"pdf\", \"format\": \"A4\" } (links in actions.pdfs) or { \"type\": \"perform\", \"action\": \"Click the Load more button\" } (a step in plain words, up to 5 browser steps on this page, never leaving the site; at most 5 per call). A read with actions costs 1 credit, the same as any page; the actions themselves add nothing. If an action fails, you still get the page as it stood, with a warning that names the action and says why.","items":{"anyOf":[{"additionalProperties":false,"properties":{"milliseconds":{"maximum":30000,"minimum":1,"type":"integer"},"type":{"const":"wait","type":"string"}},"required":["type","milliseconds"],"type":"object"},{"additionalProperties":false,"properties":{"selector":{"minLength":1,"type":"string"},"type":{"const":"wait","type":"string"}},"required":["type","selector"],"type":"object"},{"additionalProperties":false,"properties":{"all":{"const":false,"type":"boolean"},"selector":{"minLength":1,"type":"string"},"type":{"const":"click","type":"string"}},"required":["type","selector"],"type":"object"},{"additionalProperties":false,"properties":{"text":{"minLength":1,"type":"string"},"type":{"const":"write","type":"string"}},"required":["type","text"],"type":"object"},{"additionalProperties":false,"properties":{"key":{"maxLength":40,"minLength":1,"type":"string"},"type":{"const":"press","type":"string"}},"required":["type","key"],"type":"object"},{"additionalProperties":false,"properties":{"amount":{"anyOf":[{"maximum":100000,"minimum":1,"type":"integer"},{"enum":["viewport","max"],"type":"string"}]},"direction":{"default":"down","enum":["up","down","left","right"],"type":"string"},"maxScrolls":{"maximum":50,"minimum":1,"type":"integer"},"selector":{"minLength":1,"type":"string"},"type":{"const":"scroll","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"fullPage":{"type":"boolean"},"quality":{"maximum":100,"minimum":1,"type":"integer"},"type":{"const":"screenshot","type":"string"},"viewport":{"additionalProperties":false,"properties":{"height":{"maximum":2160,"minimum":200,"type":"integer"},"width":{"maximum":3840,"minimum":200,"type":"integer"}},"required":["width","height"],"type":"object"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"type":{"const":"scrape","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"script":{"maxLength":20000,"minLength":1,"type":"string"},"type":{"const":"executeJavascript","type":"string"}},"required":["type","script"],"type":"object"},{"additionalProperties":false,"properties":{"format":{"enum":["Letter","Legal","Tabloid","Ledger","A0","A1","A2","A3","A4","A5","A6"],"type":"string"},"landscape":{"type":"boolean"},"scale":{"maximum":2,"minimum":0.1,"type":"number"},"type":{"const":"pdf","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"action":{"maxLength":500,"minLength":1,"type":"string"},"type":{"const":"perform","type":"string"}},"required":["type","action"],"type":"object"}]},"maxItems":50,"minItems":1,"type":"array"},"alexandria":{"not":{}},"auditMetadata":{"not":{}},"blockAds":{"description":"Ads and trackers are not loaded when a page runs in a browser. Send false to load them.","type":"boolean"},"checkPromptInjection":{"description":"Send true to scan the page text for instructions aimed at an AI model before anything is built from it. A page that has them is refused with 403 promptInjectionDetected and costs nothing. The scan adds 4 credits when it runs; a page it cannot scan fully comes back with a warning and no charge.","type":"boolean"},"domainTools":{"const":false,"type":"boolean"},"excludeTags":{"description":"Remove the parts of the page that match these CSS selectors, such as .comments.","items":{"minLength":1,"type":"string"},"minItems":1,"type":"array"},"fastMode":{"description":"Send true to read the page without opening a browser: the answer comes sooner, but a page that needs a browser, or that refuses a plain request, comes back as an error instead of being retried. Ignored when the call needs a browser (actions, screenshot, waitFor, mobile, profile, network, branding).","type":"boolean"},"formats":{"default":["markdown"],"description":"What to return: markdown (clean page text), summary (a short summary of the page), html (the cleaned page), rawHtml (the page as sent), audio and video (for a YouTube link: the audio track as an M4A file, or the video as an MP4 file, as a link that works for 1 hour), rawBase64 (the bytes the site sent, Base64 encoded, from a live read; metadata.contentType says what they are), links (every link on the page), images (every image address), screenshot (a link to a JPEG of the visible page, kept for 7 days), changeTracking (what changed in the markdown since your key last read this page with the same options, kept 30 days; add modes [\"git-diff\",\"json\"] with a schema or prompt to compare fields too), question (send { \"type\": \"question\", \"question\": \"...\" } to get answer, null when the page does not state one), product (title, brand, category, url, description and variants with price, sale, availability and images, or null) and menu (merchant, currency and sections of items with prices, or null) network (the JSON the page loaded while it rendered, up to 30 responses) and branding (the page's colors, fonts, typography, spacing, button and input styles, logo and brand images, read from how the page looks, with a field left out when the page does not show it). Send { \"type\": \"screenshot\", \"fullPage\": true } for the whole page. Send { \"type\": \"highlights\", \"query\": \"refund policy\" } for the passages that best match a query. Send { \"type\": \"json\", \"schema\": { \"type\": \"object\", \"properties\": { \"price\": { \"type\": \"number\" } } } } or { \"type\": \"json\", \"prompt\": \"the price and the stock\" } for fields filled from the page, each checked against it. Send { \"type\": \"json\", \"parser\": \"amazon-product\" } to get a site's own data as json instead of reading the page; GET /v1/parsers lists the parsers. Send { \"type\": \"json\", \"rules\": { \"title\": \"h1\", \"links\": { \"selector\": \"a\", \"type\": \"list\", \"output\": \"@href\" } } } to read the page with CSS rules and no model, at the page's own price. Send { \"type\": \"attributes\", \"selectors\": [{ \"selector\": \"a\", \"attribute\": \"href\" }] } for attribute values, returned in attributes. Without a parser or rules, json needs a schema or a prompt and is filled from the page. json with a schema or a prompt, summary, highlights, question, product, menu and changeTracking in json mode cost 4 credits more each when they return something. json with rules or a parser, and attributes, cost nothing more. A screenshot, network or branding read costs 1 credit, the same as any page. A PDF comes back as markdown only, and costs 1 credit more for each page read.","items":{"anyOf":[{"enum":["markdown","summary","html","rawHtml","rawBase64","links","images","network","branding","audio","video","screenshot","changeTracking","product","menu"],"type":"string"},{"additionalProperties":false,"properties":{"type":{"enum":["markdown","summary","html","rawHtml","rawBase64","links","images","network","branding","audio","video"],"type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"modes":{"description":"git-diff returns a unified diff of the markdown. json compares the fields in schema or prompt between this read and the last one. Without modes you get git-diff.","items":{"enum":["git-diff","json"],"type":"string"},"maxItems":2,"type":"array"},"prompt":{"description":"With json mode: what to compare, in plain words, such as the price and stock.","maxLength":10000,"minLength":1,"type":"string"},"schema":{"additionalProperties":{"$ref":"#/definitions/__schema0"},"description":"The fields to fill, as a JSON Schema (draft-07 or 2020-12) object with properties. Pydantic's model_json_schema() and zod's toJSONSchema() output work as they are. enum, const, anyOf, oneOf, nullable types, $ref with $defs, required, descriptions and any key names are read. Up to 100 top-level fields and 32 KB. A field the page does not state comes back null.","propertyNames":{"type":"string"},"type":"object"},"tag":{"type":"null"},"type":{"const":"changeTracking","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"question":{"description":"A question to answer from the page, such as what the refund window is.","maxLength":10000,"minLength":1,"type":"string"},"type":{"const":"question","type":"string"}},"required":["type","question"],"type":"object"},{"additionalProperties":false,"properties":{"type":{"const":"product","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"type":{"const":"menu","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"fullPage":{"default":false,"description":"Capture the whole page from top to bottom instead of the visible part.","type":"boolean"},"quality":{"description":"JPEG quality from 1 to 100. The default is 70.","maximum":100,"minimum":1,"type":"integer"},"type":{"const":"screenshot","type":"string"},"viewport":{"additionalProperties":false,"description":"The window size in pixels, such as { width: 390, height: 844 }.","properties":{"height":{"maximum":2160,"minimum":200,"type":"integer"},"width":{"maximum":3840,"minimum":200,"type":"integer"}},"required":["width","height"],"type":"object"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"count":{"default":5,"description":"How many passages to return, best match first.","maximum":20,"minimum":1,"type":"integer"},"query":{"description":"What you are looking for on the page, such as refund policy.","maxLength":10000,"minLength":1,"type":"string"},"type":{"const":"highlights","type":"string"}},"required":["type","query"],"type":"object"},{"additionalProperties":false,"properties":{"checkPromptInjection":{"description":"Deprecated: send checkPromptInjection at the top level of the call.","type":"boolean"},"options":{"additionalProperties":{"$ref":"#/definitions/__schema1"},"description":"Only with parser: extra inputs for it, such as { \"page\": 2 } for the next page of results or { \"minRating\": 4.5 } for a filter. GET /v1/parsers lists what each parser accepts.","propertyNames":{"type":"string"},"type":"object"},"parser":{"description":"Read the page with a named parser, which gives the site's own data as json. The url must be the kind of page the parser reads. Parsers are the only way to read some sites. GET /v1/parsers lists them.","type":"string"},"prompt":{"description":"What to pull from the page in plain words, such as the version and the release date.","maxLength":10000,"minLength":1,"type":"string"},"rules":{"additionalProperties":{"$ref":"#/definitions/__schema2"},"description":"Read the page with CSS rules instead of a model, no extra fee. Each field is a selector such as \"h1\" (the first match's text), \"a@href\" (an attribute) or { \"selector\": \"li\", \"type\": \"list\", \"output\": \"text\" | \"html\" | \"@attribute\" | { nested fields } }. A missing item is null and an unmatched list is []. Relative links become absolute. Up to 100 fields, 5 levels deep. Not with schema, prompt or parser.","propertyNames":{"type":"string"},"type":"object"},"schema":{"additionalProperties":{"$ref":"#/definitions/__schema0"},"description":"The fields to fill, as a JSON Schema (draft-07 or 2020-12) object with properties. Pydantic's model_json_schema() and zod's toJSONSchema() output work as they are. enum, const, anyOf, oneOf, nullable types, $ref with $defs, required, descriptions and any key names are read. Up to 100 top-level fields and 32 KB. A field the page does not state comes back null.","propertyNames":{"type":"string"},"type":"object"},"type":{"const":"json","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"selectors":{"description":"The elements and attributes to read, such as { selector: 'a.buy', attribute: 'href' }.","items":{"additionalProperties":false,"properties":{"attribute":{"maxLength":100,"minLength":1,"type":"string"},"selector":{"minLength":1,"type":"string"}},"required":["selector","attribute"],"type":"object"},"maxItems":50,"minItems":1,"type":"array"},"type":{"const":"attributes","type":"string"}},"required":["type","selectors"],"type":"object"}]},"maxItems":20,"minItems":1,"type":"array"},"headers":{"additionalProperties":{"maxLength":2000,"pattern":"^[\\t\\x20-\\x7e]*$","type":"string"},"description":"Extra request headers to send to the site, such as { \"x-plan\": \"pro\" }. A read with headers is never answered from or saved to a stored copy.","propertyNames":{"pattern":"^[A-Za-z0-9-]{1,64}$","type":"string"},"type":"object"},"ignoreRobotsTxt":{"const":false,"type":"boolean"},"includeTags":{"description":"Keep only the parts of the page that match these CSS selectors, such as article or .price. When set, onlyMainContent is not applied.","items":{"minLength":1,"type":"string"},"minItems":1,"type":"array"},"location":{"additionalProperties":false,"description":"Where to read the page from. The default is the United States.","properties":{"country":{"description":"Two-letter country code to read the page from, such as DE or JP.","type":"string"},"languages":{"description":"Languages to ask the site for, best first, such as [\"de\", \"en\"]. Sent as Accept-Language. A read with languages is never answered from or saved to a stored copy.","items":{"pattern":"^[A-Za-z]{2,3}(?:-[A-Za-z0-9]{2,8})*$","type":"string"},"maxItems":5,"minItems":1,"type":"array"}},"type":"object"},"lockdown":{"description":"Send true to answer only from a stored copy of the page and never read it live, whatever its age. A page with no stored copy is notFound. The same as minAge 0.","type":"boolean"},"maxAge":{"description":"Accept a stored answer up to this many milliseconds old, at most 30 days. Without it, 2 days, or less for a site whose pages change often, and a copy up to twice that age (at most 7 days) comes back at once as stale while a fresh read runs. 0 always reads the page live. metadata.cacheState says which one you got.","maximum":9007199254740991,"minimum":0,"type":"integer"},"minAge":{"description":"Answer only from a stored copy that is at least this many milliseconds old, and never read the page live. 0 accepts any stored copy. A page with no such copy is notFound.","maximum":9007199254740991,"minimum":0,"type":"integer"},"mobile":{"description":"Read the page as a phone would: a phone-sized screen and the mobile version of the site. The page loads in a browser.","type":"boolean"},"onlyCleanContent":{"description":"Send true to have a model remove what onlyMainContent leaves behind in the markdown: cookie banners, ads, share widgets, breadcrumbs, sign-up prompts, comment prompts and related-article lists. It only removes whole paragraphs and lists; it never rewrites or adds text, and code blocks are always kept. Skipped with a warning when the page is too long to clean or the model does not answer. Not with zeroDataRetention. Summary, answers and highlights are made from the cleaned markdown.","type":"boolean"},"onlyMainContent":{"default":true,"description":"Keep only the page's main content, without menus, headers, footers and ads.","type":"boolean"},"parsers":{"description":"Only the pdf parser exists. Send \"pdf\" or { \"type\": \"pdf\", mode, maxPages, pages, blocks, pageMarkers } with the same meaning as in parse. Without mode a PDF is read from its text layer only; auto reads the picture of a page that has no text, and ocr reads the picture of every page, up to 20 pages. Each page read costs 1 credit.","items":{"anyOf":[{"const":"pdf","type":"string"},{"additionalProperties":false,"properties":{"blocks":{"description":"Send true to also get the page's layout in blocks: each title, section header or run of text, with its page, reading order, position on the page (bbox as left, top, right, bottom from 0 to 1) and where its text sits in that page's markdown (span, as in pages). Tables, figures and formulas are not told apart. A page read from its picture is one block. No extra charge.","type":"boolean"},"maxPages":{"description":"Read at most this many pages, up to 100.","maximum":100,"minimum":1,"type":"integer"},"mode":{"description":"fast reads the text layer only. auto (the default) reads the text layer and reads the picture of any page that has none. ocr reads the picture of every page.","enum":["fast","auto","ocr"],"type":"string"},"pageMarkers":{"description":"Send true to mark page breaks in the markdown: pages are joined with \"---\" and a line, where N is the page that follows. No extra charge.","type":"boolean"},"pages":{"description":"Send true to also get each page's markdown in pages, as { pageNumber, markdown }. No extra charge.","type":"boolean"},"type":{"const":"pdf","type":"string"}},"required":["type"],"type":"object"}]},"minItems":1,"type":"array"},"profile":{"additionalProperties":false,"description":"Read the page with the cookies and local storage that earlier calls saved under this name, kept for your account for 30 days after the last use. A call with a profile always loads the page in a browser, costs 1 credit, the same as any page, and is never answered from a stored copy. Only one call at a time can save to a profile.","properties":{"name":{"description":"A name you choose, such as shop-login. Calls with the same name share state.","maxLength":128,"minLength":1,"type":"string"},"saveChanges":{"default":true,"description":"Keep the cookies and local storage this read leaves behind for the next call with this name. Send false to read with the profile without changing it.","type":"boolean"}},"required":["name"],"type":"object"},"proxy":{"description":"auto: basic first, enhanced once if the site refuses. basic: one plain attempt. enhanced: the stronger read from the start. Same price.","enum":["auto","basic","enhanced"],"type":"string"},"redactPII":{"anyOf":[{"type":"boolean"},{"additionalProperties":false,"description":"Options for redactPII.","properties":{"entities":{"default":["PERSON","EMAIL","PHONE","LOCATION","FINANCIAL","SECRET"],"description":"What to hide: PERSON, EMAIL, PHONE, LOCATION, FINANCIAL, SECRET. All by default.","items":{"enum":["PERSON","EMAIL","PHONE","LOCATION","FINANCIAL","SECRET"],"type":"string"},"minItems":1,"type":"array"},"mode":{"default":"accurate","description":"accurate finds names and places with the model and the rest by pattern. aggressive adds guesses that catch more and may hide a little too much. fast uses patterns only, so it finds no ordinary names or places.","enum":["accurate","aggressive","fast"],"type":"string"},"replaceStyle":{"default":"tag","description":"tag writes <EMAIL>, mask writes * for each character, remove deletes it.","enum":["tag","mask","remove"],"type":"string"}},"type":"object"}],"description":"Send true, or an object, to hide personal data in the markdown and in everything made from it (summary, answers, highlights, json). Links, html and rawHtml are not changed. A page the model cannot scan is refused rather than returned unredacted."},"removeBase64Images":{"description":"Images inside the page that carry their data in the address (data:image) are dropped by default. Send false to keep them in markdown and html.","type":"boolean"},"robotsUserAgent":{"not":{}},"skipTlsVerification":{"description":"Send true to read a page whose certificate is expired, self-signed or for another name. The read is not private against someone between us and the site.","type":"boolean"},"storeInCache":{"default":true,"description":"Send false to neither read nor keep a stored copy of this page.","type":"boolean"},"threatProtection":{"not":{}},"timeout":{"description":"How long to keep trying, in milliseconds, between 10 seconds and 2 minutes. Pages behind a bot check can need 10 to 30 seconds the first time.","maximum":300000,"minimum":1000,"type":"integer"},"toolDetail":{"not":{}},"waitFor":{"description":"Extra milliseconds to wait before reading, up to 60000, for pages that load their content late. To wait for an element, add a wait action with a selector. A read that waits costs 1 credit, the same as any page.","maximum":60000,"minimum":0,"type":"integer"},"zeroDataRetention":{"default":false,"description":"Send true to keep nothing from this call: no stored copy is read or made, and nothing from it is logged. Costs 1 credit more per page. Not with a screenshot.","type":"boolean"}},"type":"object"},"sources":{"description":"What to search: web, news, images. Each is a string or {type}. Default web, or none when categories asks for research, companies, people, developer, gov or videos.","items":{"anyOf":[{"anyOf":[{"enum":["web","news","images"],"type":"string"},{"additionalProperties":false,"properties":{"location":{"type":"string"},"tbs":{"type":"string"},"type":{"const":"web","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"type":{"enum":["news","images"],"type":"string"}},"required":["type"],"type":"object"}]},{"anyOf":[{"enum":["alexandria","exchange"],"type":"string"},{"additionalProperties":false,"properties":{"type":{"enum":["alexandria","exchange"],"type":"string"}},"required":["type"],"type":"object"}]}]},"maxItems":5,"minItems":1,"type":"array"},"tbs":{"description":"Time filter: qdr:d, qdr:w, qdr:m or qdr:y, or cdr:1,cd_min:MM/DD/YYYY,cd_max:MM/DD/YYYY, plus sbd:1, like sbd:1,qdr:w. sbd:1 sorts newest first; results without a date come last. Web takes all of them; news takes qdr and sbd; images take none.","minLength":1,"type":"string"},"threatProtection":{"additionalProperties":{},"properties":{},"type":"object"},"timeout":{"default":60000,"description":"Milliseconds to wait for the sources, from 1,000 to 120,000; more is read as 120,000. Default 60,000. A source that has not answered by then is left out with a warning. When none has, the call fails and costs nothing.","maximum":9007199254740991,"minimum":1000,"type":"integer"},"toolDetail":{"const":"compact","type":"string"}},"required":["query"],"type":"object"}after
{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"definitions":{"__schema0":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"items":{"allOf":[{"$ref":"#/definitions/__schema0"}]},"type":"array"},{"additionalProperties":{"allOf":[{"$ref":"#/definitions/__schema0"}]},"propertyNames":{"type":"string"},"type":"object"}]},"__schema1":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"items":{"allOf":[{"$ref":"#/definitions/__schema1"}]},"type":"array"},{"additionalProperties":{"allOf":[{"$ref":"#/definitions/__schema1"}]},"propertyNames":{"type":"string"},"type":"object"}]},"__schema2":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"items":{"allOf":[{"$ref":"#/definitions/__schema2"}]},"type":"array"},{"additionalProperties":{"allOf":[{"$ref":"#/definitions/__schema2"}]},"propertyNames":{"type":"string"},"type":"object"}]}},"properties":{"categories":{"description":"pdf: web results that are PDF files. research: scholarly papers, in a research list, ranked by relevance then citations. companies: companies that match the query, in a companies list, best matches first. The query can name a place, industry, employee count, founding year and funding stage, like fintech startups in Berlin, 50-200 employees. people: people that match the query, in a people list, best matches first. The query can name a role, company, place or research topic, like CFO of Stripe, founders of fintech startups in Berlin, or researchers on CRISPR base editing. Each person has roles, affiliations and public profile links, never contact details. developer: passages from GitHub READMEs, issues, merged pull requests, releases, developer docs and API operations, in a developer list; send it as an object to filter by repos, types, language and minStars. gov: statutes, regulations, register notices and bills from government sources, in the web group with category gov and the kind, jurisdiction and citation of each. videos: passages from what is said in YouTube videos shared under a Creative Commons license, in a videos list, one result per video, with the channel, the license and the watch link; the link carries &t= only when the passage's start is exact. The index is a June 2024 snapshot of English videos, so a link may be dead.","items":{"anyOf":[{"enum":["developer","gov","research","pdf","companies","people","videos"],"type":"string"},{"additionalProperties":false,"properties":{"type":{"enum":["developer","gov","research","pdf","companies","people","videos"],"type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"language":{"description":"Only repositories whose main language is this, like TypeScript.","minLength":1,"type":"string"},"minStars":{"description":"Only repositories with at least this many GitHub stars.","maximum":9007199254740991,"minimum":0,"type":"integer"},"repos":{"default":[],"description":"Only results from these GitHub repositories, as owner/name.","items":{"pattern":"^[\\w.-]+\\/[\\w.-]+$","type":"string"},"maxItems":5,"type":"array"},"type":{"const":"developer","type":"string"},"types":{"default":[],"description":"Only these result types: readme, issue, pull_request, release, operation, doc.","items":{"enum":["readme","issue","pull_request","release","operation","doc"],"type":"string"},"type":"array"}},"required":["type"],"type":"object"}]},"type":"array"},"country":{"description":"Two-letter country to search from, like us. uk is read as gb. Image results are always US.","pattern":"^[A-Za-z]{2}$","type":"string"},"domainTools":{"description":"Accepted for compatibility. We have no domain-matched tools to add, so true and false give the same results.","type":"boolean"},"enterprise":{"items":{"type":"string"},"maxItems":0,"type":"array"},"excludeDomains":{"items":{"type":"string"},"maxItems":10,"type":"array"},"highlights":{"default":true,"description":"On by default. When a web result's page is already stored, its description is the passages of that page that best match the query. Send false for the snippet the search engine shows.","type":"boolean"},"ignoreInvalidURLs":{"default":false,"description":"Leave out results whose address cannot be read as a page.","type":"boolean"},"includeDomains":{"items":{"type":"string"},"maxItems":10,"type":"array"},"limit":{"description":"Most results to return for each source. Default 10, or 5 with scrapeOptions, which reads every web and news result returned. News returns at most 50.","maximum":100,"minimum":1,"type":"integer"},"location":{"description":"Where to search from, like Germany or San Francisco,California,United States. The last part is the country and replaces country. A city before it narrows web results to that place.","minLength":1,"type":"string"},"maxAge":{"description":"Accept a stored answer up to this many milliseconds old, at most 30 days. Without it, 15 minutes for news and 1 hour for web and images. 0 always searches live.","maximum":9007199254740991,"minimum":0,"type":"integer"},"query":{"description":"What to search for, up to 500 characters. Search operators work in web results: quotes for an exact phrase, -word, site:, -site:, filetype:, inurl:, allinurl:, intitle: and allintitle:. In image results, imagesize:WIDTHxHEIGHT keeps images of exactly that size and larger:WIDTHxHEIGHT keeps images at least that large.","maxLength":500,"minLength":1,"type":"string"},"safe":{"description":"Hide explicit web, news and image results when true.","type":"boolean"},"scrapeOptions":{"additionalProperties":false,"description":"Reads each web and news result, as many as limit asks for, within timeout, and puts the passages that best match the query in each web description. Takes the options of scrape: formats (markdown, html, rawHtml, links, images, summary, screenshot, json and the rest), onlyMainContent, includeTags, excludeTags, maxAge, minAge, waitFor, mobile, timeout (per page), headers, actions, location, parsers, profile and zeroDataRetention. Costs what scrape costs for each page read: 1 credit, plus 4 for each summary or json with a schema or prompt that returns something.","properties":{"actions":{"description":"Up to 50 steps to run on the page, in order, before reading it: { \"type\": \"wait\", \"milliseconds\": 500 } (up to 30 seconds), { \"type\": \"wait\", \"selector\": \".results\" }, { \"type\": \"click\", \"selector\": \"button.more\" }, { \"type\": \"write\", \"text\": \"tides\" }, { \"type\": \"press\", \"key\": \"Enter\" }, { \"type\": \"scroll\", \"direction\": \"down\" } (also up, left or right; amount is pixels, \"viewport\" or \"max\"; maxScrolls 1 to 50; selector scrolls an inner container; \"max\" keeps scrolling until the page stops growing, for feeds that load as you go), { \"type\": \"screenshot\", \"fullPage\": true } (links come back in actions.screenshots), { \"type\": \"scrape\" } (the page at that point, in actions.scrapes), { \"type\": \"executeJavascript\", \"script\": \"document.title\" } (results in actions.javascriptReturns), { \"type\": \"pdf\", \"format\": \"A4\" } (links in actions.pdfs) or { \"type\": \"perform\", \"action\": \"Click the Load more button\" } (a step in plain words, up to 5 browser steps on this page, never leaving the site; at most 5 per call). A read with actions costs 1 credit, the same as any page; the actions themselves add nothing. If an action fails, you still get the page as it stood, with a warning that names the action and says why.","items":{"anyOf":[{"additionalProperties":false,"properties":{"milliseconds":{"maximum":30000,"minimum":1,"type":"integer"},"type":{"const":"wait","type":"string"}},"required":["type","milliseconds"],"type":"object"},{"additionalProperties":false,"properties":{"selector":{"minLength":1,"type":"string"},"type":{"const":"wait","type":"string"}},"required":["type","selector"],"type":"object"},{"additionalProperties":false,"properties":{"all":{"const":false,"type":"boolean"},"selector":{"minLength":1,"type":"string"},"type":{"const":"click","type":"string"}},"required":["type","selector"],"type":"object"},{"additionalProperties":false,"properties":{"text":{"minLength":1,"type":"string"},"type":{"const":"write","type":"string"}},"required":["type","text"],"type":"object"},{"additionalProperties":false,"properties":{"key":{"maxLength":40,"minLength":1,"type":"string"},"type":{"const":"press","type":"string"}},"required":["type","key"],"type":"object"},{"additionalProperties":false,"properties":{"amount":{"anyOf":[{"maximum":100000,"minimum":1,"type":"integer"},{"enum":["viewport","max"],"type":"string"}]},"direction":{"default":"down","enum":["up","down","left","right"],"type":"string"},"maxScrolls":{"maximum":50,"minimum":1,"type":"integer"},"selector":{"minLength":1,"type":"string"},"type":{"const":"scroll","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"fullPage":{"type":"boolean"},"quality":{"maximum":100,"minimum":1,"type":"integer"},"type":{"const":"screenshot","type":"string"},"viewport":{"additionalProperties":false,"properties":{"height":{"maximum":2160,"minimum":200,"type":"integer"},"width":{"maximum":3840,"minimum":200,"type":"integer"}},"required":["width","height"],"type":"object"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"type":{"const":"scrape","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"script":{"maxLength":20000,"minLength":1,"type":"string"},"type":{"const":"executeJavascript","type":"string"}},"required":["type","script"],"type":"object"},{"additionalProperties":false,"properties":{"format":{"enum":["Letter","Legal","Tabloid","Ledger","A0","A1","A2","A3","A4","A5","A6"],"type":"string"},"landscape":{"type":"boolean"},"scale":{"maximum":2,"minimum":0.1,"type":"number"},"type":{"const":"pdf","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"action":{"maxLength":500,"minLength":1,"type":"string"},"type":{"const":"perform","type":"string"}},"required":["type","action"],"type":"object"}]},"maxItems":50,"minItems":1,"type":"array"},"alexandria":{"not":{}},"auditMetadata":{"not":{}},"blockAds":{"description":"Ads and trackers are not loaded when a page runs in a browser. Send false to load them.","type":"boolean"},"checkPromptInjection":{"description":"Send true to scan the page text for instructions aimed at an AI model before anything is built from it. A page that has them is refused with 403 promptInjectionDetected and costs nothing. The scan adds 4 credits when it runs; a page it cannot scan fully comes back with a warning and no charge.","type":"boolean"},"domainTools":{"const":false,"type":"boolean"},"excludeTags":{"description":"Remove the parts of the page that match these CSS selectors, such as .comments.","items":{"minLength":1,"type":"string"},"minItems":1,"type":"array"},"fastMode":{"description":"Send true to read the page without opening a browser: the answer comes sooner, but a page that needs a browser, or that refuses a plain request, comes back as an error instead of being retried. Ignored when the call needs a browser (actions, screenshot, waitFor, mobile, profile, network, branding).","type":"boolean"},"formats":{"default":["markdown"],"description":"What to return: markdown (clean page text), summary (a short summary of the page), html (the cleaned page), rawHtml (the page as sent), audio and video (for a YouTube link: the audio track as an M4A file, or the video as an MP4 file, as a link that works for 1 hour), rawBase64 (the bytes the site sent, Base64 encoded, from a live read; metadata.contentType says what they are), links (every link on the page), images (every image address), screenshot (a link to a JPEG of the visible page, kept for 7 days), changeTracking (what changed in the markdown since your key last read this page with the same options, kept 30 days; add modes [\"git-diff\",\"json\"] with a schema or prompt to compare fields too), question (send { \"type\": \"question\", \"question\": \"...\" } to get answer, null when the page does not state one), product (title, brand, category, url, description and variants with price, sale, availability and images, or null) and menu (merchant, currency and sections of items with prices, or null) network (the JSON the page loaded while it rendered, up to 30 responses) and branding (the page's colors, fonts, typography, spacing, button and input styles, logo and brand images, read from how the page looks, with a field left out when the page does not show it). Send { \"type\": \"screenshot\", \"fullPage\": true } for the whole page. Send { \"type\": \"highlights\", \"query\": \"refund policy\" } for the passages that best match a query. Send { \"type\": \"json\", \"schema\": { \"type\": \"object\", \"properties\": { \"price\": { \"type\": \"number\" } } } } or { \"type\": \"json\", \"prompt\": \"the price and the stock\" } for fields filled from the page, each checked against it. Send { \"type\": \"json\", \"parser\": \"amazon-product\" } to get a site's own data as json instead of reading the page; GET /v1/parsers lists the parsers. Send { \"type\": \"json\", \"rules\": { \"title\": \"h1\", \"links\": { \"selector\": \"a\", \"type\": \"list\", \"output\": \"@href\" } } } to read the page with CSS rules and no model, at the page's own price. Send { \"type\": \"attributes\", \"selectors\": [{ \"selector\": \"a\", \"attribute\": \"href\" }] } for attribute values, returned in attributes. Without a parser or rules, json needs a schema or a prompt and is filled from the page. json with a schema or a prompt, summary, highlights, question, product, menu and changeTracking in json mode cost 4 credits more each when they return something. json with rules or a parser, and attributes, cost nothing more. A screenshot, network or branding read costs 1 credit, the same as any page. A PDF comes back as markdown only, and costs 1 credit more for each page of text that comes back. A CSV or an Excel .xlsx file comes back as markdown tables.","items":{"anyOf":[{"enum":["markdown","summary","html","rawHtml","rawBase64","links","images","network","branding","audio","video","screenshot","changeTracking","product","menu"],"type":"string"},{"additionalProperties":false,"properties":{"type":{"enum":["markdown","summary","html","rawHtml","rawBase64","links","images","network","branding","audio","video"],"type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"modes":{"description":"git-diff returns a unified diff of the markdown. json compares the fields in schema or prompt between this read and the last one. Without modes you get git-diff.","items":{"enum":["git-diff","json"],"type":"string"},"maxItems":2,"type":"array"},"prompt":{"description":"With json mode: what to compare, in plain words, such as the price and stock.","maxLength":10000,"minLength":1,"type":"string"},"schema":{"additionalProperties":{"$ref":"#/definitions/__schema0"},"description":"The fields to fill, as a JSON Schema (draft-07 or 2020-12) object with properties. Pydantic's model_json_schema() and zod's toJSONSchema() output work as they are. enum, const, anyOf, oneOf, nullable types, $ref with $defs, required, descriptions and any key names are read. Up to 100 top-level fields and 32 KB. A field the page does not state comes back null.","propertyNames":{"type":"string"},"type":"object"},"tag":{"type":"null"},"type":{"const":"changeTracking","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"question":{"description":"A question to answer from the page, such as what the refund window is.","maxLength":10000,"minLength":1,"type":"string"},"type":{"const":"question","type":"string"}},"required":["type","question"],"type":"object"},{"additionalProperties":false,"properties":{"type":{"const":"product","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"type":{"const":"menu","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"fullPage":{"default":false,"description":"Capture the whole page from top to bottom instead of the visible part.","type":"boolean"},"quality":{"description":"JPEG quality from 1 to 100. The default is 70.","maximum":100,"minimum":1,"type":"integer"},"type":{"const":"screenshot","type":"string"},"viewport":{"additionalProperties":false,"description":"The window size in pixels, such as { width: 390, height: 844 }.","properties":{"height":{"maximum":2160,"minimum":200,"type":"integer"},"width":{"maximum":3840,"minimum":200,"type":"integer"}},"required":["width","height"],"type":"object"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"count":{"default":5,"description":"How many passages to return, best match first.","maximum":20,"minimum":1,"type":"integer"},"query":{"description":"What you are looking for on the page, such as refund policy.","maxLength":10000,"minLength":1,"type":"string"},"type":{"const":"highlights","type":"string"}},"required":["type","query"],"type":"object"},{"additionalProperties":false,"properties":{"checkPromptInjection":{"description":"Deprecated: send checkPromptInjection at the top level of the call.","type":"boolean"},"options":{"additionalProperties":{"$ref":"#/definitions/__schema1"},"description":"Only with parser: extra inputs for it, such as { \"page\": 2 } for the next page of results or { \"minRating\": 4.5 } for a filter. GET /v1/parsers lists what each parser accepts.","propertyNames":{"type":"string"},"type":"object"},"parser":{"description":"Read the page with a named parser, which gives the site's own data as json. The url must be the kind of page the parser reads. Parsers are the only way to read some sites. GET /v1/parsers lists them.","type":"string"},"prompt":{"description":"What to pull from the page in plain words, such as the version and the release date.","maxLength":10000,"minLength":1,"type":"string"},"rules":{"additionalProperties":{"$ref":"#/definitions/__schema2"},"description":"Read the page with CSS rules instead of a model, no extra fee. Each field is a selector such as \"h1\" (the first match's text), \"a@href\" (an attribute) or { \"selector\": \"li\", \"type\": \"list\", \"output\": \"text\" | \"html\" | \"@attribute\" | { nested fields } }. A missing item is null and an unmatched list is []. Relative links become absolute. Up to 100 fields, 5 levels deep. Not with schema, prompt or parser.","propertyNames":{"type":"string"},"type":"object"},"schema":{"additionalProperties":{"$ref":"#/definitions/__schema0"},"description":"The fields to fill, as a JSON Schema (draft-07 or 2020-12) object with properties. Pydantic's model_json_schema() and zod's toJSONSchema() output work as they are. enum, const, anyOf, oneOf, nullable types, $ref with $defs, required, descriptions and any key names are read. Up to 100 top-level fields and 32 KB. A field the page does not state comes back null.","propertyNames":{"type":"string"},"type":"object"},"type":{"const":"json","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"selectors":{"description":"The elements and attributes to read, such as { selector: 'a.buy', attribute: 'href' }.","items":{"additionalProperties":false,"properties":{"attribute":{"maxLength":100,"minLength":1,"type":"string"},"selector":{"minLength":1,"type":"string"}},"required":["selector","attribute"],"type":"object"},"maxItems":50,"minItems":1,"type":"array"},"type":{"const":"attributes","type":"string"}},"required":["type","selectors"],"type":"object"}]},"maxItems":20,"minItems":1,"type":"array"},"headers":{"additionalProperties":{"maxLength":2000,"pattern":"^[\\t\\x20-\\x7e]*$","type":"string"},"description":"Extra request headers to send to the site, such as { \"x-plan\": \"pro\" }. A read with headers is never answered from or saved to a stored copy.","propertyNames":{"pattern":"^[A-Za-z0-9-]{1,64}$","type":"string"},"type":"object"},"ignoreRobotsTxt":{"const":false,"type":"boolean"},"includeTags":{"description":"Keep only the parts of the page that match these CSS selectors, such as article or .price. When set, onlyMainContent is not applied.","items":{"minLength":1,"type":"string"},"minItems":1,"type":"array"},"location":{"additionalProperties":false,"description":"Where to read the page from. The default is the United States.","properties":{"country":{"description":"Two-letter country code to read the page from, such as DE or JP.","type":"string"},"languages":{"description":"Languages to ask the site for, best first, such as [\"de\", \"en\"]. Sent as Accept-Language. A read with languages is never answered from or saved to a stored copy.","items":{"pattern":"^[A-Za-z]{2,3}(?:-[A-Za-z0-9]{2,8})*$","type":"string"},"maxItems":5,"minItems":1,"type":"array"}},"type":"object"},"lockdown":{"description":"Send true to answer only from a stored copy of the page and never read it live, whatever its age. A page with no stored copy is notFound. The same as minAge 0.","type":"boolean"},"maxAge":{"description":"Accept a stored answer up to this many milliseconds old, at most 30 days. Without it, 2 days, or less for a site whose pages change often, and a copy up to twice that age (at most 7 days) comes back at once as stale while a fresh read runs. 0 always reads the page live. metadata.cacheState says which one you got.","maximum":9007199254740991,"minimum":0,"type":"integer"},"minAge":{"description":"Answer only from a stored copy that is at least this many milliseconds old, and never read the page live. 0 accepts any stored copy. A page with no such copy is notFound.","maximum":9007199254740991,"minimum":0,"type":"integer"},"mobile":{"description":"Read the page as a phone would: a phone-sized screen and the mobile version of the site. The page loads in a browser.","type":"boolean"},"onlyCleanContent":{"description":"Send true to have a model remove what onlyMainContent leaves behind in the markdown: cookie banners, ads, share widgets, breadcrumbs, sign-up prompts, comment prompts and related-article lists. It only removes whole paragraphs and lists; it never rewrites or adds text, and code blocks are always kept. Skipped with a warning when the page is too long to clean or the model does not answer. Not with zeroDataRetention. Summary, answers and highlights are made from the cleaned markdown.","type":"boolean"},"onlyMainContent":{"default":true,"description":"Keep only the page's main content, without menus, headers, footers and ads.","type":"boolean"},"parsers":{"description":"Only the pdf parser exists. Send \"pdf\" or { \"type\": \"pdf\", mode, maxPages, pages, blocks, pageMarkers } with the same meaning as in parse. Without mode a PDF is read from its text layer only; auto reads the picture of a page that has no text, and ocr reads the picture of every page, up to 20 pages. Each page of text that comes back costs 1 credit.","items":{"anyOf":[{"const":"pdf","type":"string"},{"additionalProperties":false,"properties":{"blocks":{"description":"Send true to also get the page's layout in blocks: each title, section header or run of text, with its page, reading order, position on the page (bbox as left, top, right, bottom from 0 to 1) and where its text sits in that page's markdown (span, as in pages). Tables, figures and formulas are not told apart. A page read from its picture is one block. No extra charge.","type":"boolean"},"maxPages":{"description":"Read at most this many pages, up to 100.","maximum":100,"minimum":1,"type":"integer"},"mode":{"description":"fast reads the text layer only. auto (the default) reads the text layer and reads the picture of any page that has none. ocr reads the picture of every page.","enum":["fast","auto","ocr"],"type":"string"},"pageMarkers":{"description":"Send true to mark page breaks in the markdown: pages are joined with \"---\" and a line, where N is the page that follows. No extra charge.","type":"boolean"},"pages":{"description":"Send true to also get each page's markdown in pages, as { pageNumber, markdown }. No extra charge.","type":"boolean"},"type":{"const":"pdf","type":"string"}},"required":["type"],"type":"object"}]},"minItems":1,"type":"array"},"profile":{"additionalProperties":false,"description":"Read the page with the cookies and local storage that earlier calls saved under this name, kept for your account for 30 days after the last use. A call with a profile always loads the page in a browser, costs 1 credit, the same as any page, and is never answered from a stored copy. Only one call at a time can save to a profile.","properties":{"name":{"description":"A name you choose, such as shop-login. Calls with the same name share state.","maxLength":128,"minLength":1,"type":"string"},"saveChanges":{"default":true,"description":"Keep the cookies and local storage this read leaves behind for the next call with this name. Send false to read with the profile without changing it.","type":"boolean"}},"required":["name"],"type":"object"},"proxy":{"description":"auto: basic first, enhanced once if the site refuses. basic: one plain attempt. enhanced: the stronger read from the start. Same price.","enum":["auto","basic","enhanced"],"type":"string"},"redactPII":{"anyOf":[{"type":"boolean"},{"additionalProperties":false,"description":"Options for redactPII.","properties":{"entities":{"default":["PERSON","EMAIL","PHONE","LOCATION","FINANCIAL","SECRET"],"description":"What to hide: PERSON, EMAIL, PHONE, LOCATION, FINANCIAL, SECRET. All by default.","items":{"enum":["PERSON","EMAIL","PHONE","LOCATION","FINANCIAL","SECRET"],"type":"string"},"minItems":1,"type":"array"},"mode":{"default":"accurate","description":"accurate finds names and places with the model and the rest by pattern. aggressive adds guesses that catch more and may hide a little too much. fast uses patterns only, so it finds no ordinary names or places.","enum":["accurate","aggressive","fast"],"type":"string"},"replaceStyle":{"default":"tag","description":"tag writes <EMAIL>, mask writes * for each character, remove deletes it.","enum":["tag","mask","remove"],"type":"string"}},"type":"object"}],"description":"Send true, or an object, to hide personal data in the markdown and in everything made from it (summary, answers, highlights, json). Links, html and rawHtml are not changed. A page the model cannot scan is refused rather than returned unredacted."},"removeBase64Images":{"description":"Images inside the page that carry their data in the address (data:image) are dropped by default. Send false to keep them in markdown and html.","type":"boolean"},"robotsUserAgent":{"not":{}},"skipTlsVerification":{"description":"Send true to read a page whose certificate is expired, self-signed or for another name. The read is not private against someone between us and the site.","type":"boolean"},"storeInCache":{"default":true,"description":"Send false to neither read nor keep a stored copy of this page.","type":"boolean"},"threatProtection":{"not":{}},"timeout":{"description":"How long to keep trying, in milliseconds, between 10 seconds and 2 minutes. Pages behind a bot check can need 10 to 30 seconds the first time.","maximum":300000,"minimum":1000,"type":"integer"},"toolDetail":{"not":{}},"waitFor":{"description":"Extra milliseconds to wait before reading, up to 60000, for pages that load their content late. To wait for an element, add a wait action with a selector. A read that waits costs 1 credit, the same as any page.","maximum":60000,"minimum":0,"type":"integer"},"zeroDataRetention":{"default":false,"description":"Send true to keep nothing from this call: no stored copy is read or made, and nothing from it is logged. Costs 1 credit more per page. Not with a screenshot.","type":"boolean"}},"type":"object"},"sources":{"description":"What to search: web, news, images. Each is a string or {type}. Default web, or none when categories asks for research, companies, people, developer, gov or videos.","items":{"anyOf":[{"anyOf":[{"enum":["web","news","images"],"type":"string"},{"additionalProperties":false,"properties":{"location":{"type":"string"},"tbs":{"type":"string"},"type":{"const":"web","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"type":{"enum":["news","images"],"type":"string"}},"required":["type"],"type":"object"}]},{"anyOf":[{"enum":["alexandria","exchange"],"type":"string"},{"additionalProperties":false,"properties":{"type":{"enum":["alexandria","exchange"],"type":"string"}},"required":["type"],"type":"object"}]}]},"maxItems":5,"minItems":1,"type":"array"},"tbs":{"description":"Time filter: qdr:d, qdr:w, qdr:m or qdr:y, or cdr:1,cd_min:MM/DD/YYYY,cd_max:MM/DD/YYYY, plus sbd:1, like sbd:1,qdr:w. sbd:1 sorts newest first; results without a date come last. Web takes all of them; news takes qdr and sbd; images take none.","minLength":1,"type":"string"},"threatProtection":{"additionalProperties":{},"properties":{},"type":"object"},"timeout":{"default":60000,"description":"Milliseconds to wait for the sources, from 1,000 to 120,000; more is read as 120,000. Default 60,000. A source that has not answered by then is left out with a warning. When none has, the call fails and costs nothing.","maximum":9007199254740991,"minimum":1000,"type":"integer"},"toolDetail":{"const":"compact","type":"string"}},"required":["query"],"type":"object"}before
{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"definitions":{"__schema0":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"items":{"allOf":[{"$ref":"#/definitions/__schema0"}]},"type":"array"},{"additionalProperties":{"allOf":[{"$ref":"#/definitions/__schema0"}]},"propertyNames":{"type":"string"},"type":"object"}]},"__schema1":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"items":{"allOf":[{"$ref":"#/definitions/__schema1"}]},"type":"array"},{"additionalProperties":{"allOf":[{"$ref":"#/definitions/__schema1"}]},"propertyNames":{"type":"string"},"type":"object"}]},"__schema2":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"items":{"allOf":[{"$ref":"#/definitions/__schema2"}]},"type":"array"},{"additionalProperties":{"allOf":[{"$ref":"#/definitions/__schema2"}]},"propertyNames":{"type":"string"},"type":"object"}]}},"properties":{"categories":{"description":"pdf: web results that are PDF files. research: scholarly papers, in a research list, ranked by relevance then citations. companies: companies that match the query, in a companies list, best matches first. The query can name a place, industry, employee count, founding year and funding stage, like fintech startups in Berlin, 50-200 employees. people: people that match the query, in a people list, best matches first. The query can name a role, company, place or research topic, like CFO of Stripe, founders of fintech startups in Berlin, or researchers on CRISPR base editing. Each person has roles, affiliations and public profile links, never contact details. developer: passages from GitHub READMEs, issues, merged pull requests, releases, developer docs and API operations, in a developer list; send it as an object to filter by repos, types, language and minStars. videos: passages from what is said in YouTube videos shared under a Creative Commons license, in a videos list, one result per video, with the channel, the license and the watch link; the link carries &t= only when the passage's start is exact. The index is a June 2024 snapshot of English videos, so a link may be dead.","items":{"anyOf":[{"enum":["developer","gov","research","pdf","companies","people","videos"],"type":"string"},{"additionalProperties":false,"properties":{"type":{"enum":["developer","gov","research","pdf","companies","people","videos"],"type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"language":{"description":"Only repositories whose main language is this, like TypeScript.","minLength":1,"type":"string"},"minStars":{"description":"Only repositories with at least this many GitHub stars.","maximum":9007199254740991,"minimum":0,"type":"integer"},"repos":{"default":[],"description":"Only results from these GitHub repositories, as owner/name.","items":{"pattern":"^[\\w.-]+\\/[\\w.-]+$","type":"string"},"maxItems":5,"type":"array"},"type":{"const":"developer","type":"string"},"types":{"default":[],"description":"Only these result types: readme, issue, pull_request, release, operation, doc.","items":{"enum":["readme","issue","pull_request","release","operation","doc"],"type":"string"},"type":"array"}},"required":["type"],"type":"object"}]},"type":"array"},"country":{"description":"Two-letter country to search from, like us. Image results are always US.","pattern":"^[A-Za-z]{2}$","type":"string"},"domainTools":{"description":"Accepted for compatibility. We have no domain-matched tools to add, so true and false give the same results.","type":"boolean"},"enterprise":{"items":{"type":"string"},"maxItems":0,"type":"array"},"excludeDomains":{"items":{"type":"string"},"maxItems":10,"type":"array"},"highlights":{"default":true,"description":"On by default. When a web result's page is already stored, its description is the passages of that page that best match the query. Send false for the snippet the search engine shows.","type":"boolean"},"ignoreInvalidURLs":{"default":false,"description":"Leave out results whose address cannot be read as a page.","type":"boolean"},"includeDomains":{"items":{"type":"string"},"maxItems":10,"type":"array"},"limit":{"description":"Most results to return for each source. Default 10, or 5 with scrapeOptions, which reads every web result returned. News returns at most 50.","maximum":100,"minimum":1,"type":"integer"},"location":{"description":"Where to search from, like Germany or San Francisco,California,United States. The last part is the country and replaces country. A city before it narrows web results to that place.","minLength":1,"type":"string"},"maxAge":{"description":"Accept a stored answer up to this many milliseconds old, at most 30 days. Without it, 15 minutes for news and 1 hour for web and images. 0 always searches live.","maximum":9007199254740991,"minimum":0,"type":"integer"},"query":{"maxLength":400,"minLength":1,"type":"string"},"safe":{"description":"Hide explicit web and image results when true.","type":"boolean"},"scrapeOptions":{"additionalProperties":false,"description":"Reads each web result, as many as limit asks for, within timeout, and puts the passages that best match the query in each description. Takes the options of scrape: formats (markdown, html, rawHtml, links, images, summary, screenshot, json and the rest), onlyMainContent, includeTags, excludeTags, maxAge, minAge, waitFor, mobile, timeout (per page), headers, actions, location, parsers, profile and zeroDataRetention. Costs what scrape costs for each page read: 1 credit, plus 4 for each summary or json with a schema or prompt that returns something.","properties":{"actions":{"description":"Up to 50 steps to run on the page, in order, before reading it: { \"type\": \"wait\", \"milliseconds\": 500 } (up to 30 seconds), { \"type\": \"wait\", \"selector\": \".results\" }, { \"type\": \"click\", \"selector\": \"button.more\" }, { \"type\": \"write\", \"text\": \"tides\" }, { \"type\": \"press\", \"key\": \"Enter\" }, { \"type\": \"scroll\", \"direction\": \"down\" } (also up, left or right; amount is pixels, \"viewport\" or \"max\"; maxScrolls 1 to 50; selector scrolls an inner container; \"max\" keeps scrolling until the page stops growing, for feeds that load as you go), { \"type\": \"screenshot\", \"fullPage\": true } (links come back in actions.screenshots), { \"type\": \"scrape\" } (the page at that point, in actions.scrapes), { \"type\": \"executeJavascript\", \"script\": \"document.title\" } (results in actions.javascriptReturns), { \"type\": \"pdf\", \"format\": \"A4\" } (links in actions.pdfs) or { \"type\": \"perform\", \"action\": \"Click the Load more button\" } (a step in plain words, up to 5 browser steps on this page, never leaving the site; at most 5 per call). A read with actions costs 1 credit, the same as any page; the actions themselves add nothing. If an action fails, you still get the page as it stood, with a warning that names the action and says why.","items":{"anyOf":[{"additionalProperties":false,"properties":{"milliseconds":{"maximum":30000,"minimum":1,"type":"integer"},"type":{"const":"wait","type":"string"}},"required":["type","milliseconds"],"type":"object"},{"additionalProperties":false,"properties":{"selector":{"minLength":1,"type":"string"},"type":{"const":"wait","type":"string"}},"required":["type","selector"],"type":"object"},{"additionalProperties":false,"properties":{"all":{"const":false,"type":"boolean"},"selector":{"minLength":1,"type":"string"},"type":{"const":"click","type":"string"}},"required":["type","selector"],"type":"object"},{"additionalProperties":false,"properties":{"text":{"minLength":1,"type":"string"},"type":{"const":"write","type":"string"}},"required":["type","text"],"type":"object"},{"additionalProperties":false,"properties":{"key":{"maxLength":40,"minLength":1,"type":"string"},"type":{"const":"press","type":"string"}},"required":["type","key"],"type":"object"},{"additionalProperties":false,"properties":{"amount":{"anyOf":[{"maximum":100000,"minimum":1,"type":"integer"},{"enum":["viewport","max"],"type":"string"}]},"direction":{"default":"down","enum":["up","down","left","right"],"type":"string"},"maxScrolls":{"maximum":50,"minimum":1,"type":"integer"},"selector":{"minLength":1,"type":"string"},"type":{"const":"scroll","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"fullPage":{"type":"boolean"},"quality":{"maximum":100,"minimum":1,"type":"integer"},"type":{"const":"screenshot","type":"string"},"viewport":{"additionalProperties":false,"properties":{"height":{"maximum":2160,"minimum":200,"type":"integer"},"width":{"maximum":3840,"minimum":200,"type":"integer"}},"required":["width","height"],"type":"object"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"type":{"const":"scrape","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"script":{"maxLength":20000,"minLength":1,"type":"string"},"type":{"const":"executeJavascript","type":"string"}},"required":["type","script"],"type":"object"},{"additionalProperties":false,"properties":{"format":{"enum":["Letter","Legal","Tabloid","Ledger","A0","A1","A2","A3","A4","A5","A6"],"type":"string"},"landscape":{"type":"boolean"},"scale":{"maximum":2,"minimum":0.1,"type":"number"},"type":{"const":"pdf","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"action":{"maxLength":500,"minLength":1,"type":"string"},"type":{"const":"perform","type":"string"}},"required":["type","action"],"type":"object"}]},"maxItems":50,"minItems":1,"type":"array"},"alexandria":{"not":{}},"auditMetadata":{"not":{}},"blockAds":{"description":"Ads and trackers are not loaded when a page runs in a browser. Send false to load them.","type":"boolean"},"checkPromptInjection":{"description":"Send true to scan the page text for instructions aimed at an AI model before anything is built from it. A page that has them is refused with 403 promptInjectionDetected and costs nothing. The scan adds 4 credits when it runs; a page it cannot scan fully comes back with a warning and no charge.","type":"boolean"},"domainTools":{"const":false,"type":"boolean"},"excludeTags":{"description":"Remove the parts of the page that match these CSS selectors, such as .comments.","items":{"minLength":1,"type":"string"},"minItems":1,"type":"array"},"fastMode":{"description":"Send true to read the page without opening a browser: the answer comes sooner, but a page that needs a browser, or that refuses a plain request, comes back as an error instead of being retried. Ignored when the call needs a browser (actions, screenshot, waitFor, mobile, profile, network, branding).","type":"boolean"},"formats":{"default":["markdown"],"description":"What to return: markdown (clean page text), summary (a short summary of the page), html (the cleaned page), rawHtml (the page as sent), audio and video (for a YouTube link: the audio track as an M4A file, or the video as an MP4 file, as a link that works for 1 hour), rawBase64 (the bytes the site sent, Base64 encoded, from a live read; metadata.contentType says what they are), links (every link on the page), images (every image address), screenshot (a link to a JPEG of the visible page, kept for 7 days), changeTracking (what changed in the markdown since your key last read this page with the same options, kept 30 days; add modes [\"git-diff\",\"json\"] with a schema or prompt to compare fields too), question (send { \"type\": \"question\", \"question\": \"...\" } to get answer, null when the page does not state one), product (title, brand, category, url, description and variants with price, sale, availability and images, or null) and menu (merchant, currency and sections of items with prices, or null) network (the JSON the page loaded while it rendered, up to 30 responses) and branding (the page's colors, fonts, typography, spacing, button and input styles, logo and brand images, read from how the page looks, with a field left out when the page does not show it). Send { \"type\": \"screenshot\", \"fullPage\": true } for the whole page. Send { \"type\": \"highlights\", \"query\": \"refund policy\" } for the passages that best match a query. Send { \"type\": \"json\", \"schema\": { \"type\": \"object\", \"properties\": { \"price\": { \"type\": \"number\" } } } } or { \"type\": \"json\", \"prompt\": \"the price and the stock\" } for fields filled from the page, each checked against it. Send { \"type\": \"json\", \"parser\": \"amazon-product\" } to get a site's own data as json instead of reading the page; GET /v1/parsers lists the parsers. Send { \"type\": \"json\", \"rules\": { \"title\": \"h1\", \"links\": { \"selector\": \"a\", \"type\": \"list\", \"output\": \"@href\" } } } to read the page with CSS rules and no model, at the page's own price. Send { \"type\": \"attributes\", \"selectors\": [{ \"selector\": \"a\", \"attribute\": \"href\" }] } for attribute values, returned in attributes. Without a parser or rules, json needs a schema or a prompt and is filled from the page. json with a schema or a prompt, summary, highlights, question, product, menu and changeTracking in json mode cost 4 credits more each when they return something. json with rules or a parser, and attributes, cost nothing more. A screenshot, network or branding read costs 1 credit, the same as any page. A PDF comes back as markdown only, and costs 1 credit more for each page read.","items":{"anyOf":[{"enum":["markdown","summary","html","rawHtml","rawBase64","links","images","network","branding","audio","video","screenshot","changeTracking","product","menu"],"type":"string"},{"additionalProperties":false,"properties":{"type":{"enum":["markdown","summary","html","rawHtml","rawBase64","links","images","network","branding","audio","video"],"type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"modes":{"description":"git-diff returns a unified diff of the markdown. json compares the fields in schema or prompt between this read and the last one. Without modes you get git-diff.","items":{"enum":["git-diff","json"],"type":"string"},"maxItems":2,"type":"array"},"prompt":{"description":"With json mode: what to compare, in plain words, such as the price and stock.","maxLength":10000,"minLength":1,"type":"string"},"schema":{"additionalProperties":{"$ref":"#/definitions/__schema0"},"description":"The fields to fill, as a JSON Schema (draft-07 or 2020-12) object with properties. Pydantic's model_json_schema() and zod's toJSONSchema() output work as they are. enum, const, anyOf, oneOf, nullable types, $ref with $defs, required, descriptions and any key names are read. Up to 100 top-level fields and 32 KB. A field the page does not state comes back null.","propertyNames":{"type":"string"},"type":"object"},"tag":{"type":"null"},"type":{"const":"changeTracking","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"question":{"description":"A question to answer from the page, such as what the refund window is.","maxLength":10000,"minLength":1,"type":"string"},"type":{"const":"question","type":"string"}},"required":["type","question"],"type":"object"},{"additionalProperties":false,"properties":{"type":{"const":"product","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"type":{"const":"menu","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"fullPage":{"default":false,"description":"Capture the whole page from top to bottom instead of the visible part.","type":"boolean"},"quality":{"description":"JPEG quality from 1 to 100. The default is 70.","maximum":100,"minimum":1,"type":"integer"},"type":{"const":"screenshot","type":"string"},"viewport":{"additionalProperties":false,"description":"The window size in pixels, such as { width: 390, height: 844 }.","properties":{"height":{"maximum":2160,"minimum":200,"type":"integer"},"width":{"maximum":3840,"minimum":200,"type":"integer"}},"required":["width","height"],"type":"object"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"count":{"default":5,"description":"How many passages to return, best match first.","maximum":20,"minimum":1,"type":"integer"},"query":{"description":"What you are looking for on the page, such as refund policy.","maxLength":10000,"minLength":1,"type":"string"},"type":{"const":"highlights","type":"string"}},"required":["type","query"],"type":"object"},{"additionalProperties":false,"properties":{"checkPromptInjection":{"description":"Deprecated: send checkPromptInjection at the top level of the call.","type":"boolean"},"options":{"additionalProperties":{"$ref":"#/definitions/__schema1"},"description":"Only with parser: extra inputs for it, such as { \"page\": 2 } for the next page of results or { \"minRating\": 4.5 } for a filter. GET /v1/parsers lists what each parser accepts.","propertyNames":{"type":"string"},"type":"object"},"parser":{"description":"Read the page with a named parser, which gives the site's own data as json. The url must be the kind of page the parser reads. Parsers are the only way to read some sites. GET /v1/parsers lists them.","type":"string"},"prompt":{"description":"What to pull from the page in plain words, such as the version and the release date.","maxLength":10000,"minLength":1,"type":"string"},"rules":{"additionalProperties":{"$ref":"#/definitions/__schema2"},"description":"Read the page with CSS rules instead of a model, no extra fee. Each field is a selector such as \"h1\" (the first match's text), \"a@href\" (an attribute) or { \"selector\": \"li\", \"type\": \"list\", \"output\": \"text\" | \"html\" | \"@attribute\" | { nested fields } }. A missing item is null and an unmatched list is []. Relative links become absolute. Up to 100 fields, 5 levels deep. Not with schema, prompt or parser.","propertyNames":{"type":"string"},"type":"object"},"schema":{"additionalProperties":{"$ref":"#/definitions/__schema0"},"description":"The fields to fill, as a JSON Schema (draft-07 or 2020-12) object with properties. Pydantic's model_json_schema() and zod's toJSONSchema() output work as they are. enum, const, anyOf, oneOf, nullable types, $ref with $defs, required, descriptions and any key names are read. Up to 100 top-level fields and 32 KB. A field the page does not state comes back null.","propertyNames":{"type":"string"},"type":"object"},"type":{"const":"json","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"selectors":{"description":"The elements and attributes to read, such as { selector: 'a.buy', attribute: 'href' }.","items":{"additionalProperties":false,"properties":{"attribute":{"maxLength":100,"minLength":1,"type":"string"},"selector":{"minLength":1,"type":"string"}},"required":["selector","attribute"],"type":"object"},"maxItems":50,"minItems":1,"type":"array"},"type":{"const":"attributes","type":"string"}},"required":["type","selectors"],"type":"object"}]},"maxItems":20,"minItems":1,"type":"array"},"headers":{"additionalProperties":{"maxLength":2000,"pattern":"^[\\t\\x20-\\x7e]*$","type":"string"},"description":"Extra request headers to send to the site, such as { \"x-plan\": \"pro\" }. A read with headers is never answered from or saved to a stored copy.","propertyNames":{"pattern":"^[A-Za-z0-9-]{1,64}$","type":"string"},"type":"object"},"ignoreRobotsTxt":{"const":false,"type":"boolean"},"includeTags":{"description":"Keep only the parts of the page that match these CSS selectors, such as article or .price. When set, onlyMainContent is not applied.","items":{"minLength":1,"type":"string"},"minItems":1,"type":"array"},"location":{"additionalProperties":false,"description":"Where to read the page from. The default is the United States.","properties":{"country":{"description":"Two-letter country code to read the page from, such as DE or JP.","type":"string"},"languages":{"description":"Languages to ask the site for, best first, such as [\"de\", \"en\"]. Sent as Accept-Language. A read with languages is never answered from or saved to a stored copy.","items":{"pattern":"^[A-Za-z]{2,3}(?:-[A-Za-z0-9]{2,8})*$","type":"string"},"maxItems":5,"minItems":1,"type":"array"}},"type":"object"},"lockdown":{"description":"Send true to answer only from a stored copy of the page and never read it live, whatever its age. A page with no stored copy is notFound. The same as minAge 0.","type":"boolean"},"maxAge":{"description":"Accept a stored answer up to this many milliseconds old, at most 30 days. Without it, 2 days, or less for a site whose pages change often, and a copy up to twice that age (at most 7 days) comes back at once as stale while a fresh read runs. 0 always reads the page live. metadata.cacheState says which one you got.","maximum":9007199254740991,"minimum":0,"type":"integer"},"minAge":{"description":"Answer only from a stored copy that is at least this many milliseconds old, and never read the page live. 0 accepts any stored copy. A page with no such copy is notFound.","maximum":9007199254740991,"minimum":0,"type":"integer"},"mobile":{"description":"Read the page as a phone would: a phone-sized screen and the mobile version of the site. The page loads in a browser.","type":"boolean"},"onlyCleanContent":{"description":"Send true to have a model remove what onlyMainContent leaves behind in the markdown: cookie banners, ads, share widgets, breadcrumbs, sign-up prompts, comment prompts and related-article lists. It only removes whole paragraphs and lists; it never rewrites or adds text, and code blocks are always kept. Skipped with a warning when the page is too long to clean or the model does not answer. Not with zeroDataRetention. Summary, answers and highlights are made from the cleaned markdown.","type":"boolean"},"onlyMainContent":{"default":true,"description":"Keep only the page's main content, without menus, headers, footers and ads.","type":"boolean"},"parsers":{"description":"Only the pdf parser exists. Send \"pdf\" or { \"type\": \"pdf\", mode, maxPages, pages, blocks, pageMarkers } with the same meaning as in parse. Without mode a PDF is read from its text layer only; auto reads the picture of a page that has no text, and ocr reads the picture of every page, up to 20 pages. Each page read costs 1 credit.","items":{"anyOf":[{"const":"pdf","type":"string"},{"additionalProperties":false,"properties":{"blocks":{"description":"Send true to also get the page's layout in blocks: each title, section header or run of text, with its page, reading order, position on the page (bbox as left, top, right, bottom from 0 to 1) and where its text sits in that page's markdown (span, as in pages). Tables, figures and formulas are not told apart. A page read from its picture is one block. No extra charge.","type":"boolean"},"maxPages":{"description":"Read at most this many pages, up to 100.","maximum":100,"minimum":1,"type":"integer"},"mode":{"description":"fast reads the text layer only. auto (the default) reads the text layer and reads the picture of any page that has none. ocr reads the picture of every page.","enum":["fast","auto","ocr"],"type":"string"},"pageMarkers":{"description":"Send true to mark page breaks in the markdown: pages are joined with \"---\" and a line, where N is the page that follows. No extra charge.","type":"boolean"},"pages":{"description":"Send true to also get each page's markdown in pages, as { pageNumber, markdown }. No extra charge.","type":"boolean"},"type":{"const":"pdf","type":"string"}},"required":["type"],"type":"object"}]},"minItems":1,"type":"array"},"profile":{"additionalProperties":false,"description":"Read the page with the cookies and local storage that earlier calls saved under this name, kept for your account for 30 days after the last use. A call with a profile always loads the page in a browser, costs 1 credit, the same as any page, and is never answered from a stored copy. Only one call at a time can save to a profile.","properties":{"name":{"description":"A name you choose, such as shop-login. Calls with the same name share state.","maxLength":128,"minLength":1,"type":"string"},"saveChanges":{"default":true,"description":"Keep the cookies and local storage this read leaves behind for the next call with this name. Send false to read with the profile without changing it.","type":"boolean"}},"required":["name"],"type":"object"},"proxy":{"description":"auto: basic first, enhanced once if the site refuses. basic: one plain attempt. enhanced: the stronger read from the start. Same price.","enum":["auto","basic","enhanced"],"type":"string"},"redactPII":{"anyOf":[{"type":"boolean"},{"additionalProperties":false,"description":"Options for redactPII.","properties":{"entities":{"default":["PERSON","EMAIL","PHONE","LOCATION","FINANCIAL","SECRET"],"description":"What to hide: PERSON, EMAIL, PHONE, LOCATION, FINANCIAL, SECRET. All by default.","items":{"enum":["PERSON","EMAIL","PHONE","LOCATION","FINANCIAL","SECRET"],"type":"string"},"minItems":1,"type":"array"},"mode":{"default":"accurate","description":"accurate finds names and places with the model and the rest by pattern. aggressive adds guesses that catch more and may hide a little too much. fast uses patterns only, so it finds no ordinary names or places.","enum":["accurate","aggressive","fast"],"type":"string"},"replaceStyle":{"default":"tag","description":"tag writes <EMAIL>, mask writes * for each character, remove deletes it.","enum":["tag","mask","remove"],"type":"string"}},"type":"object"}],"description":"Send true, or an object, to hide personal data in the markdown and in everything made from it (summary, answers, highlights, json). Links, html and rawHtml are not changed. A page the model cannot scan is refused rather than returned unredacted."},"removeBase64Images":{"description":"Images inside the page that carry their data in the address (data:image) are dropped by default. Send false to keep them in markdown and html.","type":"boolean"},"robotsUserAgent":{"not":{}},"skipTlsVerification":{"description":"Send true to read a page whose certificate is expired, self-signed or for another name. The read is not private against someone between us and the site.","type":"boolean"},"storeInCache":{"default":true,"description":"Send false to neither read nor keep a stored copy of this page.","type":"boolean"},"threatProtection":{"not":{}},"timeout":{"description":"How long to keep trying, in milliseconds, between 10 seconds and 2 minutes. Pages behind a bot check can need 10 to 30 seconds the first time.","maximum":300000,"minimum":1000,"type":"integer"},"toolDetail":{"not":{}},"waitFor":{"description":"Extra milliseconds to wait before reading, up to 60000, for pages that load their content late. To wait for an element, add a wait action with a selector. A read that waits costs 1 credit, the same as any page.","maximum":60000,"minimum":0,"type":"integer"},"zeroDataRetention":{"default":false,"description":"Send true to keep nothing from this call: no stored copy is read or made, and nothing from it is logged. Costs 1 credit more per page. Not with a screenshot.","type":"boolean"}},"type":"object"},"sources":{"description":"What to search: web, news, images. Each is a string or {type}. The catalogue names alexandria and exchange are accepted and left out: they name a source we do not have. Default web, or none when categories asks for research, companies, people, developer or videos.","items":{"anyOf":[{"anyOf":[{"enum":["web","news","images"],"type":"string"},{"additionalProperties":false,"properties":{"location":{"type":"string"},"tbs":{"type":"string"},"type":{"const":"web","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"type":{"enum":["news","images"],"type":"string"}},"required":["type"],"type":"object"}]},{"anyOf":[{"enum":["alexandria","exchange"],"type":"string"},{"additionalProperties":false,"properties":{"type":{"enum":["alexandria","exchange"],"type":"string"}},"required":["type"],"type":"object"}]}]},"maxItems":5,"minItems":1,"type":"array"},"tbs":{"description":"Time filter: qdr:h, qdr:d, qdr:w, qdr:m or qdr:y, or cdr:1,cd_min:MM/DD/YYYY,cd_max:MM/DD/YYYY. Web takes both; news takes qdr only; images take none.","minLength":1,"type":"string"},"threatProtection":{"additionalProperties":{},"properties":{},"type":"object"},"timeout":{"default":60000,"description":"Milliseconds to wait for the sources.","maximum":9007199254740991,"minimum":1000,"type":"integer"},"toolDetail":{"const":"compact","type":"string"}},"required":["query"],"type":"object"}after
{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"definitions":{"__schema0":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"items":{"allOf":[{"$ref":"#/definitions/__schema0"}]},"type":"array"},{"additionalProperties":{"allOf":[{"$ref":"#/definitions/__schema0"}]},"propertyNames":{"type":"string"},"type":"object"}]},"__schema1":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"items":{"allOf":[{"$ref":"#/definitions/__schema1"}]},"type":"array"},{"additionalProperties":{"allOf":[{"$ref":"#/definitions/__schema1"}]},"propertyNames":{"type":"string"},"type":"object"}]},"__schema2":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"items":{"allOf":[{"$ref":"#/definitions/__schema2"}]},"type":"array"},{"additionalProperties":{"allOf":[{"$ref":"#/definitions/__schema2"}]},"propertyNames":{"type":"string"},"type":"object"}]}},"properties":{"categories":{"description":"pdf: web results that are PDF files. research: scholarly papers, in a research list, ranked by relevance then citations. companies: companies that match the query, in a companies list, best matches first. The query can name a place, industry, employee count, founding year and funding stage, like fintech startups in Berlin, 50-200 employees. people: people that match the query, in a people list, best matches first. The query can name a role, company, place or research topic, like CFO of Stripe, founders of fintech startups in Berlin, or researchers on CRISPR base editing. Each person has roles, affiliations and public profile links, never contact details. developer: passages from GitHub READMEs, issues, merged pull requests, releases, developer docs and API operations, in a developer list; send it as an object to filter by repos, types, language and minStars. gov: statutes, regulations, register notices and bills from government sources, in the web group with category gov and the kind, jurisdiction and citation of each. videos: passages from what is said in YouTube videos shared under a Creative Commons license, in a videos list, one result per video, with the channel, the license and the watch link; the link carries &t= only when the passage's start is exact. The index is a June 2024 snapshot of English videos, so a link may be dead.","items":{"anyOf":[{"enum":["developer","gov","research","pdf","companies","people","videos"],"type":"string"},{"additionalProperties":false,"properties":{"type":{"enum":["developer","gov","research","pdf","companies","people","videos"],"type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"language":{"description":"Only repositories whose main language is this, like TypeScript.","minLength":1,"type":"string"},"minStars":{"description":"Only repositories with at least this many GitHub stars.","maximum":9007199254740991,"minimum":0,"type":"integer"},"repos":{"default":[],"description":"Only results from these GitHub repositories, as owner/name.","items":{"pattern":"^[\\w.-]+\\/[\\w.-]+$","type":"string"},"maxItems":5,"type":"array"},"type":{"const":"developer","type":"string"},"types":{"default":[],"description":"Only these result types: readme, issue, pull_request, release, operation, doc.","items":{"enum":["readme","issue","pull_request","release","operation","doc"],"type":"string"},"type":"array"}},"required":["type"],"type":"object"}]},"type":"array"},"country":{"description":"Two-letter country to search from, like us. uk is read as gb. Image results are always US.","pattern":"^[A-Za-z]{2}$","type":"string"},"domainTools":{"description":"Accepted for compatibility. We have no domain-matched tools to add, so true and false give the same results.","type":"boolean"},"enterprise":{"items":{"type":"string"},"maxItems":0,"type":"array"},"excludeDomains":{"items":{"type":"string"},"maxItems":10,"type":"array"},"highlights":{"default":true,"description":"On by default. When a web result's page is already stored, its description is the passages of that page that best match the query. Send false for the snippet the search engine shows.","type":"boolean"},"ignoreInvalidURLs":{"default":false,"description":"Leave out results whose address cannot be read as a page.","type":"boolean"},"includeDomains":{"items":{"type":"string"},"maxItems":10,"type":"array"},"limit":{"description":"Most results to return for each source. Default 10, or 5 with scrapeOptions, which reads every web and news result returned. News returns at most 50.","maximum":100,"minimum":1,"type":"integer"},"location":{"description":"Where to search from, like Germany or San Francisco,California,United States. The last part is the country and replaces country. A city before it narrows web results to that place.","minLength":1,"type":"string"},"maxAge":{"description":"Accept a stored answer up to this many milliseconds old, at most 30 days. Without it, 15 minutes for news and 1 hour for web and images. 0 always searches live.","maximum":9007199254740991,"minimum":0,"type":"integer"},"query":{"description":"What to search for, up to 500 characters. Search operators work in web results: quotes for an exact phrase, -word, site:, -site:, filetype:, inurl:, allinurl:, intitle: and allintitle:. In image results, imagesize:WIDTHxHEIGHT keeps images of exactly that size and larger:WIDTHxHEIGHT keeps images at least that large.","maxLength":500,"minLength":1,"type":"string"},"safe":{"description":"Hide explicit web, news and image results when true.","type":"boolean"},"scrapeOptions":{"additionalProperties":false,"description":"Reads each web and news result, as many as limit asks for, within timeout, and puts the passages that best match the query in each web description. Takes the options of scrape: formats (markdown, html, rawHtml, links, images, summary, screenshot, json and the rest), onlyMainContent, includeTags, excludeTags, maxAge, minAge, waitFor, mobile, timeout (per page), headers, actions, location, parsers, profile and zeroDataRetention. Costs what scrape costs for each page read: 1 credit, plus 4 for each summary or json with a schema or prompt that returns something.","properties":{"actions":{"description":"Up to 50 steps to run on the page, in order, before reading it: { \"type\": \"wait\", \"milliseconds\": 500 } (up to 30 seconds), { \"type\": \"wait\", \"selector\": \".results\" }, { \"type\": \"click\", \"selector\": \"button.more\" }, { \"type\": \"write\", \"text\": \"tides\" }, { \"type\": \"press\", \"key\": \"Enter\" }, { \"type\": \"scroll\", \"direction\": \"down\" } (also up, left or right; amount is pixels, \"viewport\" or \"max\"; maxScrolls 1 to 50; selector scrolls an inner container; \"max\" keeps scrolling until the page stops growing, for feeds that load as you go), { \"type\": \"screenshot\", \"fullPage\": true } (links come back in actions.screenshots), { \"type\": \"scrape\" } (the page at that point, in actions.scrapes), { \"type\": \"executeJavascript\", \"script\": \"document.title\" } (results in actions.javascriptReturns), { \"type\": \"pdf\", \"format\": \"A4\" } (links in actions.pdfs) or { \"type\": \"perform\", \"action\": \"Click the Load more button\" } (a step in plain words, up to 5 browser steps on this page, never leaving the site; at most 5 per call). A read with actions costs 1 credit, the same as any page; the actions themselves add nothing. If an action fails, you still get the page as it stood, with a warning that names the action and says why.","items":{"anyOf":[{"additionalProperties":false,"properties":{"milliseconds":{"maximum":30000,"minimum":1,"type":"integer"},"type":{"const":"wait","type":"string"}},"required":["type","milliseconds"],"type":"object"},{"additionalProperties":false,"properties":{"selector":{"minLength":1,"type":"string"},"type":{"const":"wait","type":"string"}},"required":["type","selector"],"type":"object"},{"additionalProperties":false,"properties":{"all":{"const":false,"type":"boolean"},"selector":{"minLength":1,"type":"string"},"type":{"const":"click","type":"string"}},"required":["type","selector"],"type":"object"},{"additionalProperties":false,"properties":{"text":{"minLength":1,"type":"string"},"type":{"const":"write","type":"string"}},"required":["type","text"],"type":"object"},{"additionalProperties":false,"properties":{"key":{"maxLength":40,"minLength":1,"type":"string"},"type":{"const":"press","type":"string"}},"required":["type","key"],"type":"object"},{"additionalProperties":false,"properties":{"amount":{"anyOf":[{"maximum":100000,"minimum":1,"type":"integer"},{"enum":["viewport","max"],"type":"string"}]},"direction":{"default":"down","enum":["up","down","left","right"],"type":"string"},"maxScrolls":{"maximum":50,"minimum":1,"type":"integer"},"selector":{"minLength":1,"type":"string"},"type":{"const":"scroll","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"fullPage":{"type":"boolean"},"quality":{"maximum":100,"minimum":1,"type":"integer"},"type":{"const":"screenshot","type":"string"},"viewport":{"additionalProperties":false,"properties":{"height":{"maximum":2160,"minimum":200,"type":"integer"},"width":{"maximum":3840,"minimum":200,"type":"integer"}},"required":["width","height"],"type":"object"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"type":{"const":"scrape","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"script":{"maxLength":20000,"minLength":1,"type":"string"},"type":{"const":"executeJavascript","type":"string"}},"required":["type","script"],"type":"object"},{"additionalProperties":false,"properties":{"format":{"enum":["Letter","Legal","Tabloid","Ledger","A0","A1","A2","A3","A4","A5","A6"],"type":"string"},"landscape":{"type":"boolean"},"scale":{"maximum":2,"minimum":0.1,"type":"number"},"type":{"const":"pdf","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"action":{"maxLength":500,"minLength":1,"type":"string"},"type":{"const":"perform","type":"string"}},"required":["type","action"],"type":"object"}]},"maxItems":50,"minItems":1,"type":"array"},"alexandria":{"not":{}},"auditMetadata":{"not":{}},"blockAds":{"description":"Ads and trackers are not loaded when a page runs in a browser. Send false to load them.","type":"boolean"},"checkPromptInjection":{"description":"Send true to scan the page text for instructions aimed at an AI model before anything is built from it. A page that has them is refused with 403 promptInjectionDetected and costs nothing. The scan adds 4 credits when it runs; a page it cannot scan fully comes back with a warning and no charge.","type":"boolean"},"domainTools":{"const":false,"type":"boolean"},"excludeTags":{"description":"Remove the parts of the page that match these CSS selectors, such as .comments.","items":{"minLength":1,"type":"string"},"minItems":1,"type":"array"},"fastMode":{"description":"Send true to read the page without opening a browser: the answer comes sooner, but a page that needs a browser, or that refuses a plain request, comes back as an error instead of being retried. Ignored when the call needs a browser (actions, screenshot, waitFor, mobile, profile, network, branding).","type":"boolean"},"formats":{"default":["markdown"],"description":"What to return: markdown (clean page text), summary (a short summary of the page), html (the cleaned page), rawHtml (the page as sent), audio and video (for a YouTube link: the audio track as an M4A file, or the video as an MP4 file, as a link that works for 1 hour), rawBase64 (the bytes the site sent, Base64 encoded, from a live read; metadata.contentType says what they are), links (every link on the page), images (every image address), screenshot (a link to a JPEG of the visible page, kept for 7 days), changeTracking (what changed in the markdown since your key last read this page with the same options, kept 30 days; add modes [\"git-diff\",\"json\"] with a schema or prompt to compare fields too), question (send { \"type\": \"question\", \"question\": \"...\" } to get answer, null when the page does not state one), product (title, brand, category, url, description and variants with price, sale, availability and images, or null) and menu (merchant, currency and sections of items with prices, or null) network (the JSON the page loaded while it rendered, up to 30 responses) and branding (the page's colors, fonts, typography, spacing, button and input styles, logo and brand images, read from how the page looks, with a field left out when the page does not show it). Send { \"type\": \"screenshot\", \"fullPage\": true } for the whole page. Send { \"type\": \"highlights\", \"query\": \"refund policy\" } for the passages that best match a query. Send { \"type\": \"json\", \"schema\": { \"type\": \"object\", \"properties\": { \"price\": { \"type\": \"number\" } } } } or { \"type\": \"json\", \"prompt\": \"the price and the stock\" } for fields filled from the page, each checked against it. Send { \"type\": \"json\", \"parser\": \"amazon-product\" } to get a site's own data as json instead of reading the page; GET /v1/parsers lists the parsers. Send { \"type\": \"json\", \"rules\": { \"title\": \"h1\", \"links\": { \"selector\": \"a\", \"type\": \"list\", \"output\": \"@href\" } } } to read the page with CSS rules and no model, at the page's own price. Send { \"type\": \"attributes\", \"selectors\": [{ \"selector\": \"a\", \"attribute\": \"href\" }] } for attribute values, returned in attributes. Without a parser or rules, json needs a schema or a prompt and is filled from the page. json with a schema or a prompt, summary, highlights, question, product, menu and changeTracking in json mode cost 4 credits more each when they return something. json with rules or a parser, and attributes, cost nothing more. A screenshot, network or branding read costs 1 credit, the same as any page. A PDF comes back as markdown only, and costs 1 credit more for each page read.","items":{"anyOf":[{"enum":["markdown","summary","html","rawHtml","rawBase64","links","images","network","branding","audio","video","screenshot","changeTracking","product","menu"],"type":"string"},{"additionalProperties":false,"properties":{"type":{"enum":["markdown","summary","html","rawHtml","rawBase64","links","images","network","branding","audio","video"],"type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"modes":{"description":"git-diff returns a unified diff of the markdown. json compares the fields in schema or prompt between this read and the last one. Without modes you get git-diff.","items":{"enum":["git-diff","json"],"type":"string"},"maxItems":2,"type":"array"},"prompt":{"description":"With json mode: what to compare, in plain words, such as the price and stock.","maxLength":10000,"minLength":1,"type":"string"},"schema":{"additionalProperties":{"$ref":"#/definitions/__schema0"},"description":"The fields to fill, as a JSON Schema (draft-07 or 2020-12) object with properties. Pydantic's model_json_schema() and zod's toJSONSchema() output work as they are. enum, const, anyOf, oneOf, nullable types, $ref with $defs, required, descriptions and any key names are read. Up to 100 top-level fields and 32 KB. A field the page does not state comes back null.","propertyNames":{"type":"string"},"type":"object"},"tag":{"type":"null"},"type":{"const":"changeTracking","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"question":{"description":"A question to answer from the page, such as what the refund window is.","maxLength":10000,"minLength":1,"type":"string"},"type":{"const":"question","type":"string"}},"required":["type","question"],"type":"object"},{"additionalProperties":false,"properties":{"type":{"const":"product","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"type":{"const":"menu","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"fullPage":{"default":false,"description":"Capture the whole page from top to bottom instead of the visible part.","type":"boolean"},"quality":{"description":"JPEG quality from 1 to 100. The default is 70.","maximum":100,"minimum":1,"type":"integer"},"type":{"const":"screenshot","type":"string"},"viewport":{"additionalProperties":false,"description":"The window size in pixels, such as { width: 390, height: 844 }.","properties":{"height":{"maximum":2160,"minimum":200,"type":"integer"},"width":{"maximum":3840,"minimum":200,"type":"integer"}},"required":["width","height"],"type":"object"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"count":{"default":5,"description":"How many passages to return, best match first.","maximum":20,"minimum":1,"type":"integer"},"query":{"description":"What you are looking for on the page, such as refund policy.","maxLength":10000,"minLength":1,"type":"string"},"type":{"const":"highlights","type":"string"}},"required":["type","query"],"type":"object"},{"additionalProperties":false,"properties":{"checkPromptInjection":{"description":"Deprecated: send checkPromptInjection at the top level of the call.","type":"boolean"},"options":{"additionalProperties":{"$ref":"#/definitions/__schema1"},"description":"Only with parser: extra inputs for it, such as { \"page\": 2 } for the next page of results or { \"minRating\": 4.5 } for a filter. GET /v1/parsers lists what each parser accepts.","propertyNames":{"type":"string"},"type":"object"},"parser":{"description":"Read the page with a named parser, which gives the site's own data as json. The url must be the kind of page the parser reads. Parsers are the only way to read some sites. GET /v1/parsers lists them.","type":"string"},"prompt":{"description":"What to pull from the page in plain words, such as the version and the release date.","maxLength":10000,"minLength":1,"type":"string"},"rules":{"additionalProperties":{"$ref":"#/definitions/__schema2"},"description":"Read the page with CSS rules instead of a model, no extra fee. Each field is a selector such as \"h1\" (the first match's text), \"a@href\" (an attribute) or { \"selector\": \"li\", \"type\": \"list\", \"output\": \"text\" | \"html\" | \"@attribute\" | { nested fields } }. A missing item is null and an unmatched list is []. Relative links become absolute. Up to 100 fields, 5 levels deep. Not with schema, prompt or parser.","propertyNames":{"type":"string"},"type":"object"},"schema":{"additionalProperties":{"$ref":"#/definitions/__schema0"},"description":"The fields to fill, as a JSON Schema (draft-07 or 2020-12) object with properties. Pydantic's model_json_schema() and zod's toJSONSchema() output work as they are. enum, const, anyOf, oneOf, nullable types, $ref with $defs, required, descriptions and any key names are read. Up to 100 top-level fields and 32 KB. A field the page does not state comes back null.","propertyNames":{"type":"string"},"type":"object"},"type":{"const":"json","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"selectors":{"description":"The elements and attributes to read, such as { selector: 'a.buy', attribute: 'href' }.","items":{"additionalProperties":false,"properties":{"attribute":{"maxLength":100,"minLength":1,"type":"string"},"selector":{"minLength":1,"type":"string"}},"required":["selector","attribute"],"type":"object"},"maxItems":50,"minItems":1,"type":"array"},"type":{"const":"attributes","type":"string"}},"required":["type","selectors"],"type":"object"}]},"maxItems":20,"minItems":1,"type":"array"},"headers":{"additionalProperties":{"maxLength":2000,"pattern":"^[\\t\\x20-\\x7e]*$","type":"string"},"description":"Extra request headers to send to the site, such as { \"x-plan\": \"pro\" }. A read with headers is never answered from or saved to a stored copy.","propertyNames":{"pattern":"^[A-Za-z0-9-]{1,64}$","type":"string"},"type":"object"},"ignoreRobotsTxt":{"const":false,"type":"boolean"},"includeTags":{"description":"Keep only the parts of the page that match these CSS selectors, such as article or .price. When set, onlyMainContent is not applied.","items":{"minLength":1,"type":"string"},"minItems":1,"type":"array"},"location":{"additionalProperties":false,"description":"Where to read the page from. The default is the United States.","properties":{"country":{"description":"Two-letter country code to read the page from, such as DE or JP.","type":"string"},"languages":{"description":"Languages to ask the site for, best first, such as [\"de\", \"en\"]. Sent as Accept-Language. A read with languages is never answered from or saved to a stored copy.","items":{"pattern":"^[A-Za-z]{2,3}(?:-[A-Za-z0-9]{2,8})*$","type":"string"},"maxItems":5,"minItems":1,"type":"array"}},"type":"object"},"lockdown":{"description":"Send true to answer only from a stored copy of the page and never read it live, whatever its age. A page with no stored copy is notFound. The same as minAge 0.","type":"boolean"},"maxAge":{"description":"Accept a stored answer up to this many milliseconds old, at most 30 days. Without it, 2 days, or less for a site whose pages change often, and a copy up to twice that age (at most 7 days) comes back at once as stale while a fresh read runs. 0 always reads the page live. metadata.cacheState says which one you got.","maximum":9007199254740991,"minimum":0,"type":"integer"},"minAge":{"description":"Answer only from a stored copy that is at least this many milliseconds old, and never read the page live. 0 accepts any stored copy. A page with no such copy is notFound.","maximum":9007199254740991,"minimum":0,"type":"integer"},"mobile":{"description":"Read the page as a phone would: a phone-sized screen and the mobile version of the site. The page loads in a browser.","type":"boolean"},"onlyCleanContent":{"description":"Send true to have a model remove what onlyMainContent leaves behind in the markdown: cookie banners, ads, share widgets, breadcrumbs, sign-up prompts, comment prompts and related-article lists. It only removes whole paragraphs and lists; it never rewrites or adds text, and code blocks are always kept. Skipped with a warning when the page is too long to clean or the model does not answer. Not with zeroDataRetention. Summary, answers and highlights are made from the cleaned markdown.","type":"boolean"},"onlyMainContent":{"default":true,"description":"Keep only the page's main content, without menus, headers, footers and ads.","type":"boolean"},"parsers":{"description":"Only the pdf parser exists. Send \"pdf\" or { \"type\": \"pdf\", mode, maxPages, pages, blocks, pageMarkers } with the same meaning as in parse. Without mode a PDF is read from its text layer only; auto reads the picture of a page that has no text, and ocr reads the picture of every page, up to 20 pages. Each page read costs 1 credit.","items":{"anyOf":[{"const":"pdf","type":"string"},{"additionalProperties":false,"properties":{"blocks":{"description":"Send true to also get the page's layout in blocks: each title, section header or run of text, with its page, reading order, position on the page (bbox as left, top, right, bottom from 0 to 1) and where its text sits in that page's markdown (span, as in pages). Tables, figures and formulas are not told apart. A page read from its picture is one block. No extra charge.","type":"boolean"},"maxPages":{"description":"Read at most this many pages, up to 100.","maximum":100,"minimum":1,"type":"integer"},"mode":{"description":"fast reads the text layer only. auto (the default) reads the text layer and reads the picture of any page that has none. ocr reads the picture of every page.","enum":["fast","auto","ocr"],"type":"string"},"pageMarkers":{"description":"Send true to mark page breaks in the markdown: pages are joined with \"---\" and a line, where N is the page that follows. No extra charge.","type":"boolean"},"pages":{"description":"Send true to also get each page's markdown in pages, as { pageNumber, markdown }. No extra charge.","type":"boolean"},"type":{"const":"pdf","type":"string"}},"required":["type"],"type":"object"}]},"minItems":1,"type":"array"},"profile":{"additionalProperties":false,"description":"Read the page with the cookies and local storage that earlier calls saved under this name, kept for your account for 30 days after the last use. A call with a profile always loads the page in a browser, costs 1 credit, the same as any page, and is never answered from a stored copy. Only one call at a time can save to a profile.","properties":{"name":{"description":"A name you choose, such as shop-login. Calls with the same name share state.","maxLength":128,"minLength":1,"type":"string"},"saveChanges":{"default":true,"description":"Keep the cookies and local storage this read leaves behind for the next call with this name. Send false to read with the profile without changing it.","type":"boolean"}},"required":["name"],"type":"object"},"proxy":{"description":"auto: basic first, enhanced once if the site refuses. basic: one plain attempt. enhanced: the stronger read from the start. Same price.","enum":["auto","basic","enhanced"],"type":"string"},"redactPII":{"anyOf":[{"type":"boolean"},{"additionalProperties":false,"description":"Options for redactPII.","properties":{"entities":{"default":["PERSON","EMAIL","PHONE","LOCATION","FINANCIAL","SECRET"],"description":"What to hide: PERSON, EMAIL, PHONE, LOCATION, FINANCIAL, SECRET. All by default.","items":{"enum":["PERSON","EMAIL","PHONE","LOCATION","FINANCIAL","SECRET"],"type":"string"},"minItems":1,"type":"array"},"mode":{"default":"accurate","description":"accurate finds names and places with the model and the rest by pattern. aggressive adds guesses that catch more and may hide a little too much. fast uses patterns only, so it finds no ordinary names or places.","enum":["accurate","aggressive","fast"],"type":"string"},"replaceStyle":{"default":"tag","description":"tag writes <EMAIL>, mask writes * for each character, remove deletes it.","enum":["tag","mask","remove"],"type":"string"}},"type":"object"}],"description":"Send true, or an object, to hide personal data in the markdown and in everything made from it (summary, answers, highlights, json). Links, html and rawHtml are not changed. A page the model cannot scan is refused rather than returned unredacted."},"removeBase64Images":{"description":"Images inside the page that carry their data in the address (data:image) are dropped by default. Send false to keep them in markdown and html.","type":"boolean"},"robotsUserAgent":{"not":{}},"skipTlsVerification":{"description":"Send true to read a page whose certificate is expired, self-signed or for another name. The read is not private against someone between us and the site.","type":"boolean"},"storeInCache":{"default":true,"description":"Send false to neither read nor keep a stored copy of this page.","type":"boolean"},"threatProtection":{"not":{}},"timeout":{"description":"How long to keep trying, in milliseconds, between 10 seconds and 2 minutes. Pages behind a bot check can need 10 to 30 seconds the first time.","maximum":300000,"minimum":1000,"type":"integer"},"toolDetail":{"not":{}},"waitFor":{"description":"Extra milliseconds to wait before reading, up to 60000, for pages that load their content late. To wait for an element, add a wait action with a selector. A read that waits costs 1 credit, the same as any page.","maximum":60000,"minimum":0,"type":"integer"},"zeroDataRetention":{"default":false,"description":"Send true to keep nothing from this call: no stored copy is read or made, and nothing from it is logged. Costs 1 credit more per page. Not with a screenshot.","type":"boolean"}},"type":"object"},"sources":{"description":"What to search: web, news, images. Each is a string or {type}. The catalogue names alexandria and exchange are accepted and left out: they name a source we do not have. Default web, or none when categories asks for research, companies, people, developer, gov or videos.","items":{"anyOf":[{"anyOf":[{"enum":["web","news","images"],"type":"string"},{"additionalProperties":false,"properties":{"location":{"type":"string"},"tbs":{"type":"string"},"type":{"const":"web","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"type":{"enum":["news","images"],"type":"string"}},"required":["type"],"type":"object"}]},{"anyOf":[{"enum":["alexandria","exchange"],"type":"string"},{"additionalProperties":false,"properties":{"type":{"enum":["alexandria","exchange"],"type":"string"}},"required":["type"],"type":"object"}]}]},"maxItems":5,"minItems":1,"type":"array"},"tbs":{"description":"Time filter: qdr:h, qdr:d, qdr:w, qdr:m or qdr:y, or cdr:1,cd_min:MM/DD/YYYY,cd_max:MM/DD/YYYY, plus sbd:1, like sbd:1,qdr:w. qdr:h keeps only results known to be from the past hour, so the answer can be short or empty. sbd:1 sorts newest first; results without a date come last. Web takes all of them; news takes qdr and sbd; images take none.","minLength":1,"type":"string"},"threatProtection":{"additionalProperties":{},"properties":{},"type":"object"},"timeout":{"default":60000,"description":"Milliseconds to wait for the sources, from 1,000 to 120,000; more is read as 120,000. Default 60,000. A source that has not answered by then is left out with a warning. When none has, the call fails and costs nothing.","maximum":9007199254740991,"minimum":1000,"type":"integer"},"toolDetail":{"const":"compact","type":"string"}},"required":["query"],"type":"object"}after
{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"definitions":{"__schema0":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"items":{"allOf":[{"$ref":"#/definitions/__schema0"}]},"type":"array"},{"additionalProperties":{"allOf":[{"$ref":"#/definitions/__schema0"}]},"propertyNames":{"type":"string"},"type":"object"}]},"__schema1":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"items":{"allOf":[{"$ref":"#/definitions/__schema1"}]},"type":"array"},{"additionalProperties":{"allOf":[{"$ref":"#/definitions/__schema1"}]},"propertyNames":{"type":"string"},"type":"object"}]},"__schema2":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"items":{"allOf":[{"$ref":"#/definitions/__schema2"}]},"type":"array"},{"additionalProperties":{"allOf":[{"$ref":"#/definitions/__schema2"}]},"propertyNames":{"type":"string"},"type":"object"}]}},"properties":{"agent":{"additionalProperties":false,"description":"Accepted so a client that sends { model: \"FIRE-1\" } works. An extract reads the pages it is given and checks every value; it does not browse or click, and the answer says so in warning. To navigate a site, use the agent endpoint.","properties":{"model":{"maxLength":40,"minLength":1,"type":"string"}},"required":["model"],"type":"object"},"alexandria":{"not":{}},"allowExternalLinks":{"default":false,"description":"Send true to also read pages on other sites that the pages link to, up to 5, picking the links whose address mentions your prompt. Each page read costs 1 credit.","type":"boolean"},"auditMetadata":{"not":{}},"domainTools":{"const":false,"type":"boolean"},"enableWebSearch":{"default":false,"description":"Send true to also search the web for your prompt and read the best pages it finds, up to 3 more. Needs a prompt. Costs 2 credits for the search. With no urls, the search runs without this.","type":"boolean"},"ignoreInvalidURLs":{"default":true,"description":"Skip addresses that are not public website URLs. Send false to refuse the call instead.","type":"boolean"},"ignoreRobotsTxt":{"const":false,"type":"boolean"},"ignoreSitemap":{"default":false,"description":"For an address ending in /*: skip the site's sitemaps and find pages by links.","type":"boolean"},"includeSubdomains":{"default":true,"description":"For an address ending in /*: also read pages on subdomains of the site. Send false to stay on the exact host.","type":"boolean"},"prompt":{"description":"What to pull from the pages in plain words, such as the version and the release date, up to 10000 characters. With no urls, the web is searched for the first 400 characters of it.","maxLength":10000,"minLength":1,"type":"string"},"robotsUserAgent":{"not":{}},"schema":{"additionalProperties":{"$ref":"#/definitions/__schema0"},"description":"The fields to fill, as a JSON Schema (draft-07 or 2020-12) object with properties. Pydantic's model_json_schema() and zod's toJSONSchema() output work as they are. enum, const, anyOf, oneOf, nullable types, $ref with $defs, required, descriptions and any key names are read. Up to 100 top-level fields and 32 KB. A field the page does not state comes back null.","propertyNames":{"type":"string"},"type":"object"},"scrapeOptions":{"additionalProperties":{},"description":"How to read each page, the same options as scrape.","properties":{"actions":{"description":"Up to 50 steps to run on the page, in order, before reading it: { \"type\": \"wait\", \"milliseconds\": 500 } (up to 30 seconds), { \"type\": \"wait\", \"selector\": \".results\" }, { \"type\": \"click\", \"selector\": \"button.more\" }, { \"type\": \"write\", \"text\": \"tides\" }, { \"type\": \"press\", \"key\": \"Enter\" }, { \"type\": \"scroll\", \"direction\": \"down\" } (also up, left or right; amount is pixels, \"viewport\" or \"max\"; maxScrolls 1 to 50; selector scrolls an inner container; \"max\" keeps scrolling until the page stops growing, for feeds that load as you go), { \"type\": \"screenshot\", \"fullPage\": true } (links come back in actions.screenshots), { \"type\": \"scrape\" } (the page at that point, in actions.scrapes), { \"type\": \"executeJavascript\", \"script\": \"document.title\" } (results in actions.javascriptReturns), { \"type\": \"pdf\", \"format\": \"A4\" } (links in actions.pdfs) or { \"type\": \"perform\", \"action\": \"Click the Load more button\" } (a step in plain words, up to 5 browser steps on this page, never leaving the site; at most 5 per call). A read with actions costs 1 credit, the same as any page; the actions themselves add nothing. If an action fails, you still get the page as it stood, with a warning that names the action and says why.","items":{"anyOf":[{"additionalProperties":false,"properties":{"milliseconds":{"maximum":30000,"minimum":1,"type":"integer"},"type":{"const":"wait","type":"string"}},"required":["type","milliseconds"],"type":"object"},{"additionalProperties":false,"properties":{"selector":{"minLength":1,"type":"string"},"type":{"const":"wait","type":"string"}},"required":["type","selector"],"type":"object"},{"additionalProperties":false,"properties":{"all":{"const":false,"type":"boolean"},"selector":{"minLength":1,"type":"string"},"type":{"const":"click","type":"string"}},"required":["type","selector"],"type":"object"},{"additionalProperties":false,"properties":{"text":{"minLength":1,"type":"string"},"type":{"const":"write","type":"string"}},"required":["type","text"],"type":"object"},{"additionalProperties":false,"properties":{"key":{"maxLength":40,"minLength":1,"type":"string"},"type":{"const":"press","type":"string"}},"required":["type","key"],"type":"object"},{"additionalProperties":false,"properties":{"amount":{"anyOf":[{"maximum":100000,"minimum":1,"type":"integer"},{"enum":["viewport","max"],"type":"string"}]},"direction":{"default":"down","enum":["up","down","left","right"],"type":"string"},"maxScrolls":{"maximum":50,"minimum":1,"type":"integer"},"selector":{"minLength":1,"type":"string"},"type":{"const":"scroll","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"fullPage":{"type":"boolean"},"quality":{"maximum":100,"minimum":1,"type":"integer"},"type":{"const":"screenshot","type":"string"},"viewport":{"additionalProperties":false,"properties":{"height":{"maximum":2160,"minimum":200,"type":"integer"},"width":{"maximum":3840,"minimum":200,"type":"integer"}},"required":["width","height"],"type":"object"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"type":{"const":"scrape","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"script":{"maxLength":20000,"minLength":1,"type":"string"},"type":{"const":"executeJavascript","type":"string"}},"required":["type","script"],"type":"object"},{"additionalProperties":false,"properties":{"format":{"enum":["Letter","Legal","Tabloid","Ledger","A0","A1","A2","A3","A4","A5","A6"],"type":"string"},"landscape":{"type":"boolean"},"scale":{"maximum":2,"minimum":0.1,"type":"number"},"type":{"const":"pdf","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"action":{"maxLength":500,"minLength":1,"type":"string"},"type":{"const":"perform","type":"string"}},"required":["type","action"],"type":"object"}]},"maxItems":50,"minItems":1,"type":"array"},"alexandria":{"not":{}},"auditMetadata":{"not":{}},"blockAds":{"description":"Ads and trackers are not loaded when a page runs in a browser. Send false to load them.","type":"boolean"},"checkPromptInjection":{"description":"Send true to scan the page text for instructions aimed at an AI model before anything is built from it. A page that has them is refused with 403 promptInjectionDetected and costs nothing. The scan adds 4 credits when it runs; a page it cannot scan fully comes back with a warning and no charge.","type":"boolean"},"domainTools":{"const":false,"type":"boolean"},"excludeTags":{"description":"Remove the parts of the page that match these CSS selectors, such as .comments.","items":{"minLength":1,"type":"string"},"minItems":1,"type":"array"},"fastMode":{"description":"Send true to read the page without opening a browser: the answer comes sooner, but a page that needs a browser, or that refuses a plain request, comes back as an error instead of being retried. Ignored when the call needs a browser (actions, screenshot, waitFor, mobile, profile, network, branding).","type":"boolean"},"formats":{"default":["markdown"],"description":"What to return: markdown (clean page text), summary (a short summary of the page), html (the cleaned page), rawHtml (the page as sent), audio and video (for a YouTube link: the audio track as an M4A file, or the video as an MP4 file, as a link that works for 1 hour), rawBase64 (the bytes the site sent, Base64 encoded, from a live read; metadata.contentType says what they are), links (every link on the page), images (every image address), screenshot (a link to a JPEG of the visible page, kept for 7 days), changeTracking (what changed in the markdown since your key last read this page with the same options, kept 30 days; add modes [\"git-diff\",\"json\"] with a schema or prompt to compare fields too), question (send { \"type\": \"question\", \"question\": \"...\" } to get answer, null when the page does not state one), product (title, brand, category, url, description and variants with price, sale, availability and images, or null) and menu (merchant, currency and sections of items with prices, or null) network (the JSON the page loaded while it rendered, up to 30 responses) and branding (the page's colors, fonts, typography, spacing, button and input styles, logo and brand images, read from how the page looks, with a field left out when the page does not show it). Send { \"type\": \"screenshot\", \"fullPage\": true } for the whole page. Send { \"type\": \"highlights\", \"query\": \"refund policy\" } for the passages that best match a query. Send { \"type\": \"json\", \"schema\": { \"type\": \"object\", \"properties\": { \"price\": { \"type\": \"number\" } } } } or { \"type\": \"json\", \"prompt\": \"the price and the stock\" } for fields filled from the page, each checked against it. Send { \"type\": \"json\", \"parser\": \"amazon-product\" } to get a site's own data as json instead of reading the page; GET /v1/parsers lists the parsers. Send { \"type\": \"json\", \"rules\": { \"title\": \"h1\", \"links\": { \"selector\": \"a\", \"type\": \"list\", \"output\": \"@href\" } } } to read the page with CSS rules and no model, at the page's own price. Send { \"type\": \"attributes\", \"selectors\": [{ \"selector\": \"a\", \"attribute\": \"href\" }] } for attribute values, returned in attributes. Without a parser or rules, json needs a schema or a prompt and is filled from the page. json with a schema or a prompt, summary, highlights, question, product, menu and changeTracking in json mode cost 4 credits more each when they return something. json with rules or a parser, and attributes, cost nothing more. A screenshot, network or branding read costs 1 credit, the same as any page. A PDF comes back as markdown only, and costs 1 credit more for each page read.","items":{"anyOf":[{"enum":["markdown","summary","html","rawHtml","rawBase64","links","images","network","branding","audio","video","screenshot","changeTracking","product","menu"],"type":"string"},{"additionalProperties":false,"properties":{"type":{"enum":["markdown","summary","html","rawHtml","rawBase64","links","images","network","branding","audio","video"],"type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"modes":{"description":"git-diff returns a unified diff of the markdown. json compares the fields in schema or prompt between this read and the last one. Without modes you get git-diff.","items":{"enum":["git-diff","json"],"type":"string"},"maxItems":2,"type":"array"},"prompt":{"description":"With json mode: what to compare, in plain words, such as the price and stock.","maxLength":10000,"minLength":1,"type":"string"},"schema":{"additionalProperties":{"$ref":"#/definitions/__schema0"},"description":"The fields to fill, as a JSON Schema (draft-07 or 2020-12) object with properties. Pydantic's model_json_schema() and zod's toJSONSchema() output work as they are. enum, const, anyOf, oneOf, nullable types, $ref with $defs, required, descriptions and any key names are read. Up to 100 top-level fields and 32 KB. A field the page does not state comes back null.","propertyNames":{"type":"string"},"type":"object"},"tag":{"type":"null"},"type":{"const":"changeTracking","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"question":{"description":"A question to answer from the page, such as what the refund window is.","maxLength":10000,"minLength":1,"type":"string"},"type":{"const":"question","type":"string"}},"required":["type","question"],"type":"object"},{"additionalProperties":false,"properties":{"type":{"const":"product","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"type":{"const":"menu","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"fullPage":{"default":false,"description":"Capture the whole page from top to bottom instead of the visible part.","type":"boolean"},"quality":{"description":"JPEG quality from 1 to 100. The default is 70.","maximum":100,"minimum":1,"type":"integer"},"type":{"const":"screenshot","type":"string"},"viewport":{"additionalProperties":false,"description":"The window size in pixels, such as { width: 390, height: 844 }.","properties":{"height":{"maximum":2160,"minimum":200,"type":"integer"},"width":{"maximum":3840,"minimum":200,"type":"integer"}},"required":["width","height"],"type":"object"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"count":{"default":5,"description":"How many passages to return, best match first.","maximum":20,"minimum":1,"type":"integer"},"query":{"description":"What you are looking for on the page, such as refund policy.","maxLength":10000,"minLength":1,"type":"string"},"type":{"const":"highlights","type":"string"}},"required":["type","query"],"type":"object"},{"additionalProperties":false,"properties":{"checkPromptInjection":{"description":"Deprecated: send checkPromptInjection at the top level of the call.","type":"boolean"},"options":{"additionalProperties":{"$ref":"#/definitions/__schema1"},"description":"Only with parser: extra inputs for it, such as { \"page\": 2 } for the next page of results or { \"minRating\": 4.5 } for a filter. GET /v1/parsers lists what each parser accepts.","propertyNames":{"type":"string"},"type":"object"},"parser":{"description":"Read the page with a named parser, which gives the site's own data as json. The url must be the kind of page the parser reads. Parsers are the only way to read some sites. GET /v1/parsers lists them.","type":"string"},"prompt":{"description":"What to pull from the page in plain words, such as the version and the release date.","maxLength":10000,"minLength":1,"type":"string"},"rules":{"additionalProperties":{"$ref":"#/definitions/__schema2"},"description":"Read the page with CSS rules instead of a model, no extra fee. Each field is a selector such as \"h1\" (the first match's text), \"a@href\" (an attribute) or { \"selector\": \"li\", \"type\": \"list\", \"output\": \"text\" | \"html\" | \"@attribute\" | { nested fields } }. A missing item is null and an unmatched list is []. Relative links become absolute. Up to 100 fields, 5 levels deep. Not with schema, prompt or parser.","propertyNames":{"type":"string"},"type":"object"},"schema":{"additionalProperties":{"$ref":"#/definitions/__schema0"},"description":"The fields to fill, as a JSON Schema (draft-07 or 2020-12) object with properties. Pydantic's model_json_schema() and zod's toJSONSchema() output work as they are. enum, const, anyOf, oneOf, nullable types, $ref with $defs, required, descriptions and any key names are read. Up to 100 top-level fields and 32 KB. A field the page does not state comes back null.","propertyNames":{"type":"string"},"type":"object"},"type":{"const":"json","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"selectors":{"description":"The elements and attributes to read, such as { selector: 'a.buy', attribute: 'href' }.","items":{"additionalProperties":false,"properties":{"attribute":{"maxLength":100,"minLength":1,"type":"string"},"selector":{"minLength":1,"type":"string"}},"required":["selector","attribute"],"type":"object"},"maxItems":50,"minItems":1,"type":"array"},"type":{"const":"attributes","type":"string"}},"required":["type","selectors"],"type":"object"}]},"maxItems":20,"minItems":1,"type":"array"},"headers":{"additionalProperties":{"maxLength":2000,"pattern":"^[\\t\\x20-\\x7e]*$","type":"string"},"description":"Extra request headers to send to the site, such as { \"x-plan\": \"pro\" }. A read with headers is never answered from or saved to a stored copy.","propertyNames":{"pattern":"^[A-Za-z0-9-]{1,64}$","type":"string"},"type":"object"},"ignoreRobotsTxt":{"const":false,"type":"boolean"},"includeTags":{"description":"Keep only the parts of the page that match these CSS selectors, such as article or .price. When set, onlyMainContent is not applied.","items":{"minLength":1,"type":"string"},"minItems":1,"type":"array"},"location":{"additionalProperties":false,"description":"Where to read the page from. The default is the United States.","properties":{"country":{"description":"Two-letter country code to read the page from, such as DE or JP.","type":"string"},"languages":{"description":"Languages to ask the site for, best first, such as [\"de\", \"en\"]. Sent as Accept-Language. A read with languages is never answered from or saved to a stored copy.","items":{"pattern":"^[A-Za-z]{2,3}(?:-[A-Za-z0-9]{2,8})*$","type":"string"},"maxItems":5,"minItems":1,"type":"array"}},"type":"object"},"lockdown":{"description":"Send true to answer only from a stored copy of the page and never read it live, whatever its age. A page with no stored copy is notFound. The same as minAge 0.","type":"boolean"},"maxAge":{"description":"Accept a stored answer up to this many milliseconds old, at most 30 days. Without it, 2 days, or less for a site whose pages change often, and a copy up to twice that age (at most 7 days) comes back at once as stale while a fresh read runs. 0 always reads the page live. metadata.cacheState says which one you got.","maximum":9007199254740991,"minimum":0,"type":"integer"},"minAge":{"description":"Answer only from a stored copy that is at least this many milliseconds old, and never read the page live. 0 accepts any stored copy. A page with no such copy is notFound.","maximum":9007199254740991,"minimum":0,"type":"integer"},"mobile":{"description":"Read the page as a phone would: a phone-sized screen and the mobile version of the site. The page loads in a browser.","type":"boolean"},"onlyCleanContent":{"description":"Send true to have a model remove what onlyMainContent leaves behind in the markdown: cookie banners, ads, share widgets, breadcrumbs, sign-up prompts, comment prompts and related-article lists. It only removes whole paragraphs and lists; it never rewrites or adds text, and code blocks are always kept. Skipped with a warning when the page is too long to clean or the model does not answer. Not with zeroDataRetention. Summary, answers and highlights are made from the cleaned markdown.","type":"boolean"},"onlyMainContent":{"default":true,"description":"Keep only the page's main content, without menus, headers, footers and ads.","type":"boolean"},"parsers":{"description":"Only the pdf parser exists. Send \"pdf\" or { \"type\": \"pdf\", mode, maxPages, pages, blocks, pageMarkers } with the same meaning as in parse. Without mode a PDF is read from its text layer only; auto reads the picture of a page that has no text, and ocr reads the picture of every page, up to 20 pages. Each page read costs 1 credit.","items":{"anyOf":[{"const":"pdf","type":"string"},{"additionalProperties":false,"properties":{"blocks":{"description":"Send true to also get the page's layout in blocks: each title, section header or run of text, with its page, reading order, position on the page (bbox as left, top, right, bottom from 0 to 1) and where its text sits in that page's markdown (span, as in pages). Tables, figures and formulas are not told apart. A page read from its picture is one block. No extra charge.","type":"boolean"},"maxPages":{"description":"Read at most this many pages, up to 100.","maximum":100,"minimum":1,"type":"integer"},"mode":{"description":"fast reads the text layer only. auto (the default) reads the text layer and reads the picture of any page that has none. ocr reads the picture of every page.","enum":["fast","auto","ocr"],"type":"string"},"pageMarkers":{"description":"Send true to mark page breaks in the markdown: pages are joined with \"---\" and a line, where N is the page that follows. No extra charge.","type":"boolean"},"pages":{"description":"Send true to also get each page's markdown in pages, as { pageNumber, markdown }. No extra charge.","type":"boolean"},"type":{"const":"pdf","type":"string"}},"required":["type"],"type":"object"}]},"minItems":1,"type":"array"},"profile":{"additionalProperties":false,"description":"Read the page with the cookies and local storage that earlier calls saved under this name, kept for your account for 30 days after the last use. A call with a profile always loads the page in a browser, costs 1 credit, the same as any page, and is never answered from a stored copy. Only one call at a time can save to a profile.","properties":{"name":{"description":"A name you choose, such as shop-login. Calls with the same name share state.","maxLength":128,"minLength":1,"type":"string"},"saveChanges":{"default":true,"description":"Keep the cookies and local storage this read leaves behind for the next call with this name. Send false to read with the profile without changing it.","type":"boolean"}},"required":["name"],"type":"object"},"proxy":{"description":"auto: basic first, enhanced once if the site refuses. basic: one plain attempt. enhanced: the stronger read from the start. Same price.","enum":["auto","basic","enhanced"],"type":"string"},"redactPII":{"anyOf":[{"type":"boolean"},{"additionalProperties":false,"description":"Options for redactPII.","properties":{"entities":{"default":["PERSON","EMAIL","PHONE","LOCATION","FINANCIAL","SECRET"],"description":"What to hide: PERSON, EMAIL, PHONE, LOCATION, FINANCIAL, SECRET. All by default.","items":{"enum":["PERSON","EMAIL","PHONE","LOCATION","FINANCIAL","SECRET"],"type":"string"},"minItems":1,"type":"array"},"mode":{"default":"accurate","description":"accurate finds names and places with the model and the rest by pattern. aggressive adds guesses that catch more and may hide a little too much. fast uses patterns only, so it finds no ordinary names or places.","enum":["accurate","aggressive","fast"],"type":"string"},"replaceStyle":{"default":"tag","description":"tag writes <EMAIL>, mask writes * for each character, remove deletes it.","enum":["tag","mask","remove"],"type":"string"}},"type":"object"}],"description":"Send true, or an object, to hide personal data in the markdown and in everything made from it (summary, answers, highlights, json). Links, html and rawHtml are not changed. A page the model cannot scan is refused rather than returned unredacted."},"removeBase64Images":{"description":"Images inside the page that carry their data in the address (data:image) are dropped by default. Send false to keep them in markdown and html.","type":"boolean"},"robotsUserAgent":{"not":{}},"skipTlsVerification":{"description":"Send true to read a page whose certificate is expired, self-signed or for another name. The read is not private against someone between us and the site.","type":"boolean"},"storeInCache":{"default":true,"description":"Send false to neither read nor keep a stored copy of this page.","type":"boolean"},"threatProtection":{"not":{}},"timeout":{"description":"How long to keep trying, in milliseconds, between 10 seconds and 2 minutes. Pages behind a bot check can need 10 to 30 seconds the first time.","maximum":300000,"minimum":1000,"type":"integer"},"toolDetail":{"not":{}},"waitFor":{"description":"Extra milliseconds to wait before reading, up to 60000, for pages that load their content late. To wait for an element, add a wait action with a selector. A read that waits costs 1 credit, the same as any page.","maximum":60000,"minimum":0,"type":"integer"},"zeroDataRetention":{"default":false,"description":"Send true to keep nothing from this call: no stored copy is read or made, and nothing from it is logged. Costs 1 credit more per page. Not with a screenshot.","type":"boolean"}},"type":"object"},"showSources":{"default":false,"description":"Send true to get sources: for each field, the pages that state its value.","type":"boolean"},"systemPrompt":{"description":"Standing instructions for how to fill the fields, such as units or how to write dates, up to 10000 characters. They add to the rules of the extract: a value is still copied from the page and is null when the page does not state it.","maxLength":10000,"minLength":1,"type":"string"},"threatProtection":{"not":{}},"urls":{"default":[],"description":"The pages to read, up to 25, such as [\"https://bun.com/blog/bun-v1.3\"]. An address ending in /* reads pages under it, found through the site's sitemap. With more than one, the fields are filled from all of them together. A page that cannot be read is skipped and named in warning, and costs nothing. A page is read up to 50000 characters. With several pages each one gets a smaller share, and all together are read up to 150000 characters. A page that is cut is counted in warning. The call fails only when no page can be read. Leave it out and send a prompt to search the web instead.","items":{"maxLength":2048,"type":"string"},"maxItems":25,"type":"array"},"webhook":{"anyOf":[{"type":"string"},{"additionalProperties":false,"properties":{"events":{"items":{"enum":["started","page","action","completed","failed","cancelled"],"type":"string"},"minItems":1,"type":"array"},"headers":{"additionalProperties":{"maxLength":1000,"type":"string"},"propertyNames":{"pattern":"^[A-Za-z0-9-]{1,64}$","type":"string"},"type":"object"},"metadata":{"additionalProperties":{"$ref":"#/definitions/__schema0"},"propertyNames":{"type":"string"},"type":"object"},"url":{"type":"string"}},"required":["url"],"type":"object"}],"description":"Where to be told when the extract ends: a plain address, or { url } which gets one JSON POST with the id, the status, the data and creditsUsed. headers are sent with the call, metadata comes back in it, and events picks completed, failed or both (both by default). The call is signed: read Stophy-Signature (t=<unix seconds>,v1=<hex>), the HMAC-SHA256 of \"<t>.<body>\" with your webhook secret from webhook.secret. A call that gets no 2xx is sent again, up to 3 times."},"zeroDataRetention":{"default":false,"description":"Send true to keep nothing from this call: pages are read live, the result is held for one hour at most, and nothing is logged. Costs 1 credit more per page.","type":"boolean"}},"type":"object"}⟨3058 unchanged words⟩ :"object"},"proxy":{"description":"Which route reads the page.autoand: basicstart with the cheapest route andfirst,moveenhanceduponcewhenif the site refuses.enhancedbasic:startsoneonplainaattempt.residentialenhanced:browser.theThestrongerpricereadisfrom thesame.start. Same price.","enum":["auto","basic"," ⟨510 unchanged words⟩
⟨2911 unchanged words⟩ :"object"},"proxy":{"description":"Which route reads the page.autoand: basicstart with the cheapest route andfirst,moveenhanceduponcewhenif the site refuses.enhancedbasic:startsoneonplainaattempt.residentialenhanced:browser.theThestrongerpricereadisfrom thesame.start. Same price.","enum":["auto","basic"," ⟨390 unchanged words⟩
⟨3497 unchanged words⟩ :"object"},"proxy":{"description":"Which route reads the page.autoand: basicstart with the cheapest route andfirst,moveenhanceduponcewhenif the site refuses.enhancedbasic:startsoneonplainaattempt.residentialenhanced:browser.theThestrongerpricereadisfrom thesame.start. Same price.","enum":["auto","basic"," ⟨551 unchanged words⟩
after
{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"definitions":{"__schema0":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"items":{"allOf":[{"$ref":"#/definitions/__schema0"}]},"type":"array"},{"additionalProperties":{"allOf":[{"$ref":"#/definitions/__schema0"}]},"propertyNames":{"type":"string"},"type":"object"}]},"__schema1":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"items":{"allOf":[{"$ref":"#/definitions/__schema1"}]},"type":"array"},{"additionalProperties":{"allOf":[{"$ref":"#/definitions/__schema1"}]},"propertyNames":{"type":"string"},"type":"object"}]},"__schema2":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"items":{"allOf":[{"$ref":"#/definitions/__schema2"}]},"type":"array"},{"additionalProperties":{"allOf":[{"$ref":"#/definitions/__schema2"}]},"propertyNames":{"type":"string"},"type":"object"}]}},"properties":{"alexandria":{"not":{}},"allowExternalLinks":{"default":false,"description":"Also follow links to other sites. They count toward limit and maxDiscoveryDepth. Only the start site's robots.txt is read.","type":"boolean"},"allowSubdomains":{"default":false,"description":"Also read pages on subdomains, such as docs.bun.com for bun.com.","type":"boolean"},"auditMetadata":{"not":{}},"crawlEntireDomain":{"default":false,"description":"Read the whole site, not only pages under the start page's path.","type":"boolean"},"deduplicateSimilarURLs":{"default":true,"description":"Read one page when addresses differ only by www, a trailing slash, a #fragment, tracking parameters such as utm_source, or the order of the ?query. Send false to read each address.","type":"boolean"},"delay":{"description":"Seconds to wait between pages. With delay the crawl reads one page at a time. At most 30.","maximum":30,"minimum":0,"type":"number"},"domainTools":{"const":false,"type":"boolean"},"excludePaths":{"default":[],"description":"Skip pages whose path matches one of these regular expressions, such as tag/.*.","items":{"maxLength":200,"minLength":1,"type":"string"},"maxItems":100,"type":"array"},"ignoreQueryParameters":{"default":false,"description":"Treat addresses that differ only in their ?query part as one page.","type":"boolean"},"ignoreRobotsTxt":{"const":false,"type":"boolean"},"includePaths":{"default":[],"description":"Read only pages whose path matches one of these regular expressions, such as blog/.*.","items":{"maxLength":200,"minLength":1,"type":"string"},"maxItems":100,"type":"array"},"limit":{"default":10000,"description":"Stop after reading this many pages in total, across every call.","maximum":10000,"minimum":1,"type":"integer"},"maxConcurrency":{"description":"Most pages read at once. We read at most 4 at once, so a larger number gives the same speed.","maximum":100,"minimum":1,"type":"integer"},"maxDiscoveryDepth":{"default":3,"description":"How many links away from the start page to go, up to 10.","maximum":10,"minimum":0,"type":"integer"},"prompt":{"description":"What you are looking for, such as sqlite performance. Pages about it are read first, and the crawl stops once new pages stop mentioning it.","maxLength":1000,"minLength":1,"type":"string"},"regexOnFullURL":{"default":false,"description":"Match includePaths and excludePaths against the whole address, not only the path.","type":"boolean"},"robotsUserAgent":{"not":{}},"scrapeOptions":{"additionalProperties":{},"description":"How to read each page, the same options and formats as scrape. Without formats, each page comes back as markdown.","properties":{"actions":{"description":"Up to 50 steps to run on the page, in order, before reading it: { \"type\": \"wait\", \"milliseconds\": 500 } (up to 30 seconds), { \"type\": \"wait\", \"selector\": \".results\" }, { \"type\": \"click\", \"selector\": \"button.more\" }, { \"type\": \"write\", \"text\": \"tides\" }, { \"type\": \"press\", \"key\": \"Enter\" }, { \"type\": \"scroll\", \"direction\": \"down\" } (also up, left or right; amount is pixels, \"viewport\" or \"max\"; maxScrolls 1 to 50; selector scrolls an inner container; \"max\" keeps scrolling until the page stops growing, for feeds that load as you go), { \"type\": \"screenshot\", \"fullPage\": true } (links come back in actions.screenshots), { \"type\": \"scrape\" } (the page at that point, in actions.scrapes), { \"type\": \"executeJavascript\", \"script\": \"document.title\" } (results in actions.javascriptReturns), { \"type\": \"pdf\", \"format\": \"A4\" } (links in actions.pdfs) or { \"type\": \"perform\", \"action\": \"Click the Load more button\" } (a step in plain words, up to 5 browser steps on this page, never leaving the site; at most 5 per call). A read with actions costs 1 credit, the same as any page; the actions themselves add nothing. If an action fails, you still get the page as it stood, with a warning that names the action and says why.","items":{"anyOf":[{"additionalProperties":false,"properties":{"milliseconds":{"maximum":30000,"minimum":1,"type":"integer"},"type":{"const":"wait","type":"string"}},"required":["type","milliseconds"],"type":"object"},{"additionalProperties":false,"properties":{"selector":{"minLength":1,"type":"string"},"type":{"const":"wait","type":"string"}},"required":["type","selector"],"type":"object"},{"additionalProperties":false,"properties":{"all":{"const":false,"type":"boolean"},"selector":{"minLength":1,"type":"string"},"type":{"const":"click","type":"string"}},"required":["type","selector"],"type":"object"},{"additionalProperties":false,"properties":{"text":{"minLength":1,"type":"string"},"type":{"const":"write","type":"string"}},"required":["type","text"],"type":"object"},{"additionalProperties":false,"properties":{"key":{"maxLength":40,"minLength":1,"type":"string"},"type":{"const":"press","type":"string"}},"required":["type","key"],"type":"object"},{"additionalProperties":false,"properties":{"amount":{"anyOf":[{"maximum":100000,"minimum":1,"type":"integer"},{"enum":["viewport","max"],"type":"string"}]},"direction":{"default":"down","enum":["up","down","left","right"],"type":"string"},"maxScrolls":{"maximum":50,"minimum":1,"type":"integer"},"selector":{"minLength":1,"type":"string"},"type":{"const":"scroll","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"fullPage":{"type":"boolean"},"quality":{"maximum":100,"minimum":1,"type":"integer"},"type":{"const":"screenshot","type":"string"},"viewport":{"additionalProperties":false,"properties":{"height":{"maximum":2160,"minimum":200,"type":"integer"},"width":{"maximum":3840,"minimum":200,"type":"integer"}},"required":["width","height"],"type":"object"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"type":{"const":"scrape","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"script":{"maxLength":20000,"minLength":1,"type":"string"},"type":{"const":"executeJavascript","type":"string"}},"required":["type","script"],"type":"object"},{"additionalProperties":false,"properties":{"format":{"enum":["Letter","Legal","Tabloid","Ledger","A0","A1","A2","A3","A4","A5","A6"],"type":"string"},"landscape":{"type":"boolean"},"scale":{"maximum":2,"minimum":0.1,"type":"number"},"type":{"const":"pdf","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"action":{"maxLength":500,"minLength":1,"type":"string"},"type":{"const":"perform","type":"string"}},"required":["type","action"],"type":"object"}]},"maxItems":50,"minItems":1,"type":"array"},"alexandria":{"not":{}},"auditMetadata":{"not":{}},"blockAds":{"description":"Ads and trackers are not loaded when a page runs in a browser. Send false to load them.","type":"boolean"},"checkPromptInjection":{"description":"Send true to scan the page text for instructions aimed at an AI model before anything is built from it. A page that has them is refused with 403 promptInjectionDetected and costs nothing. The scan adds 4 credits when it runs; a page it cannot scan fully comes back with a warning and no charge.","type":"boolean"},"domainTools":{"const":false,"type":"boolean"},"excludeTags":{"description":"Remove the parts of the page that match these CSS selectors, such as .comments.","items":{"minLength":1,"type":"string"},"minItems":1,"type":"array"},"fastMode":{"description":"Send true to read the page without opening a browser: the answer comes sooner, but a page that needs a browser, or that refuses a plain request, comes back as an error instead of being retried. Ignored when the call needs a browser (actions, screenshot, waitFor, mobile, profile, network, branding).","type":"boolean"},"formats":{"default":["markdown"],"description":"What to return: markdown (clean page text), summary (a short summary of the page), html (the cleaned page), rawHtml (the page as sent), audio and video (for a YouTube link: the audio track as an M4A file, or the video as an MP4 file, as a link that works for 1 hour), rawBase64 (the bytes the site sent, Base64 encoded, from a live read; metadata.contentType says what they are), links (every link on the page), images (every image address), screenshot (a link to a JPEG of the visible page, kept for 7 days), changeTracking (what changed in the markdown since your key last read this page with the same options, kept 30 days; add modes [\"git-diff\",\"json\"] with a schema or prompt to compare fields too), question (send { \"type\": \"question\", \"question\": \"...\" } to get answer, null when the page does not state one), product (title, brand, category, url, description and variants with price, sale, availability and images, or null) and menu (merchant, currency and sections of items with prices, or null) network (the JSON the page loaded while it rendered, up to 30 responses) and branding (the page's colors, fonts, typography, spacing, button and input styles, logo and brand images, read from how the page looks, with a field left out when the page does not show it). Send { \"type\": \"screenshot\", \"fullPage\": true } for the whole page. Send { \"type\": \"highlights\", \"query\": \"refund policy\" } for the passages that best match a query. Send { \"type\": \"json\", \"schema\": { \"type\": \"object\", \"properties\": { \"price\": { \"type\": \"number\" } } } } or { \"type\": \"json\", \"prompt\": \"the price and the stock\" } for fields filled from the page, each checked against it. Send { \"type\": \"json\", \"parser\": \"amazon-product\" } to get a site's own data as json instead of reading the page; GET /v1/parsers lists the parsers. Send { \"type\": \"json\", \"rules\": { \"title\": \"h1\", \"links\": { \"selector\": \"a\", \"type\": \"list\", \"output\": \"@href\" } } } to read the page with CSS rules and no model, at the page's own price. Send { \"type\": \"attributes\", \"selectors\": [{ \"selector\": \"a\", \"attribute\": \"href\" }] } for attribute values, returned in attributes. Without a parser or rules, json needs a schema or a prompt and is filled from the page. json with a schema or a prompt, summary, highlights, question, product, menu and changeTracking in json mode cost 4 credits more each when they return something. json with rules or a parser, and attributes, cost nothing more. A screenshot, network or branding read costs 1 credit, the same as any page. A PDF comes back as markdown only, and costs 1 credit more for each page read.","items":{"anyOf":[{"enum":["markdown","summary","html","rawHtml","rawBase64","links","images","network","branding","audio","video","screenshot","changeTracking","product","menu"],"type":"string"},{"additionalProperties":false,"properties":{"type":{"enum":["markdown","summary","html","rawHtml","rawBase64","links","images","network","branding","audio","video"],"type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"modes":{"description":"git-diff returns a unified diff of the markdown. json compares the fields in schema or prompt between this read and the last one. Without modes you get git-diff.","items":{"enum":["git-diff","json"],"type":"string"},"maxItems":2,"type":"array"},"prompt":{"description":"With json mode: what to compare, in plain words, such as the price and stock.","maxLength":10000,"minLength":1,"type":"string"},"schema":{"additionalProperties":{"$ref":"#/definitions/__schema0"},"description":"The fields to fill, as a JSON Schema (draft-07 or 2020-12) object with properties. Pydantic's model_json_schema() and zod's toJSONSchema() output work as they are. enum, const, anyOf, oneOf, nullable types, $ref with $defs, required, descriptions and any key names are read. Up to 100 top-level fields and 32 KB. A field the page does not state comes back null.","propertyNames":{"type":"string"},"type":"object"},"tag":{"type":"null"},"type":{"const":"changeTracking","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"question":{"description":"A question to answer from the page, such as what the refund window is.","maxLength":10000,"minLength":1,"type":"string"},"type":{"const":"question","type":"string"}},"required":["type","question"],"type":"object"},{"additionalProperties":false,"properties":{"type":{"const":"product","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"type":{"const":"menu","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"fullPage":{"default":false,"description":"Capture the whole page from top to bottom instead of the visible part.","type":"boolean"},"quality":{"description":"JPEG quality from 1 to 100. The default is 70.","maximum":100,"minimum":1,"type":"integer"},"type":{"const":"screenshot","type":"string"},"viewport":{"additionalProperties":false,"description":"The window size in pixels, such as { width: 390, height: 844 }.","properties":{"height":{"maximum":2160,"minimum":200,"type":"integer"},"width":{"maximum":3840,"minimum":200,"type":"integer"}},"required":["width","height"],"type":"object"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"count":{"default":5,"description":"How many passages to return, best match first.","maximum":20,"minimum":1,"type":"integer"},"query":{"description":"What you are looking for on the page, such as refund policy.","maxLength":10000,"minLength":1,"type":"string"},"type":{"const":"highlights","type":"string"}},"required":["type","query"],"type":"object"},{"additionalProperties":false,"properties":{"checkPromptInjection":{"description":"Deprecated: send checkPromptInjection at the top level of the call.","type":"boolean"},"options":{"additionalProperties":{"$ref":"#/definitions/__schema1"},"description":"Only with parser: extra inputs for it, such as { \"page\": 2 } for the next page of results or { \"minRating\": 4.5 } for a filter. GET /v1/parsers lists what each parser accepts.","propertyNames":{"type":"string"},"type":"object"},"parser":{"description":"Read the page with a named parser, which gives the site's own data as json. The url must be the kind of page the parser reads. Parsers are the only way to read some sites. GET /v1/parsers lists them.","type":"string"},"prompt":{"description":"What to pull from the page in plain words, such as the version and the release date.","maxLength":10000,"minLength":1,"type":"string"},"rules":{"additionalProperties":{"$ref":"#/definitions/__schema2"},"description":"Read the page with CSS rules instead of a model, no extra fee. Each field is a selector such as \"h1\" (the first match's text), \"a@href\" (an attribute) or { \"selector\": \"li\", \"type\": \"list\", \"output\": \"text\" | \"html\" | \"@attribute\" | { nested fields } }. A missing item is null and an unmatched list is []. Relative links become absolute. Up to 100 fields, 5 levels deep. Not with schema, prompt or parser.","propertyNames":{"type":"string"},"type":"object"},"schema":{"additionalProperties":{"$ref":"#/definitions/__schema0"},"description":"The fields to fill, as a JSON Schema (draft-07 or 2020-12) object with properties. Pydantic's model_json_schema() and zod's toJSONSchema() output work as they are. enum, const, anyOf, oneOf, nullable types, $ref with $defs, required, descriptions and any key names are read. Up to 100 top-level fields and 32 KB. A field the page does not state comes back null.","propertyNames":{"type":"string"},"type":"object"},"type":{"const":"json","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"selectors":{"description":"The elements and attributes to read, such as { selector: 'a.buy', attribute: 'href' }.","items":{"additionalProperties":false,"properties":{"attribute":{"maxLength":100,"minLength":1,"type":"string"},"selector":{"minLength":1,"type":"string"}},"required":["selector","attribute"],"type":"object"},"maxItems":50,"minItems":1,"type":"array"},"type":{"const":"attributes","type":"string"}},"required":["type","selectors"],"type":"object"}]},"maxItems":20,"minItems":1,"type":"array"},"headers":{"additionalProperties":{"maxLength":2000,"pattern":"^[\\t\\x20-\\x7e]*$","type":"string"},"description":"Extra request headers to send to the site, such as { \"x-plan\": \"pro\" }. A read with headers is never answered from or saved to a stored copy.","propertyNames":{"pattern":"^[A-Za-z0-9-]{1,64}$","type":"string"},"type":"object"},"ignoreRobotsTxt":{"const":false,"type":"boolean"},"includeTags":{"description":"Keep only the parts of the page that match these CSS selectors, such as article or .price. When set, onlyMainContent is not applied.","items":{"minLength":1,"type":"string"},"minItems":1,"type":"array"},"location":{"additionalProperties":false,"description":"Where to read the page from. The default is the United States.","properties":{"country":{"description":"Two-letter country code to read the page from, such as DE or JP.","type":"string"},"languages":{"description":"Languages to ask the site for, best first, such as [\"de\", \"en\"]. Sent as Accept-Language. A read with languages is never answered from or saved to a stored copy.","items":{"pattern":"^[A-Za-z]{2,3}(?:-[A-Za-z0-9]{2,8})*$","type":"string"},"maxItems":5,"minItems":1,"type":"array"}},"type":"object"},"lockdown":{"description":"Send true to answer only from a stored copy of the page and never read it live, whatever its age. A page with no stored copy is notFound. The same as minAge 0.","type":"boolean"},"maxAge":{"description":"Accept a stored answer up to this many milliseconds old, at most 30 days. Without it, 2 days, or less for a site whose pages change often, and a copy up to twice that age (at most 7 days) comes back at once as stale while a fresh read runs. 0 always reads the page live. metadata.cacheState says which one you got.","maximum":9007199254740991,"minimum":0,"type":"integer"},"minAge":{"description":"Answer only from a stored copy that is at least this many milliseconds old, and never read the page live. 0 accepts any stored copy. A page with no such copy is notFound.","maximum":9007199254740991,"minimum":0,"type":"integer"},"mobile":{"description":"Read the page as a phone would: a phone-sized screen and the mobile version of the site. The page loads in a browser.","type":"boolean"},"onlyCleanContent":{"description":"Send true to have a model remove what onlyMainContent leaves behind in the markdown: cookie banners, ads, share widgets, breadcrumbs, sign-up prompts, comment prompts and related-article lists. It only removes whole paragraphs and lists; it never rewrites or adds text, and code blocks are always kept. Skipped with a warning when the page is too long to clean or the model does not answer. Not with zeroDataRetention. Summary, answers and highlights are made from the cleaned markdown.","type":"boolean"},"onlyMainContent":{"default":true,"description":"Keep only the page's main content, without menus, headers, footers and ads.","type":"boolean"},"parsers":{"description":"Only the pdf parser exists. Send \"pdf\" or { \"type\": \"pdf\", mode, maxPages, pages, blocks, pageMarkers } with the same meaning as in parse. Without mode a PDF is read from its text layer only; auto reads the picture of a page that has no text, and ocr reads the picture of every page, up to 20 pages. Each page read costs 1 credit.","items":{"anyOf":[{"const":"pdf","type":"string"},{"additionalProperties":false,"properties":{"blocks":{"description":"Send true to also get the page's layout in blocks: each title, section header or run of text, with its page, reading order, position on the page (bbox as left, top, right, bottom from 0 to 1) and where its text sits in that page's markdown (span, as in pages). Tables, figures and formulas are not told apart. A page read from its picture is one block. No extra charge.","type":"boolean"},"maxPages":{"description":"Read at most this many pages, up to 100.","maximum":100,"minimum":1,"type":"integer"},"mode":{"description":"fast reads the text layer only. auto (the default) reads the text layer and reads the picture of any page that has none. ocr reads the picture of every page.","enum":["fast","auto","ocr"],"type":"string"},"pageMarkers":{"description":"Send true to mark page breaks in the markdown: pages are joined with \"---\" and a line, where N is the page that follows. No extra charge.","type":"boolean"},"pages":{"description":"Send true to also get each page's markdown in pages, as { pageNumber, markdown }. No extra charge.","type":"boolean"},"type":{"const":"pdf","type":"string"}},"required":["type"],"type":"object"}]},"minItems":1,"type":"array"},"profile":{"additionalProperties":false,"description":"Read the page with the cookies and local storage that earlier calls saved under this name, kept for your account for 30 days after the last use. A call with a profile always loads the page in a browser, costs 1 credit, the same as any page, and is never answered from a stored copy. Only one call at a time can save to a profile.","properties":{"name":{"description":"A name you choose, such as shop-login. Calls with the same name share state.","maxLength":128,"minLength":1,"type":"string"},"saveChanges":{"default":true,"description":"Keep the cookies and local storage this read leaves behind for the next call with this name. Send false to read with the profile without changing it.","type":"boolean"}},"required":["name"],"type":"object"},"proxy":{"description":"Which route reads the page. auto and basic start with the cheapest route and move up when the site refuses. enhanced starts on a residential browser. The price is the same.","enum":["auto","basic","enhanced"],"type":"string"},"redactPII":{"anyOf":[{"type":"boolean"},{"additionalProperties":false,"description":"Options for redactPII.","properties":{"entities":{"default":["PERSON","EMAIL","PHONE","LOCATION","FINANCIAL","SECRET"],"description":"What to hide: PERSON, EMAIL, PHONE, LOCATION, FINANCIAL, SECRET. All by default.","items":{"enum":["PERSON","EMAIL","PHONE","LOCATION","FINANCIAL","SECRET"],"type":"string"},"minItems":1,"type":"array"},"mode":{"default":"accurate","description":"accurate finds names and places with the model and the rest by pattern. aggressive adds guesses that catch more and may hide a little too much. fast uses patterns only, so it finds no ordinary names or places.","enum":["accurate","aggressive","fast"],"type":"string"},"replaceStyle":{"default":"tag","description":"tag writes <EMAIL>, mask writes * for each character, remove deletes it.","enum":["tag","mask","remove"],"type":"string"}},"type":"object"}],"description":"Send true, or an object, to hide personal data in the markdown and in everything made from it (summary, answers, highlights, json). Links, html and rawHtml are not changed. A page the model cannot scan is refused rather than returned unredacted."},"removeBase64Images":{"description":"Images inside the page that carry their data in the address (data:image) are dropped by default. Send false to keep them in markdown and html.","type":"boolean"},"robotsUserAgent":{"not":{}},"skipTlsVerification":{"description":"Send true to read a page whose certificate is expired, self-signed or for another name. The read is not private against someone between us and the site.","type":"boolean"},"storeInCache":{"default":true,"description":"Send false to neither read nor keep a stored copy of this page.","type":"boolean"},"threatProtection":{"not":{}},"timeout":{"description":"How long to keep trying, in milliseconds, between 10 seconds and 2 minutes. Pages behind a bot check can need 10 to 30 seconds the first time.","maximum":300000,"minimum":1000,"type":"integer"},"toolDetail":{"not":{}},"waitFor":{"description":"Extra milliseconds to wait before reading, up to 60000, for pages that load their content late. To wait for an element, add a wait action with a selector. A read that waits costs 1 credit, the same as any page.","maximum":60000,"minimum":0,"type":"integer"},"zeroDataRetention":{"default":false,"description":"Send true to keep nothing from this call: no stored copy is read or made, and nothing from it is logged. Costs 1 credit more per page. Not with a screenshot.","type":"boolean"}},"type":"object"},"sitemap":{"default":"include","description":"include also uses the site's sitemaps. only reads just the pages the sitemaps name. skip ignores them.","enum":["skip","include","only"],"type":"string"},"threatProtection":{"not":{}},"url":{"description":"The page to start from, such as https://bun.com/docs.","type":"string"},"webhook":{"anyOf":[{"type":"string"},{"additionalProperties":false,"properties":{"events":{"items":{"enum":["started","page","action","completed","failed","cancelled"],"type":"string"},"minItems":1,"type":"array"},"headers":{"additionalProperties":{"maxLength":1000,"type":"string"},"propertyNames":{"pattern":"^[A-Za-z0-9-]{1,64}$","type":"string"},"type":"object"},"metadata":{"additionalProperties":{"$ref":"#/definitions/__schema0"},"propertyNames":{"type":"string"},"type":"object"},"url":{"type":"string"}},"required":["url"],"type":"object"}],"description":"Where to be told about the job: a plain address, or { url } which gets a JSON POST when the job starts, for each finished page, and when the job ends. headers are sent with every call, metadata comes back in every call, and events picks which of started, page, action, completed, failed and cancelled to send (all by default). An agent run sends action for each step it takes, and page too. Every call is signed: read Stophy-Signature (t=<unix seconds>,v1=<hex>), where v1 is the HMAC-SHA256 of \"<t>.<body>\" with your webhook secret from webhook.secret. A call that gets no 2xx is sent again, up to 3 times. If your address answers slowly, a page event can carry only the page url. Read that page with the status call."},"zeroDataRetention":{"default":false,"description":"Send true to keep nothing from this crawl: no stored copy is read or made, page results are held for one hour at most, and nothing is logged. Costs 1 credit more per page.","type":"boolean"}},"required":["url"],"type":"object"}before
{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"definitions":{"__schema0":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"items":{"allOf":[{"$ref":"#/definitions/__schema0"}]},"type":"array"},{"additionalProperties":{"allOf":[{"$ref":"#/definitions/__schema0"}]},"propertyNames":{"type":"string"},"type":"object"}]},"__schema1":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"items":{"allOf":[{"$ref":"#/definitions/__schema1"}]},"type":"array"},{"additionalProperties":{"allOf":[{"$ref":"#/definitions/__schema1"}]},"propertyNames":{"type":"string"},"type":"object"}]},"__schema2":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"items":{"allOf":[{"$ref":"#/definitions/__schema2"}]},"type":"array"},{"additionalProperties":{"allOf":[{"$ref":"#/definitions/__schema2"}]},"propertyNames":{"type":"string"},"type":"object"}]}},"properties":{"enableWebSearch":{"const":false,"type":"boolean"},"ignoreInvalidURLs":{"default":true,"description":"Skip addresses that are not public website URLs. Send false to refuse the call instead.","type":"boolean"},"ignoreSitemap":{"type":"boolean"},"includeSubdomains":{"type":"boolean"},"prompt":{"description":"What to pull from the pages in plain words, such as the version and the release date.","maxLength":500,"minLength":1,"type":"string"},"schema":{"additionalProperties":{"$ref":"#/definitions/__schema0"},"description":"The fields to fill, as a JSON Schema (draft-07 or 2020-12) object with properties. Pydantic's model_json_schema() and zod's toJSONSchema() output work as they are. enum, const, anyOf, oneOf, nullable types, $ref with $defs, required, descriptions and any key names are read. Up to 100 top-level fields and 32 KB. A field the page does not state comes back null.","propertyNames":{"type":"string"},"type":"object"},"scrapeOptions":{"additionalProperties":{},"description":"How to read each page, the same options as scrape.","properties":{"actions":{"description":"Up to 50 steps to run on the page, in order, before reading it: { \"type\": \"wait\", \"milliseconds\": 500 } (up to 30 seconds), { \"type\": \"wait\", \"selector\": \".results\" }, { \"type\": \"click\", \"selector\": \"button.more\" }, { \"type\": \"write\", \"text\": \"tides\" }, { \"type\": \"press\", \"key\": \"Enter\" }, { \"type\": \"scroll\", \"direction\": \"down\" } (also up, left or right; amount is pixels, \"viewport\" or \"max\"; maxScrolls 1 to 50; selector scrolls an inner container; \"max\" keeps scrolling until the page stops growing, for feeds that load as you go), { \"type\": \"screenshot\", \"fullPage\": true } (links come back in actions.screenshots), { \"type\": \"scrape\" } (the page at that point, in actions.scrapes), { \"type\": \"executeJavascript\", \"script\": \"document.title\" } (results in actions.javascriptReturns), { \"type\": \"pdf\", \"format\": \"A4\" } (links in actions.pdfs) or { \"type\": \"perform\", \"action\": \"Click the Load more button\" } (a step in plain words, up to 5 browser steps on this page, never leaving the site; at most 5 per call). A read with actions costs 1 credit, the same as any page, and each perform action costs 2 credits more. If an action fails, you still get the page as it stood, with a warning that names the action and says why.","items":{"anyOf":[{"additionalProperties":false,"properties":{"milliseconds":{"maximum":30000,"minimum":1,"type":"integer"},"type":{"const":"wait","type":"string"}},"required":["type","milliseconds"],"type":"object"},{"additionalProperties":false,"properties":{"selector":{"minLength":1,"type":"string"},"type":{"const":"wait","type":"string"}},"required":["type","selector"],"type":"object"},{"additionalProperties":false,"properties":{"all":{"const":false,"type":"boolean"},"selector":{"minLength":1,"type":"string"},"type":{"const":"click","type":"string"}},"required":["type","selector"],"type":"object"},{"additionalProperties":false,"properties":{"text":{"minLength":1,"type":"string"},"type":{"const":"write","type":"string"}},"required":["type","text"],"type":"object"},{"additionalProperties":false,"properties":{"key":{"maxLength":40,"minLength":1,"type":"string"},"type":{"const":"press","type":"string"}},"required":["type","key"],"type":"object"},{"additionalProperties":false,"properties":{"amount":{"anyOf":[{"maximum":100000,"minimum":1,"type":"integer"},{"enum":["viewport","max"],"type":"string"}]},"direction":{"default":"down","enum":["up","down","left","right"],"type":"string"},"maxScrolls":{"maximum":50,"minimum":1,"type":"integer"},"selector":{"minLength":1,"type":"string"},"type":{"const":"scroll","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"fullPage":{"type":"boolean"},"quality":{"maximum":100,"minimum":1,"type":"integer"},"type":{"const":"screenshot","type":"string"},"viewport":{"additionalProperties":false,"properties":{"height":{"maximum":2160,"minimum":200,"type":"integer"},"width":{"maximum":3840,"minimum":200,"type":"integer"}},"required":["width","height"],"type":"object"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"type":{"const":"scrape","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"script":{"maxLength":20000,"minLength":1,"type":"string"},"type":{"const":"executeJavascript","type":"string"}},"required":["type","script"],"type":"object"},{"additionalProperties":false,"properties":{"format":{"enum":["Letter","Legal","Tabloid","Ledger","A0","A1","A2","A3","A4","A5","A6"],"type":"string"},"landscape":{"type":"boolean"},"scale":{"maximum":2,"minimum":0.1,"type":"number"},"type":{"const":"pdf","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"action":{"maxLength":500,"minLength":1,"type":"string"},"type":{"const":"perform","type":"string"}},"required":["type","action"],"type":"object"}]},"maxItems":50,"minItems":1,"type":"array"},"alexandria":{"not":{}},"auditMetadata":{"not":{}},"blockAds":{"const":true,"type":"boolean"},"checkPromptInjection":{"const":false,"type":"boolean"},"domainTools":{"const":false,"type":"boolean"},"excludeTags":{"description":"Remove the parts of the page that match these CSS selectors, such as .comments.","items":{"minLength":1,"type":"string"},"minItems":1,"type":"array"},"formats":{"default":["markdown"],"description":"What to return: markdown (clean page text), summary (a short summary of the page), html (the cleaned page), rawHtml (the page as sent), links (every link on the page), images (every image address), screenshot (a link to a JPEG of the visible page, kept for 7 days), changeTracking (what changed in the markdown since your key last read this page with the same options, kept 30 days) network (the JSON the page loaded while it rendered, up to 30 responses) and branding (the page's colors, fonts, typography, spacing, button and input styles, logo and brand images, read from how the page looks, with a field left out when the page does not show it). Send { \"type\": \"screenshot\", \"fullPage\": true } for the whole page. Send { \"type\": \"highlights\", \"query\": \"refund policy\" } for the passages that best match a query. Send { \"type\": \"json\", \"schema\": { \"type\": \"object\", \"properties\": { \"price\": { \"type\": \"number\" } } } } or { \"type\": \"json\", \"prompt\": \"the price and the stock\" } for fields filled from the page, each checked against it. Send { \"type\": \"json\", \"parser\": \"amazon-product\" } to get a site's own data as json instead of reading the page; GET /v1/parsers lists the parsers. Send { \"type\": \"json\", \"rules\": { \"title\": \"h1\", \"links\": { \"selector\": \"a\", \"type\": \"list\", \"output\": \"@href\" } } } to read the page with CSS rules and no model, at the page's own price. Send { \"type\": \"attributes\", \"selectors\": [{ \"selector\": \"a\", \"attribute\": \"href\" }] } for attribute values, returned in attributes. Without a parser or rules, json needs a schema or a prompt and is filled from the page. json with a schema or a prompt, summary and highlights cost 4 credits more each when they return something. json with rules or a parser, and attributes, cost nothing more. A screenshot, network or branding read costs 1 credit, the same as any page. A PDF comes back as markdown only, and costs 1 credit more for each page read.","items":{"anyOf":[{"enum":["markdown","summary","html","rawHtml","links","images","network","branding","screenshot","changeTracking"],"type":"string"},{"additionalProperties":false,"properties":{"type":{"enum":["markdown","summary","html","rawHtml","links","images","network","branding"],"type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"modes":{"items":{"const":"git-diff","type":"string"},"type":"array"},"prompt":{"not":{}},"schema":{"not":{}},"tag":{"type":"null"},"type":{"const":"changeTracking","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"fullPage":{"default":false,"description":"Capture the whole page from top to bottom instead of the visible part.","type":"boolean"},"quality":{"description":"JPEG quality from 1 to 100. The default is 70.","maximum":100,"minimum":1,"type":"integer"},"type":{"const":"screenshot","type":"string"},"viewport":{"additionalProperties":false,"description":"The window size in pixels, such as { width: 390, height: 844 }.","properties":{"height":{"maximum":2160,"minimum":200,"type":"integer"},"width":{"maximum":3840,"minimum":200,"type":"integer"}},"required":["width","height"],"type":"object"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"count":{"default":5,"description":"How many passages to return, best match first.","maximum":20,"minimum":1,"type":"integer"},"query":{"description":"What you are looking for on the page, such as refund policy.","maxLength":10000,"minLength":1,"type":"string"},"type":{"const":"highlights","type":"string"}},"required":["type","query"],"type":"object"},{"additionalProperties":false,"properties":{"checkPromptInjection":{"const":false,"type":"boolean"},"options":{"additionalProperties":{"$ref":"#/definitions/__schema1"},"description":"Only with parser: extra inputs for it, such as { \"page\": 2 } for the next page of results or { \"minRating\": 4.5 } for a filter. GET /v1/parsers lists what each parser accepts.","propertyNames":{"type":"string"},"type":"object"},"parser":{"description":"Read the page with a named parser, which gives the site's own data as json. The url must be the kind of page the parser reads. Parsers are the only way to read some sites. GET /v1/parsers lists them.","type":"string"},"prompt":{"description":"What to pull from the page in plain words, such as the version and the release date.","maxLength":10000,"minLength":1,"type":"string"},"rules":{"additionalProperties":{"$ref":"#/definitions/__schema2"},"description":"Read the page with CSS rules instead of a model, no extra fee. Each field is a selector such as \"h1\" (the first match's text), \"a@href\" (an attribute) or { \"selector\": \"li\", \"type\": \"list\", \"output\": \"text\" | \"html\" | \"@attribute\" | { nested fields } }. A missing item is null and an unmatched list is []. Relative links become absolute. Up to 100 fields, 5 levels deep. Not with schema, prompt or parser.","propertyNames":{"type":"string"},"type":"object"},"schema":{"additionalProperties":{"$ref":"#/definitions/__schema0"},"description":"The fields to fill, as a JSON Schema (draft-07 or 2020-12) object with properties. Pydantic's model_json_schema() and zod's toJSONSchema() output work as they are. enum, const, anyOf, oneOf, nullable types, $ref with $defs, required, descriptions and any key names are read. Up to 100 top-level fields and 32 KB. A field the page does not state comes back null.","propertyNames":{"type":"string"},"type":"object"},"type":{"const":"json","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"selectors":{"description":"The elements and attributes to read, such as { selector: 'a.buy', attribute: 'href' }.","items":{"additionalProperties":false,"properties":{"attribute":{"maxLength":100,"minLength":1,"type":"string"},"selector":{"minLength":1,"type":"string"}},"required":["selector","attribute"],"type":"object"},"maxItems":50,"minItems":1,"type":"array"},"type":{"const":"attributes","type":"string"}},"required":["type","selectors"],"type":"object"}]},"maxItems":20,"minItems":1,"type":"array"},"headers":{"additionalProperties":{"maxLength":2000,"pattern":"^[\\t\\x20-\\x7e]*$","type":"string"},"description":"Extra request headers to send to the site, such as { \"x-plan\": \"pro\" }. A read with headers is never answered from or saved to a stored copy.","propertyNames":{"pattern":"^[A-Za-z0-9-]{1,64}$","type":"string"},"type":"object"},"includeTags":{"description":"Keep only the parts of the page that match these CSS selectors, such as article or .price. When set, onlyMainContent is not applied.","items":{"minLength":1,"type":"string"},"minItems":1,"type":"array"},"location":{"additionalProperties":false,"description":"Where to read the page from. The default is the United States.","properties":{"country":{"description":"Two-letter country code to read the page from, such as DE or JP.","type":"string"},"languages":{"description":"Languages to ask the site for, best first, such as [\"de\", \"en\"]. Sent as Accept-Language. A read with languages is never answered from or saved to a stored copy.","items":{"pattern":"^[A-Za-z]{2,3}(?:-[A-Za-z0-9]{2,8})*$","type":"string"},"maxItems":5,"minItems":1,"type":"array"}},"type":"object"},"lockdown":{"const":false,"type":"boolean"},"maxAge":{"description":"Accept a stored answer up to this many milliseconds old, at most 30 days. Without it, 2 days, or less for a site whose pages change often, and a copy up to twice that age (at most 7 days) comes back at once as stale while a fresh read runs. 0 always reads the page live. metadata.cacheState says which one you got.","maximum":9007199254740991,"minimum":0,"type":"integer"},"minAge":{"description":"Answer only from a stored copy that is at least this many milliseconds old, and never read the page live. 0 accepts any stored copy. A page with no such copy is notFound.","maximum":9007199254740991,"minimum":0,"type":"integer"},"mobile":{"description":"Read the page as a phone would: a phone-sized screen and the mobile version of the site. The page loads in a browser.","type":"boolean"},"onlyCleanContent":{"const":false,"type":"boolean"},"onlyMainContent":{"default":true,"description":"Keep only the page's main content, without menus, headers, footers and ads.","type":"boolean"},"parsers":{"description":"Only [\"pdf\"] is supported: PDFs are read as markdown.","items":{"anyOf":[{"const":"pdf","type":"string"},{"additionalProperties":false,"properties":{"blocks":{"const":false,"type":"boolean"},"maxPages":{"not":{}},"mode":{"const":"auto","type":"string"},"pageMarkers":{"const":false,"type":"boolean"},"pages":{"const":false,"type":"boolean"},"type":{"const":"pdf","type":"string"}},"required":["type"],"type":"object"}]},"minItems":1,"type":"array"},"profile":{"additionalProperties":false,"description":"Read the page with the cookies and local storage that earlier calls saved under this name, kept for your account for 30 days after the last use. A call with a profile always loads the page in a browser, costs 1 credit, the same as any page, and is never answered from a stored copy. Only one call at a time can save to a profile.","properties":{"name":{"description":"A name you choose, such as shop-login. Calls with the same name share state.","maxLength":128,"minLength":1,"type":"string"},"saveChanges":{"default":true,"description":"Keep the cookies and local storage this read leaves behind for the next call with this name. Send false to read with the profile without changing it.","type":"boolean"}},"required":["name"],"type":"object"},"proxy":{"const":"auto","type":"string"},"redactPII":{"const":false,"type":"boolean"},"removeBase64Images":{"const":true,"type":"boolean"},"skipTlsVerification":{"const":false,"type":"boolean"},"storeInCache":{"default":true,"description":"Send false to neither read nor keep a stored copy of this page.","type":"boolean"},"threatProtection":{"not":{}},"timeout":{"description":"How long to keep trying, in milliseconds, between 10 seconds and 2 minutes. Pages behind a bot check can need 10 to 30 seconds the first time.","maximum":300000,"minimum":1000,"type":"integer"},"toolDetail":{"not":{}},"waitFor":{"description":"Extra milliseconds to wait before reading, up to 60000, for pages that load their content late. To wait for an element, add a wait action with a selector. A read that waits costs 1 credit, the same as any page.","maximum":60000,"minimum":0,"type":"integer"},"zeroDataRetention":{"default":false,"description":"Send true to keep nothing from this call: no stored copy is read or made, and nothing from it is logged. Costs 1 credit more per page. Not with a screenshot.","type":"boolean"}},"type":"object"},"showSources":{"const":false,"type":"boolean"},"threatProtection":{"not":{}},"urls":{"description":"The pages to read, up to 10, such as [\"https://bun.com/blog/bun-v1.3\"]. With more than one, the fields are filled from all of them together. A page that cannot be read is skipped and named in warning, and costs nothing. The call fails only when no page can be read.","items":{"maxLength":2048,"type":"string"},"maxItems":10,"minItems":1,"type":"array"},"zeroDataRetention":{"default":false,"description":"Send true to keep nothing from this call: pages are read live, the result is held for one hour at most, and nothing is logged. Costs 1 credit more per page.","type":"boolean"}},"required":["urls"],"type":"object"}after
{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"definitions":{"__schema0":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"items":{"allOf":[{"$ref":"#/definitions/__schema0"}]},"type":"array"},{"additionalProperties":{"allOf":[{"$ref":"#/definitions/__schema0"}]},"propertyNames":{"type":"string"},"type":"object"}]},"__schema1":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"items":{"allOf":[{"$ref":"#/definitions/__schema1"}]},"type":"array"},{"additionalProperties":{"allOf":[{"$ref":"#/definitions/__schema1"}]},"propertyNames":{"type":"string"},"type":"object"}]},"__schema2":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"items":{"allOf":[{"$ref":"#/definitions/__schema2"}]},"type":"array"},{"additionalProperties":{"allOf":[{"$ref":"#/definitions/__schema2"}]},"propertyNames":{"type":"string"},"type":"object"}]}},"properties":{"alexandria":{"not":{}},"auditMetadata":{"not":{}},"domainTools":{"const":false,"type":"boolean"},"enableWebSearch":{"default":false,"description":"Send true to also search the web for your prompt and read the best pages it finds, up to 3 more. Needs a prompt. Costs 2 credits for the search.","type":"boolean"},"ignoreInvalidURLs":{"default":true,"description":"Skip addresses that are not public website URLs. Send false to refuse the call instead.","type":"boolean"},"ignoreRobotsTxt":{"const":false,"type":"boolean"},"ignoreSitemap":{"default":false,"description":"For an address ending in /*: skip the site's sitemaps and find pages by links.","type":"boolean"},"includeSubdomains":{"default":false,"description":"For an address ending in /*: also read pages on subdomains of the site.","type":"boolean"},"prompt":{"description":"What to pull from the pages in plain words, such as the version and the release date.","maxLength":500,"minLength":1,"type":"string"},"robotsUserAgent":{"not":{}},"schema":{"additionalProperties":{"$ref":"#/definitions/__schema0"},"description":"The fields to fill, as a JSON Schema (draft-07 or 2020-12) object with properties. Pydantic's model_json_schema() and zod's toJSONSchema() output work as they are. enum, const, anyOf, oneOf, nullable types, $ref with $defs, required, descriptions and any key names are read. Up to 100 top-level fields and 32 KB. A field the page does not state comes back null.","propertyNames":{"type":"string"},"type":"object"},"scrapeOptions":{"additionalProperties":{},"description":"How to read each page, the same options as scrape.","properties":{"actions":{"description":"Up to 50 steps to run on the page, in order, before reading it: { \"type\": \"wait\", \"milliseconds\": 500 } (up to 30 seconds), { \"type\": \"wait\", \"selector\": \".results\" }, { \"type\": \"click\", \"selector\": \"button.more\" }, { \"type\": \"write\", \"text\": \"tides\" }, { \"type\": \"press\", \"key\": \"Enter\" }, { \"type\": \"scroll\", \"direction\": \"down\" } (also up, left or right; amount is pixels, \"viewport\" or \"max\"; maxScrolls 1 to 50; selector scrolls an inner container; \"max\" keeps scrolling until the page stops growing, for feeds that load as you go), { \"type\": \"screenshot\", \"fullPage\": true } (links come back in actions.screenshots), { \"type\": \"scrape\" } (the page at that point, in actions.scrapes), { \"type\": \"executeJavascript\", \"script\": \"document.title\" } (results in actions.javascriptReturns), { \"type\": \"pdf\", \"format\": \"A4\" } (links in actions.pdfs) or { \"type\": \"perform\", \"action\": \"Click the Load more button\" } (a step in plain words, up to 5 browser steps on this page, never leaving the site; at most 5 per call). A read with actions costs 1 credit, the same as any page; the actions themselves add nothing. If an action fails, you still get the page as it stood, with a warning that names the action and says why.","items":{"anyOf":[{"additionalProperties":false,"properties":{"milliseconds":{"maximum":30000,"minimum":1,"type":"integer"},"type":{"const":"wait","type":"string"}},"required":["type","milliseconds"],"type":"object"},{"additionalProperties":false,"properties":{"selector":{"minLength":1,"type":"string"},"type":{"const":"wait","type":"string"}},"required":["type","selector"],"type":"object"},{"additionalProperties":false,"properties":{"all":{"const":false,"type":"boolean"},"selector":{"minLength":1,"type":"string"},"type":{"const":"click","type":"string"}},"required":["type","selector"],"type":"object"},{"additionalProperties":false,"properties":{"text":{"minLength":1,"type":"string"},"type":{"const":"write","type":"string"}},"required":["type","text"],"type":"object"},{"additionalProperties":false,"properties":{"key":{"maxLength":40,"minLength":1,"type":"string"},"type":{"const":"press","type":"string"}},"required":["type","key"],"type":"object"},{"additionalProperties":false,"properties":{"amount":{"anyOf":[{"maximum":100000,"minimum":1,"type":"integer"},{"enum":["viewport","max"],"type":"string"}]},"direction":{"default":"down","enum":["up","down","left","right"],"type":"string"},"maxScrolls":{"maximum":50,"minimum":1,"type":"integer"},"selector":{"minLength":1,"type":"string"},"type":{"const":"scroll","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"fullPage":{"type":"boolean"},"quality":{"maximum":100,"minimum":1,"type":"integer"},"type":{"const":"screenshot","type":"string"},"viewport":{"additionalProperties":false,"properties":{"height":{"maximum":2160,"minimum":200,"type":"integer"},"width":{"maximum":3840,"minimum":200,"type":"integer"}},"required":["width","height"],"type":"object"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"type":{"const":"scrape","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"script":{"maxLength":20000,"minLength":1,"type":"string"},"type":{"const":"executeJavascript","type":"string"}},"required":["type","script"],"type":"object"},{"additionalProperties":false,"properties":{"format":{"enum":["Letter","Legal","Tabloid","Ledger","A0","A1","A2","A3","A4","A5","A6"],"type":"string"},"landscape":{"type":"boolean"},"scale":{"maximum":2,"minimum":0.1,"type":"number"},"type":{"const":"pdf","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"action":{"maxLength":500,"minLength":1,"type":"string"},"type":{"const":"perform","type":"string"}},"required":["type","action"],"type":"object"}]},"maxItems":50,"minItems":1,"type":"array"},"alexandria":{"not":{}},"auditMetadata":{"not":{}},"blockAds":{"description":"Ads and trackers are not loaded when a page runs in a browser. Send false to load them.","type":"boolean"},"checkPromptInjection":{"description":"Send true to scan the page text for instructions aimed at an AI model before anything is built from it. A page that has them is refused with 403 promptInjectionDetected and costs nothing. The scan adds 4 credits when it runs; a page it cannot scan fully comes back with a warning and no charge.","type":"boolean"},"domainTools":{"const":false,"type":"boolean"},"excludeTags":{"description":"Remove the parts of the page that match these CSS selectors, such as .comments.","items":{"minLength":1,"type":"string"},"minItems":1,"type":"array"},"fastMode":{"description":"Send true to read the page without opening a browser: the answer comes sooner, but a page that needs a browser, or that refuses a plain request, comes back as an error instead of being retried. Ignored when the call needs a browser (actions, screenshot, waitFor, mobile, profile, network, branding).","type":"boolean"},"formats":{"default":["markdown"],"description":"What to return: markdown (clean page text), summary (a short summary of the page), html (the cleaned page), rawHtml (the page as sent), audio and video (for a YouTube link: the audio track as an M4A file, or the video as an MP4 file, as a link that works for 1 hour), rawBase64 (the bytes the site sent, Base64 encoded, from a live read; metadata.contentType says what they are), links (every link on the page), images (every image address), screenshot (a link to a JPEG of the visible page, kept for 7 days), changeTracking (what changed in the markdown since your key last read this page with the same options, kept 30 days; add modes [\"git-diff\",\"json\"] with a schema or prompt to compare fields too), question (send { \"type\": \"question\", \"question\": \"...\" } to get answer, null when the page does not state one), product (title, brand, category, url, description and variants with price, sale, availability and images, or null) and menu (merchant, currency and sections of items with prices, or null) network (the JSON the page loaded while it rendered, up to 30 responses) and branding (the page's colors, fonts, typography, spacing, button and input styles, logo and brand images, read from how the page looks, with a field left out when the page does not show it). Send { \"type\": \"screenshot\", \"fullPage\": true } for the whole page. Send { \"type\": \"highlights\", \"query\": \"refund policy\" } for the passages that best match a query. Send { \"type\": \"json\", \"schema\": { \"type\": \"object\", \"properties\": { \"price\": { \"type\": \"number\" } } } } or { \"type\": \"json\", \"prompt\": \"the price and the stock\" } for fields filled from the page, each checked against it. Send { \"type\": \"json\", \"parser\": \"amazon-product\" } to get a site's own data as json instead of reading the page; GET /v1/parsers lists the parsers. Send { \"type\": \"json\", \"rules\": { \"title\": \"h1\", \"links\": { \"selector\": \"a\", \"type\": \"list\", \"output\": \"@href\" } } } to read the page with CSS rules and no model, at the page's own price. Send { \"type\": \"attributes\", \"selectors\": [{ \"selector\": \"a\", \"attribute\": \"href\" }] } for attribute values, returned in attributes. Without a parser or rules, json needs a schema or a prompt and is filled from the page. json with a schema or a prompt, summary, highlights, question, product, menu and changeTracking in json mode cost 4 credits more each when they return something. json with rules or a parser, and attributes, cost nothing more. A screenshot, network or branding read costs 1 credit, the same as any page. A PDF comes back as markdown only, and costs 1 credit more for each page read.","items":{"anyOf":[{"enum":["markdown","summary","html","rawHtml","rawBase64","links","images","network","branding","audio","video","screenshot","changeTracking","product","menu"],"type":"string"},{"additionalProperties":false,"properties":{"type":{"enum":["markdown","summary","html","rawHtml","rawBase64","links","images","network","branding","audio","video"],"type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"modes":{"description":"git-diff returns a unified diff of the markdown. json compares the fields in schema or prompt between this read and the last one. Without modes you get git-diff.","items":{"enum":["git-diff","json"],"type":"string"},"maxItems":2,"type":"array"},"prompt":{"description":"With json mode: what to compare, in plain words, such as the price and stock.","maxLength":10000,"minLength":1,"type":"string"},"schema":{"additionalProperties":{"$ref":"#/definitions/__schema0"},"description":"The fields to fill, as a JSON Schema (draft-07 or 2020-12) object with properties. Pydantic's model_json_schema() and zod's toJSONSchema() output work as they are. enum, const, anyOf, oneOf, nullable types, $ref with $defs, required, descriptions and any key names are read. Up to 100 top-level fields and 32 KB. A field the page does not state comes back null.","propertyNames":{"type":"string"},"type":"object"},"tag":{"type":"null"},"type":{"const":"changeTracking","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"question":{"description":"A question to answer from the page, such as what the refund window is.","maxLength":10000,"minLength":1,"type":"string"},"type":{"const":"question","type":"string"}},"required":["type","question"],"type":"object"},{"additionalProperties":false,"properties":{"type":{"const":"product","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"type":{"const":"menu","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"fullPage":{"default":false,"description":"Capture the whole page from top to bottom instead of the visible part.","type":"boolean"},"quality":{"description":"JPEG quality from 1 to 100. The default is 70.","maximum":100,"minimum":1,"type":"integer"},"type":{"const":"screenshot","type":"string"},"viewport":{"additionalProperties":false,"description":"The window size in pixels, such as { width: 390, height: 844 }.","properties":{"height":{"maximum":2160,"minimum":200,"type":"integer"},"width":{"maximum":3840,"minimum":200,"type":"integer"}},"required":["width","height"],"type":"object"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"count":{"default":5,"description":"How many passages to return, best match first.","maximum":20,"minimum":1,"type":"integer"},"query":{"description":"What you are looking for on the page, such as refund policy.","maxLength":10000,"minLength":1,"type":"string"},"type":{"const":"highlights","type":"string"}},"required":["type","query"],"type":"object"},{"additionalProperties":false,"properties":{"checkPromptInjection":{"description":"Deprecated: send checkPromptInjection at the top level of the call.","type":"boolean"},"options":{"additionalProperties":{"$ref":"#/definitions/__schema1"},"description":"Only with parser: extra inputs for it, such as { \"page\": 2 } for the next page of results or { \"minRating\": 4.5 } for a filter. GET /v1/parsers lists what each parser accepts.","propertyNames":{"type":"string"},"type":"object"},"parser":{"description":"Read the page with a named parser, which gives the site's own data as json. The url must be the kind of page the parser reads. Parsers are the only way to read some sites. GET /v1/parsers lists them.","type":"string"},"prompt":{"description":"What to pull from the page in plain words, such as the version and the release date.","maxLength":10000,"minLength":1,"type":"string"},"rules":{"additionalProperties":{"$ref":"#/definitions/__schema2"},"description":"Read the page with CSS rules instead of a model, no extra fee. Each field is a selector such as \"h1\" (the first match's text), \"a@href\" (an attribute) or { \"selector\": \"li\", \"type\": \"list\", \"output\": \"text\" | \"html\" | \"@attribute\" | { nested fields } }. A missing item is null and an unmatched list is []. Relative links become absolute. Up to 100 fields, 5 levels deep. Not with schema, prompt or parser.","propertyNames":{"type":"string"},"type":"object"},"schema":{"additionalProperties":{"$ref":"#/definitions/__schema0"},"description":"The fields to fill, as a JSON Schema (draft-07 or 2020-12) object with properties. Pydantic's model_json_schema() and zod's toJSONSchema() output work as they are. enum, const, anyOf, oneOf, nullable types, $ref with $defs, required, descriptions and any key names are read. Up to 100 top-level fields and 32 KB. A field the page does not state comes back null.","propertyNames":{"type":"string"},"type":"object"},"type":{"const":"json","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"selectors":{"description":"The elements and attributes to read, such as { selector: 'a.buy', attribute: 'href' }.","items":{"additionalProperties":false,"properties":{"attribute":{"maxLength":100,"minLength":1,"type":"string"},"selector":{"minLength":1,"type":"string"}},"required":["selector","attribute"],"type":"object"},"maxItems":50,"minItems":1,"type":"array"},"type":{"const":"attributes","type":"string"}},"required":["type","selectors"],"type":"object"}]},"maxItems":20,"minItems":1,"type":"array"},"headers":{"additionalProperties":{"maxLength":2000,"pattern":"^[\\t\\x20-\\x7e]*$","type":"string"},"description":"Extra request headers to send to the site, such as { \"x-plan\": \"pro\" }. A read with headers is never answered from or saved to a stored copy.","propertyNames":{"pattern":"^[A-Za-z0-9-]{1,64}$","type":"string"},"type":"object"},"ignoreRobotsTxt":{"const":false,"type":"boolean"},"includeTags":{"description":"Keep only the parts of the page that match these CSS selectors, such as article or .price. When set, onlyMainContent is not applied.","items":{"minLength":1,"type":"string"},"minItems":1,"type":"array"},"location":{"additionalProperties":false,"description":"Where to read the page from. The default is the United States.","properties":{"country":{"description":"Two-letter country code to read the page from, such as DE or JP.","type":"string"},"languages":{"description":"Languages to ask the site for, best first, such as [\"de\", \"en\"]. Sent as Accept-Language. A read with languages is never answered from or saved to a stored copy.","items":{"pattern":"^[A-Za-z]{2,3}(?:-[A-Za-z0-9]{2,8})*$","type":"string"},"maxItems":5,"minItems":1,"type":"array"}},"type":"object"},"lockdown":{"description":"Send true to answer only from a stored copy of the page and never read it live, whatever its age. A page with no stored copy is notFound. The same as minAge 0.","type":"boolean"},"maxAge":{"description":"Accept a stored answer up to this many milliseconds old, at most 30 days. Without it, 2 days, or less for a site whose pages change often, and a copy up to twice that age (at most 7 days) comes back at once as stale while a fresh read runs. 0 always reads the page live. metadata.cacheState says which one you got.","maximum":9007199254740991,"minimum":0,"type":"integer"},"minAge":{"description":"Answer only from a stored copy that is at least this many milliseconds old, and never read the page live. 0 accepts any stored copy. A page with no such copy is notFound.","maximum":9007199254740991,"minimum":0,"type":"integer"},"mobile":{"description":"Read the page as a phone would: a phone-sized screen and the mobile version of the site. The page loads in a browser.","type":"boolean"},"onlyCleanContent":{"description":"Send true to have a model remove what onlyMainContent leaves behind in the markdown: cookie banners, ads, share widgets, breadcrumbs, sign-up prompts, comment prompts and related-article lists. It only removes whole paragraphs and lists; it never rewrites or adds text, and code blocks are always kept. Skipped with a warning when the page is too long to clean or the model does not answer. Not with zeroDataRetention. Summary, answers and highlights are made from the cleaned markdown.","type":"boolean"},"onlyMainContent":{"default":true,"description":"Keep only the page's main content, without menus, headers, footers and ads.","type":"boolean"},"parsers":{"description":"Only the pdf parser exists. Send \"pdf\" or { \"type\": \"pdf\", mode, maxPages, pages, blocks, pageMarkers } with the same meaning as in parse. Without mode a PDF is read from its text layer only; auto reads the picture of a page that has no text, and ocr reads the picture of every page, up to 20 pages. Each page read costs 1 credit.","items":{"anyOf":[{"const":"pdf","type":"string"},{"additionalProperties":false,"properties":{"blocks":{"description":"Send true to also get the page's layout in blocks: each title, section header or run of text, with its page, reading order, position on the page (bbox as left, top, right, bottom from 0 to 1) and where its text sits in that page's markdown (span, as in pages). Tables, figures and formulas are not told apart. A page read from its picture is one block. No extra charge.","type":"boolean"},"maxPages":{"description":"Read at most this many pages, up to 100.","maximum":100,"minimum":1,"type":"integer"},"mode":{"description":"fast reads the text layer only. auto (the default) reads the text layer and reads the picture of any page that has none. ocr reads the picture of every page.","enum":["fast","auto","ocr"],"type":"string"},"pageMarkers":{"description":"Send true to mark page breaks in the markdown: pages are joined with \"---\" and a line, where N is the page that follows. No extra charge.","type":"boolean"},"pages":{"description":"Send true to also get each page's markdown in pages, as { pageNumber, markdown }. No extra charge.","type":"boolean"},"type":{"const":"pdf","type":"string"}},"required":["type"],"type":"object"}]},"minItems":1,"type":"array"},"profile":{"additionalProperties":false,"description":"Read the page with the cookies and local storage that earlier calls saved under this name, kept for your account for 30 days after the last use. A call with a profile always loads the page in a browser, costs 1 credit, the same as any page, and is never answered from a stored copy. Only one call at a time can save to a profile.","properties":{"name":{"description":"A name you choose, such as shop-login. Calls with the same name share state.","maxLength":128,"minLength":1,"type":"string"},"saveChanges":{"default":true,"description":"Keep the cookies and local storage this read leaves behind for the next call with this name. Send false to read with the profile without changing it.","type":"boolean"}},"required":["name"],"type":"object"},"proxy":{"description":"Which route reads the page. auto and basic start with the cheapest route and move up when the site refuses. enhanced starts on a residential browser. The price is the same.","enum":["auto","basic","enhanced"],"type":"string"},"redactPII":{"anyOf":[{"type":"boolean"},{"additionalProperties":false,"description":"Options for redactPII.","properties":{"entities":{"default":["PERSON","EMAIL","PHONE","LOCATION","FINANCIAL","SECRET"],"description":"What to hide: PERSON, EMAIL, PHONE, LOCATION, FINANCIAL, SECRET. All by default.","items":{"enum":["PERSON","EMAIL","PHONE","LOCATION","FINANCIAL","SECRET"],"type":"string"},"minItems":1,"type":"array"},"mode":{"default":"accurate","description":"accurate finds names and places with the model and the rest by pattern. aggressive adds guesses that catch more and may hide a little too much. fast uses patterns only, so it finds no ordinary names or places.","enum":["accurate","aggressive","fast"],"type":"string"},"replaceStyle":{"default":"tag","description":"tag writes <EMAIL>, mask writes * for each character, remove deletes it.","enum":["tag","mask","remove"],"type":"string"}},"type":"object"}],"description":"Send true, or an object, to hide personal data in the markdown and in everything made from it (summary, answers, highlights, json). Links, html and rawHtml are not changed. A page the model cannot scan is refused rather than returned unredacted."},"removeBase64Images":{"description":"Images inside the page that carry their data in the address (data:image) are dropped by default. Send false to keep them in markdown and html.","type":"boolean"},"robotsUserAgent":{"not":{}},"skipTlsVerification":{"description":"Send true to read a page whose certificate is expired, self-signed or for another name. The read is not private against someone between us and the site.","type":"boolean"},"storeInCache":{"default":true,"description":"Send false to neither read nor keep a stored copy of this page.","type":"boolean"},"threatProtection":{"not":{}},"timeout":{"description":"How long to keep trying, in milliseconds, between 10 seconds and 2 minutes. Pages behind a bot check can need 10 to 30 seconds the first time.","maximum":300000,"minimum":1000,"type":"integer"},"toolDetail":{"not":{}},"waitFor":{"description":"Extra milliseconds to wait before reading, up to 60000, for pages that load their content late. To wait for an element, add a wait action with a selector. A read that waits costs 1 credit, the same as any page.","maximum":60000,"minimum":0,"type":"integer"},"zeroDataRetention":{"default":false,"description":"Send true to keep nothing from this call: no stored copy is read or made, and nothing from it is logged. Costs 1 credit more per page. Not with a screenshot.","type":"boolean"}},"type":"object"},"showSources":{"default":false,"description":"Send true to get sources: for each field, the pages that state its value.","type":"boolean"},"threatProtection":{"not":{}},"urls":{"default":[],"description":"The pages to read, up to 10, such as [\"https://bun.com/blog/bun-v1.3\"]. An address ending in /* reads pages under it, found through the site's sitemap. With more than one, the fields are filled from all of them together. A page that cannot be read is skipped and named in warning, and costs nothing. The call fails only when no page can be read.","items":{"maxLength":2048,"type":"string"},"maxItems":10,"type":"array"},"zeroDataRetention":{"default":false,"description":"Send true to keep nothing from this call: pages are read live, the result is held for one hour at most, and nothing is logged. Costs 1 credit more per page.","type":"boolean"}},"type":"object"}{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"alexandria":{"not":{}},"auditMetadata":{"not":{}},"domainTools":{"const":false,"type":"boolean"},"ignoreCache":{"default":false,"description":"Send ⟨28 unchanged words⟩ ?query part.","type":"boolean"},"ignoreRobotsTxt":{"const":false,"type":"boolean"},"includeSubdomains":{"default":true,"description":"Also ⟨28 unchanged words⟩ integer"},"location":{"additionalProperties":false,"description":"Where to read the page from. The default is the United States.","properties":{"country":{"description":"Two-letter country code to read the page from, such as DE or JP.","type":"string"},"languages":{"notdescription":"Languages to ask the site for, best first, such as [\"de\", \"en\"]. Sent as Accept-Language. A read with languages is never answered from or saved to a stored copy.","items":{"pattern":"^[A-Za-z]{2,3}(?:-[A-Za-z0-9]{2,8})*$","type":"string"},"maxItems":5,"minItems":1,"type":"array"}},"type":"object"},"robotsUserAgent":{"not":{}},"search":{"description":"Keep only ⟨84 unchanged words⟩
⟨15 unchanged words⟩ for any page, however it is reached. checkPromptInjection adds 4 credits when the scan runs, json with a schema or a prompt, summary, highlights, question, product, menu andhighlightschangeTracking in json mode add 4 credits each when they return something. ⟨7 unchanged words⟩ PDF adds 1 credit for each page read.Each perform actionBrowseraddsactions2addcredits.nothing. An answer from a stored copy within maxAgeiscostsfree.1 credit like any page. A page that comes back with a 404 ⟨8 unchanged words⟩ A page that cannot be read costs nothing.Each page of a urls call is priced on its own.creditsUsed shows what the call cost. To get ⟨44 unchanged words⟩ google-flights, google-hotels, google-play-app, google-play-search, google-play-reviews, upwork-search, upwork-job, craigslist-search, craigslist-listing, careers-jobs, careers-job, indeed-search, indeed-job, realtor-search, realtor-property, zillow-search, zillow-property, expedia-hotels, booking-search, booking-hotel, booking-reviews, airbnb-search, airbnb-listing, airbnb-reviews, youtube-search, youtube-video, youtube-transcript, youtube-comments, youtube-channel, youtube-post ⟨5 unchanged words⟩ reddit-subreddits, instagram-post, instagram-profile, instagram-comments, instagram-transcript, instagram-feed, x-profile, x-post, threads-profile, threads-post, pinterest-search, pinterest-pin ⟨10 unchanged words⟩ tiktok-hashtag, tiktok-sound, tiktok-search, tiktok-ads, tiktok-shop, tiktok-followers, tiktok-following, linkedin-jobs, linkedin-job, linkedin-company, linkedin-profile, linkedin-posts, linkedin-ads ⟨19 unchanged words⟩ tripadvisor-reviews, glassdoor-company, glassdoor-reviews, glassdoor-salaries, g2-reviews,zillow-search, zillow-property, realtor-search, realtor-property, booking-search, booking-hotel, booking-reviews, expedia-hotels, airbnb-search, airbnb-listing, airbnb-reviews, indeed-search, indeed-job, upwork-search, upwork-job, careers-jobs, careers-job, craigslist-search,luma-events, luma-event, emails, phone-numbers,company, instagram-feed, tiktok-followers, tiktok-following.company. GET /v1/parsers lists what each one takes.
before
{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"definitions":{"__schema0":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"items":{"allOf":[{"$ref":"#/definitions/__schema0"}]},"type":"array"},{"additionalProperties":{"allOf":[{"$ref":"#/definitions/__schema0"}]},"propertyNames":{"type":"string"},"type":"object"}]},"__schema1":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"items":{"allOf":[{"$ref":"#/definitions/__schema1"}]},"type":"array"},{"additionalProperties":{"allOf":[{"$ref":"#/definitions/__schema1"}]},"propertyNames":{"type":"string"},"type":"object"}]},"__schema2":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"items":{"allOf":[{"$ref":"#/definitions/__schema2"}]},"type":"array"},{"additionalProperties":{"allOf":[{"$ref":"#/definitions/__schema2"}]},"propertyNames":{"type":"string"},"type":"object"}]}},"properties":{"actions":{"description":"Up to 50 steps to run on the page, in order, before reading it: { \"type\": \"wait\", \"milliseconds\": 500 } (up to 30 seconds), { \"type\": \"wait\", \"selector\": \".results\" }, { \"type\": \"click\", \"selector\": \"button.more\" }, { \"type\": \"write\", \"text\": \"tides\" }, { \"type\": \"press\", \"key\": \"Enter\" }, { \"type\": \"scroll\", \"direction\": \"down\" } (also up, left or right; amount is pixels, \"viewport\" or \"max\"; maxScrolls 1 to 50; selector scrolls an inner container; \"max\" keeps scrolling until the page stops growing, for feeds that load as you go), { \"type\": \"screenshot\", \"fullPage\": true } (links come back in actions.screenshots), { \"type\": \"scrape\" } (the page at that point, in actions.scrapes), { \"type\": \"executeJavascript\", \"script\": \"document.title\" } (results in actions.javascriptReturns), { \"type\": \"pdf\", \"format\": \"A4\" } (links in actions.pdfs) or { \"type\": \"perform\", \"action\": \"Click the Load more button\" } (a step in plain words, up to 5 browser steps on this page, never leaving the site; at most 5 per call). A read with actions costs 1 credit, the same as any page, and each perform action costs 2 credits more. If an action fails, you still get the page as it stood, with a warning that names the action and says why.","items":{"anyOf":[{"additionalProperties":false,"properties":{"milliseconds":{"maximum":30000,"minimum":1,"type":"integer"},"type":{"const":"wait","type":"string"}},"required":["type","milliseconds"],"type":"object"},{"additionalProperties":false,"properties":{"selector":{"minLength":1,"type":"string"},"type":{"const":"wait","type":"string"}},"required":["type","selector"],"type":"object"},{"additionalProperties":false,"properties":{"all":{"const":false,"type":"boolean"},"selector":{"minLength":1,"type":"string"},"type":{"const":"click","type":"string"}},"required":["type","selector"],"type":"object"},{"additionalProperties":false,"properties":{"text":{"minLength":1,"type":"string"},"type":{"const":"write","type":"string"}},"required":["type","text"],"type":"object"},{"additionalProperties":false,"properties":{"key":{"maxLength":40,"minLength":1,"type":"string"},"type":{"const":"press","type":"string"}},"required":["type","key"],"type":"object"},{"additionalProperties":false,"properties":{"amount":{"anyOf":[{"maximum":100000,"minimum":1,"type":"integer"},{"enum":["viewport","max"],"type":"string"}]},"direction":{"default":"down","enum":["up","down","left","right"],"type":"string"},"maxScrolls":{"maximum":50,"minimum":1,"type":"integer"},"selector":{"minLength":1,"type":"string"},"type":{"const":"scroll","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"fullPage":{"type":"boolean"},"quality":{"maximum":100,"minimum":1,"type":"integer"},"type":{"const":"screenshot","type":"string"},"viewport":{"additionalProperties":false,"properties":{"height":{"maximum":2160,"minimum":200,"type":"integer"},"width":{"maximum":3840,"minimum":200,"type":"integer"}},"required":["width","height"],"type":"object"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"type":{"const":"scrape","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"script":{"maxLength":20000,"minLength":1,"type":"string"},"type":{"const":"executeJavascript","type":"string"}},"required":["type","script"],"type":"object"},{"additionalProperties":false,"properties":{"format":{"enum":["Letter","Legal","Tabloid","Ledger","A0","A1","A2","A3","A4","A5","A6"],"type":"string"},"landscape":{"type":"boolean"},"scale":{"maximum":2,"minimum":0.1,"type":"number"},"type":{"const":"pdf","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"action":{"maxLength":500,"minLength":1,"type":"string"},"type":{"const":"perform","type":"string"}},"required":["type","action"],"type":"object"}]},"maxItems":50,"minItems":1,"type":"array"},"alexandria":{"not":{}},"auditMetadata":{"not":{}},"blockAds":{"const":true,"type":"boolean"},"checkPromptInjection":{"const":false,"type":"boolean"},"domainTools":{"const":false,"type":"boolean"},"excludeTags":{"description":"Remove the parts of the page that match these CSS selectors, such as .comments.","items":{"minLength":1,"type":"string"},"minItems":1,"type":"array"},"formats":{"default":["markdown"],"description":"What to return: markdown (clean page text), summary (a short summary of the page), html (the cleaned page), rawHtml (the page as sent), links (every link on the page), images (every image address), screenshot (a link to a JPEG of the visible page, kept for 7 days), changeTracking (what changed in the markdown since your key last read this page with the same options, kept 30 days) network (the JSON the page loaded while it rendered, up to 30 responses) and branding (the page's colors, fonts, typography, spacing, button and input styles, logo and brand images, read from how the page looks, with a field left out when the page does not show it). Send { \"type\": \"screenshot\", \"fullPage\": true } for the whole page. Send { \"type\": \"highlights\", \"query\": \"refund policy\" } for the passages that best match a query. Send { \"type\": \"json\", \"schema\": { \"type\": \"object\", \"properties\": { \"price\": { \"type\": \"number\" } } } } or { \"type\": \"json\", \"prompt\": \"the price and the stock\" } for fields filled from the page, each checked against it. Send { \"type\": \"json\", \"parser\": \"amazon-product\" } to get a site's own data as json instead of reading the page; GET /v1/parsers lists the parsers. Send { \"type\": \"json\", \"rules\": { \"title\": \"h1\", \"links\": { \"selector\": \"a\", \"type\": \"list\", \"output\": \"@href\" } } } to read the page with CSS rules and no model, at the page's own price. Send { \"type\": \"attributes\", \"selectors\": [{ \"selector\": \"a\", \"attribute\": \"href\" }] } for attribute values, returned in attributes. Without a parser or rules, json needs a schema or a prompt and is filled from the page. json with a schema or a prompt, summary and highlights cost 4 credits more each when they return something. json with rules or a parser, and attributes, cost nothing more. A screenshot, network or branding read costs 1 credit, the same as any page. A PDF comes back as markdown only, and costs 1 credit more for each page read.","items":{"anyOf":[{"enum":["markdown","summary","html","rawHtml","links","images","network","branding","screenshot","changeTracking"],"type":"string"},{"additionalProperties":false,"properties":{"type":{"enum":["markdown","summary","html","rawHtml","links","images","network","branding"],"type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"modes":{"items":{"const":"git-diff","type":"string"},"type":"array"},"prompt":{"not":{}},"schema":{"not":{}},"tag":{"type":"null"},"type":{"const":"changeTracking","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"fullPage":{"default":false,"description":"Capture the whole page from top to bottom instead of the visible part.","type":"boolean"},"quality":{"description":"JPEG quality from 1 to 100. The default is 70.","maximum":100,"minimum":1,"type":"integer"},"type":{"const":"screenshot","type":"string"},"viewport":{"additionalProperties":false,"description":"The window size in pixels, such as { width: 390, height: 844 }.","properties":{"height":{"maximum":2160,"minimum":200,"type":"integer"},"width":{"maximum":3840,"minimum":200,"type":"integer"}},"required":["width","height"],"type":"object"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"count":{"default":5,"description":"How many passages to return, best match first.","maximum":20,"minimum":1,"type":"integer"},"query":{"description":"What you are looking for on the page, such as refund policy.","maxLength":10000,"minLength":1,"type":"string"},"type":{"const":"highlights","type":"string"}},"required":["type","query"],"type":"object"},{"additionalProperties":false,"properties":{"checkPromptInjection":{"const":false,"type":"boolean"},"options":{"additionalProperties":{"$ref":"#/definitions/__schema0"},"description":"Only with parser: extra inputs for it, such as { \"page\": 2 } for the next page of results or { \"minRating\": 4.5 } for a filter. GET /v1/parsers lists what each parser accepts.","propertyNames":{"type":"string"},"type":"object"},"parser":{"description":"Read the page with a named parser, which gives the site's own data as json. The url must be the kind of page the parser reads. Parsers are the only way to read some sites. GET /v1/parsers lists them.","type":"string"},"prompt":{"description":"What to pull from the page in plain words, such as the version and the release date.","maxLength":10000,"minLength":1,"type":"string"},"rules":{"additionalProperties":{"$ref":"#/definitions/__schema2"},"description":"Read the page with CSS rules instead of a model, no extra fee. Each field is a selector such as \"h1\" (the first match's text), \"a@href\" (an attribute) or { \"selector\": \"li\", \"type\": \"list\", \"output\": \"text\" | \"html\" | \"@attribute\" | { nested fields } }. A missing item is null and an unmatched list is []. Relative links become absolute. Up to 100 fields, 5 levels deep. Not with schema, prompt or parser.","propertyNames":{"type":"string"},"type":"object"},"schema":{"additionalProperties":{"$ref":"#/definitions/__schema1"},"description":"The fields to fill, as a JSON Schema (draft-07 or 2020-12) object with properties. Pydantic's model_json_schema() and zod's toJSONSchema() output work as they are. enum, const, anyOf, oneOf, nullable types, $ref with $defs, required, descriptions and any key names are read. Up to 100 top-level fields and 32 KB. A field the page does not state comes back null.","propertyNames":{"type":"string"},"type":"object"},"type":{"const":"json","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"selectors":{"description":"The elements and attributes to read, such as { selector: 'a.buy', attribute: 'href' }.","items":{"additionalProperties":false,"properties":{"attribute":{"maxLength":100,"minLength":1,"type":"string"},"selector":{"minLength":1,"type":"string"}},"required":["selector","attribute"],"type":"object"},"maxItems":50,"minItems":1,"type":"array"},"type":{"const":"attributes","type":"string"}},"required":["type","selectors"],"type":"object"}]},"maxItems":20,"minItems":1,"type":"array"},"headers":{"additionalProperties":{"maxLength":2000,"pattern":"^[\\t\\x20-\\x7e]*$","type":"string"},"description":"Extra request headers to send to the site, such as { \"x-plan\": \"pro\" }. A read with headers is never answered from or saved to a stored copy.","propertyNames":{"pattern":"^[A-Za-z0-9-]{1,64}$","type":"string"},"type":"object"},"includeTags":{"description":"Keep only the parts of the page that match these CSS selectors, such as article or .price. When set, onlyMainContent is not applied.","items":{"minLength":1,"type":"string"},"minItems":1,"type":"array"},"linkStyle":{"default":"inline","description":"How links appear in the markdown. inline keeps [text](address). numbered writes Pricing⟨3⟩ and lists each address once at the end. none keeps only the link text, which makes link-heavy pages 10 to 70% shorter; ask for the links format to get the addresses.","enum":["inline","numbered","none"],"type":"string"},"location":{"additionalProperties":false,"description":"Where to read the page from. The default is the United States.","properties":{"country":{"description":"Two-letter country code to read the page from, such as DE or JP.","type":"string"},"languages":{"description":"Languages to ask the site for, best first, such as [\"de\", \"en\"]. Sent as Accept-Language. A read with languages is never answered from or saved to a stored copy.","items":{"pattern":"^[A-Za-z]{2,3}(?:-[A-Za-z0-9]{2,8})*$","type":"string"},"maxItems":5,"minItems":1,"type":"array"}},"type":"object"},"lockdown":{"const":false,"type":"boolean"},"maxAge":{"description":"Accept a stored answer up to this many milliseconds old, at most 30 days. Without it, 2 days, or less for a site whose pages change often, and a copy up to twice that age (at most 7 days) comes back at once as stale while a fresh read runs. 0 always reads the page live. metadata.cacheState says which one you got.","maximum":9007199254740991,"minimum":0,"type":"integer"},"maxChars":{"description":"Cut the markdown at this many characters; isTruncated says when that happened.","maximum":1000000,"minimum":500,"type":"integer"},"minAge":{"description":"Answer only from a stored copy that is at least this many milliseconds old, and never read the page live. 0 accepts any stored copy. A page with no such copy is notFound.","maximum":9007199254740991,"minimum":0,"type":"integer"},"mobile":{"description":"Read the page as a phone would: a phone-sized screen and the mobile version of the site. The page loads in a browser.","type":"boolean"},"onlyCleanContent":{"const":false,"type":"boolean"},"onlyMainContent":{"default":true,"description":"Keep only the page's main content, without menus, headers, footers and ads.","type":"boolean"},"parsers":{"description":"Only [\"pdf\"] is supported: PDFs are read as markdown.","items":{"anyOf":[{"const":"pdf","type":"string"},{"additionalProperties":false,"properties":{"blocks":{"const":false,"type":"boolean"},"maxPages":{"not":{}},"mode":{"const":"auto","type":"string"},"pageMarkers":{"const":false,"type":"boolean"},"pages":{"const":false,"type":"boolean"},"type":{"const":"pdf","type":"string"}},"required":["type"],"type":"object"}]},"minItems":1,"type":"array"},"profile":{"additionalProperties":false,"description":"Read the page with the cookies and local storage that earlier calls saved under this name, kept for your account for 30 days after the last use. A call with a profile always loads the page in a browser, costs 1 credit, the same as any page, and is never answered from a stored copy. Only one call at a time can save to a profile.","properties":{"name":{"description":"A name you choose, such as shop-login. Calls with the same name share state.","maxLength":128,"minLength":1,"type":"string"},"saveChanges":{"default":true,"description":"Keep the cookies and local storage this read leaves behind for the next call with this name. Send false to read with the profile without changing it.","type":"boolean"}},"required":["name"],"type":"object"},"proxy":{"const":"auto","type":"string"},"redactPII":{"const":false,"type":"boolean"},"removeBase64Images":{"const":true,"type":"boolean"},"skipTlsVerification":{"const":false,"type":"boolean"},"storeInCache":{"default":true,"description":"Send false to neither read nor keep a stored copy of this page.","type":"boolean"},"threatProtection":{"not":{}},"timeout":{"description":"How long to keep trying, in milliseconds, between 10 seconds and 2 minutes. Pages behind a bot check can need 10 to 30 seconds the first time.","maximum":300000,"minimum":1000,"type":"integer"},"toolDetail":{"not":{}},"url":{"description":"The page or PDF to read, such as https://bun.com/docs.","type":"string"},"urls":{"not":{}},"waitFor":{"description":"Extra milliseconds to wait before reading, up to 60000, for pages that load their content late. To wait for an element, add a wait action with a selector. A read that waits costs 1 credit, the same as any page.","maximum":60000,"minimum":0,"type":"integer"},"zeroDataRetention":{"default":false,"description":"Send true to keep nothing from this call: no stored copy is read or made, and nothing from it is logged. Costs 1 credit more per page. Not with a screenshot.","type":"boolean"}},"required":["url"],"type":"object"}before
{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"definitions":{"__schema0":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"items":{"allOf":[{"$ref":"#/definitions/__schema0"}]},"type":"array"},{"additionalProperties":{"allOf":[{"$ref":"#/definitions/__schema0"}]},"propertyNames":{"type":"string"},"type":"object"}]},"__schema1":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"items":{"allOf":[{"$ref":"#/definitions/__schema1"}]},"type":"array"},{"additionalProperties":{"allOf":[{"$ref":"#/definitions/__schema1"}]},"propertyNames":{"type":"string"},"type":"object"}]},"__schema2":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"items":{"allOf":[{"$ref":"#/definitions/__schema2"}]},"type":"array"},{"additionalProperties":{"allOf":[{"$ref":"#/definitions/__schema2"}]},"propertyNames":{"type":"string"},"type":"object"}]}},"properties":{"categories":{"description":"pdf: web results that are PDF files. research: scholarly papers, in a research list, ranked by relevance then citations. companies: companies that match the query, in a companies list, best matches first. The query can name a place, industry, employee count, founding year and funding stage, like fintech startups in Berlin, 50-200 employees. people: people that match the query, in a people list, best matches first. The query can name a role, company, place or research topic, like CFO of Stripe, founders of fintech startups in Berlin, or researchers on CRISPR base editing. Each person has roles, affiliations and public profile links, never contact details. developer: passages from GitHub READMEs, issues, merged pull requests, releases, developer docs and API operations, in a developer list; send it as an object to filter by repos, types, language and minStars.","items":{"anyOf":[{"enum":["developer","gov","research","pdf","companies","people"],"type":"string"},{"additionalProperties":false,"properties":{"type":{"enum":["developer","gov","research","pdf","companies","people"],"type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"language":{"description":"Only repositories whose main language is this, like TypeScript.","minLength":1,"type":"string"},"minStars":{"description":"Only repositories with at least this many GitHub stars.","maximum":9007199254740991,"minimum":0,"type":"integer"},"repos":{"default":[],"description":"Only results from these GitHub repositories, as owner/name.","items":{"pattern":"^[\\w.-]+\\/[\\w.-]+$","type":"string"},"maxItems":5,"type":"array"},"type":{"const":"developer","type":"string"},"types":{"default":[],"description":"Only these result types: readme, issue, pull_request, release, operation, doc.","items":{"enum":["readme","issue","pull_request","release","operation","doc"],"type":"string"},"type":"array"}},"required":["type"],"type":"object"}]},"type":"array"},"country":{"description":"Two-letter country to search from, like us. Image results are always US.","pattern":"^[A-Za-z]{2}$","type":"string"},"domainTools":{"const":false,"type":"boolean"},"enterprise":{"items":{"type":"string"},"maxItems":0,"type":"array"},"excludeDomains":{"items":{"type":"string"},"maxItems":10,"type":"array"},"highlights":{"default":true,"description":"On by default. When a web result's page is already stored, its description is the passages of that page that best match the query. Send false for the snippet the search engine shows.","type":"boolean"},"ignoreInvalidURLs":{"default":false,"description":"Leave out results whose address cannot be read as a page.","type":"boolean"},"includeDomains":{"items":{"type":"string"},"maxItems":10,"type":"array"},"limit":{"description":"Most results to return for each source. Default 10, or 5 with scrapeOptions, which reads at most 5 pages. News returns at most 50.","maximum":100,"minimum":1,"type":"integer"},"location":{"description":"Where to search from, like Germany or San Francisco,California,United States. The last part is the country and replaces country. A city before it narrows web results to that place.","minLength":1,"type":"string"},"maxAge":{"description":"Accept a stored answer up to this many milliseconds old, at most 30 days. Without it, 15 minutes for news and 1 hour for web and images. 0 always searches live.","maximum":9007199254740991,"minimum":0,"type":"integer"},"query":{"maxLength":400,"minLength":1,"type":"string"},"safe":{"description":"Hide explicit web and image results when true.","type":"boolean"},"scrapeOptions":{"additionalProperties":false,"description":"Reads the top web results, up to 5, and puts the passages that best match the query in each description. Add formats to get more from each page: markdown, html, links, summary or {\"type\":\"json\",\"prompt\":\"the price\"}. Costs 1 more credit for each page read, plus 4 for each summary or json with a schema or prompt that returns something.","properties":{"blockAds":{"const":true,"type":"boolean"},"checkPromptInjection":{"const":false,"type":"boolean"},"excludeTags":{"items":{"type":"string"},"maxItems":0,"type":"array"},"formats":{"items":{"anyOf":[{"enum":["markdown","highlights","html","links","summary"],"type":"string"},{"additionalProperties":false,"properties":{"type":{"enum":["markdown","highlights","html","links","summary"],"type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"checkPromptInjection":{"const":false,"type":"boolean"},"options":{"additionalProperties":{"$ref":"#/definitions/__schema0"},"description":"Only with parser: extra inputs for it, such as { \"page\": 2 } for the next page of results or { \"minRating\": 4.5 } for a filter. GET /v1/parsers lists what each parser accepts.","propertyNames":{"type":"string"},"type":"object"},"parser":{"description":"Read the page with a named parser, which gives the site's own data as json. The url must be the kind of page the parser reads. Parsers are the only way to read some sites. GET /v1/parsers lists them.","type":"string"},"prompt":{"description":"What to pull from the page in plain words, such as the version and the release date.","maxLength":10000,"minLength":1,"type":"string"},"rules":{"additionalProperties":{"$ref":"#/definitions/__schema2"},"description":"Read the page with CSS rules instead of a model, no extra fee. Each field is a selector such as \"h1\" (the first match's text), \"a@href\" (an attribute) or { \"selector\": \"li\", \"type\": \"list\", \"output\": \"text\" | \"html\" | \"@attribute\" | { nested fields } }. A missing item is null and an unmatched list is []. Relative links become absolute. Up to 100 fields, 5 levels deep. Not with schema, prompt or parser.","propertyNames":{"type":"string"},"type":"object"},"schema":{"additionalProperties":{"$ref":"#/definitions/__schema1"},"description":"The fields to fill, as a JSON Schema (draft-07 or 2020-12) object with properties. Pydantic's model_json_schema() and zod's toJSONSchema() output work as they are. enum, const, anyOf, oneOf, nullable types, $ref with $defs, required, descriptions and any key names are read. Up to 100 top-level fields and 32 KB. A field the page does not state comes back null.","propertyNames":{"type":"string"},"type":"object"},"type":{"const":"json","type":"string"}},"required":["type"],"type":"object"}]},"type":"array"},"headers":{"additionalProperties":{},"properties":{},"type":"object"},"includeTags":{"items":{"type":"string"},"maxItems":0,"type":"array"},"lockdown":{"const":false,"type":"boolean"},"maxAge":{"const":172800000,"type":"number"},"mobile":{"const":false,"type":"boolean"},"onlyCleanContent":{"const":false,"type":"boolean"},"onlyMainContent":{"const":true,"type":"boolean"},"proxy":{"const":"auto","type":"string"},"redactPII":{"const":false,"type":"boolean"},"removeBase64Images":{"const":true,"type":"boolean"},"skipTlsVerification":{"const":false,"type":"boolean"},"storeInCache":{"const":true,"type":"boolean"},"timeout":{"const":60000,"type":"number"},"waitFor":{"const":0,"type":"number"},"zeroDataRetention":{"default":false,"description":"Send true to keep nothing from the pages read, and read each one live. Costs 1 more credit per page.","type":"boolean"}},"type":"object"},"sources":{"description":"What to search: web, news, images. Each is a string or {type}. Default web, or none when categories asks for research, companies, people or developer.","items":{"anyOf":[{"enum":["web","news","images"],"type":"string"},{"additionalProperties":false,"properties":{"location":{"type":"string"},"tbs":{"type":"string"},"type":{"const":"web","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"type":{"enum":["news","images"],"type":"string"}},"required":["type"],"type":"object"}]},"maxItems":3,"minItems":1,"type":"array"},"tbs":{"description":"Time filter: qdr:h, qdr:d, qdr:w, qdr:m or qdr:y, or cdr:1,cd_min:MM/DD/YYYY,cd_max:MM/DD/YYYY. Web takes both; news takes qdr only; images take none.","minLength":1,"type":"string"},"threatProtection":{"additionalProperties":{},"properties":{},"type":"object"},"timeout":{"default":60000,"description":"Milliseconds to wait for the sources.","maximum":9007199254740991,"minimum":1000,"type":"integer"},"toolDetail":{"const":"compact","type":"string"}},"required":["query"],"type":"object"}after
{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"definitions":{"__schema0":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"items":{"allOf":[{"$ref":"#/definitions/__schema0"}]},"type":"array"},{"additionalProperties":{"allOf":[{"$ref":"#/definitions/__schema0"}]},"propertyNames":{"type":"string"},"type":"object"}]},"__schema1":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"items":{"allOf":[{"$ref":"#/definitions/__schema1"}]},"type":"array"},{"additionalProperties":{"allOf":[{"$ref":"#/definitions/__schema1"}]},"propertyNames":{"type":"string"},"type":"object"}]},"__schema2":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"items":{"allOf":[{"$ref":"#/definitions/__schema2"}]},"type":"array"},{"additionalProperties":{"allOf":[{"$ref":"#/definitions/__schema2"}]},"propertyNames":{"type":"string"},"type":"object"}]}},"properties":{"categories":{"description":"pdf: web results that are PDF files. research: scholarly papers, in a research list, ranked by relevance then citations. companies: companies that match the query, in a companies list, best matches first. The query can name a place, industry, employee count, founding year and funding stage, like fintech startups in Berlin, 50-200 employees. people: people that match the query, in a people list, best matches first. The query can name a role, company, place or research topic, like CFO of Stripe, founders of fintech startups in Berlin, or researchers on CRISPR base editing. Each person has roles, affiliations and public profile links, never contact details. developer: passages from GitHub READMEs, issues, merged pull requests, releases, developer docs and API operations, in a developer list; send it as an object to filter by repos, types, language and minStars. videos: passages from what is said in YouTube videos shared under a Creative Commons license, in a videos list, one result per video, with the channel, the license and the watch link; the link carries &t= only when the passage's start is exact. The index is a June 2024 snapshot of English videos, so a link may be dead.","items":{"anyOf":[{"enum":["developer","gov","research","pdf","companies","people","videos"],"type":"string"},{"additionalProperties":false,"properties":{"type":{"enum":["developer","gov","research","pdf","companies","people","videos"],"type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"language":{"description":"Only repositories whose main language is this, like TypeScript.","minLength":1,"type":"string"},"minStars":{"description":"Only repositories with at least this many GitHub stars.","maximum":9007199254740991,"minimum":0,"type":"integer"},"repos":{"default":[],"description":"Only results from these GitHub repositories, as owner/name.","items":{"pattern":"^[\\w.-]+\\/[\\w.-]+$","type":"string"},"maxItems":5,"type":"array"},"type":{"const":"developer","type":"string"},"types":{"default":[],"description":"Only these result types: readme, issue, pull_request, release, operation, doc.","items":{"enum":["readme","issue","pull_request","release","operation","doc"],"type":"string"},"type":"array"}},"required":["type"],"type":"object"}]},"type":"array"},"country":{"description":"Two-letter country to search from, like us. Image results are always US.","pattern":"^[A-Za-z]{2}$","type":"string"},"domainTools":{"description":"Accepted for compatibility. We have no domain-matched tools to add, so true and false give the same results.","type":"boolean"},"enterprise":{"items":{"type":"string"},"maxItems":0,"type":"array"},"excludeDomains":{"items":{"type":"string"},"maxItems":10,"type":"array"},"highlights":{"default":true,"description":"On by default. When a web result's page is already stored, its description is the passages of that page that best match the query. Send false for the snippet the search engine shows.","type":"boolean"},"ignoreInvalidURLs":{"default":false,"description":"Leave out results whose address cannot be read as a page.","type":"boolean"},"includeDomains":{"items":{"type":"string"},"maxItems":10,"type":"array"},"limit":{"description":"Most results to return for each source. Default 10, or 5 with scrapeOptions, which reads every web result returned. News returns at most 50.","maximum":100,"minimum":1,"type":"integer"},"location":{"description":"Where to search from, like Germany or San Francisco,California,United States. The last part is the country and replaces country. A city before it narrows web results to that place.","minLength":1,"type":"string"},"maxAge":{"description":"Accept a stored answer up to this many milliseconds old, at most 30 days. Without it, 15 minutes for news and 1 hour for web and images. 0 always searches live.","maximum":9007199254740991,"minimum":0,"type":"integer"},"query":{"maxLength":400,"minLength":1,"type":"string"},"safe":{"description":"Hide explicit web and image results when true.","type":"boolean"},"scrapeOptions":{"additionalProperties":false,"description":"Reads each web result, as many as limit asks for, within timeout, and puts the passages that best match the query in each description. Takes the options of scrape: formats (markdown, html, rawHtml, links, images, summary, screenshot, json and the rest), onlyMainContent, includeTags, excludeTags, maxAge, minAge, waitFor, mobile, timeout (per page), headers, actions, location, parsers, profile and zeroDataRetention. Costs what scrape costs for each page read: 1 credit, plus 4 for each summary or json with a schema or prompt that returns something.","properties":{"actions":{"description":"Up to 50 steps to run on the page, in order, before reading it: { \"type\": \"wait\", \"milliseconds\": 500 } (up to 30 seconds), { \"type\": \"wait\", \"selector\": \".results\" }, { \"type\": \"click\", \"selector\": \"button.more\" }, { \"type\": \"write\", \"text\": \"tides\" }, { \"type\": \"press\", \"key\": \"Enter\" }, { \"type\": \"scroll\", \"direction\": \"down\" } (also up, left or right; amount is pixels, \"viewport\" or \"max\"; maxScrolls 1 to 50; selector scrolls an inner container; \"max\" keeps scrolling until the page stops growing, for feeds that load as you go), { \"type\": \"screenshot\", \"fullPage\": true } (links come back in actions.screenshots), { \"type\": \"scrape\" } (the page at that point, in actions.scrapes), { \"type\": \"executeJavascript\", \"script\": \"document.title\" } (results in actions.javascriptReturns), { \"type\": \"pdf\", \"format\": \"A4\" } (links in actions.pdfs) or { \"type\": \"perform\", \"action\": \"Click the Load more button\" } (a step in plain words, up to 5 browser steps on this page, never leaving the site; at most 5 per call). A read with actions costs 1 credit, the same as any page; the actions themselves add nothing. If an action fails, you still get the page as it stood, with a warning that names the action and says why.","items":{"anyOf":[{"additionalProperties":false,"properties":{"milliseconds":{"maximum":30000,"minimum":1,"type":"integer"},"type":{"const":"wait","type":"string"}},"required":["type","milliseconds"],"type":"object"},{"additionalProperties":false,"properties":{"selector":{"minLength":1,"type":"string"},"type":{"const":"wait","type":"string"}},"required":["type","selector"],"type":"object"},{"additionalProperties":false,"properties":{"all":{"const":false,"type":"boolean"},"selector":{"minLength":1,"type":"string"},"type":{"const":"click","type":"string"}},"required":["type","selector"],"type":"object"},{"additionalProperties":false,"properties":{"text":{"minLength":1,"type":"string"},"type":{"const":"write","type":"string"}},"required":["type","text"],"type":"object"},{"additionalProperties":false,"properties":{"key":{"maxLength":40,"minLength":1,"type":"string"},"type":{"const":"press","type":"string"}},"required":["type","key"],"type":"object"},{"additionalProperties":false,"properties":{"amount":{"anyOf":[{"maximum":100000,"minimum":1,"type":"integer"},{"enum":["viewport","max"],"type":"string"}]},"direction":{"default":"down","enum":["up","down","left","right"],"type":"string"},"maxScrolls":{"maximum":50,"minimum":1,"type":"integer"},"selector":{"minLength":1,"type":"string"},"type":{"const":"scroll","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"fullPage":{"type":"boolean"},"quality":{"maximum":100,"minimum":1,"type":"integer"},"type":{"const":"screenshot","type":"string"},"viewport":{"additionalProperties":false,"properties":{"height":{"maximum":2160,"minimum":200,"type":"integer"},"width":{"maximum":3840,"minimum":200,"type":"integer"}},"required":["width","height"],"type":"object"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"type":{"const":"scrape","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"script":{"maxLength":20000,"minLength":1,"type":"string"},"type":{"const":"executeJavascript","type":"string"}},"required":["type","script"],"type":"object"},{"additionalProperties":false,"properties":{"format":{"enum":["Letter","Legal","Tabloid","Ledger","A0","A1","A2","A3","A4","A5","A6"],"type":"string"},"landscape":{"type":"boolean"},"scale":{"maximum":2,"minimum":0.1,"type":"number"},"type":{"const":"pdf","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"action":{"maxLength":500,"minLength":1,"type":"string"},"type":{"const":"perform","type":"string"}},"required":["type","action"],"type":"object"}]},"maxItems":50,"minItems":1,"type":"array"},"alexandria":{"not":{}},"auditMetadata":{"not":{}},"blockAds":{"description":"Ads and trackers are not loaded when a page runs in a browser. Send false to load them.","type":"boolean"},"checkPromptInjection":{"description":"Send true to scan the page text for instructions aimed at an AI model before anything is built from it. A page that has them is refused with 403 promptInjectionDetected and costs nothing. The scan adds 4 credits when it runs; a page it cannot scan fully comes back with a warning and no charge.","type":"boolean"},"domainTools":{"const":false,"type":"boolean"},"excludeTags":{"description":"Remove the parts of the page that match these CSS selectors, such as .comments.","items":{"minLength":1,"type":"string"},"minItems":1,"type":"array"},"fastMode":{"description":"Send true to read the page without opening a browser: the answer comes sooner, but a page that needs a browser, or that refuses a plain request, comes back as an error instead of being retried. Ignored when the call needs a browser (actions, screenshot, waitFor, mobile, profile, network, branding).","type":"boolean"},"formats":{"default":["markdown"],"description":"What to return: markdown (clean page text), summary (a short summary of the page), html (the cleaned page), rawHtml (the page as sent), audio and video (for a YouTube link: the audio track as an M4A file, or the video as an MP4 file, as a link that works for 1 hour), rawBase64 (the bytes the site sent, Base64 encoded, from a live read; metadata.contentType says what they are), links (every link on the page), images (every image address), screenshot (a link to a JPEG of the visible page, kept for 7 days), changeTracking (what changed in the markdown since your key last read this page with the same options, kept 30 days; add modes [\"git-diff\",\"json\"] with a schema or prompt to compare fields too), question (send { \"type\": \"question\", \"question\": \"...\" } to get answer, null when the page does not state one), product (title, brand, category, url, description and variants with price, sale, availability and images, or null) and menu (merchant, currency and sections of items with prices, or null) network (the JSON the page loaded while it rendered, up to 30 responses) and branding (the page's colors, fonts, typography, spacing, button and input styles, logo and brand images, read from how the page looks, with a field left out when the page does not show it). Send { \"type\": \"screenshot\", \"fullPage\": true } for the whole page. Send { \"type\": \"highlights\", \"query\": \"refund policy\" } for the passages that best match a query. Send { \"type\": \"json\", \"schema\": { \"type\": \"object\", \"properties\": { \"price\": { \"type\": \"number\" } } } } or { \"type\": \"json\", \"prompt\": \"the price and the stock\" } for fields filled from the page, each checked against it. Send { \"type\": \"json\", \"parser\": \"amazon-product\" } to get a site's own data as json instead of reading the page; GET /v1/parsers lists the parsers. Send { \"type\": \"json\", \"rules\": { \"title\": \"h1\", \"links\": { \"selector\": \"a\", \"type\": \"list\", \"output\": \"@href\" } } } to read the page with CSS rules and no model, at the page's own price. Send { \"type\": \"attributes\", \"selectors\": [{ \"selector\": \"a\", \"attribute\": \"href\" }] } for attribute values, returned in attributes. Without a parser or rules, json needs a schema or a prompt and is filled from the page. json with a schema or a prompt, summary, highlights, question, product, menu and changeTracking in json mode cost 4 credits more each when they return something. json with rules or a parser, and attributes, cost nothing more. A screenshot, network or branding read costs 1 credit, the same as any page. A PDF comes back as markdown only, and costs 1 credit more for each page read.","items":{"anyOf":[{"enum":["markdown","summary","html","rawHtml","rawBase64","links","images","network","branding","audio","video","screenshot","changeTracking","product","menu"],"type":"string"},{"additionalProperties":false,"properties":{"type":{"enum":["markdown","summary","html","rawHtml","rawBase64","links","images","network","branding","audio","video"],"type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"modes":{"description":"git-diff returns a unified diff of the markdown. json compares the fields in schema or prompt between this read and the last one. Without modes you get git-diff.","items":{"enum":["git-diff","json"],"type":"string"},"maxItems":2,"type":"array"},"prompt":{"description":"With json mode: what to compare, in plain words, such as the price and stock.","maxLength":10000,"minLength":1,"type":"string"},"schema":{"additionalProperties":{"$ref":"#/definitions/__schema0"},"description":"The fields to fill, as a JSON Schema (draft-07 or 2020-12) object with properties. Pydantic's model_json_schema() and zod's toJSONSchema() output work as they are. enum, const, anyOf, oneOf, nullable types, $ref with $defs, required, descriptions and any key names are read. Up to 100 top-level fields and 32 KB. A field the page does not state comes back null.","propertyNames":{"type":"string"},"type":"object"},"tag":{"type":"null"},"type":{"const":"changeTracking","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"question":{"description":"A question to answer from the page, such as what the refund window is.","maxLength":10000,"minLength":1,"type":"string"},"type":{"const":"question","type":"string"}},"required":["type","question"],"type":"object"},{"additionalProperties":false,"properties":{"type":{"const":"product","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"type":{"const":"menu","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"fullPage":{"default":false,"description":"Capture the whole page from top to bottom instead of the visible part.","type":"boolean"},"quality":{"description":"JPEG quality from 1 to 100. The default is 70.","maximum":100,"minimum":1,"type":"integer"},"type":{"const":"screenshot","type":"string"},"viewport":{"additionalProperties":false,"description":"The window size in pixels, such as { width: 390, height: 844 }.","properties":{"height":{"maximum":2160,"minimum":200,"type":"integer"},"width":{"maximum":3840,"minimum":200,"type":"integer"}},"required":["width","height"],"type":"object"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"count":{"default":5,"description":"How many passages to return, best match first.","maximum":20,"minimum":1,"type":"integer"},"query":{"description":"What you are looking for on the page, such as refund policy.","maxLength":10000,"minLength":1,"type":"string"},"type":{"const":"highlights","type":"string"}},"required":["type","query"],"type":"object"},{"additionalProperties":false,"properties":{"checkPromptInjection":{"description":"Deprecated: send checkPromptInjection at the top level of the call.","type":"boolean"},"options":{"additionalProperties":{"$ref":"#/definitions/__schema1"},"description":"Only with parser: extra inputs for it, such as { \"page\": 2 } for the next page of results or { \"minRating\": 4.5 } for a filter. GET /v1/parsers lists what each parser accepts.","propertyNames":{"type":"string"},"type":"object"},"parser":{"description":"Read the page with a named parser, which gives the site's own data as json. The url must be the kind of page the parser reads. Parsers are the only way to read some sites. GET /v1/parsers lists them.","type":"string"},"prompt":{"description":"What to pull from the page in plain words, such as the version and the release date.","maxLength":10000,"minLength":1,"type":"string"},"rules":{"additionalProperties":{"$ref":"#/definitions/__schema2"},"description":"Read the page with CSS rules instead of a model, no extra fee. Each field is a selector such as \"h1\" (the first match's text), \"a@href\" (an attribute) or { \"selector\": \"li\", \"type\": \"list\", \"output\": \"text\" | \"html\" | \"@attribute\" | { nested fields } }. A missing item is null and an unmatched list is []. Relative links become absolute. Up to 100 fields, 5 levels deep. Not with schema, prompt or parser.","propertyNames":{"type":"string"},"type":"object"},"schema":{"additionalProperties":{"$ref":"#/definitions/__schema0"},"description":"The fields to fill, as a JSON Schema (draft-07 or 2020-12) object with properties. Pydantic's model_json_schema() and zod's toJSONSchema() output work as they are. enum, const, anyOf, oneOf, nullable types, $ref with $defs, required, descriptions and any key names are read. Up to 100 top-level fields and 32 KB. A field the page does not state comes back null.","propertyNames":{"type":"string"},"type":"object"},"type":{"const":"json","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"selectors":{"description":"The elements and attributes to read, such as { selector: 'a.buy', attribute: 'href' }.","items":{"additionalProperties":false,"properties":{"attribute":{"maxLength":100,"minLength":1,"type":"string"},"selector":{"minLength":1,"type":"string"}},"required":["selector","attribute"],"type":"object"},"maxItems":50,"minItems":1,"type":"array"},"type":{"const":"attributes","type":"string"}},"required":["type","selectors"],"type":"object"}]},"maxItems":20,"minItems":1,"type":"array"},"headers":{"additionalProperties":{"maxLength":2000,"pattern":"^[\\t\\x20-\\x7e]*$","type":"string"},"description":"Extra request headers to send to the site, such as { \"x-plan\": \"pro\" }. A read with headers is never answered from or saved to a stored copy.","propertyNames":{"pattern":"^[A-Za-z0-9-]{1,64}$","type":"string"},"type":"object"},"ignoreRobotsTxt":{"const":false,"type":"boolean"},"includeTags":{"description":"Keep only the parts of the page that match these CSS selectors, such as article or .price. When set, onlyMainContent is not applied.","items":{"minLength":1,"type":"string"},"minItems":1,"type":"array"},"location":{"additionalProperties":false,"description":"Where to read the page from. The default is the United States.","properties":{"country":{"description":"Two-letter country code to read the page from, such as DE or JP.","type":"string"},"languages":{"description":"Languages to ask the site for, best first, such as [\"de\", \"en\"]. Sent as Accept-Language. A read with languages is never answered from or saved to a stored copy.","items":{"pattern":"^[A-Za-z]{2,3}(?:-[A-Za-z0-9]{2,8})*$","type":"string"},"maxItems":5,"minItems":1,"type":"array"}},"type":"object"},"lockdown":{"description":"Send true to answer only from a stored copy of the page and never read it live, whatever its age. A page with no stored copy is notFound. The same as minAge 0.","type":"boolean"},"maxAge":{"description":"Accept a stored answer up to this many milliseconds old, at most 30 days. Without it, 2 days, or less for a site whose pages change often, and a copy up to twice that age (at most 7 days) comes back at once as stale while a fresh read runs. 0 always reads the page live. metadata.cacheState says which one you got.","maximum":9007199254740991,"minimum":0,"type":"integer"},"minAge":{"description":"Answer only from a stored copy that is at least this many milliseconds old, and never read the page live. 0 accepts any stored copy. A page with no such copy is notFound.","maximum":9007199254740991,"minimum":0,"type":"integer"},"mobile":{"description":"Read the page as a phone would: a phone-sized screen and the mobile version of the site. The page loads in a browser.","type":"boolean"},"onlyCleanContent":{"description":"Send true to have a model remove what onlyMainContent leaves behind in the markdown: cookie banners, ads, share widgets, breadcrumbs, sign-up prompts, comment prompts and related-article lists. It only removes whole paragraphs and lists; it never rewrites or adds text, and code blocks are always kept. Skipped with a warning when the page is too long to clean or the model does not answer. Not with zeroDataRetention. Summary, answers and highlights are made from the cleaned markdown.","type":"boolean"},"onlyMainContent":{"default":true,"description":"Keep only the page's main content, without menus, headers, footers and ads.","type":"boolean"},"parsers":{"description":"Only the pdf parser exists. Send \"pdf\" or { \"type\": \"pdf\", mode, maxPages, pages, blocks, pageMarkers } with the same meaning as in parse. Without mode a PDF is read from its text layer only; auto reads the picture of a page that has no text, and ocr reads the picture of every page, up to 20 pages. Each page read costs 1 credit.","items":{"anyOf":[{"const":"pdf","type":"string"},{"additionalProperties":false,"properties":{"blocks":{"description":"Send true to also get the page's layout in blocks: each title, section header or run of text, with its page, reading order, position on the page (bbox as left, top, right, bottom from 0 to 1) and where its text sits in that page's markdown (span, as in pages). Tables, figures and formulas are not told apart. A page read from its picture is one block. No extra charge.","type":"boolean"},"maxPages":{"description":"Read at most this many pages, up to 100.","maximum":100,"minimum":1,"type":"integer"},"mode":{"description":"fast reads the text layer only. auto (the default) reads the text layer and reads the picture of any page that has none. ocr reads the picture of every page.","enum":["fast","auto","ocr"],"type":"string"},"pageMarkers":{"description":"Send true to mark page breaks in the markdown: pages are joined with \"---\" and a line, where N is the page that follows. No extra charge.","type":"boolean"},"pages":{"description":"Send true to also get each page's markdown in pages, as { pageNumber, markdown }. No extra charge.","type":"boolean"},"type":{"const":"pdf","type":"string"}},"required":["type"],"type":"object"}]},"minItems":1,"type":"array"},"profile":{"additionalProperties":false,"description":"Read the page with the cookies and local storage that earlier calls saved under this name, kept for your account for 30 days after the last use. A call with a profile always loads the page in a browser, costs 1 credit, the same as any page, and is never answered from a stored copy. Only one call at a time can save to a profile.","properties":{"name":{"description":"A name you choose, such as shop-login. Calls with the same name share state.","maxLength":128,"minLength":1,"type":"string"},"saveChanges":{"default":true,"description":"Keep the cookies and local storage this read leaves behind for the next call with this name. Send false to read with the profile without changing it.","type":"boolean"}},"required":["name"],"type":"object"},"proxy":{"description":"Which route reads the page. auto and basic start with the cheapest route and move up when the site refuses. enhanced starts on a residential browser. The price is the same.","enum":["auto","basic","enhanced"],"type":"string"},"redactPII":{"anyOf":[{"type":"boolean"},{"additionalProperties":false,"description":"Options for redactPII.","properties":{"entities":{"default":["PERSON","EMAIL","PHONE","LOCATION","FINANCIAL","SECRET"],"description":"What to hide: PERSON, EMAIL, PHONE, LOCATION, FINANCIAL, SECRET. All by default.","items":{"enum":["PERSON","EMAIL","PHONE","LOCATION","FINANCIAL","SECRET"],"type":"string"},"minItems":1,"type":"array"},"mode":{"default":"accurate","description":"accurate finds names and places with the model and the rest by pattern. aggressive adds guesses that catch more and may hide a little too much. fast uses patterns only, so it finds no ordinary names or places.","enum":["accurate","aggressive","fast"],"type":"string"},"replaceStyle":{"default":"tag","description":"tag writes <EMAIL>, mask writes * for each character, remove deletes it.","enum":["tag","mask","remove"],"type":"string"}},"type":"object"}],"description":"Send true, or an object, to hide personal data in the markdown and in everything made from it (summary, answers, highlights, json). Links, html and rawHtml are not changed. A page the model cannot scan is refused rather than returned unredacted."},"removeBase64Images":{"description":"Images inside the page that carry their data in the address (data:image) are dropped by default. Send false to keep them in markdown and html.","type":"boolean"},"robotsUserAgent":{"not":{}},"skipTlsVerification":{"description":"Send true to read a page whose certificate is expired, self-signed or for another name. The read is not private against someone between us and the site.","type":"boolean"},"storeInCache":{"default":true,"description":"Send false to neither read nor keep a stored copy of this page.","type":"boolean"},"threatProtection":{"not":{}},"timeout":{"description":"How long to keep trying, in milliseconds, between 10 seconds and 2 minutes. Pages behind a bot check can need 10 to 30 seconds the first time.","maximum":300000,"minimum":1000,"type":"integer"},"toolDetail":{"not":{}},"waitFor":{"description":"Extra milliseconds to wait before reading, up to 60000, for pages that load their content late. To wait for an element, add a wait action with a selector. A read that waits costs 1 credit, the same as any page.","maximum":60000,"minimum":0,"type":"integer"},"zeroDataRetention":{"default":false,"description":"Send true to keep nothing from this call: no stored copy is read or made, and nothing from it is logged. Costs 1 credit more per page. Not with a screenshot.","type":"boolean"}},"type":"object"},"sources":{"description":"What to search: web, news, images. Each is a string or {type}. The catalogue names alexandria and exchange are accepted and left out: they name a source we do not have. Default web, or none when categories asks for research, companies, people, developer or videos.","items":{"anyOf":[{"anyOf":[{"enum":["web","news","images"],"type":"string"},{"additionalProperties":false,"properties":{"location":{"type":"string"},"tbs":{"type":"string"},"type":{"const":"web","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"type":{"enum":["news","images"],"type":"string"}},"required":["type"],"type":"object"}]},{"anyOf":[{"enum":["alexandria","exchange"],"type":"string"},{"additionalProperties":false,"properties":{"type":{"enum":["alexandria","exchange"],"type":"string"}},"required":["type"],"type":"object"}]}]},"maxItems":5,"minItems":1,"type":"array"},"tbs":{"description":"Time filter: qdr:h, qdr:d, qdr:w, qdr:m or qdr:y, or cdr:1,cd_min:MM/DD/YYYY,cd_max:MM/DD/YYYY. Web takes both; news takes qdr only; images take none.","minLength":1,"type":"string"},"threatProtection":{"additionalProperties":{},"properties":{},"type":"object"},"timeout":{"default":60000,"description":"Milliseconds to wait for the sources.","maximum":9007199254740991,"minimum":1000,"type":"integer"},"toolDetail":{"const":"compact","type":"string"}},"required":["query"],"type":"object"}⟨17 unchanged words⟩ key once approved.","type":"string"},"scopes":{"description":"What the key may do besides the calls every key can make. Leave out for none.","items":{"enum":[],"type":"string"},"type":"array"}},"type":"object"}
before
{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"definitions":{"__schema0":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"items":{"allOf":[{"$ref":"#/definitions/__schema0"}]},"type":"array"},{"additionalProperties":{"allOf":[{"$ref":"#/definitions/__schema0"}]},"propertyNames":{"type":"string"},"type":"object"}]},"__schema1":{"anyOf":[{"additionalProperties":{},"properties":{"description":{"maxLength":300,"type":"string"},"type":{"enum":["string","number","integer","boolean"],"type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":{},"properties":{"description":{"maxLength":300,"type":"string"},"items":{"allOf":[{"$ref":"#/definitions/__schema1"}]},"type":{"const":"array","type":"string"}},"required":["type","items"],"type":"object"},{"additionalProperties":{},"properties":{"description":{"maxLength":300,"type":"string"},"properties":{"additionalProperties":{"allOf":[{"$ref":"#/definitions/__schema1"}]},"propertyNames":{"pattern":"^[A-Za-z][A-Za-z0-9_]{0,63}$","type":"string"},"type":"object"},"type":{"const":"object","type":"string"}},"required":["type","properties"],"type":"object"}]},"__schema2":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"items":{"allOf":[{"$ref":"#/definitions/__schema2"}]},"type":"array"},{"additionalProperties":{"allOf":[{"$ref":"#/definitions/__schema2"}]},"propertyNames":{"type":"string"},"type":"object"}]}},"properties":{"allowExternalLinks":{"const":false,"type":"boolean"},"allowSubdomains":{"default":false,"description":"Also read pages on subdomains, such as docs.bun.com for bun.com.","type":"boolean"},"crawlEntireDomain":{"default":false,"description":"Read the whole site, not only pages under the start page's path.","type":"boolean"},"delay":{"not":{}},"excludePaths":{"default":[],"description":"Skip pages whose path matches one of these regular expressions, such as tag/.*.","items":{"maxLength":200,"minLength":1,"type":"string"},"maxItems":100,"type":"array"},"ignoreQueryParameters":{"default":false,"description":"Treat addresses that differ only in their ?query part as one page.","type":"boolean"},"ignoreRobotsTxt":{"const":false,"type":"boolean"},"includePaths":{"default":[],"description":"Read only pages whose path matches one of these regular expressions, such as blog/.*.","items":{"maxLength":200,"minLength":1,"type":"string"},"maxItems":100,"type":"array"},"limit":{"default":10000,"description":"Stop after reading this many pages in total, across every call.","maximum":10000,"minimum":1,"type":"integer"},"maxConcurrency":{"not":{}},"maxDiscoveryDepth":{"default":3,"description":"How many links away from the start page to go, up to 10.","maximum":10,"minimum":0,"type":"integer"},"prompt":{"description":"What you are looking for, such as sqlite performance. Pages about it are read first, and the crawl stops once new pages stop mentioning it.","maxLength":1000,"minLength":1,"type":"string"},"regexOnFullURL":{"default":false,"description":"Match includePaths and excludePaths against the whole address, not only the path.","type":"boolean"},"robotsUserAgent":{"not":{}},"scrapeOptions":{"additionalProperties":{},"description":"How to read each page, the same options as scrape. Only markdown comes back yet.","properties":{"actions":{"description":"Up to 50 steps to run on the page, in order, before reading it: { \"type\": \"wait\", \"milliseconds\": 500 } (up to 30 seconds), { \"type\": \"wait\", \"selector\": \".results\" }, { \"type\": \"click\", \"selector\": \"button.more\" }, { \"type\": \"write\", \"text\": \"tides\" }, { \"type\": \"press\", \"key\": \"Enter\" }, { \"type\": \"scroll\", \"direction\": \"down\" } (also up, left or right; amount is pixels, \"viewport\" or \"max\"; maxScrolls 1 to 50; selector scrolls an inner container; \"max\" keeps scrolling until the page stops growing, for feeds that load as you go), { \"type\": \"screenshot\", \"fullPage\": true } (links come back in actions.screenshots), { \"type\": \"scrape\" } (the page at that point, in actions.scrapes), { \"type\": \"executeJavascript\", \"script\": \"document.title\" } (results in actions.javascriptReturns), { \"type\": \"pdf\", \"format\": \"A4\" } (links in actions.pdfs) or { \"type\": \"perform\", \"action\": \"Click the Load more button\" } (a step in plain words, up to 5 browser steps on this page, never leaving the site; at most 5 per call). A read with actions costs 1 credit, the same as any page, and each perform action costs 2 credits more. If an action fails, you still get the page as it stood, with a warning that names the action and says why.","items":{"anyOf":[{"additionalProperties":false,"properties":{"milliseconds":{"maximum":30000,"minimum":1,"type":"integer"},"type":{"const":"wait","type":"string"}},"required":["type","milliseconds"],"type":"object"},{"additionalProperties":false,"properties":{"selector":{"minLength":1,"type":"string"},"type":{"const":"wait","type":"string"}},"required":["type","selector"],"type":"object"},{"additionalProperties":false,"properties":{"all":{"const":false,"type":"boolean"},"selector":{"minLength":1,"type":"string"},"type":{"const":"click","type":"string"}},"required":["type","selector"],"type":"object"},{"additionalProperties":false,"properties":{"text":{"minLength":1,"type":"string"},"type":{"const":"write","type":"string"}},"required":["type","text"],"type":"object"},{"additionalProperties":false,"properties":{"key":{"maxLength":40,"minLength":1,"type":"string"},"type":{"const":"press","type":"string"}},"required":["type","key"],"type":"object"},{"additionalProperties":false,"properties":{"amount":{"anyOf":[{"maximum":100000,"minimum":1,"type":"integer"},{"enum":["viewport","max"],"type":"string"}]},"direction":{"default":"down","enum":["up","down","left","right"],"type":"string"},"maxScrolls":{"maximum":50,"minimum":1,"type":"integer"},"selector":{"minLength":1,"type":"string"},"type":{"const":"scroll","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"fullPage":{"type":"boolean"},"quality":{"maximum":100,"minimum":1,"type":"integer"},"type":{"const":"screenshot","type":"string"},"viewport":{"additionalProperties":false,"properties":{"height":{"maximum":2160,"minimum":200,"type":"integer"},"width":{"maximum":3840,"minimum":200,"type":"integer"}},"required":["width","height"],"type":"object"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"type":{"const":"scrape","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"script":{"maxLength":20000,"minLength":1,"type":"string"},"type":{"const":"executeJavascript","type":"string"}},"required":["type","script"],"type":"object"},{"additionalProperties":false,"properties":{"format":{"enum":["Letter","Legal","Tabloid","Ledger","A0","A1","A2","A3","A4","A5","A6"],"type":"string"},"landscape":{"type":"boolean"},"scale":{"maximum":2,"minimum":0.1,"type":"number"},"type":{"const":"pdf","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"action":{"maxLength":500,"minLength":1,"type":"string"},"type":{"const":"perform","type":"string"}},"required":["type","action"],"type":"object"}]},"maxItems":50,"minItems":1,"type":"array"},"alexandria":{"not":{}},"auditMetadata":{"not":{}},"blockAds":{"const":true,"type":"boolean"},"checkPromptInjection":{"const":false,"type":"boolean"},"domainTools":{"const":false,"type":"boolean"},"excludeTags":{"description":"Remove the parts of the page that match these CSS selectors, such as .comments.","items":{"minLength":1,"type":"string"},"minItems":1,"type":"array"},"formats":{"default":["markdown"],"description":"What to return: markdown (clean page text), summary (a short summary of the page), html (the cleaned page), rawHtml (the page as sent), links (every link on the page), images (every image address), screenshot (a link to a JPEG of the visible page, kept for 7 days), changeTracking (what changed in the markdown since your key last read this page with the same options, kept 30 days) network (the JSON the page loaded while it rendered, up to 30 responses) and branding (the page's colors, fonts, typography, spacing, button and input styles, logo and brand images, read from how the page looks, with a field left out when the page does not show it). Send { \"type\": \"screenshot\", \"fullPage\": true } for the whole page. Send { \"type\": \"highlights\", \"query\": \"refund policy\" } for the passages that best match a query. Send { \"type\": \"json\", \"schema\": { \"type\": \"object\", \"properties\": { \"price\": { \"type\": \"number\" } } } } or { \"type\": \"json\", \"prompt\": \"the price and the stock\" } for fields filled from the page, each checked against it. Send { \"type\": \"json\", \"parser\": \"amazon-product\" } to get a site's own data as json instead of reading the page; GET /v1/parsers lists the parsers. Send { \"type\": \"json\", \"rules\": { \"title\": \"h1\", \"links\": { \"selector\": \"a\", \"type\": \"list\", \"output\": \"@href\" } } } to read the page with CSS rules and no model, at the page's own price. Send { \"type\": \"attributes\", \"selectors\": [{ \"selector\": \"a\", \"attribute\": \"href\" }] } for attribute values, returned in attributes. Without a parser or rules, json needs a schema or a prompt and is filled from the page. json with a schema or a prompt, summary and highlights cost 4 credits more each when they return something. json with rules or a parser, and attributes, cost nothing more. A screenshot, network or branding read costs 1 credit, the same as any page. A PDF comes back as markdown only, and costs 1 credit more for each page read.","items":{"anyOf":[{"enum":["markdown","summary","html","rawHtml","links","images","network","branding","screenshot","changeTracking"],"type":"string"},{"additionalProperties":false,"properties":{"type":{"enum":["markdown","summary","html","rawHtml","links","images","network","branding"],"type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"modes":{"items":{"const":"git-diff","type":"string"},"type":"array"},"prompt":{"not":{}},"schema":{"not":{}},"tag":{"type":"null"},"type":{"const":"changeTracking","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"fullPage":{"default":false,"description":"Capture the whole page from top to bottom instead of the visible part.","type":"boolean"},"quality":{"not":{}},"type":{"const":"screenshot","type":"string"},"viewport":{"not":{}}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"count":{"default":5,"description":"How many passages to return, best match first.","maximum":20,"minimum":1,"type":"integer"},"query":{"description":"What you are looking for on the page, such as refund policy.","maxLength":10000,"minLength":1,"type":"string"},"type":{"const":"highlights","type":"string"}},"required":["type","query"],"type":"object"},{"additionalProperties":false,"properties":{"checkPromptInjection":{"const":false,"type":"boolean"},"options":{"additionalProperties":{"$ref":"#/definitions/__schema0"},"description":"Only with parser: extra inputs for it, such as { \"page\": 2 } for the next page of results or { \"minRating\": 4.5 } for a filter. GET /v1/parsers lists what each parser accepts.","propertyNames":{"type":"string"},"type":"object"},"parser":{"description":"Read the page with a named parser, which gives the site's own data as json. The url must be the kind of page the parser reads. Parsers are the only way to read some sites. GET /v1/parsers lists them.","type":"string"},"prompt":{"description":"What to pull from the page in plain words, such as the version and the release date.","maxLength":10000,"minLength":1,"type":"string"},"rules":{"additionalProperties":{"$ref":"#/definitions/__schema2"},"description":"Read the page with CSS rules instead of a model, no extra fee. Each field is a selector such as \"h1\" (the first match's text), \"a@href\" (an attribute) or { \"selector\": \"li\", \"type\": \"list\", \"output\": \"text\" | \"html\" | \"@attribute\" | { nested fields } }. A missing item is null and an unmatched list is []. Relative links become absolute. Up to 100 fields, 5 levels deep. Not with schema, prompt or parser.","propertyNames":{"type":"string"},"type":"object"},"schema":{"additionalProperties":{},"description":"The fields to fill, as a JSON Schema object with up to 20 properties. Each is a string, number, integer, boolean, an array, or an object with its own properties, nested up to 4 levels.","properties":{"properties":{"additionalProperties":{"$ref":"#/definitions/__schema1"},"propertyNames":{"pattern":"^[A-Za-z][A-Za-z0-9_]{0,63}$","type":"string"},"type":"object"},"type":{"const":"object","type":"string"}},"required":["type","properties"],"type":"object"},"type":{"const":"json","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"selectors":{"description":"The elements and attributes to read, such as { selector: 'a.buy', attribute: 'href' }.","items":{"additionalProperties":false,"properties":{"attribute":{"maxLength":100,"minLength":1,"type":"string"},"selector":{"minLength":1,"type":"string"}},"required":["selector","attribute"],"type":"object"},"maxItems":50,"minItems":1,"type":"array"},"type":{"const":"attributes","type":"string"}},"required":["type","selectors"],"type":"object"}]},"maxItems":20,"minItems":1,"type":"array"},"headers":{"not":{}},"includeTags":{"description":"Keep only the parts of the page that match these CSS selectors, such as article or .price. When set, onlyMainContent is not applied.","items":{"minLength":1,"type":"string"},"minItems":1,"type":"array"},"location":{"additionalProperties":false,"description":"Where to read the page from. The default is the United States.","properties":{"country":{"description":"Two-letter country code to read the page from, such as DE or JP.","type":"string"},"languages":{"not":{}}},"type":"object"},"lockdown":{"const":false,"type":"boolean"},"maxAge":{"description":"Accept a stored answer up to this many milliseconds old, at most 30 days. Without it, 2 days, or less for a site whose pages change often, and a copy up to twice that age (at most 7 days) comes back at once as stale while a fresh read runs. 0 always reads the page live. metadata.cacheState says which one you got.","maximum":9007199254740991,"minimum":0,"type":"integer"},"minAge":{"description":"Answer only from a stored copy that is at least this many milliseconds old, and never read the page live. 0 accepts any stored copy. A page with no such copy is notFound.","maximum":9007199254740991,"minimum":0,"type":"integer"},"mobile":{"const":false,"type":"boolean"},"onlyCleanContent":{"const":false,"type":"boolean"},"onlyMainContent":{"default":true,"description":"Keep only the page's main content, without menus, headers, footers and ads.","type":"boolean"},"parsers":{"description":"Only [\"pdf\"] is supported: PDFs are read as markdown.","items":{"anyOf":[{"const":"pdf","type":"string"},{"additionalProperties":false,"properties":{"blocks":{"const":false,"type":"boolean"},"maxPages":{"not":{}},"mode":{"const":"auto","type":"string"},"pageMarkers":{"const":false,"type":"boolean"},"pages":{"const":false,"type":"boolean"},"type":{"const":"pdf","type":"string"}},"required":["type"],"type":"object"}]},"minItems":1,"type":"array"},"profile":{"additionalProperties":false,"description":"Read the page with the cookies and local storage that earlier calls saved under this name, kept for your account for 30 days after the last use. A call with a profile always loads the page in a browser, costs 1 credit, the same as any page, and is never answered from a stored copy. Only one call at a time can save to a profile.","properties":{"name":{"description":"A name you choose, such as shop-login. Calls with the same name share state.","maxLength":128,"minLength":1,"type":"string"},"saveChanges":{"default":true,"description":"Keep the cookies and local storage this read leaves behind for the next call with this name. Send false to read with the profile without changing it.","type":"boolean"}},"required":["name"],"type":"object"},"proxy":{"const":"auto","type":"string"},"redactPII":{"const":false,"type":"boolean"},"removeBase64Images":{"const":true,"type":"boolean"},"skipTlsVerification":{"const":false,"type":"boolean"},"storeInCache":{"default":true,"description":"Send false to neither read nor keep a stored copy of this page.","type":"boolean"},"threatProtection":{"not":{}},"timeout":{"description":"How long to keep trying, in milliseconds, between 10 seconds and 2 minutes. Pages behind a bot check can need 10 to 30 seconds the first time.","maximum":300000,"minimum":1000,"type":"integer"},"toolDetail":{"not":{}},"waitFor":{"description":"Extra milliseconds to wait before reading, up to 60000, for pages that load their content late. To wait for an element, add a wait action with a selector. A read that waits costs 1 credit, the same as any page.","maximum":60000,"minimum":0,"type":"integer"},"zeroDataRetention":{"default":false,"description":"Send true to keep nothing from this call: no stored copy is read or made, and nothing from it is logged. Costs 1 credit more per page. Not with a screenshot.","type":"boolean"}},"type":"object"},"sitemap":{"default":"include","description":"include also uses the site's sitemaps. only reads just the pages the sitemaps name. skip ignores them.","enum":["skip","include","only"],"type":"string"},"url":{"description":"The page to start from, such as https://bun.com/docs.","type":"string"},"webhook":{"additionalProperties":false,"description":"Where to be told about the job: { url } gets a JSON POST when the job starts, for each finished page, and when the job ends. If your address answers slowly, a page event can carry only the page url. Read that page with the status call.","properties":{"events":{"not":{}},"headers":{"not":{}},"metadata":{"not":{}},"url":{"type":"string"}},"required":["url"],"type":"object"},"zeroDataRetention":{"default":false,"description":"Send true to keep nothing from this crawl: no stored copy is read or made, page results are held for one hour at most, and nothing is logged. Costs 1 credit more per page.","type":"boolean"}},"required":["url"],"type":"object"}after
{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"definitions":{"__schema0":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"items":{"allOf":[{"$ref":"#/definitions/__schema0"}]},"type":"array"},{"additionalProperties":{"allOf":[{"$ref":"#/definitions/__schema0"}]},"propertyNames":{"type":"string"},"type":"object"}]},"__schema1":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"items":{"allOf":[{"$ref":"#/definitions/__schema1"}]},"type":"array"},{"additionalProperties":{"allOf":[{"$ref":"#/definitions/__schema1"}]},"propertyNames":{"type":"string"},"type":"object"}]},"__schema2":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"items":{"allOf":[{"$ref":"#/definitions/__schema2"}]},"type":"array"},{"additionalProperties":{"allOf":[{"$ref":"#/definitions/__schema2"}]},"propertyNames":{"type":"string"},"type":"object"}]}},"properties":{"allowExternalLinks":{"const":false,"type":"boolean"},"allowSubdomains":{"default":false,"description":"Also read pages on subdomains, such as docs.bun.com for bun.com.","type":"boolean"},"crawlEntireDomain":{"default":false,"description":"Read the whole site, not only pages under the start page's path.","type":"boolean"},"delay":{"not":{}},"excludePaths":{"default":[],"description":"Skip pages whose path matches one of these regular expressions, such as tag/.*.","items":{"maxLength":200,"minLength":1,"type":"string"},"maxItems":100,"type":"array"},"ignoreQueryParameters":{"default":false,"description":"Treat addresses that differ only in their ?query part as one page.","type":"boolean"},"ignoreRobotsTxt":{"const":false,"type":"boolean"},"includePaths":{"default":[],"description":"Read only pages whose path matches one of these regular expressions, such as blog/.*.","items":{"maxLength":200,"minLength":1,"type":"string"},"maxItems":100,"type":"array"},"limit":{"default":10000,"description":"Stop after reading this many pages in total, across every call.","maximum":10000,"minimum":1,"type":"integer"},"maxConcurrency":{"not":{}},"maxDiscoveryDepth":{"default":3,"description":"How many links away from the start page to go, up to 10.","maximum":10,"minimum":0,"type":"integer"},"prompt":{"description":"What you are looking for, such as sqlite performance. Pages about it are read first, and the crawl stops once new pages stop mentioning it.","maxLength":1000,"minLength":1,"type":"string"},"regexOnFullURL":{"default":false,"description":"Match includePaths and excludePaths against the whole address, not only the path.","type":"boolean"},"robotsUserAgent":{"not":{}},"scrapeOptions":{"additionalProperties":{},"description":"How to read each page, the same options and formats as scrape. Without formats, each page comes back as markdown.","properties":{"actions":{"description":"Up to 50 steps to run on the page, in order, before reading it: { \"type\": \"wait\", \"milliseconds\": 500 } (up to 30 seconds), { \"type\": \"wait\", \"selector\": \".results\" }, { \"type\": \"click\", \"selector\": \"button.more\" }, { \"type\": \"write\", \"text\": \"tides\" }, { \"type\": \"press\", \"key\": \"Enter\" }, { \"type\": \"scroll\", \"direction\": \"down\" } (also up, left or right; amount is pixels, \"viewport\" or \"max\"; maxScrolls 1 to 50; selector scrolls an inner container; \"max\" keeps scrolling until the page stops growing, for feeds that load as you go), { \"type\": \"screenshot\", \"fullPage\": true } (links come back in actions.screenshots), { \"type\": \"scrape\" } (the page at that point, in actions.scrapes), { \"type\": \"executeJavascript\", \"script\": \"document.title\" } (results in actions.javascriptReturns), { \"type\": \"pdf\", \"format\": \"A4\" } (links in actions.pdfs) or { \"type\": \"perform\", \"action\": \"Click the Load more button\" } (a step in plain words, up to 5 browser steps on this page, never leaving the site; at most 5 per call). A read with actions costs 1 credit, the same as any page, and each perform action costs 2 credits more. If an action fails, you still get the page as it stood, with a warning that names the action and says why.","items":{"anyOf":[{"additionalProperties":false,"properties":{"milliseconds":{"maximum":30000,"minimum":1,"type":"integer"},"type":{"const":"wait","type":"string"}},"required":["type","milliseconds"],"type":"object"},{"additionalProperties":false,"properties":{"selector":{"minLength":1,"type":"string"},"type":{"const":"wait","type":"string"}},"required":["type","selector"],"type":"object"},{"additionalProperties":false,"properties":{"all":{"const":false,"type":"boolean"},"selector":{"minLength":1,"type":"string"},"type":{"const":"click","type":"string"}},"required":["type","selector"],"type":"object"},{"additionalProperties":false,"properties":{"text":{"minLength":1,"type":"string"},"type":{"const":"write","type":"string"}},"required":["type","text"],"type":"object"},{"additionalProperties":false,"properties":{"key":{"maxLength":40,"minLength":1,"type":"string"},"type":{"const":"press","type":"string"}},"required":["type","key"],"type":"object"},{"additionalProperties":false,"properties":{"amount":{"anyOf":[{"maximum":100000,"minimum":1,"type":"integer"},{"enum":["viewport","max"],"type":"string"}]},"direction":{"default":"down","enum":["up","down","left","right"],"type":"string"},"maxScrolls":{"maximum":50,"minimum":1,"type":"integer"},"selector":{"minLength":1,"type":"string"},"type":{"const":"scroll","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"fullPage":{"type":"boolean"},"quality":{"maximum":100,"minimum":1,"type":"integer"},"type":{"const":"screenshot","type":"string"},"viewport":{"additionalProperties":false,"properties":{"height":{"maximum":2160,"minimum":200,"type":"integer"},"width":{"maximum":3840,"minimum":200,"type":"integer"}},"required":["width","height"],"type":"object"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"type":{"const":"scrape","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"script":{"maxLength":20000,"minLength":1,"type":"string"},"type":{"const":"executeJavascript","type":"string"}},"required":["type","script"],"type":"object"},{"additionalProperties":false,"properties":{"format":{"enum":["Letter","Legal","Tabloid","Ledger","A0","A1","A2","A3","A4","A5","A6"],"type":"string"},"landscape":{"type":"boolean"},"scale":{"maximum":2,"minimum":0.1,"type":"number"},"type":{"const":"pdf","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"action":{"maxLength":500,"minLength":1,"type":"string"},"type":{"const":"perform","type":"string"}},"required":["type","action"],"type":"object"}]},"maxItems":50,"minItems":1,"type":"array"},"alexandria":{"not":{}},"auditMetadata":{"not":{}},"blockAds":{"const":true,"type":"boolean"},"checkPromptInjection":{"const":false,"type":"boolean"},"domainTools":{"const":false,"type":"boolean"},"excludeTags":{"description":"Remove the parts of the page that match these CSS selectors, such as .comments.","items":{"minLength":1,"type":"string"},"minItems":1,"type":"array"},"formats":{"default":["markdown"],"description":"What to return: markdown (clean page text), summary (a short summary of the page), html (the cleaned page), rawHtml (the page as sent), links (every link on the page), images (every image address), screenshot (a link to a JPEG of the visible page, kept for 7 days), changeTracking (what changed in the markdown since your key last read this page with the same options, kept 30 days) network (the JSON the page loaded while it rendered, up to 30 responses) and branding (the page's colors, fonts, typography, spacing, button and input styles, logo and brand images, read from how the page looks, with a field left out when the page does not show it). Send { \"type\": \"screenshot\", \"fullPage\": true } for the whole page. Send { \"type\": \"highlights\", \"query\": \"refund policy\" } for the passages that best match a query. Send { \"type\": \"json\", \"schema\": { \"type\": \"object\", \"properties\": { \"price\": { \"type\": \"number\" } } } } or { \"type\": \"json\", \"prompt\": \"the price and the stock\" } for fields filled from the page, each checked against it. Send { \"type\": \"json\", \"parser\": \"amazon-product\" } to get a site's own data as json instead of reading the page; GET /v1/parsers lists the parsers. Send { \"type\": \"json\", \"rules\": { \"title\": \"h1\", \"links\": { \"selector\": \"a\", \"type\": \"list\", \"output\": \"@href\" } } } to read the page with CSS rules and no model, at the page's own price. Send { \"type\": \"attributes\", \"selectors\": [{ \"selector\": \"a\", \"attribute\": \"href\" }] } for attribute values, returned in attributes. Without a parser or rules, json needs a schema or a prompt and is filled from the page. json with a schema or a prompt, summary and highlights cost 4 credits more each when they return something. json with rules or a parser, and attributes, cost nothing more. A screenshot, network or branding read costs 1 credit, the same as any page. A PDF comes back as markdown only, and costs 1 credit more for each page read.","items":{"anyOf":[{"enum":["markdown","summary","html","rawHtml","links","images","network","branding","screenshot","changeTracking"],"type":"string"},{"additionalProperties":false,"properties":{"type":{"enum":["markdown","summary","html","rawHtml","links","images","network","branding"],"type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"modes":{"items":{"const":"git-diff","type":"string"},"type":"array"},"prompt":{"not":{}},"schema":{"not":{}},"tag":{"type":"null"},"type":{"const":"changeTracking","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"fullPage":{"default":false,"description":"Capture the whole page from top to bottom instead of the visible part.","type":"boolean"},"quality":{"description":"JPEG quality from 1 to 100. The default is 70.","maximum":100,"minimum":1,"type":"integer"},"type":{"const":"screenshot","type":"string"},"viewport":{"additionalProperties":false,"description":"The window size in pixels, such as { width: 390, height: 844 }.","properties":{"height":{"maximum":2160,"minimum":200,"type":"integer"},"width":{"maximum":3840,"minimum":200,"type":"integer"}},"required":["width","height"],"type":"object"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"count":{"default":5,"description":"How many passages to return, best match first.","maximum":20,"minimum":1,"type":"integer"},"query":{"description":"What you are looking for on the page, such as refund policy.","maxLength":10000,"minLength":1,"type":"string"},"type":{"const":"highlights","type":"string"}},"required":["type","query"],"type":"object"},{"additionalProperties":false,"properties":{"checkPromptInjection":{"const":false,"type":"boolean"},"options":{"additionalProperties":{"$ref":"#/definitions/__schema0"},"description":"Only with parser: extra inputs for it, such as { \"page\": 2 } for the next page of results or { \"minRating\": 4.5 } for a filter. GET /v1/parsers lists what each parser accepts.","propertyNames":{"type":"string"},"type":"object"},"parser":{"description":"Read the page with a named parser, which gives the site's own data as json. The url must be the kind of page the parser reads. Parsers are the only way to read some sites. GET /v1/parsers lists them.","type":"string"},"prompt":{"description":"What to pull from the page in plain words, such as the version and the release date.","maxLength":10000,"minLength":1,"type":"string"},"rules":{"additionalProperties":{"$ref":"#/definitions/__schema2"},"description":"Read the page with CSS rules instead of a model, no extra fee. Each field is a selector such as \"h1\" (the first match's text), \"a@href\" (an attribute) or { \"selector\": \"li\", \"type\": \"list\", \"output\": \"text\" | \"html\" | \"@attribute\" | { nested fields } }. A missing item is null and an unmatched list is []. Relative links become absolute. Up to 100 fields, 5 levels deep. Not with schema, prompt or parser.","propertyNames":{"type":"string"},"type":"object"},"schema":{"additionalProperties":{"$ref":"#/definitions/__schema1"},"description":"The fields to fill, as a JSON Schema (draft-07 or 2020-12) object with properties. Pydantic's model_json_schema() and zod's toJSONSchema() output work as they are. enum, const, anyOf, oneOf, nullable types, $ref with $defs, required, descriptions and any key names are read. Up to 100 top-level fields and 32 KB. A field the page does not state comes back null.","propertyNames":{"type":"string"},"type":"object"},"type":{"const":"json","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"selectors":{"description":"The elements and attributes to read, such as { selector: 'a.buy', attribute: 'href' }.","items":{"additionalProperties":false,"properties":{"attribute":{"maxLength":100,"minLength":1,"type":"string"},"selector":{"minLength":1,"type":"string"}},"required":["selector","attribute"],"type":"object"},"maxItems":50,"minItems":1,"type":"array"},"type":{"const":"attributes","type":"string"}},"required":["type","selectors"],"type":"object"}]},"maxItems":20,"minItems":1,"type":"array"},"headers":{"additionalProperties":{"maxLength":2000,"pattern":"^[\\t\\x20-\\x7e]*$","type":"string"},"description":"Extra request headers to send to the site, such as { \"x-plan\": \"pro\" }. A read with headers is never answered from or saved to a stored copy.","propertyNames":{"pattern":"^[A-Za-z0-9-]{1,64}$","type":"string"},"type":"object"},"includeTags":{"description":"Keep only the parts of the page that match these CSS selectors, such as article or .price. When set, onlyMainContent is not applied.","items":{"minLength":1,"type":"string"},"minItems":1,"type":"array"},"location":{"additionalProperties":false,"description":"Where to read the page from. The default is the United States.","properties":{"country":{"description":"Two-letter country code to read the page from, such as DE or JP.","type":"string"},"languages":{"description":"Languages to ask the site for, best first, such as [\"de\", \"en\"]. Sent as Accept-Language. A read with languages is never answered from or saved to a stored copy.","items":{"pattern":"^[A-Za-z]{2,3}(?:-[A-Za-z0-9]{2,8})*$","type":"string"},"maxItems":5,"minItems":1,"type":"array"}},"type":"object"},"lockdown":{"const":false,"type":"boolean"},"maxAge":{"description":"Accept a stored answer up to this many milliseconds old, at most 30 days. Without it, 2 days, or less for a site whose pages change often, and a copy up to twice that age (at most 7 days) comes back at once as stale while a fresh read runs. 0 always reads the page live. metadata.cacheState says which one you got.","maximum":9007199254740991,"minimum":0,"type":"integer"},"minAge":{"description":"Answer only from a stored copy that is at least this many milliseconds old, and never read the page live. 0 accepts any stored copy. A page with no such copy is notFound.","maximum":9007199254740991,"minimum":0,"type":"integer"},"mobile":{"description":"Read the page as a phone would: a phone-sized screen and the mobile version of the site. The page loads in a browser.","type":"boolean"},"onlyCleanContent":{"const":false,"type":"boolean"},"onlyMainContent":{"default":true,"description":"Keep only the page's main content, without menus, headers, footers and ads.","type":"boolean"},"parsers":{"description":"Only [\"pdf\"] is supported: PDFs are read as markdown.","items":{"anyOf":[{"const":"pdf","type":"string"},{"additionalProperties":false,"properties":{"blocks":{"const":false,"type":"boolean"},"maxPages":{"not":{}},"mode":{"const":"auto","type":"string"},"pageMarkers":{"const":false,"type":"boolean"},"pages":{"const":false,"type":"boolean"},"type":{"const":"pdf","type":"string"}},"required":["type"],"type":"object"}]},"minItems":1,"type":"array"},"profile":{"additionalProperties":false,"description":"Read the page with the cookies and local storage that earlier calls saved under this name, kept for your account for 30 days after the last use. A call with a profile always loads the page in a browser, costs 1 credit, the same as any page, and is never answered from a stored copy. Only one call at a time can save to a profile.","properties":{"name":{"description":"A name you choose, such as shop-login. Calls with the same name share state.","maxLength":128,"minLength":1,"type":"string"},"saveChanges":{"default":true,"description":"Keep the cookies and local storage this read leaves behind for the next call with this name. Send false to read with the profile without changing it.","type":"boolean"}},"required":["name"],"type":"object"},"proxy":{"const":"auto","type":"string"},"redactPII":{"const":false,"type":"boolean"},"removeBase64Images":{"const":true,"type":"boolean"},"skipTlsVerification":{"const":false,"type":"boolean"},"storeInCache":{"default":true,"description":"Send false to neither read nor keep a stored copy of this page.","type":"boolean"},"threatProtection":{"not":{}},"timeout":{"description":"How long to keep trying, in milliseconds, between 10 seconds and 2 minutes. Pages behind a bot check can need 10 to 30 seconds the first time.","maximum":300000,"minimum":1000,"type":"integer"},"toolDetail":{"not":{}},"waitFor":{"description":"Extra milliseconds to wait before reading, up to 60000, for pages that load their content late. To wait for an element, add a wait action with a selector. A read that waits costs 1 credit, the same as any page.","maximum":60000,"minimum":0,"type":"integer"},"zeroDataRetention":{"default":false,"description":"Send true to keep nothing from this call: no stored copy is read or made, and nothing from it is logged. Costs 1 credit more per page. Not with a screenshot.","type":"boolean"}},"type":"object"},"sitemap":{"default":"include","description":"include also uses the site's sitemaps. only reads just the pages the sitemaps name. skip ignores them.","enum":["skip","include","only"],"type":"string"},"url":{"description":"The page to start from, such as https://bun.com/docs.","type":"string"},"webhook":{"additionalProperties":false,"description":"Where to be told about the job: { url } gets a JSON POST when the job starts, for each finished page, and when the job ends. headers are sent with every call, metadata comes back in every call, and events picks which of started, page, completed, failed and cancelled to send (all by default). Every call is signed: read Stophy-Signature (t=<unix seconds>,v1=<hex>), where v1 is the HMAC-SHA256 of \"<t>.<body>\" with your webhook secret from webhook.secret. A call that gets no 2xx is sent again, up to 4 times. If your address answers slowly, a page event can carry only the page url. Read that page with the status call.","properties":{"events":{"items":{"enum":["started","page","completed","failed","cancelled"],"type":"string"},"minItems":1,"type":"array"},"headers":{"additionalProperties":{"maxLength":1000,"type":"string"},"propertyNames":{"pattern":"^[A-Za-z0-9-]{1,64}$","type":"string"},"type":"object"},"metadata":{"additionalProperties":{"$ref":"#/definitions/__schema1"},"propertyNames":{"type":"string"},"type":"object"},"url":{"type":"string"}},"required":["url"],"type":"object"},"zeroDataRetention":{"default":false,"description":"Send true to keep nothing from this crawl: no stored copy is read or made, page results are held for one hour at most, and nothing is logged. Costs 1 credit more per page.","type":"boolean"}},"required":["url"],"type":"object"}before
{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"definitions":{"__schema0":{"anyOf":[{"additionalProperties":{},"properties":{"description":{"maxLength":300,"type":"string"},"type":{"enum":["string","number","integer","boolean"],"type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":{},"properties":{"description":{"maxLength":300,"type":"string"},"items":{"allOf":[{"$ref":"#/definitions/__schema0"}]},"type":{"const":"array","type":"string"}},"required":["type","items"],"type":"object"},{"additionalProperties":{},"properties":{"description":{"maxLength":300,"type":"string"},"properties":{"additionalProperties":{"allOf":[{"$ref":"#/definitions/__schema0"}]},"propertyNames":{"pattern":"^[A-Za-z][A-Za-z0-9_]{0,63}$","type":"string"},"type":"object"},"type":{"const":"object","type":"string"}},"required":["type","properties"],"type":"object"}]},"__schema1":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"items":{"allOf":[{"$ref":"#/definitions/__schema1"}]},"type":"array"},{"additionalProperties":{"allOf":[{"$ref":"#/definitions/__schema1"}]},"propertyNames":{"type":"string"},"type":"object"}]},"__schema2":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"items":{"allOf":[{"$ref":"#/definitions/__schema2"}]},"type":"array"},{"additionalProperties":{"allOf":[{"$ref":"#/definitions/__schema2"}]},"propertyNames":{"type":"string"},"type":"object"}]}},"properties":{"enableWebSearch":{"const":false,"type":"boolean"},"ignoreInvalidURLs":{"default":true,"description":"Skip addresses that are not public website URLs. Send false to refuse the call instead.","type":"boolean"},"ignoreSitemap":{"type":"boolean"},"includeSubdomains":{"type":"boolean"},"prompt":{"description":"What to pull from the pages in plain words, such as the version and the release date.","maxLength":500,"minLength":1,"type":"string"},"schema":{"additionalProperties":{},"description":"The fields to fill, as a JSON Schema object with up to 20 properties. Each is a string, number, integer, boolean, an array, or an object with its own properties, nested up to 4 levels.","properties":{"properties":{"additionalProperties":{"$ref":"#/definitions/__schema0"},"propertyNames":{"pattern":"^[A-Za-z][A-Za-z0-9_]{0,63}$","type":"string"},"type":"object"},"type":{"const":"object","type":"string"}},"required":["type","properties"],"type":"object"},"scrapeOptions":{"additionalProperties":{},"description":"How to read each page, the same options as scrape.","properties":{"actions":{"description":"Up to 50 steps to run on the page, in order, before reading it: { \"type\": \"wait\", \"milliseconds\": 500 } (up to 30 seconds), { \"type\": \"wait\", \"selector\": \".results\" }, { \"type\": \"click\", \"selector\": \"button.more\" }, { \"type\": \"write\", \"text\": \"tides\" }, { \"type\": \"press\", \"key\": \"Enter\" }, { \"type\": \"scroll\", \"direction\": \"down\" } (also up, left or right; amount is pixels, \"viewport\" or \"max\"; maxScrolls 1 to 50; selector scrolls an inner container; \"max\" keeps scrolling until the page stops growing, for feeds that load as you go), { \"type\": \"screenshot\", \"fullPage\": true } (links come back in actions.screenshots), { \"type\": \"scrape\" } (the page at that point, in actions.scrapes), { \"type\": \"executeJavascript\", \"script\": \"document.title\" } (results in actions.javascriptReturns), { \"type\": \"pdf\", \"format\": \"A4\" } (links in actions.pdfs) or { \"type\": \"perform\", \"action\": \"Click the Load more button\" } (a step in plain words, up to 5 browser steps on this page, never leaving the site; at most 5 per call). A read with actions costs 1 credit, the same as any page, and each perform action costs 2 credits more. If an action fails, you still get the page as it stood, with a warning that names the action and says why.","items":{"anyOf":[{"additionalProperties":false,"properties":{"milliseconds":{"maximum":30000,"minimum":1,"type":"integer"},"type":{"const":"wait","type":"string"}},"required":["type","milliseconds"],"type":"object"},{"additionalProperties":false,"properties":{"selector":{"minLength":1,"type":"string"},"type":{"const":"wait","type":"string"}},"required":["type","selector"],"type":"object"},{"additionalProperties":false,"properties":{"all":{"const":false,"type":"boolean"},"selector":{"minLength":1,"type":"string"},"type":{"const":"click","type":"string"}},"required":["type","selector"],"type":"object"},{"additionalProperties":false,"properties":{"text":{"minLength":1,"type":"string"},"type":{"const":"write","type":"string"}},"required":["type","text"],"type":"object"},{"additionalProperties":false,"properties":{"key":{"maxLength":40,"minLength":1,"type":"string"},"type":{"const":"press","type":"string"}},"required":["type","key"],"type":"object"},{"additionalProperties":false,"properties":{"amount":{"anyOf":[{"maximum":100000,"minimum":1,"type":"integer"},{"enum":["viewport","max"],"type":"string"}]},"direction":{"default":"down","enum":["up","down","left","right"],"type":"string"},"maxScrolls":{"maximum":50,"minimum":1,"type":"integer"},"selector":{"minLength":1,"type":"string"},"type":{"const":"scroll","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"fullPage":{"type":"boolean"},"quality":{"maximum":100,"minimum":1,"type":"integer"},"type":{"const":"screenshot","type":"string"},"viewport":{"additionalProperties":false,"properties":{"height":{"maximum":2160,"minimum":200,"type":"integer"},"width":{"maximum":3840,"minimum":200,"type":"integer"}},"required":["width","height"],"type":"object"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"type":{"const":"scrape","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"script":{"maxLength":20000,"minLength":1,"type":"string"},"type":{"const":"executeJavascript","type":"string"}},"required":["type","script"],"type":"object"},{"additionalProperties":false,"properties":{"format":{"enum":["Letter","Legal","Tabloid","Ledger","A0","A1","A2","A3","A4","A5","A6"],"type":"string"},"landscape":{"type":"boolean"},"scale":{"maximum":2,"minimum":0.1,"type":"number"},"type":{"const":"pdf","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"action":{"maxLength":500,"minLength":1,"type":"string"},"type":{"const":"perform","type":"string"}},"required":["type","action"],"type":"object"}]},"maxItems":50,"minItems":1,"type":"array"},"alexandria":{"not":{}},"auditMetadata":{"not":{}},"blockAds":{"const":true,"type":"boolean"},"checkPromptInjection":{"const":false,"type":"boolean"},"domainTools":{"const":false,"type":"boolean"},"excludeTags":{"description":"Remove the parts of the page that match these CSS selectors, such as .comments.","items":{"minLength":1,"type":"string"},"minItems":1,"type":"array"},"formats":{"default":["markdown"],"description":"What to return: markdown (clean page text), summary (a short summary of the page), html (the cleaned page), rawHtml (the page as sent), links (every link on the page), images (every image address), screenshot (a link to a JPEG of the visible page, kept for 7 days), changeTracking (what changed in the markdown since your key last read this page with the same options, kept 30 days) network (the JSON the page loaded while it rendered, up to 30 responses) and branding (the page's colors, fonts, typography, spacing, button and input styles, logo and brand images, read from how the page looks, with a field left out when the page does not show it). Send { \"type\": \"screenshot\", \"fullPage\": true } for the whole page. Send { \"type\": \"highlights\", \"query\": \"refund policy\" } for the passages that best match a query. Send { \"type\": \"json\", \"schema\": { \"type\": \"object\", \"properties\": { \"price\": { \"type\": \"number\" } } } } or { \"type\": \"json\", \"prompt\": \"the price and the stock\" } for fields filled from the page, each checked against it. Send { \"type\": \"json\", \"parser\": \"amazon-product\" } to get a site's own data as json instead of reading the page; GET /v1/parsers lists the parsers. Send { \"type\": \"json\", \"rules\": { \"title\": \"h1\", \"links\": { \"selector\": \"a\", \"type\": \"list\", \"output\": \"@href\" } } } to read the page with CSS rules and no model, at the page's own price. Send { \"type\": \"attributes\", \"selectors\": [{ \"selector\": \"a\", \"attribute\": \"href\" }] } for attribute values, returned in attributes. Without a parser or rules, json needs a schema or a prompt and is filled from the page. json with a schema or a prompt, summary and highlights cost 4 credits more each when they return something. json with rules or a parser, and attributes, cost nothing more. A screenshot, network or branding read costs 1 credit, the same as any page. A PDF comes back as markdown only, and costs 1 credit more for each page read.","items":{"anyOf":[{"enum":["markdown","summary","html","rawHtml","links","images","network","branding","screenshot","changeTracking"],"type":"string"},{"additionalProperties":false,"properties":{"type":{"enum":["markdown","summary","html","rawHtml","links","images","network","branding"],"type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"modes":{"items":{"const":"git-diff","type":"string"},"type":"array"},"prompt":{"not":{}},"schema":{"not":{}},"tag":{"type":"null"},"type":{"const":"changeTracking","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"fullPage":{"default":false,"description":"Capture the whole page from top to bottom instead of the visible part.","type":"boolean"},"quality":{"not":{}},"type":{"const":"screenshot","type":"string"},"viewport":{"not":{}}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"count":{"default":5,"description":"How many passages to return, best match first.","maximum":20,"minimum":1,"type":"integer"},"query":{"description":"What you are looking for on the page, such as refund policy.","maxLength":10000,"minLength":1,"type":"string"},"type":{"const":"highlights","type":"string"}},"required":["type","query"],"type":"object"},{"additionalProperties":false,"properties":{"checkPromptInjection":{"const":false,"type":"boolean"},"options":{"additionalProperties":{"$ref":"#/definitions/__schema1"},"description":"Only with parser: extra inputs for it, such as { \"page\": 2 } for the next page of results or { \"minRating\": 4.5 } for a filter. GET /v1/parsers lists what each parser accepts.","propertyNames":{"type":"string"},"type":"object"},"parser":{"description":"Read the page with a named parser, which gives the site's own data as json. The url must be the kind of page the parser reads. Parsers are the only way to read some sites. GET /v1/parsers lists them.","type":"string"},"prompt":{"description":"What to pull from the page in plain words, such as the version and the release date.","maxLength":10000,"minLength":1,"type":"string"},"rules":{"additionalProperties":{"$ref":"#/definitions/__schema2"},"description":"Read the page with CSS rules instead of a model, no extra fee. Each field is a selector such as \"h1\" (the first match's text), \"a@href\" (an attribute) or { \"selector\": \"li\", \"type\": \"list\", \"output\": \"text\" | \"html\" | \"@attribute\" | { nested fields } }. A missing item is null and an unmatched list is []. Relative links become absolute. Up to 100 fields, 5 levels deep. Not with schema, prompt or parser.","propertyNames":{"type":"string"},"type":"object"},"schema":{"additionalProperties":{},"description":"The fields to fill, as a JSON Schema object with up to 20 properties. Each is a string, number, integer, boolean, an array, or an object with its own properties, nested up to 4 levels.","properties":{"properties":{"additionalProperties":{"$ref":"#/definitions/__schema0"},"propertyNames":{"pattern":"^[A-Za-z][A-Za-z0-9_]{0,63}$","type":"string"},"type":"object"},"type":{"const":"object","type":"string"}},"required":["type","properties"],"type":"object"},"type":{"const":"json","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"selectors":{"description":"The elements and attributes to read, such as { selector: 'a.buy', attribute: 'href' }.","items":{"additionalProperties":false,"properties":{"attribute":{"maxLength":100,"minLength":1,"type":"string"},"selector":{"minLength":1,"type":"string"}},"required":["selector","attribute"],"type":"object"},"maxItems":50,"minItems":1,"type":"array"},"type":{"const":"attributes","type":"string"}},"required":["type","selectors"],"type":"object"}]},"maxItems":20,"minItems":1,"type":"array"},"headers":{"not":{}},"includeTags":{"description":"Keep only the parts of the page that match these CSS selectors, such as article or .price. When set, onlyMainContent is not applied.","items":{"minLength":1,"type":"string"},"minItems":1,"type":"array"},"location":{"additionalProperties":false,"description":"Where to read the page from. The default is the United States.","properties":{"country":{"description":"Two-letter country code to read the page from, such as DE or JP.","type":"string"},"languages":{"not":{}}},"type":"object"},"lockdown":{"const":false,"type":"boolean"},"maxAge":{"description":"Accept a stored answer up to this many milliseconds old, at most 30 days. Without it, 2 days, or less for a site whose pages change often, and a copy up to twice that age (at most 7 days) comes back at once as stale while a fresh read runs. 0 always reads the page live. metadata.cacheState says which one you got.","maximum":9007199254740991,"minimum":0,"type":"integer"},"minAge":{"description":"Answer only from a stored copy that is at least this many milliseconds old, and never read the page live. 0 accepts any stored copy. A page with no such copy is notFound.","maximum":9007199254740991,"minimum":0,"type":"integer"},"mobile":{"const":false,"type":"boolean"},"onlyCleanContent":{"const":false,"type":"boolean"},"onlyMainContent":{"default":true,"description":"Keep only the page's main content, without menus, headers, footers and ads.","type":"boolean"},"parsers":{"description":"Only [\"pdf\"] is supported: PDFs are read as markdown.","items":{"anyOf":[{"const":"pdf","type":"string"},{"additionalProperties":false,"properties":{"blocks":{"const":false,"type":"boolean"},"maxPages":{"not":{}},"mode":{"const":"auto","type":"string"},"pageMarkers":{"const":false,"type":"boolean"},"pages":{"const":false,"type":"boolean"},"type":{"const":"pdf","type":"string"}},"required":["type"],"type":"object"}]},"minItems":1,"type":"array"},"profile":{"additionalProperties":false,"description":"Read the page with the cookies and local storage that earlier calls saved under this name, kept for your account for 30 days after the last use. A call with a profile always loads the page in a browser, costs 1 credit, the same as any page, and is never answered from a stored copy. Only one call at a time can save to a profile.","properties":{"name":{"description":"A name you choose, such as shop-login. Calls with the same name share state.","maxLength":128,"minLength":1,"type":"string"},"saveChanges":{"default":true,"description":"Keep the cookies and local storage this read leaves behind for the next call with this name. Send false to read with the profile without changing it.","type":"boolean"}},"required":["name"],"type":"object"},"proxy":{"const":"auto","type":"string"},"redactPII":{"const":false,"type":"boolean"},"removeBase64Images":{"const":true,"type":"boolean"},"skipTlsVerification":{"const":false,"type":"boolean"},"storeInCache":{"default":true,"description":"Send false to neither read nor keep a stored copy of this page.","type":"boolean"},"threatProtection":{"not":{}},"timeout":{"description":"How long to keep trying, in milliseconds, between 10 seconds and 2 minutes. Pages behind a bot check can need 10 to 30 seconds the first time.","maximum":300000,"minimum":1000,"type":"integer"},"toolDetail":{"not":{}},"waitFor":{"description":"Extra milliseconds to wait before reading, up to 60000, for pages that load their content late. To wait for an element, add a wait action with a selector. A read that waits costs 1 credit, the same as any page.","maximum":60000,"minimum":0,"type":"integer"},"zeroDataRetention":{"default":false,"description":"Send true to keep nothing from this call: no stored copy is read or made, and nothing from it is logged. Costs 1 credit more per page. Not with a screenshot.","type":"boolean"}},"type":"object"},"showSources":{"const":false,"type":"boolean"},"threatProtection":{"not":{}},"urls":{"description":"The pages to read, up to 10, such as [\"https://bun.com/blog/bun-v1.3\"]. With more than one, the fields are filled from all of them together. A page that cannot be read is skipped and named in warning, and costs nothing. The call fails only when no page can be read.","items":{"maxLength":2048,"type":"string"},"maxItems":10,"minItems":1,"type":"array"},"zeroDataRetention":{"default":false,"description":"Send true to keep nothing from this call: pages are read live, the result is held for one hour at most, and nothing is logged. Costs 1 credit more per page.","type":"boolean"}},"required":["urls"],"type":"object"}after
{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"definitions":{"__schema0":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"items":{"allOf":[{"$ref":"#/definitions/__schema0"}]},"type":"array"},{"additionalProperties":{"allOf":[{"$ref":"#/definitions/__schema0"}]},"propertyNames":{"type":"string"},"type":"object"}]},"__schema1":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"items":{"allOf":[{"$ref":"#/definitions/__schema1"}]},"type":"array"},{"additionalProperties":{"allOf":[{"$ref":"#/definitions/__schema1"}]},"propertyNames":{"type":"string"},"type":"object"}]},"__schema2":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"items":{"allOf":[{"$ref":"#/definitions/__schema2"}]},"type":"array"},{"additionalProperties":{"allOf":[{"$ref":"#/definitions/__schema2"}]},"propertyNames":{"type":"string"},"type":"object"}]}},"properties":{"enableWebSearch":{"const":false,"type":"boolean"},"ignoreInvalidURLs":{"default":true,"description":"Skip addresses that are not public website URLs. Send false to refuse the call instead.","type":"boolean"},"ignoreSitemap":{"type":"boolean"},"includeSubdomains":{"type":"boolean"},"prompt":{"description":"What to pull from the pages in plain words, such as the version and the release date.","maxLength":500,"minLength":1,"type":"string"},"schema":{"additionalProperties":{"$ref":"#/definitions/__schema0"},"description":"The fields to fill, as a JSON Schema (draft-07 or 2020-12) object with properties. Pydantic's model_json_schema() and zod's toJSONSchema() output work as they are. enum, const, anyOf, oneOf, nullable types, $ref with $defs, required, descriptions and any key names are read. Up to 100 top-level fields and 32 KB. A field the page does not state comes back null.","propertyNames":{"type":"string"},"type":"object"},"scrapeOptions":{"additionalProperties":{},"description":"How to read each page, the same options as scrape.","properties":{"actions":{"description":"Up to 50 steps to run on the page, in order, before reading it: { \"type\": \"wait\", \"milliseconds\": 500 } (up to 30 seconds), { \"type\": \"wait\", \"selector\": \".results\" }, { \"type\": \"click\", \"selector\": \"button.more\" }, { \"type\": \"write\", \"text\": \"tides\" }, { \"type\": \"press\", \"key\": \"Enter\" }, { \"type\": \"scroll\", \"direction\": \"down\" } (also up, left or right; amount is pixels, \"viewport\" or \"max\"; maxScrolls 1 to 50; selector scrolls an inner container; \"max\" keeps scrolling until the page stops growing, for feeds that load as you go), { \"type\": \"screenshot\", \"fullPage\": true } (links come back in actions.screenshots), { \"type\": \"scrape\" } (the page at that point, in actions.scrapes), { \"type\": \"executeJavascript\", \"script\": \"document.title\" } (results in actions.javascriptReturns), { \"type\": \"pdf\", \"format\": \"A4\" } (links in actions.pdfs) or { \"type\": \"perform\", \"action\": \"Click the Load more button\" } (a step in plain words, up to 5 browser steps on this page, never leaving the site; at most 5 per call). A read with actions costs 1 credit, the same as any page, and each perform action costs 2 credits more. If an action fails, you still get the page as it stood, with a warning that names the action and says why.","items":{"anyOf":[{"additionalProperties":false,"properties":{"milliseconds":{"maximum":30000,"minimum":1,"type":"integer"},"type":{"const":"wait","type":"string"}},"required":["type","milliseconds"],"type":"object"},{"additionalProperties":false,"properties":{"selector":{"minLength":1,"type":"string"},"type":{"const":"wait","type":"string"}},"required":["type","selector"],"type":"object"},{"additionalProperties":false,"properties":{"all":{"const":false,"type":"boolean"},"selector":{"minLength":1,"type":"string"},"type":{"const":"click","type":"string"}},"required":["type","selector"],"type":"object"},{"additionalProperties":false,"properties":{"text":{"minLength":1,"type":"string"},"type":{"const":"write","type":"string"}},"required":["type","text"],"type":"object"},{"additionalProperties":false,"properties":{"key":{"maxLength":40,"minLength":1,"type":"string"},"type":{"const":"press","type":"string"}},"required":["type","key"],"type":"object"},{"additionalProperties":false,"properties":{"amount":{"anyOf":[{"maximum":100000,"minimum":1,"type":"integer"},{"enum":["viewport","max"],"type":"string"}]},"direction":{"default":"down","enum":["up","down","left","right"],"type":"string"},"maxScrolls":{"maximum":50,"minimum":1,"type":"integer"},"selector":{"minLength":1,"type":"string"},"type":{"const":"scroll","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"fullPage":{"type":"boolean"},"quality":{"maximum":100,"minimum":1,"type":"integer"},"type":{"const":"screenshot","type":"string"},"viewport":{"additionalProperties":false,"properties":{"height":{"maximum":2160,"minimum":200,"type":"integer"},"width":{"maximum":3840,"minimum":200,"type":"integer"}},"required":["width","height"],"type":"object"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"type":{"const":"scrape","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"script":{"maxLength":20000,"minLength":1,"type":"string"},"type":{"const":"executeJavascript","type":"string"}},"required":["type","script"],"type":"object"},{"additionalProperties":false,"properties":{"format":{"enum":["Letter","Legal","Tabloid","Ledger","A0","A1","A2","A3","A4","A5","A6"],"type":"string"},"landscape":{"type":"boolean"},"scale":{"maximum":2,"minimum":0.1,"type":"number"},"type":{"const":"pdf","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"action":{"maxLength":500,"minLength":1,"type":"string"},"type":{"const":"perform","type":"string"}},"required":["type","action"],"type":"object"}]},"maxItems":50,"minItems":1,"type":"array"},"alexandria":{"not":{}},"auditMetadata":{"not":{}},"blockAds":{"const":true,"type":"boolean"},"checkPromptInjection":{"const":false,"type":"boolean"},"domainTools":{"const":false,"type":"boolean"},"excludeTags":{"description":"Remove the parts of the page that match these CSS selectors, such as .comments.","items":{"minLength":1,"type":"string"},"minItems":1,"type":"array"},"formats":{"default":["markdown"],"description":"What to return: markdown (clean page text), summary (a short summary of the page), html (the cleaned page), rawHtml (the page as sent), links (every link on the page), images (every image address), screenshot (a link to a JPEG of the visible page, kept for 7 days), changeTracking (what changed in the markdown since your key last read this page with the same options, kept 30 days) network (the JSON the page loaded while it rendered, up to 30 responses) and branding (the page's colors, fonts, typography, spacing, button and input styles, logo and brand images, read from how the page looks, with a field left out when the page does not show it). Send { \"type\": \"screenshot\", \"fullPage\": true } for the whole page. Send { \"type\": \"highlights\", \"query\": \"refund policy\" } for the passages that best match a query. Send { \"type\": \"json\", \"schema\": { \"type\": \"object\", \"properties\": { \"price\": { \"type\": \"number\" } } } } or { \"type\": \"json\", \"prompt\": \"the price and the stock\" } for fields filled from the page, each checked against it. Send { \"type\": \"json\", \"parser\": \"amazon-product\" } to get a site's own data as json instead of reading the page; GET /v1/parsers lists the parsers. Send { \"type\": \"json\", \"rules\": { \"title\": \"h1\", \"links\": { \"selector\": \"a\", \"type\": \"list\", \"output\": \"@href\" } } } to read the page with CSS rules and no model, at the page's own price. Send { \"type\": \"attributes\", \"selectors\": [{ \"selector\": \"a\", \"attribute\": \"href\" }] } for attribute values, returned in attributes. Without a parser or rules, json needs a schema or a prompt and is filled from the page. json with a schema or a prompt, summary and highlights cost 4 credits more each when they return something. json with rules or a parser, and attributes, cost nothing more. A screenshot, network or branding read costs 1 credit, the same as any page. A PDF comes back as markdown only, and costs 1 credit more for each page read.","items":{"anyOf":[{"enum":["markdown","summary","html","rawHtml","links","images","network","branding","screenshot","changeTracking"],"type":"string"},{"additionalProperties":false,"properties":{"type":{"enum":["markdown","summary","html","rawHtml","links","images","network","branding"],"type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"modes":{"items":{"const":"git-diff","type":"string"},"type":"array"},"prompt":{"not":{}},"schema":{"not":{}},"tag":{"type":"null"},"type":{"const":"changeTracking","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"fullPage":{"default":false,"description":"Capture the whole page from top to bottom instead of the visible part.","type":"boolean"},"quality":{"description":"JPEG quality from 1 to 100. The default is 70.","maximum":100,"minimum":1,"type":"integer"},"type":{"const":"screenshot","type":"string"},"viewport":{"additionalProperties":false,"description":"The window size in pixels, such as { width: 390, height: 844 }.","properties":{"height":{"maximum":2160,"minimum":200,"type":"integer"},"width":{"maximum":3840,"minimum":200,"type":"integer"}},"required":["width","height"],"type":"object"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"count":{"default":5,"description":"How many passages to return, best match first.","maximum":20,"minimum":1,"type":"integer"},"query":{"description":"What you are looking for on the page, such as refund policy.","maxLength":10000,"minLength":1,"type":"string"},"type":{"const":"highlights","type":"string"}},"required":["type","query"],"type":"object"},{"additionalProperties":false,"properties":{"checkPromptInjection":{"const":false,"type":"boolean"},"options":{"additionalProperties":{"$ref":"#/definitions/__schema1"},"description":"Only with parser: extra inputs for it, such as { \"page\": 2 } for the next page of results or { \"minRating\": 4.5 } for a filter. GET /v1/parsers lists what each parser accepts.","propertyNames":{"type":"string"},"type":"object"},"parser":{"description":"Read the page with a named parser, which gives the site's own data as json. The url must be the kind of page the parser reads. Parsers are the only way to read some sites. GET /v1/parsers lists them.","type":"string"},"prompt":{"description":"What to pull from the page in plain words, such as the version and the release date.","maxLength":10000,"minLength":1,"type":"string"},"rules":{"additionalProperties":{"$ref":"#/definitions/__schema2"},"description":"Read the page with CSS rules instead of a model, no extra fee. Each field is a selector such as \"h1\" (the first match's text), \"a@href\" (an attribute) or { \"selector\": \"li\", \"type\": \"list\", \"output\": \"text\" | \"html\" | \"@attribute\" | { nested fields } }. A missing item is null and an unmatched list is []. Relative links become absolute. Up to 100 fields, 5 levels deep. Not with schema, prompt or parser.","propertyNames":{"type":"string"},"type":"object"},"schema":{"additionalProperties":{"$ref":"#/definitions/__schema0"},"description":"The fields to fill, as a JSON Schema (draft-07 or 2020-12) object with properties. Pydantic's model_json_schema() and zod's toJSONSchema() output work as they are. enum, const, anyOf, oneOf, nullable types, $ref with $defs, required, descriptions and any key names are read. Up to 100 top-level fields and 32 KB. A field the page does not state comes back null.","propertyNames":{"type":"string"},"type":"object"},"type":{"const":"json","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"selectors":{"description":"The elements and attributes to read, such as { selector: 'a.buy', attribute: 'href' }.","items":{"additionalProperties":false,"properties":{"attribute":{"maxLength":100,"minLength":1,"type":"string"},"selector":{"minLength":1,"type":"string"}},"required":["selector","attribute"],"type":"object"},"maxItems":50,"minItems":1,"type":"array"},"type":{"const":"attributes","type":"string"}},"required":["type","selectors"],"type":"object"}]},"maxItems":20,"minItems":1,"type":"array"},"headers":{"additionalProperties":{"maxLength":2000,"pattern":"^[\\t\\x20-\\x7e]*$","type":"string"},"description":"Extra request headers to send to the site, such as { \"x-plan\": \"pro\" }. A read with headers is never answered from or saved to a stored copy.","propertyNames":{"pattern":"^[A-Za-z0-9-]{1,64}$","type":"string"},"type":"object"},"includeTags":{"description":"Keep only the parts of the page that match these CSS selectors, such as article or .price. When set, onlyMainContent is not applied.","items":{"minLength":1,"type":"string"},"minItems":1,"type":"array"},"location":{"additionalProperties":false,"description":"Where to read the page from. The default is the United States.","properties":{"country":{"description":"Two-letter country code to read the page from, such as DE or JP.","type":"string"},"languages":{"description":"Languages to ask the site for, best first, such as [\"de\", \"en\"]. Sent as Accept-Language. A read with languages is never answered from or saved to a stored copy.","items":{"pattern":"^[A-Za-z]{2,3}(?:-[A-Za-z0-9]{2,8})*$","type":"string"},"maxItems":5,"minItems":1,"type":"array"}},"type":"object"},"lockdown":{"const":false,"type":"boolean"},"maxAge":{"description":"Accept a stored answer up to this many milliseconds old, at most 30 days. Without it, 2 days, or less for a site whose pages change often, and a copy up to twice that age (at most 7 days) comes back at once as stale while a fresh read runs. 0 always reads the page live. metadata.cacheState says which one you got.","maximum":9007199254740991,"minimum":0,"type":"integer"},"minAge":{"description":"Answer only from a stored copy that is at least this many milliseconds old, and never read the page live. 0 accepts any stored copy. A page with no such copy is notFound.","maximum":9007199254740991,"minimum":0,"type":"integer"},"mobile":{"description":"Read the page as a phone would: a phone-sized screen and the mobile version of the site. The page loads in a browser.","type":"boolean"},"onlyCleanContent":{"const":false,"type":"boolean"},"onlyMainContent":{"default":true,"description":"Keep only the page's main content, without menus, headers, footers and ads.","type":"boolean"},"parsers":{"description":"Only [\"pdf\"] is supported: PDFs are read as markdown.","items":{"anyOf":[{"const":"pdf","type":"string"},{"additionalProperties":false,"properties":{"blocks":{"const":false,"type":"boolean"},"maxPages":{"not":{}},"mode":{"const":"auto","type":"string"},"pageMarkers":{"const":false,"type":"boolean"},"pages":{"const":false,"type":"boolean"},"type":{"const":"pdf","type":"string"}},"required":["type"],"type":"object"}]},"minItems":1,"type":"array"},"profile":{"additionalProperties":false,"description":"Read the page with the cookies and local storage that earlier calls saved under this name, kept for your account for 30 days after the last use. A call with a profile always loads the page in a browser, costs 1 credit, the same as any page, and is never answered from a stored copy. Only one call at a time can save to a profile.","properties":{"name":{"description":"A name you choose, such as shop-login. Calls with the same name share state.","maxLength":128,"minLength":1,"type":"string"},"saveChanges":{"default":true,"description":"Keep the cookies and local storage this read leaves behind for the next call with this name. Send false to read with the profile without changing it.","type":"boolean"}},"required":["name"],"type":"object"},"proxy":{"const":"auto","type":"string"},"redactPII":{"const":false,"type":"boolean"},"removeBase64Images":{"const":true,"type":"boolean"},"skipTlsVerification":{"const":false,"type":"boolean"},"storeInCache":{"default":true,"description":"Send false to neither read nor keep a stored copy of this page.","type":"boolean"},"threatProtection":{"not":{}},"timeout":{"description":"How long to keep trying, in milliseconds, between 10 seconds and 2 minutes. Pages behind a bot check can need 10 to 30 seconds the first time.","maximum":300000,"minimum":1000,"type":"integer"},"toolDetail":{"not":{}},"waitFor":{"description":"Extra milliseconds to wait before reading, up to 60000, for pages that load their content late. To wait for an element, add a wait action with a selector. A read that waits costs 1 credit, the same as any page.","maximum":60000,"minimum":0,"type":"integer"},"zeroDataRetention":{"default":false,"description":"Send true to keep nothing from this call: no stored copy is read or made, and nothing from it is logged. Costs 1 credit more per page. Not with a screenshot.","type":"boolean"}},"type":"object"},"showSources":{"const":false,"type":"boolean"},"threatProtection":{"not":{}},"urls":{"description":"The pages to read, up to 10, such as [\"https://bun.com/blog/bun-v1.3\"]. With more than one, the fields are filled from all of them together. A page that cannot be read is skipped and named in warning, and costs nothing. The call fails only when no page can be read.","items":{"maxLength":2048,"type":"string"},"maxItems":10,"minItems":1,"type":"array"},"zeroDataRetention":{"default":false,"description":"Send true to keep nothing from this call: pages are read live, the result is held for one hour at most, and nothing is logged. Costs 1 credit more per page.","type":"boolean"}},"required":["urls"],"type":"object"}⟨224 unchanged words⟩ tripadvisor-place, tripadvisor-reviews, glassdoor-company, glassdoor-reviews, glassdoor-salaries, g2-reviews, zillow-search, zillow-property, realtor-search, realtor-property, booking-search, booking-hotel ⟨27 unchanged words⟩
before
{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"definitions":{"__schema0":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"items":{"allOf":[{"$ref":"#/definitions/__schema0"}]},"type":"array"},{"additionalProperties":{"allOf":[{"$ref":"#/definitions/__schema0"}]},"propertyNames":{"type":"string"},"type":"object"}]},"__schema1":{"anyOf":[{"additionalProperties":{},"properties":{"description":{"maxLength":300,"type":"string"},"type":{"enum":["string","number","integer","boolean"],"type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":{},"properties":{"description":{"maxLength":300,"type":"string"},"items":{"allOf":[{"$ref":"#/definitions/__schema1"}]},"type":{"const":"array","type":"string"}},"required":["type","items"],"type":"object"},{"additionalProperties":{},"properties":{"description":{"maxLength":300,"type":"string"},"properties":{"additionalProperties":{"allOf":[{"$ref":"#/definitions/__schema1"}]},"propertyNames":{"pattern":"^[A-Za-z][A-Za-z0-9_]{0,63}$","type":"string"},"type":"object"},"type":{"const":"object","type":"string"}},"required":["type","properties"],"type":"object"}]},"__schema2":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"items":{"allOf":[{"$ref":"#/definitions/__schema2"}]},"type":"array"},{"additionalProperties":{"allOf":[{"$ref":"#/definitions/__schema2"}]},"propertyNames":{"type":"string"},"type":"object"}]}},"properties":{"actions":{"description":"Up to 50 steps to run on the page, in order, before reading it: { \"type\": \"wait\", \"milliseconds\": 500 } (up to 30 seconds), { \"type\": \"wait\", \"selector\": \".results\" }, { \"type\": \"click\", \"selector\": \"button.more\" }, { \"type\": \"write\", \"text\": \"tides\" }, { \"type\": \"press\", \"key\": \"Enter\" }, { \"type\": \"scroll\", \"direction\": \"down\" } (also up, left or right; amount is pixels, \"viewport\" or \"max\"; maxScrolls 1 to 50; selector scrolls an inner container; \"max\" keeps scrolling until the page stops growing, for feeds that load as you go), { \"type\": \"screenshot\", \"fullPage\": true } (links come back in actions.screenshots), { \"type\": \"scrape\" } (the page at that point, in actions.scrapes), { \"type\": \"executeJavascript\", \"script\": \"document.title\" } (results in actions.javascriptReturns), { \"type\": \"pdf\", \"format\": \"A4\" } (links in actions.pdfs) or { \"type\": \"perform\", \"action\": \"Click the Load more button\" } (a step in plain words, up to 5 browser steps on this page, never leaving the site; at most 5 per call). A read with actions costs 1 credit, the same as any page, and each perform action costs 2 credits more. If an action fails, you still get the page as it stood, with a warning that names the action and says why.","items":{"anyOf":[{"additionalProperties":false,"properties":{"milliseconds":{"maximum":30000,"minimum":1,"type":"integer"},"type":{"const":"wait","type":"string"}},"required":["type","milliseconds"],"type":"object"},{"additionalProperties":false,"properties":{"selector":{"minLength":1,"type":"string"},"type":{"const":"wait","type":"string"}},"required":["type","selector"],"type":"object"},{"additionalProperties":false,"properties":{"all":{"const":false,"type":"boolean"},"selector":{"minLength":1,"type":"string"},"type":{"const":"click","type":"string"}},"required":["type","selector"],"type":"object"},{"additionalProperties":false,"properties":{"text":{"minLength":1,"type":"string"},"type":{"const":"write","type":"string"}},"required":["type","text"],"type":"object"},{"additionalProperties":false,"properties":{"key":{"maxLength":40,"minLength":1,"type":"string"},"type":{"const":"press","type":"string"}},"required":["type","key"],"type":"object"},{"additionalProperties":false,"properties":{"amount":{"anyOf":[{"maximum":100000,"minimum":1,"type":"integer"},{"enum":["viewport","max"],"type":"string"}]},"direction":{"default":"down","enum":["up","down","left","right"],"type":"string"},"maxScrolls":{"maximum":50,"minimum":1,"type":"integer"},"selector":{"minLength":1,"type":"string"},"type":{"const":"scroll","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"fullPage":{"type":"boolean"},"quality":{"maximum":100,"minimum":1,"type":"integer"},"type":{"const":"screenshot","type":"string"},"viewport":{"additionalProperties":false,"properties":{"height":{"maximum":2160,"minimum":200,"type":"integer"},"width":{"maximum":3840,"minimum":200,"type":"integer"}},"required":["width","height"],"type":"object"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"type":{"const":"scrape","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"script":{"maxLength":20000,"minLength":1,"type":"string"},"type":{"const":"executeJavascript","type":"string"}},"required":["type","script"],"type":"object"},{"additionalProperties":false,"properties":{"format":{"enum":["Letter","Legal","Tabloid","Ledger","A0","A1","A2","A3","A4","A5","A6"],"type":"string"},"landscape":{"type":"boolean"},"scale":{"maximum":2,"minimum":0.1,"type":"number"},"type":{"const":"pdf","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"action":{"maxLength":500,"minLength":1,"type":"string"},"type":{"const":"perform","type":"string"}},"required":["type","action"],"type":"object"}]},"maxItems":50,"minItems":1,"type":"array"},"alexandria":{"not":{}},"auditMetadata":{"not":{}},"blockAds":{"const":true,"type":"boolean"},"checkPromptInjection":{"const":false,"type":"boolean"},"domainTools":{"const":false,"type":"boolean"},"excludeTags":{"description":"Remove the parts of the page that match these CSS selectors, such as .comments.","items":{"minLength":1,"type":"string"},"minItems":1,"type":"array"},"formats":{"default":["markdown"],"description":"What to return: markdown (clean page text), summary (a short summary of the page), html (the cleaned page), rawHtml (the page as sent), links (every link on the page), images (every image address), screenshot (a link to a JPEG of the visible page, kept for 7 days), changeTracking (what changed in the markdown since your key last read this page with the same options, kept 30 days) network (the JSON the page loaded while it rendered, up to 30 responses) and branding (the page's colors, fonts, typography, spacing, button and input styles, logo and brand images, read from how the page looks, with a field left out when the page does not show it). Send { \"type\": \"screenshot\", \"fullPage\": true } for the whole page. Send { \"type\": \"highlights\", \"query\": \"refund policy\" } for the passages that best match a query. Send { \"type\": \"json\", \"schema\": { \"type\": \"object\", \"properties\": { \"price\": { \"type\": \"number\" } } } } or { \"type\": \"json\", \"prompt\": \"the price and the stock\" } for fields filled from the page, each checked against it. Send { \"type\": \"json\", \"parser\": \"amazon-product\" } to get a site's own data as json instead of reading the page; GET /v1/parsers lists the parsers. Send { \"type\": \"json\", \"rules\": { \"title\": \"h1\", \"links\": { \"selector\": \"a\", \"type\": \"list\", \"output\": \"@href\" } } } to read the page with CSS rules and no model, at the page's own price. Send { \"type\": \"attributes\", \"selectors\": [{ \"selector\": \"a\", \"attribute\": \"href\" }] } for attribute values, returned in attributes. Without a parser or rules, json needs a schema or a prompt and is filled from the page. json with a schema or a prompt, summary and highlights cost 4 credits more each when they return something. json with rules or a parser, and attributes, cost nothing more. A screenshot, network or branding read costs 1 credit, the same as any page. A PDF comes back as markdown only, and costs 1 credit more for each page read.","items":{"anyOf":[{"enum":["markdown","summary","html","rawHtml","links","images","network","branding","screenshot","changeTracking"],"type":"string"},{"additionalProperties":false,"properties":{"type":{"enum":["markdown","summary","html","rawHtml","links","images","network","branding"],"type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"modes":{"items":{"const":"git-diff","type":"string"},"type":"array"},"prompt":{"not":{}},"schema":{"not":{}},"tag":{"type":"null"},"type":{"const":"changeTracking","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"fullPage":{"default":false,"description":"Capture the whole page from top to bottom instead of the visible part.","type":"boolean"},"quality":{"not":{}},"type":{"const":"screenshot","type":"string"},"viewport":{"not":{}}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"count":{"default":5,"description":"How many passages to return, best match first.","maximum":20,"minimum":1,"type":"integer"},"query":{"description":"What you are looking for on the page, such as refund policy.","maxLength":10000,"minLength":1,"type":"string"},"type":{"const":"highlights","type":"string"}},"required":["type","query"],"type":"object"},{"additionalProperties":false,"properties":{"checkPromptInjection":{"const":false,"type":"boolean"},"options":{"additionalProperties":{"$ref":"#/definitions/__schema0"},"description":"Only with parser: extra inputs for it, such as { \"page\": 2 } for the next page of results or { \"minRating\": 4.5 } for a filter. GET /v1/parsers lists what each parser accepts.","propertyNames":{"type":"string"},"type":"object"},"parser":{"description":"Read the page with a named parser, which gives the site's own data as json. The url must be the kind of page the parser reads. Parsers are the only way to read some sites. GET /v1/parsers lists them.","type":"string"},"prompt":{"description":"What to pull from the page in plain words, such as the version and the release date.","maxLength":10000,"minLength":1,"type":"string"},"rules":{"additionalProperties":{"$ref":"#/definitions/__schema2"},"description":"Read the page with CSS rules instead of a model, no extra fee. Each field is a selector such as \"h1\" (the first match's text), \"a@href\" (an attribute) or { \"selector\": \"li\", \"type\": \"list\", \"output\": \"text\" | \"html\" | \"@attribute\" | { nested fields } }. A missing item is null and an unmatched list is []. Relative links become absolute. Up to 100 fields, 5 levels deep. Not with schema, prompt or parser.","propertyNames":{"type":"string"},"type":"object"},"schema":{"additionalProperties":{},"description":"The fields to fill, as a JSON Schema object with up to 20 properties. Each is a string, number, integer, boolean, an array, or an object with its own properties, nested up to 4 levels.","properties":{"properties":{"additionalProperties":{"$ref":"#/definitions/__schema1"},"propertyNames":{"pattern":"^[A-Za-z][A-Za-z0-9_]{0,63}$","type":"string"},"type":"object"},"type":{"const":"object","type":"string"}},"required":["type","properties"],"type":"object"},"type":{"const":"json","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"selectors":{"description":"The elements and attributes to read, such as { selector: 'a.buy', attribute: 'href' }.","items":{"additionalProperties":false,"properties":{"attribute":{"maxLength":100,"minLength":1,"type":"string"},"selector":{"minLength":1,"type":"string"}},"required":["selector","attribute"],"type":"object"},"maxItems":50,"minItems":1,"type":"array"},"type":{"const":"attributes","type":"string"}},"required":["type","selectors"],"type":"object"}]},"maxItems":20,"minItems":1,"type":"array"},"headers":{"not":{}},"includeTags":{"description":"Keep only the parts of the page that match these CSS selectors, such as article or .price. When set, onlyMainContent is not applied.","items":{"minLength":1,"type":"string"},"minItems":1,"type":"array"},"linkStyle":{"default":"inline","description":"How links appear in the markdown. inline keeps [text](address). numbered writes Pricing⟨3⟩ and lists each address once at the end. none keeps only the link text, which makes link-heavy pages 10 to 70% shorter; ask for the links format to get the addresses.","enum":["inline","numbered","none"],"type":"string"},"location":{"additionalProperties":false,"description":"Where to read the page from. The default is the United States.","properties":{"country":{"description":"Two-letter country code to read the page from, such as DE or JP.","type":"string"},"languages":{"not":{}}},"type":"object"},"lockdown":{"const":false,"type":"boolean"},"maxAge":{"description":"Accept a stored answer up to this many milliseconds old, at most 30 days. Without it, 2 days, or less for a site whose pages change often, and a copy up to twice that age (at most 7 days) comes back at once as stale while a fresh read runs. 0 always reads the page live. metadata.cacheState says which one you got.","maximum":9007199254740991,"minimum":0,"type":"integer"},"maxChars":{"description":"Cut the markdown at this many characters; isTruncated says when that happened.","maximum":1000000,"minimum":500,"type":"integer"},"minAge":{"description":"Answer only from a stored copy that is at least this many milliseconds old, and never read the page live. 0 accepts any stored copy. A page with no such copy is notFound.","maximum":9007199254740991,"minimum":0,"type":"integer"},"mobile":{"const":false,"type":"boolean"},"onlyCleanContent":{"const":false,"type":"boolean"},"onlyMainContent":{"default":true,"description":"Keep only the page's main content, without menus, headers, footers and ads.","type":"boolean"},"parsers":{"description":"Only [\"pdf\"] is supported: PDFs are read as markdown.","items":{"anyOf":[{"const":"pdf","type":"string"},{"additionalProperties":false,"properties":{"blocks":{"const":false,"type":"boolean"},"maxPages":{"not":{}},"mode":{"const":"auto","type":"string"},"pageMarkers":{"const":false,"type":"boolean"},"pages":{"const":false,"type":"boolean"},"type":{"const":"pdf","type":"string"}},"required":["type"],"type":"object"}]},"minItems":1,"type":"array"},"profile":{"additionalProperties":false,"description":"Read the page with the cookies and local storage that earlier calls saved under this name, kept for your account for 30 days after the last use. A call with a profile always loads the page in a browser, costs 1 credit, the same as any page, and is never answered from a stored copy. Only one call at a time can save to a profile.","properties":{"name":{"description":"A name you choose, such as shop-login. Calls with the same name share state.","maxLength":128,"minLength":1,"type":"string"},"saveChanges":{"default":true,"description":"Keep the cookies and local storage this read leaves behind for the next call with this name. Send false to read with the profile without changing it.","type":"boolean"}},"required":["name"],"type":"object"},"proxy":{"const":"auto","type":"string"},"redactPII":{"const":false,"type":"boolean"},"removeBase64Images":{"const":true,"type":"boolean"},"skipTlsVerification":{"const":false,"type":"boolean"},"storeInCache":{"default":true,"description":"Send false to neither read nor keep a stored copy of this page.","type":"boolean"},"threatProtection":{"not":{}},"timeout":{"description":"How long to keep trying, in milliseconds, between 10 seconds and 2 minutes. Pages behind a bot check can need 10 to 30 seconds the first time.","maximum":300000,"minimum":1000,"type":"integer"},"toolDetail":{"not":{}},"url":{"description":"The page or PDF to read, such as https://bun.com/docs.","type":"string"},"urls":{"not":{}},"waitFor":{"description":"Extra milliseconds to wait before reading, up to 60000, for pages that load their content late. To wait for an element, add a wait action with a selector. A read that waits costs 1 credit, the same as any page.","maximum":60000,"minimum":0,"type":"integer"},"zeroDataRetention":{"default":false,"description":"Send true to keep nothing from this call: no stored copy is read or made, and nothing from it is logged. Costs 1 credit more per page. Not with a screenshot.","type":"boolean"}},"required":["url"],"type":"object"}after
{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"definitions":{"__schema0":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"items":{"allOf":[{"$ref":"#/definitions/__schema0"}]},"type":"array"},{"additionalProperties":{"allOf":[{"$ref":"#/definitions/__schema0"}]},"propertyNames":{"type":"string"},"type":"object"}]},"__schema1":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"items":{"allOf":[{"$ref":"#/definitions/__schema1"}]},"type":"array"},{"additionalProperties":{"allOf":[{"$ref":"#/definitions/__schema1"}]},"propertyNames":{"type":"string"},"type":"object"}]},"__schema2":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"items":{"allOf":[{"$ref":"#/definitions/__schema2"}]},"type":"array"},{"additionalProperties":{"allOf":[{"$ref":"#/definitions/__schema2"}]},"propertyNames":{"type":"string"},"type":"object"}]}},"properties":{"actions":{"description":"Up to 50 steps to run on the page, in order, before reading it: { \"type\": \"wait\", \"milliseconds\": 500 } (up to 30 seconds), { \"type\": \"wait\", \"selector\": \".results\" }, { \"type\": \"click\", \"selector\": \"button.more\" }, { \"type\": \"write\", \"text\": \"tides\" }, { \"type\": \"press\", \"key\": \"Enter\" }, { \"type\": \"scroll\", \"direction\": \"down\" } (also up, left or right; amount is pixels, \"viewport\" or \"max\"; maxScrolls 1 to 50; selector scrolls an inner container; \"max\" keeps scrolling until the page stops growing, for feeds that load as you go), { \"type\": \"screenshot\", \"fullPage\": true } (links come back in actions.screenshots), { \"type\": \"scrape\" } (the page at that point, in actions.scrapes), { \"type\": \"executeJavascript\", \"script\": \"document.title\" } (results in actions.javascriptReturns), { \"type\": \"pdf\", \"format\": \"A4\" } (links in actions.pdfs) or { \"type\": \"perform\", \"action\": \"Click the Load more button\" } (a step in plain words, up to 5 browser steps on this page, never leaving the site; at most 5 per call). A read with actions costs 1 credit, the same as any page, and each perform action costs 2 credits more. If an action fails, you still get the page as it stood, with a warning that names the action and says why.","items":{"anyOf":[{"additionalProperties":false,"properties":{"milliseconds":{"maximum":30000,"minimum":1,"type":"integer"},"type":{"const":"wait","type":"string"}},"required":["type","milliseconds"],"type":"object"},{"additionalProperties":false,"properties":{"selector":{"minLength":1,"type":"string"},"type":{"const":"wait","type":"string"}},"required":["type","selector"],"type":"object"},{"additionalProperties":false,"properties":{"all":{"const":false,"type":"boolean"},"selector":{"minLength":1,"type":"string"},"type":{"const":"click","type":"string"}},"required":["type","selector"],"type":"object"},{"additionalProperties":false,"properties":{"text":{"minLength":1,"type":"string"},"type":{"const":"write","type":"string"}},"required":["type","text"],"type":"object"},{"additionalProperties":false,"properties":{"key":{"maxLength":40,"minLength":1,"type":"string"},"type":{"const":"press","type":"string"}},"required":["type","key"],"type":"object"},{"additionalProperties":false,"properties":{"amount":{"anyOf":[{"maximum":100000,"minimum":1,"type":"integer"},{"enum":["viewport","max"],"type":"string"}]},"direction":{"default":"down","enum":["up","down","left","right"],"type":"string"},"maxScrolls":{"maximum":50,"minimum":1,"type":"integer"},"selector":{"minLength":1,"type":"string"},"type":{"const":"scroll","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"fullPage":{"type":"boolean"},"quality":{"maximum":100,"minimum":1,"type":"integer"},"type":{"const":"screenshot","type":"string"},"viewport":{"additionalProperties":false,"properties":{"height":{"maximum":2160,"minimum":200,"type":"integer"},"width":{"maximum":3840,"minimum":200,"type":"integer"}},"required":["width","height"],"type":"object"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"type":{"const":"scrape","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"script":{"maxLength":20000,"minLength":1,"type":"string"},"type":{"const":"executeJavascript","type":"string"}},"required":["type","script"],"type":"object"},{"additionalProperties":false,"properties":{"format":{"enum":["Letter","Legal","Tabloid","Ledger","A0","A1","A2","A3","A4","A5","A6"],"type":"string"},"landscape":{"type":"boolean"},"scale":{"maximum":2,"minimum":0.1,"type":"number"},"type":{"const":"pdf","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"action":{"maxLength":500,"minLength":1,"type":"string"},"type":{"const":"perform","type":"string"}},"required":["type","action"],"type":"object"}]},"maxItems":50,"minItems":1,"type":"array"},"alexandria":{"not":{}},"auditMetadata":{"not":{}},"blockAds":{"const":true,"type":"boolean"},"checkPromptInjection":{"const":false,"type":"boolean"},"domainTools":{"const":false,"type":"boolean"},"excludeTags":{"description":"Remove the parts of the page that match these CSS selectors, such as .comments.","items":{"minLength":1,"type":"string"},"minItems":1,"type":"array"},"formats":{"default":["markdown"],"description":"What to return: markdown (clean page text), summary (a short summary of the page), html (the cleaned page), rawHtml (the page as sent), links (every link on the page), images (every image address), screenshot (a link to a JPEG of the visible page, kept for 7 days), changeTracking (what changed in the markdown since your key last read this page with the same options, kept 30 days) network (the JSON the page loaded while it rendered, up to 30 responses) and branding (the page's colors, fonts, typography, spacing, button and input styles, logo and brand images, read from how the page looks, with a field left out when the page does not show it). Send { \"type\": \"screenshot\", \"fullPage\": true } for the whole page. Send { \"type\": \"highlights\", \"query\": \"refund policy\" } for the passages that best match a query. Send { \"type\": \"json\", \"schema\": { \"type\": \"object\", \"properties\": { \"price\": { \"type\": \"number\" } } } } or { \"type\": \"json\", \"prompt\": \"the price and the stock\" } for fields filled from the page, each checked against it. Send { \"type\": \"json\", \"parser\": \"amazon-product\" } to get a site's own data as json instead of reading the page; GET /v1/parsers lists the parsers. Send { \"type\": \"json\", \"rules\": { \"title\": \"h1\", \"links\": { \"selector\": \"a\", \"type\": \"list\", \"output\": \"@href\" } } } to read the page with CSS rules and no model, at the page's own price. Send { \"type\": \"attributes\", \"selectors\": [{ \"selector\": \"a\", \"attribute\": \"href\" }] } for attribute values, returned in attributes. Without a parser or rules, json needs a schema or a prompt and is filled from the page. json with a schema or a prompt, summary and highlights cost 4 credits more each when they return something. json with rules or a parser, and attributes, cost nothing more. A screenshot, network or branding read costs 1 credit, the same as any page. A PDF comes back as markdown only, and costs 1 credit more for each page read.","items":{"anyOf":[{"enum":["markdown","summary","html","rawHtml","links","images","network","branding","screenshot","changeTracking"],"type":"string"},{"additionalProperties":false,"properties":{"type":{"enum":["markdown","summary","html","rawHtml","links","images","network","branding"],"type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"modes":{"items":{"const":"git-diff","type":"string"},"type":"array"},"prompt":{"not":{}},"schema":{"not":{}},"tag":{"type":"null"},"type":{"const":"changeTracking","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"fullPage":{"default":false,"description":"Capture the whole page from top to bottom instead of the visible part.","type":"boolean"},"quality":{"description":"JPEG quality from 1 to 100. The default is 70.","maximum":100,"minimum":1,"type":"integer"},"type":{"const":"screenshot","type":"string"},"viewport":{"additionalProperties":false,"description":"The window size in pixels, such as { width: 390, height: 844 }.","properties":{"height":{"maximum":2160,"minimum":200,"type":"integer"},"width":{"maximum":3840,"minimum":200,"type":"integer"}},"required":["width","height"],"type":"object"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"count":{"default":5,"description":"How many passages to return, best match first.","maximum":20,"minimum":1,"type":"integer"},"query":{"description":"What you are looking for on the page, such as refund policy.","maxLength":10000,"minLength":1,"type":"string"},"type":{"const":"highlights","type":"string"}},"required":["type","query"],"type":"object"},{"additionalProperties":false,"properties":{"checkPromptInjection":{"const":false,"type":"boolean"},"options":{"additionalProperties":{"$ref":"#/definitions/__schema0"},"description":"Only with parser: extra inputs for it, such as { \"page\": 2 } for the next page of results or { \"minRating\": 4.5 } for a filter. GET /v1/parsers lists what each parser accepts.","propertyNames":{"type":"string"},"type":"object"},"parser":{"description":"Read the page with a named parser, which gives the site's own data as json. The url must be the kind of page the parser reads. Parsers are the only way to read some sites. GET /v1/parsers lists them.","type":"string"},"prompt":{"description":"What to pull from the page in plain words, such as the version and the release date.","maxLength":10000,"minLength":1,"type":"string"},"rules":{"additionalProperties":{"$ref":"#/definitions/__schema2"},"description":"Read the page with CSS rules instead of a model, no extra fee. Each field is a selector such as \"h1\" (the first match's text), \"a@href\" (an attribute) or { \"selector\": \"li\", \"type\": \"list\", \"output\": \"text\" | \"html\" | \"@attribute\" | { nested fields } }. A missing item is null and an unmatched list is []. Relative links become absolute. Up to 100 fields, 5 levels deep. Not with schema, prompt or parser.","propertyNames":{"type":"string"},"type":"object"},"schema":{"additionalProperties":{"$ref":"#/definitions/__schema1"},"description":"The fields to fill, as a JSON Schema (draft-07 or 2020-12) object with properties. Pydantic's model_json_schema() and zod's toJSONSchema() output work as they are. enum, const, anyOf, oneOf, nullable types, $ref with $defs, required, descriptions and any key names are read. Up to 100 top-level fields and 32 KB. A field the page does not state comes back null.","propertyNames":{"type":"string"},"type":"object"},"type":{"const":"json","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"selectors":{"description":"The elements and attributes to read, such as { selector: 'a.buy', attribute: 'href' }.","items":{"additionalProperties":false,"properties":{"attribute":{"maxLength":100,"minLength":1,"type":"string"},"selector":{"minLength":1,"type":"string"}},"required":["selector","attribute"],"type":"object"},"maxItems":50,"minItems":1,"type":"array"},"type":{"const":"attributes","type":"string"}},"required":["type","selectors"],"type":"object"}]},"maxItems":20,"minItems":1,"type":"array"},"headers":{"additionalProperties":{"maxLength":2000,"pattern":"^[\\t\\x20-\\x7e]*$","type":"string"},"description":"Extra request headers to send to the site, such as { \"x-plan\": \"pro\" }. A read with headers is never answered from or saved to a stored copy.","propertyNames":{"pattern":"^[A-Za-z0-9-]{1,64}$","type":"string"},"type":"object"},"includeTags":{"description":"Keep only the parts of the page that match these CSS selectors, such as article or .price. When set, onlyMainContent is not applied.","items":{"minLength":1,"type":"string"},"minItems":1,"type":"array"},"linkStyle":{"default":"inline","description":"How links appear in the markdown. inline keeps [text](address). numbered writes Pricing⟨3⟩ and lists each address once at the end. none keeps only the link text, which makes link-heavy pages 10 to 70% shorter; ask for the links format to get the addresses.","enum":["inline","numbered","none"],"type":"string"},"location":{"additionalProperties":false,"description":"Where to read the page from. The default is the United States.","properties":{"country":{"description":"Two-letter country code to read the page from, such as DE or JP.","type":"string"},"languages":{"description":"Languages to ask the site for, best first, such as [\"de\", \"en\"]. Sent as Accept-Language. A read with languages is never answered from or saved to a stored copy.","items":{"pattern":"^[A-Za-z]{2,3}(?:-[A-Za-z0-9]{2,8})*$","type":"string"},"maxItems":5,"minItems":1,"type":"array"}},"type":"object"},"lockdown":{"const":false,"type":"boolean"},"maxAge":{"description":"Accept a stored answer up to this many milliseconds old, at most 30 days. Without it, 2 days, or less for a site whose pages change often, and a copy up to twice that age (at most 7 days) comes back at once as stale while a fresh read runs. 0 always reads the page live. metadata.cacheState says which one you got.","maximum":9007199254740991,"minimum":0,"type":"integer"},"maxChars":{"description":"Cut the markdown at this many characters; isTruncated says when that happened.","maximum":1000000,"minimum":500,"type":"integer"},"minAge":{"description":"Answer only from a stored copy that is at least this many milliseconds old, and never read the page live. 0 accepts any stored copy. A page with no such copy is notFound.","maximum":9007199254740991,"minimum":0,"type":"integer"},"mobile":{"description":"Read the page as a phone would: a phone-sized screen and the mobile version of the site. The page loads in a browser.","type":"boolean"},"onlyCleanContent":{"const":false,"type":"boolean"},"onlyMainContent":{"default":true,"description":"Keep only the page's main content, without menus, headers, footers and ads.","type":"boolean"},"parsers":{"description":"Only [\"pdf\"] is supported: PDFs are read as markdown.","items":{"anyOf":[{"const":"pdf","type":"string"},{"additionalProperties":false,"properties":{"blocks":{"const":false,"type":"boolean"},"maxPages":{"not":{}},"mode":{"const":"auto","type":"string"},"pageMarkers":{"const":false,"type":"boolean"},"pages":{"const":false,"type":"boolean"},"type":{"const":"pdf","type":"string"}},"required":["type"],"type":"object"}]},"minItems":1,"type":"array"},"profile":{"additionalProperties":false,"description":"Read the page with the cookies and local storage that earlier calls saved under this name, kept for your account for 30 days after the last use. A call with a profile always loads the page in a browser, costs 1 credit, the same as any page, and is never answered from a stored copy. Only one call at a time can save to a profile.","properties":{"name":{"description":"A name you choose, such as shop-login. Calls with the same name share state.","maxLength":128,"minLength":1,"type":"string"},"saveChanges":{"default":true,"description":"Keep the cookies and local storage this read leaves behind for the next call with this name. Send false to read with the profile without changing it.","type":"boolean"}},"required":["name"],"type":"object"},"proxy":{"const":"auto","type":"string"},"redactPII":{"const":false,"type":"boolean"},"removeBase64Images":{"const":true,"type":"boolean"},"skipTlsVerification":{"const":false,"type":"boolean"},"storeInCache":{"default":true,"description":"Send false to neither read nor keep a stored copy of this page.","type":"boolean"},"threatProtection":{"not":{}},"timeout":{"description":"How long to keep trying, in milliseconds, between 10 seconds and 2 minutes. Pages behind a bot check can need 10 to 30 seconds the first time.","maximum":300000,"minimum":1000,"type":"integer"},"toolDetail":{"not":{}},"url":{"description":"The page or PDF to read, such as https://bun.com/docs.","type":"string"},"urls":{"not":{}},"waitFor":{"description":"Extra milliseconds to wait before reading, up to 60000, for pages that load their content late. To wait for an element, add a wait action with a selector. A read that waits costs 1 credit, the same as any page.","maximum":60000,"minimum":0,"type":"integer"},"zeroDataRetention":{"default":false,"description":"Send true to keep nothing from this call: no stored copy is read or made, and nothing from it is logged. Costs 1 credit more per page. Not with a screenshot.","type":"boolean"}},"required":["url"],"type":"object"}{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"definitions":{"__schema0":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"items":{"allOf":[{"$ref":"#/definitions/__schema0"}]},"type":"array"},{"additionalProperties":{"allOf":[{"$ref":"#/definitions/__schema0"}]},"propertyNames":{"type":"string"},"type":"object"}]},"__schema1":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"items":{"allOf":[{"$ref":"#/definitions/__schema1"}]},"type":"array"},{"additionalProperties":{"allOf":[{"$ref":"#/definitions/__schema1"}]},"propertyNames":{"type":"string"},"type":"object"}]},"__schema2":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"items":{"allOf":[{"$ref":"#/definitions/__schema2"}]},"type":"array"},{"additionalProperties":{"allOf":[{"$ref":"#/definitions/__schema2"}]},"propertyNames":{"type":"string"},"type":"object"}]}},"properties":{"categories":{"description":"pdf: ⟨509 unchanged words⟩ best match the query in each description. Add\"markdown\" toformats to getthemorewholefrom each page:textmarkdown,too.html, links, summary or {\"type\":\"json\",\"prompt\":\"the price\"}. Costs 1 more credit for each pageread.read, plus 4 for each summary or json with a schema or prompt that returns something.","properties":{"blockAds":{"const": ⟨16 unchanged words⟩ formats":{"items":{"anyOf":[{"enum":["markdown","highlights","html","links","summary"],"type":"string"},{"additionalProperties":false,"properties":{"type":{"enum":["markdown","highlights","html","links","summary"],"type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"checkPromptInjection":{"const":false,"type":"boolean"},"options":{"additionalProperties":{"$ref":"#/definitions/__schema0"},"description":"Only with parser: extra inputs for it, such as { \"page\": 2 } for the next page of results or { \"minRating\": 4.5 } for a filter. GET /v1/parsers lists what each parser accepts.","propertyNames":{"type":"string"},"type":"object"},"parser":{"description":"Read the page with a named parser, which gives the site's own data as json. The url must be the kind of page the parser reads. Parsers are the only way to read some sites. GET /v1/parsers lists them.","type":"string"},"prompt":{"description":"What to pull from the page in plain words, such as the version and the release date.","maxLength":10000,"minLength":1,"type":"string"},"rules":{"additionalProperties":{"$ref":"#/definitions/__schema2"},"description":"Read the page with CSS rules instead of a model, no extra fee. Each field is a selector such as \"h1\" (the first match's text), \"a@href\" (an attribute) or { \"selector\": \"li\", \"type\": \"list\", \"output\": \"text\" | \"html\" | \"@attribute\" | { nested fields } }. A missing item is null and an unmatched list is []. Relative links become absolute. Up to 100 fields, 5 levels deep. Not with schema, prompt or parser.","propertyNames":{"type":"string"},"type":"object"},"schema":{"additionalProperties":{"$ref":"#/definitions/__schema1"},"description":"The fields to fill, as a JSON Schema (draft-07 or 2020-12) object with properties. Pydantic's model_json_schema() and zod's toJSONSchema() output work as they are. enum, const, anyOf, oneOf, nullable types, $ref with $defs, required, descriptions and any key names are read. Up to 100 top-level fields and 32 KB. A field the page does not state comes back null.","propertyNames":{"type":"string"},"type":"object"},"type":{"const":"json","type":"string"}},"required":[" ⟨245 unchanged words⟩
⟨1777 unchanged words⟩ or less for a site whose pages changeoften.often, and a copy up to twice that age (at most 7 days) comes back at once as stale while a fresh read runs. 0 always reads the page live. metadata.cacheState says ⟨542 unchanged words⟩
⟨1696 unchanged words⟩ or less for a site whose pages changeoften.often, and a copy up to twice that age (at most 7 days) comes back at once as stale while a fresh read runs. 0 always reads the page live. metadata.cacheState says ⟨468 unchanged words⟩
Search the web, news, images, scholarly papers, companies andcompaniespeople in one call. 2 credits per 10 results from eachsource a......
⟨54 unchanged words⟩ like fintech startups in Berlin, 50-200 employees. people: people that match the query, in a people list, best matches first. The query can name a role, company, place or research topic, like CFO of Stripe, founders of fintech startups in Berlin, or researchers on CRISPR base editing. Each person has roles, affiliations and public profile links, never contact details. developer: passages from GitHub READMEs, issues, merged ⟨29 unchanged words⟩ ,"gov","research","pdf","companies","people"],"type":"string"},{"additionalProperties": ⟨5 unchanged words⟩ ,"gov","research","pdf","companies","people"],"type":"string"}},"required": ⟨528 unchanged words⟩ or none when categories asks for research, companies, people or developer.","items":{"anyOf":[ ⟨109 unchanged words⟩
Search the web, news, images, scholarly papers andimagescompanies in one call. 2 credits per 10 results from each source,plus 1 credit for each web re...a...
⟨9 unchanged words⟩ web results that are PDF files. research:webscholarlyresultspapers, in a research list, ranked by relevance then citations. companies: companies that match the query, in a companies list, best matches first. The query can name a place, industry, employee count, founding year and funding stage, like fintech startups in Berlin, 50-200 employees. developer: passages fromacademicGitHubsitesREADMEs,only.issues, merged pull requests, releases, developer docs and API operations, in a developer list; send it as an object to filter by repos, types, language and minStars.","items":{"anyOf":[{"enum":["developer","gov","research","pdf","companies"],"type":"string"},{"additionalProperties": ⟨4 unchanged words⟩ ["developer","gov","research","pdf","companies"],"type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"language":{"description":"Only repositories whose main language is this, like TypeScript.","minLength":1,"type":"string"},"minStars":{"description":"Only repositories with at least this many GitHub stars.","maximum":9007199254740991,"minimum":0,"type":"integer"},"repos":{"default":[],"description":"Only results from these GitHub repositories, as owner/name.","items":{"pattern":"^[\\w.-]+\\/[\\w.-]+$","type":"string"},"maxItems":5,"type":"array"},"type":{"const":"developer","type":"string"},"types":{"default":[],"description":"Only these result types: readme, issue, pull_request, release, operation, doc.","items":{"enum":["readme","issue","pull_request","release","operation","doc"],"type":"string"},"type":"array"}},"required":["type"],"type":"object"}]},"type":"array"},"country":{"description":"Two-letter country to search ⟨414 unchanged words⟩ images. Each is a string or {type}. Default web, or none when categories asks for research, companies or developer.","items":{"anyOf":[{"enum" ⟨108 unchanged words⟩
{"$schema":"http://json-schema.org/draft-07/schema#","examples":[{"id":"youtubeSearchmap"}],"properties":{"id":{"description ⟨12 unchanged words⟩
{"$schema":"http://json-schema.org/draft-07/schema#","examples":[{"query":"recent redditcrawlpostsaaboutdocsbunsite"},{"category":"youtubeweb"}],"properties":{"category":{"description":"Source name, such asreddit or youtube.web.","type":"string"},"query":{"description":"What you want in plain words, such as \"restaurantcrawlreviewsaindocsAustin\site\".","maxLength":200,"type":"string ⟨2 unchanged words⟩
Web Crawl Start — Crawl a website in the background. 1 credit a page, however it is reached. A page that cannot be read costs nothing. ...
Web Extract — Pull the fields you name from any public page as JSON, each checked against the page. $0.01 for most pages: the page'...
Web Map — Scrape the list of pages on a website. 1 credit per call. Input: url, search, sitemap, includeSubdomains, ignoreQuery...
Web Scrape — Scrape any public web page as markdown, HTML, links, a screenshot or JSON. 1 credit for any page, however it is reached. json with a schema or a prompt, summary and highlights add 4 credits each when they return something. CSS rules and attributes add nothing. A PDF adds 1 credit for each page read. Each perform action adds 2 credits. An answer from a stored copy within maxAge is free. A page that comes back with a 404 or 410 status is charged like any page. A page that cannot be read costs nothing. Each page of a urls call is priced on its own. creditsUsed shows what the call cost. To get a …
Search — Search the web, news and images in one call. 2 credits per 10 results from each source, plus 1 credit for each web re...
Optional:Optional. Returns an endpoint's full inputs, filter notes, an example and output fields. Costs nothing.
Use this first when theStartuserhere.wantsSendliveplaindatawordsfromfor theweb: search, video, social, places, jobs, shopping, homes, apps, traveldataoryouads.want. Returnsmatchesendpoints with their inputs, filters and cost, ready for stophy_call. Costs nothing.
⟨18 unchanged words⟩ , homes, apps, travel or ads. Returnsmatching endpointsmatches withwhat eachinputs,returnsfilters anditscost,cost.ready for stophy_call.
{"destructiveHint":false,"idempotentHint":true,"openWorldHint":true,"readOnlyHint":true,"title":"Call a Stophy endpoint"}
{"$schema":"http://json-schema.org/draft-07/schema#","examples":[{"id":"youtubeSearch"}],"properties":{"id":{"description":"Endpoint id fromstophy_search_endpoints, such as youtubeSearch.stophy_search_endpoints.","minLength":1,"type":"string"} ⟨4 unchanged words⟩
{"destructiveHint":false,"idempotentHint":true,"openWorldHint":true,"readOnlyHint":true,"title":"Describe a Stophy endpoint"}
Use this first when the user wants live data from theweb. It covers:web: search·, video(YouTube,transcripts) ·socialTikTok, Instagram, Pinterest, LinkedIn) ·places(Google Maps,Tripadvisor) ·jobs(Upwork,LinkedIn, Indeed) ·shopping(Walmart) · homes (Zillow,Rightmove, ImmoScout24homes,Airbnb) ·apps(App Store,Google Play) ·travel(flights) · ads (Meta, Google, TikTok, LinkedIn, Microsoft, Pinterest). Describe what you need in plain words, like "restaurant reviews inorAustin".ads. Returnsendpoints to choosematchingfrom,endpoints with what each returns and its cost.
{"$schema":"http://json-schema.org/draft-07/schema#","examples":[{"query":"recent reddit posts about bun"},{"category":"youtube"}],"properties":{"category":{"description":"Source ⟨8 unchanged words⟩ ,"query":{"description":"What you want,in plain words, such as \"restaurantreviews\" or \"who is hiringreviewsreactindevelopers\Austin\".","type":"string"}},"type":"object"}
{"destructiveHint":false,"idempotentHint":true,"openWorldHint":true,"readOnlyHint":true,"title":"Find Stophy endpoints"}
⟨11 unchanged words⟩ web. Covers 40+ sites: web (search, news,)any·pageemail (find,contactsverify) · social (Reddit, X, TikTok, ⟨66 unchanged words⟩
after
{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"actions":{"description":"Steps to run on the page before reading it, in order.","items":{"additionalProperties":{},"description":"Objects with a type: wait (milliseconds, selector), click (selector, all), write (text), press (key), scroll (direction, amount, maxScrolls, selector), screenshot (fullPage, quality, viewport), scrape, executeJavascript (script), pdf (format, landscape, scale), perform (action).","properties":{},"type":"object"},"maxItems":50,"minItems":1,"type":"array"},"blockAds":{"description":"Ads and trackers are not loaded when a page runs in a browser.","type":"boolean"},"checkPromptInjection":{"description":"Send true to scan the page text for instructions aimed at an AI model... The scan adds $2.50 per 1,000 pages when it runs; a page it cannot scan fully comes back with a warning and no charge.","type":"boolean"},"excludeTags":{"description":"Remove the parts of the page that match these CSS selectors, such as...","items":{"minLength":1,"type":"string"},"minItems":1,"type":"array"},"fastMode":{"description":"Send true to read the page without opening a browser: the answer...","type":"boolean"},"formats":{"description":"What to return. Each entry is a name, or an object for options and fields.","items":{"anyOf":[{"enum":["markdown","summary","html","rawHtml","rawBase64","links","images","network","branding","audio","video","screenshot","changeTracking","product","menu"],"type":"string"},{"additionalProperties":{},"description":"Objects with a type: changeTracking (modes, schema, prompt, tag), question (question), product, menu, screenshot (fullPage, quality, viewport), highlights (query, count), json (parser, options, schema, prompt, rules, checkPromptInjection), attributes (selectors).","properties":{},"type":"object"}]},"maxItems":20,"minItems":1,"type":"array"},"headers":{"additionalProperties":{"maxLength":2000,"type":"string"},"description":"Extra request headers to send to the site, such as { \"x-plan\": \"pro\"...","properties":{},"type":"object"},"includeTags":{"description":"Keep only the parts of the page that match these CSS selectors, such...","items":{"minLength":1,"type":"string"},"minItems":1,"type":"array"},"linkStyle":{"description":"How links appear in the markdown. inline keeps [text](address)....","enum":["inline","numbered","none"],"type":"string"},"location":{"additionalProperties":false,"description":"Where to read the page from. The default is the United States.","properties":{"country":{"type":"string"},"languages":{"items":{"type":"string"},"maxItems":5,"minItems":1,"type":"array"}},"type":"object"},"lockdown":{"description":"Send true to answer only from a stored copy of the page and never...","type":"boolean"},"maxAge":{"description":"Accept a stored answer up to this many milliseconds old, at most 30...","maximum":9007199254740991,"minimum":0,"type":"integer"},"maxChars":{"description":"Cut the markdown at this many characters; isTruncated says when that...","maximum":1000000,"minimum":500,"type":"integer"},"minAge":{"description":"Answer only from a stored copy that is at least this many...","maximum":9007199254740991,"minimum":0,"type":"integer"},"mobile":{"description":"Read the page as a phone would: a phone-sized screen and the mobile...","type":"boolean"},"offset":{"description":"Start the markdown this many characters into the page, PDF or file.","maximum":9007199254740991,"minimum":0,"type":"integer"},"onlyCleanContent":{"description":"Send true to have a model remove what onlyMainContent leaves behind...","type":"boolean"},"onlyMainContent":{"description":"Keep only the page's main content, without menus, headers, footers...","type":"boolean"},"parsers":{"description":"Only the pdf parser exists. Send \"pdf\" or { \"type\": \"pdf\", mode... Each page of text that comes back costs $0.50 per 1,000 pages from its text layer and $2.50 per 1,000 pages from its picture.","items":{"anyOf":[{"const":"pdf","type":"string"},{"additionalProperties":{},"description":"Objects with a type: pdf (mode, maxPages, pages, blocks, pageMarkers).","properties":{},"type":"object"}]},"minItems":1,"type":"array"},"profile":{"additionalProperties":false,"description":"Read the page with the cookies and local storage that earlier calls... A call with a profile always loads the page in a browser, costs $1 per 1,000 pages, the same as any page, and is never answered from a stored copy.","properties":{"name":{"maxLength":128,"minLength":1,"type":"string"},"saveChanges":{"type":"boolean"}},"required":["name"],"type":"object"},"proxy":{"description":"auto: basic first, enhanced once if the site refuses. basic: one...","enum":["auto","basic","enhanced","stealth"],"type":"string"},"query":{"description":"What you are looking for on the page, such as refund window.","maxLength":10000,"minLength":1,"type":"string"},"redactPII":{"anyOf":[{"type":"boolean"},{"additionalProperties":{},"properties":{},"type":"object"}],"description":"Send true, or { mode, entities, replaceStyle }, to hide personal data in the markdown and what is made from it."},"removeBase64Images":{"description":"Images inside the page that carry their data in the address...","type":"boolean"},"skipTlsVerification":{"description":"Send true to read a page whose certificate is expired, self-signed or...","type":"boolean"},"storeInCache":{"description":"Send false to neither read nor keep a stored copy of this page.","type":"boolean"},"timeout":{"description":"How long to keep trying, in milliseconds, from 1 second to 5 minutes...","maximum":300000,"minimum":1000,"type":"integer"},"url":{"description":"The page or PDF to read, such as https://bun.com/docs.","type":"string"},"urls":{"not":{}},"waitFor":{"description":"Extra milliseconds to wait before reading, up to 60000, for pages... A read that waits costs $1 per 1,000 pages, the same as any page.","maximum":60000,"minimum":0,"type":"integer"},"zeroDataRetention":{"description":"Send true to keep nothing from this call: no stored copy is read or... Adds $2 per 1,000 pages.","type":"boolean"}},"required":["url"],"type":"object"}after
{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"definitions":{"__schema0":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"items":{"allOf":[{"$ref":"#/definitions/__schema0"}]},"type":"array"},{"additionalProperties":{"allOf":[{"$ref":"#/definitions/__schema0"}]},"propertyNames":{"type":"string"},"type":"object"}]},"__schema1":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"items":{"allOf":[{"$ref":"#/definitions/__schema1"}]},"type":"array"},{"additionalProperties":{"allOf":[{"$ref":"#/definitions/__schema1"}]},"propertyNames":{"type":"string"},"type":"object"}]},"__schema2":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"items":{"allOf":[{"$ref":"#/definitions/__schema2"}]},"type":"array"},{"additionalProperties":{"allOf":[{"$ref":"#/definitions/__schema2"}]},"propertyNames":{"type":"string"},"type":"object"}]}},"properties":{"actions":{"description":"Up to 50 steps to run on the page, in order, before reading it: { \"type\": \"wait\", \"milliseconds\": 500 } (up to 60 seconds), { \"type\": \"wait\", \"selector\": \".results\" }, { \"type\": \"click\", \"selector\": \"button.more\" }, { \"type\": \"write\", \"text\": \"tides\" }, { \"type\": \"press\", \"key\": \"Enter\" }, { \"type\": \"scroll\", \"direction\": \"down\" } (also up, left or right; amount is pixels, \"viewport\" or \"max\"; maxScrolls 1 to 50; selector scrolls an inner container; \"max\" keeps scrolling until the page stops growing, for feeds that load as you go), { \"type\": \"screenshot\", \"fullPage\": true } (links come back in actions.screenshots), { \"type\": \"scrape\" } (the page at that point, in actions.scrapes), { \"type\": \"executeJavascript\", \"script\": \"document.title\" } (results in actions.javascriptReturns), { \"type\": \"pdf\", \"format\": \"A4\" } (links in actions.pdfs) or { \"type\": \"perform\", \"action\": \"Click the Load more button\" } (a step in plain words, up to 5 browser steps on this page, never leaving the site; at most 5 per call). A read with actions costs $2 per 1,000 pages, the same as any page; the actions themselves add nothing. If an action fails, you still get the page as it stood, with a warning that names the action and says why.","items":{"anyOf":[{"additionalProperties":false,"properties":{"milliseconds":{"maximum":60000,"minimum":1,"type":"integer"},"type":{"const":"wait","type":"string"}},"required":["type","milliseconds"],"type":"object"},{"additionalProperties":false,"properties":{"selector":{"minLength":1,"type":"string"},"type":{"const":"wait","type":"string"}},"required":["type","selector"],"type":"object"},{"additionalProperties":false,"properties":{"all":{"const":false,"type":"boolean"},"selector":{"minLength":1,"type":"string"},"type":{"const":"click","type":"string"}},"required":["type","selector"],"type":"object"},{"additionalProperties":false,"properties":{"text":{"minLength":1,"type":"string"},"type":{"const":"write","type":"string"}},"required":["type","text"],"type":"object"},{"additionalProperties":false,"properties":{"key":{"maxLength":40,"minLength":1,"type":"string"},"type":{"const":"press","type":"string"}},"required":["type","key"],"type":"object"},{"additionalProperties":false,"properties":{"amount":{"anyOf":[{"maximum":100000,"minimum":1,"type":"integer"},{"enum":["viewport","max"],"type":"string"}]},"direction":{"default":"down","enum":["up","down","left","right"],"type":"string"},"maxScrolls":{"maximum":50,"minimum":1,"type":"integer"},"selector":{"minLength":1,"type":"string"},"type":{"const":"scroll","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"fullPage":{"type":"boolean"},"quality":{"maximum":100,"minimum":1,"type":"integer"},"type":{"const":"screenshot","type":"string"},"viewport":{"additionalProperties":false,"properties":{"height":{"maximum":2160,"minimum":200,"type":"integer"},"width":{"maximum":3840,"minimum":200,"type":"integer"}},"required":["width","height"],"type":"object"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"type":{"const":"scrape","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"script":{"maxLength":20000,"minLength":1,"type":"string"},"type":{"const":"executeJavascript","type":"string"}},"required":["type","script"],"type":"object"},{"additionalProperties":false,"properties":{"format":{"enum":["Letter","Legal","Tabloid","Ledger","A0","A1","A2","A3","A4","A5","A6"],"type":"string"},"landscape":{"type":"boolean"},"scale":{"maximum":2,"minimum":0.1,"type":"number"},"type":{"const":"pdf","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"action":{"maxLength":500,"minLength":1,"type":"string"},"type":{"const":"perform","type":"string"}},"required":["type","action"],"type":"object"}]},"maxItems":50,"minItems":1,"type":"array"},"blockAds":{"description":"Ads and trackers are not loaded when a page runs in a browser. Send false to load them.","type":"boolean"},"checkPromptInjection":{"description":"Send true to scan the page text for instructions aimed at an AI model before anything is built from it. A page that has them is refused with 403 promptInjectionDetected and costs nothing. The scan adds $8 per 1,000 pages when it runs; a page it cannot scan fully comes back with a warning and no charge.","type":"boolean"},"excludeTags":{"description":"Remove the parts of the page that match these CSS selectors, such as .comments.","items":{"minLength":1,"type":"string"},"minItems":1,"type":"array"},"fastMode":{"description":"Send true to read the page without opening a browser: the answer comes sooner, but a page that needs a browser, or that refuses a plain request, comes back as an error instead of being retried. Ignored when the call needs a browser (actions, screenshot, waitFor, mobile, profile, network, branding).","type":"boolean"},"formats":{"default":["markdown"],"description":"What to return: markdown (clean page text), summary (a short summary of the page), html (the cleaned page), rawHtml (the page as sent), audio and video (for a YouTube link: the audio track as an M4A file, or the video as an MP4 file, as a link that works for 1 hour), rawBase64 (the bytes the site sent, Base64 encoded, from a live read; metadata.contentType says what they are), links (every link on the page), images (every image address), screenshot (a link to a JPEG of the visible page, kept for 7 days), changeTracking (what changed in the markdown since your key last read this page with the same options, kept 30 days; add modes [\"git-diff\",\"json\"] with a schema or prompt to compare fields too), question (send { \"type\": \"question\", \"question\": \"...\" } to get answer, null when the page does not state one), product (title, brand, category, url, description and variants with price, sale, availability and images, or null) and menu (merchant, currency and sections of items with prices, or null) network (the JSON the page loaded while it rendered, up to 30 responses) and branding (the page's colors, fonts, typography, spacing, button and input styles, logo and brand images, read from how the page looks, with a field left out when the page does not show it). Send { \"type\": \"screenshot\", \"fullPage\": true } for the whole page. Send { \"type\": \"highlights\", \"query\": \"refund policy\" } for the passages that best match a query. Send { \"type\": \"json\", \"schema\": { \"type\": \"object\", \"properties\": { \"price\": { \"type\": \"number\" } } } } or { \"type\": \"json\", \"prompt\": \"the price and the stock\" } for fields filled from the page, each checked against it. Send { \"type\": \"json\", \"parser\": \"amazon-product\" } to get a site's own data as json instead of reading the page; GET /v1/parsers lists the parsers. Send { \"type\": \"json\", \"rules\": { \"title\": \"h1\", \"links\": { \"selector\": \"a\", \"type\": \"list\", \"output\": \"@href\" } } } to read the page with CSS rules and no model, at the page's own price. Send { \"type\": \"attributes\", \"selectors\": [{ \"selector\": \"a\", \"attribute\": \"href\" }] } for attribute values, returned in attributes. Without a parser or rules, json needs a schema or a prompt and is filled from the page. json with a schema or a prompt, summary, highlights, question, product, menu and changeTracking in json mode add $8 per 1,000 pages each when they return something. json with rules or a parser, and attributes, cost nothing more. A screenshot, network or branding read costs $2 per 1,000 pages, the same as any page. A PDF comes back as markdown only, and adds $2 per 1,000 pages of text that comes back. A CSV or an Excel .xlsx file comes back as markdown tables.","items":{"anyOf":[{"enum":["markdown","summary","html","rawHtml","rawBase64","links","images","network","branding","audio","video","screenshot","changeTracking","product","menu"],"type":"string"},{"additionalProperties":false,"properties":{"type":{"enum":["markdown","summary","html","rawHtml","rawBase64","links","images","network","branding","audio","video"],"type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"modes":{"description":"git-diff returns a unified diff of the markdown. json compares the fields in schema or prompt between this read and the last one. Without modes you get git-diff.","items":{"enum":["git-diff","json"],"type":"string"},"maxItems":2,"type":"array"},"prompt":{"description":"With json mode: what to compare, in plain words, such as the price and stock.","maxLength":10000,"minLength":1,"type":"string"},"schema":{"additionalProperties":{"$ref":"#/definitions/__schema0"},"description":"The fields to fill, as a JSON Schema (draft-07 or 2020-12) object with properties. Pydantic's model_json_schema() and zod's toJSONSchema() output work as they are. enum, const, anyOf, oneOf, nullable types, $ref with $defs, required, descriptions and any key names are read. Up to 100 top-level fields and 32 KB. A field the page does not state comes back null.","propertyNames":{"type":"string"},"type":"object"},"tag":{"type":"null"},"type":{"const":"changeTracking","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"question":{"description":"A question to answer from the page, such as what the refund window is.","maxLength":10000,"minLength":1,"type":"string"},"type":{"const":"question","type":"string"}},"required":["type","question"],"type":"object"},{"additionalProperties":false,"properties":{"type":{"const":"product","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"type":{"const":"menu","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"fullPage":{"default":false,"description":"Capture the whole page from top to bottom instead of the visible part.","type":"boolean"},"quality":{"description":"JPEG quality from 1 to 100. The default is 70.","maximum":100,"minimum":1,"type":"integer"},"type":{"const":"screenshot","type":"string"},"viewport":{"additionalProperties":false,"description":"The window size in pixels, such as { width: 390, height: 844 }.","properties":{"height":{"maximum":2160,"minimum":200,"type":"integer"},"width":{"maximum":3840,"minimum":200,"type":"integer"}},"required":["width","height"],"type":"object"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"count":{"default":5,"description":"How many passages to return, best match first.","maximum":20,"minimum":1,"type":"integer"},"query":{"description":"What you are looking for on the page, such as refund policy.","maxLength":10000,"minLength":1,"type":"string"},"type":{"const":"highlights","type":"string"}},"required":["type","query"],"type":"object"},{"additionalProperties":false,"properties":{"checkPromptInjection":{"description":"Deprecated: send checkPromptInjection at the top level of the call.","type":"boolean"},"options":{"additionalProperties":{"$ref":"#/definitions/__schema1"},"description":"Only with parser: extra inputs for it, such as { \"page\": 2 } for the next page of results or { \"minRating\": 4.5 } for a filter. GET /v1/parsers lists what each parser accepts.","propertyNames":{"type":"string"},"type":"object"},"parser":{"description":"Read the page with a named parser, which gives the site's own data as json. The url must be the kind of page the parser reads. Parsers are the only way to read some sites. GET /v1/parsers lists them.","type":"string"},"prompt":{"description":"What to pull from the page in plain words, such as the version and the release date.","maxLength":10000,"minLength":1,"type":"string"},"rules":{"additionalProperties":{"$ref":"#/definitions/__schema2"},"description":"Read the page with CSS rules instead of a model, no extra fee. Each field is a selector such as \"h1\" (the first match's text), \"a@href\" (an attribute) or { \"selector\": \"li\", \"type\": \"list\", \"output\": \"text\" | \"html\" | \"@attribute\" | { nested fields } }. A missing item is null and an unmatched list is []. Relative links become absolute. Up to 100 fields, 5 levels deep. Not with schema, prompt or parser.","propertyNames":{"type":"string"},"type":"object"},"schema":{"additionalProperties":{"$ref":"#/definitions/__schema0"},"description":"The fields to fill, as a JSON Schema (draft-07 or 2020-12) object with properties. Pydantic's model_json_schema() and zod's toJSONSchema() output work as they are. enum, const, anyOf, oneOf, nullable types, $ref with $defs, required, descriptions and any key names are read. Up to 100 top-level fields and 32 KB. A field the page does not state comes back null.","propertyNames":{"type":"string"},"type":"object"},"type":{"const":"json","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"selectors":{"description":"The elements and attributes to read, such as { selector: 'a.buy', attribute: 'href' }.","items":{"additionalProperties":false,"properties":{"attribute":{"maxLength":100,"minLength":1,"type":"string"},"selector":{"minLength":1,"type":"string"}},"required":["selector","attribute"],"type":"object"},"maxItems":50,"minItems":1,"type":"array"},"type":{"const":"attributes","type":"string"}},"required":["type","selectors"],"type":"object"}]},"maxItems":20,"minItems":1,"type":"array"},"headers":{"additionalProperties":{"maxLength":2000,"pattern":"^[\\t\\x20-\\x7e]*$","type":"string"},"description":"Extra request headers to send to the site, such as { \"x-plan\": \"pro\" }. A read with headers is never answered from or saved to a stored copy.","propertyNames":{"pattern":"^[A-Za-z0-9-]{1,64}$","type":"string"},"type":"object"},"includeTags":{"description":"Keep only the parts of the page that match these CSS selectors, such as article or .price. When set, onlyMainContent is not applied.","items":{"minLength":1,"type":"string"},"minItems":1,"type":"array"},"linkStyle":{"default":"inline","description":"How links appear in the markdown. inline keeps [text](address). numbered writes Pricing⟨3⟩ and lists each address once at the end. none keeps only the link text, which makes link-heavy pages 10 to 70% shorter; ask for the links format to get the addresses.","enum":["inline","numbered","none"],"type":"string"},"location":{"additionalProperties":false,"description":"Where to read the page from. The default is the United States.","properties":{"country":{"description":"Two-letter country code to read the page from, such as DE or JP.","type":"string"},"languages":{"description":"Languages to ask the site for, best first, such as [\"de\", \"en\"]. Sent as Accept-Language. A read with languages is never answered from or saved to a stored copy.","items":{"pattern":"^[A-Za-z]{2,3}(?:-[A-Za-z0-9]{2,8})*$","type":"string"},"maxItems":5,"minItems":1,"type":"array"}},"type":"object"},"lockdown":{"description":"Send true to answer only from a stored copy of the page and never read it live, whatever its age. A page with no stored copy is notFound. The same as minAge 0.","type":"boolean"},"maxAge":{"description":"Accept a stored answer up to this many milliseconds old, at most 30 days. Without it, 2 days, or less for a site whose pages change often, and a copy up to twice that age (at most 7 days) comes back at once as stale while a fresh read runs. 0 always reads the page live. metadata.cacheState says which one you got.","maximum":9007199254740991,"minimum":0,"type":"integer"},"maxChars":{"description":"Cut the markdown at this many characters; isTruncated says when that happened and nextOffset where to read on. With query, how much of the page to keep, 8000 by default.","maximum":1000000,"minimum":500,"type":"integer"},"minAge":{"description":"Answer only from a stored copy that is at least this many milliseconds old, and never read the page live. 0 accepts any stored copy. A page with no such copy is notFound.","maximum":9007199254740991,"minimum":0,"type":"integer"},"mobile":{"description":"Read the page as a phone would: a phone-sized screen and the mobile version of the site. The page loads in a browser.","type":"boolean"},"offset":{"description":"Start the markdown this many characters into the page, PDF or file. Send the nextOffset of the last answer, with the same maxChars, to read on. Not with query.","maximum":9007199254740991,"minimum":0,"type":"integer"},"onlyCleanContent":{"description":"Send true to have a model remove what onlyMainContent leaves behind in the markdown: cookie banners, ads, share widgets, breadcrumbs, sign-up prompts, comment prompts and related-article lists. It only removes whole paragraphs and lists; it never rewrites or adds text, and code blocks are always kept. Skipped with a warning when the page is too long to clean or the model does not answer. Not with zeroDataRetention. Summary, answers and highlights are made from the cleaned markdown.","type":"boolean"},"onlyMainContent":{"default":true,"description":"Keep only the page's main content, without menus, headers, footers and ads.","type":"boolean"},"parsers":{"description":"Only the pdf parser exists. Send \"pdf\" or { \"type\": \"pdf\", mode, maxPages, pages, blocks, pageMarkers } with the same meaning as in parse. Without mode a PDF is read as auto: from its text layer, and from the picture of any page that has no text. fast reads the text layer only, and ocr reads the picture of every page, up to 20 pages. Each page of text that comes back costs $2 per 1,000 pages. Pictures are read only with an API key.","items":{"anyOf":[{"const":"pdf","type":"string"},{"additionalProperties":false,"properties":{"blocks":{"description":"Send true to also get the page's layout in blocks: each title, section header or run of text, with its page, reading order, position on the page (bbox as left, top, right, bottom from 0 to 1) and where its text sits in that page's markdown (span, as in pages). Tables, figures and formulas are not told apart. A page read from its picture is one block. No extra charge.","type":"boolean"},"maxPages":{"description":"Read at most this many pages, up to 500, which is also the default.","maximum":500,"minimum":1,"type":"integer"},"mode":{"description":"fast reads the text layer only. auto (the default) reads the text layer and reads the picture of any page that has none. ocr reads the picture of every page.","enum":["fast","auto","ocr"],"type":"string"},"pageMarkers":{"description":"Send true to mark page breaks in the markdown: pages are joined with \"---\" and a line, where N is the page that follows. No extra charge.","type":"boolean"},"pages":{"description":"Send true to also get each page's markdown in pages, as { pageNumber, markdown }. No extra charge.","type":"boolean"},"type":{"const":"pdf","type":"string"}},"required":["type"],"type":"object"}]},"minItems":1,"type":"array"},"profile":{"additionalProperties":false,"description":"Read the page with the cookies and local storage that earlier calls saved under this name, kept for your account for 30 days after the last use. A call with a profile always loads the page in a browser, costs $2 per 1,000 pages, the same as any page, and is never answered from a stored copy. Only one call at a time can save to a profile.","properties":{"name":{"description":"A name you choose, such as shop-login. Calls with the same name share state.","maxLength":128,"minLength":1,"type":"string"},"saveChanges":{"default":true,"description":"Keep the cookies and local storage this read leaves behind for the next call with this name. Send false to read with the profile without changing it.","type":"boolean"}},"required":["name"],"type":"object"},"proxy":{"description":"auto: basic first, enhanced once if the site refuses. basic: one plain attempt. enhanced: the stronger read from the start. stealth is the same as enhanced. Same price.","enum":["auto","basic","enhanced","stealth"],"type":"string"},"query":{"description":"What you are looking for on the page, such as refund window. A page longer than maxChars (8000 by default) comes back as the passages that match, in page order, each with the text around it and its table header; a shorter page comes back whole. Costs nothing extra, and a PDF is charged for the share of its pages that comes back. Not with offset.","maxLength":10000,"minLength":1,"type":"string"},"redactPII":{"anyOf":[{"type":"boolean"},{"additionalProperties":false,"description":"Options for redactPII.","properties":{"entities":{"default":["PERSON","EMAIL","PHONE","LOCATION","FINANCIAL","SECRET"],"description":"What to hide: PERSON, EMAIL, PHONE, LOCATION, FINANCIAL, SECRET. All by default.","items":{"enum":["PERSON","EMAIL","PHONE","LOCATION","FINANCIAL","SECRET"],"type":"string"},"minItems":1,"type":"array"},"mode":{"default":"accurate","description":"accurate finds names and places with the model and the rest by pattern. aggressive adds guesses that catch more and may hide a little too much. fast uses patterns only, so it finds no ordinary names or places.","enum":["accurate","aggressive","fast"],"type":"string"},"replaceStyle":{"default":"tag","description":"tag writes <EMAIL>, mask writes * for each character, remove deletes it.","enum":["tag","mask","remove"],"type":"string"}},"type":"object"}],"description":"Send true, or an object, to hide personal data in the markdown and in everything made from it (summary, answers, highlights, json). Links, html and rawHtml are not changed. A page the model cannot scan is refused rather than returned unredacted."},"removeBase64Images":{"description":"Images inside the page that carry their data in the address (data:image) are dropped by default. Send false to keep them in markdown and html.","type":"boolean"},"skipTlsVerification":{"description":"Send true to read a page whose certificate is expired, self-signed or for another name. The read is not private against someone between us and the site.","type":"boolean"},"storeInCache":{"default":true,"description":"Send false to neither read nor keep a stored copy of this page.","type":"boolean"},"timeout":{"default":60000,"description":"How long to keep trying, in milliseconds, from 1 second to 5 minutes; 60 seconds by default. A page that needs a browser needs at least 5 seconds, and pages behind a bot check can need 10 to 30 seconds the first time. A read that runs out of time is an error and costs nothing.","maximum":300000,"minimum":1000,"type":"integer"},"url":{"description":"The page or PDF to read, such as https://bun.com/docs.","type":"string"},"urls":{"not":{}},"waitFor":{"description":"Extra milliseconds to wait before reading, up to 60000, for pages that load their content late. To wait for an element, add a wait action with a selector. A read that waits costs $2 per 1,000 pages, the same as any page.","maximum":60000,"minimum":0,"type":"integer"},"zeroDataRetention":{"default":false,"description":"Send true to keep nothing from this call: no stored copy is read or made, and nothing from it is logged. Adds $2 per 1,000 pages. Not with a screenshot.","type":"boolean"}},"required":["url"],"type":"object"}after
{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"definitions":{"__schema0":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"items":{"allOf":[{"$ref":"#/definitions/__schema0"}]},"type":"array"},{"additionalProperties":{"allOf":[{"$ref":"#/definitions/__schema0"}]},"propertyNames":{"type":"string"},"type":"object"}]},"__schema1":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"items":{"allOf":[{"$ref":"#/definitions/__schema1"}]},"type":"array"},{"additionalProperties":{"allOf":[{"$ref":"#/definitions/__schema1"}]},"propertyNames":{"type":"string"},"type":"object"}]},"__schema2":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"items":{"allOf":[{"$ref":"#/definitions/__schema2"}]},"type":"array"},{"additionalProperties":{"allOf":[{"$ref":"#/definitions/__schema2"}]},"propertyNames":{"type":"string"},"type":"object"}]}},"properties":{"actions":{"description":"Up to 50 steps to run on the page, in order, before reading it: { \"type\": \"wait\", \"milliseconds\": 500 } (up to 30 seconds), { \"type\": \"wait\", \"selector\": \".results\" }, { \"type\": \"click\", \"selector\": \"button.more\" }, { \"type\": \"write\", \"text\": \"tides\" }, { \"type\": \"press\", \"key\": \"Enter\" }, { \"type\": \"scroll\", \"direction\": \"down\" } (also up, left or right; amount is pixels, \"viewport\" or \"max\"; maxScrolls 1 to 50; selector scrolls an inner container; \"max\" keeps scrolling until the page stops growing, for feeds that load as you go), { \"type\": \"screenshot\", \"fullPage\": true } (links come back in actions.screenshots), { \"type\": \"scrape\" } (the page at that point, in actions.scrapes), { \"type\": \"executeJavascript\", \"script\": \"document.title\" } (results in actions.javascriptReturns), { \"type\": \"pdf\", \"format\": \"A4\" } (links in actions.pdfs) or { \"type\": \"perform\", \"action\": \"Click the Load more button\" } (a step in plain words, up to 5 browser steps on this page, never leaving the site; at most 5 per call). A read with actions costs 1 credit, the same as any page; the actions themselves add nothing. If an action fails, you still get the page as it stood, with a warning that names the action and says why.","items":{"anyOf":[{"additionalProperties":false,"properties":{"milliseconds":{"maximum":30000,"minimum":1,"type":"integer"},"type":{"const":"wait","type":"string"}},"required":["type","milliseconds"],"type":"object"},{"additionalProperties":false,"properties":{"selector":{"minLength":1,"type":"string"},"type":{"const":"wait","type":"string"}},"required":["type","selector"],"type":"object"},{"additionalProperties":false,"properties":{"all":{"const":false,"type":"boolean"},"selector":{"minLength":1,"type":"string"},"type":{"const":"click","type":"string"}},"required":["type","selector"],"type":"object"},{"additionalProperties":false,"properties":{"text":{"minLength":1,"type":"string"},"type":{"const":"write","type":"string"}},"required":["type","text"],"type":"object"},{"additionalProperties":false,"properties":{"key":{"maxLength":40,"minLength":1,"type":"string"},"type":{"const":"press","type":"string"}},"required":["type","key"],"type":"object"},{"additionalProperties":false,"properties":{"amount":{"anyOf":[{"maximum":100000,"minimum":1,"type":"integer"},{"enum":["viewport","max"],"type":"string"}]},"direction":{"default":"down","enum":["up","down","left","right"],"type":"string"},"maxScrolls":{"maximum":50,"minimum":1,"type":"integer"},"selector":{"minLength":1,"type":"string"},"type":{"const":"scroll","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"fullPage":{"type":"boolean"},"quality":{"maximum":100,"minimum":1,"type":"integer"},"type":{"const":"screenshot","type":"string"},"viewport":{"additionalProperties":false,"properties":{"height":{"maximum":2160,"minimum":200,"type":"integer"},"width":{"maximum":3840,"minimum":200,"type":"integer"}},"required":["width","height"],"type":"object"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"type":{"const":"scrape","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"script":{"maxLength":20000,"minLength":1,"type":"string"},"type":{"const":"executeJavascript","type":"string"}},"required":["type","script"],"type":"object"},{"additionalProperties":false,"properties":{"format":{"enum":["Letter","Legal","Tabloid","Ledger","A0","A1","A2","A3","A4","A5","A6"],"type":"string"},"landscape":{"type":"boolean"},"scale":{"maximum":2,"minimum":0.1,"type":"number"},"type":{"const":"pdf","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"action":{"maxLength":500,"minLength":1,"type":"string"},"type":{"const":"perform","type":"string"}},"required":["type","action"],"type":"object"}]},"maxItems":50,"minItems":1,"type":"array"},"alexandria":{"not":{}},"auditMetadata":{"not":{}},"blockAds":{"description":"Ads and trackers are not loaded when a page runs in a browser. Send false to load them.","type":"boolean"},"checkPromptInjection":{"description":"Send true to scan the page text for instructions aimed at an AI model before anything is built from it. A page that has them is refused with 403 promptInjectionDetected and costs nothing. The scan adds 4 credits when it runs; a page it cannot scan fully comes back with a warning and no charge.","type":"boolean"},"domainTools":{"const":false,"type":"boolean"},"excludeTags":{"description":"Remove the parts of the page that match these CSS selectors, such as .comments.","items":{"minLength":1,"type":"string"},"minItems":1,"type":"array"},"fastMode":{"description":"Send true to read the page without opening a browser: the answer comes sooner, but a page that needs a browser, or that refuses a plain request, comes back as an error instead of being retried. Ignored when the call needs a browser (actions, screenshot, waitFor, mobile, profile, network, branding).","type":"boolean"},"formats":{"default":["markdown"],"description":"What to return: markdown (clean page text), summary (a short summary of the page), html (the cleaned page), rawHtml (the page as sent), audio and video (for a YouTube link: the audio track as an M4A file, or the video as an MP4 file, as a link that works for 1 hour), rawBase64 (the bytes the site sent, Base64 encoded, from a live read; metadata.contentType says what they are), links (every link on the page), images (every image address), screenshot (a link to a JPEG of the visible page, kept for 7 days), changeTracking (what changed in the markdown since your key last read this page with the same options, kept 30 days; add modes [\"git-diff\",\"json\"] with a schema or prompt to compare fields too), question (send { \"type\": \"question\", \"question\": \"...\" } to get answer, null when the page does not state one), product (title, brand, category, url, description and variants with price, sale, availability and images, or null) and menu (merchant, currency and sections of items with prices, or null) network (the JSON the page loaded while it rendered, up to 30 responses) and branding (the page's colors, fonts, typography, spacing, button and input styles, logo and brand images, read from how the page looks, with a field left out when the page does not show it). Send { \"type\": \"screenshot\", \"fullPage\": true } for the whole page. Send { \"type\": \"highlights\", \"query\": \"refund policy\" } for the passages that best match a query. Send { \"type\": \"json\", \"schema\": { \"type\": \"object\", \"properties\": { \"price\": { \"type\": \"number\" } } } } or { \"type\": \"json\", \"prompt\": \"the price and the stock\" } for fields filled from the page, each checked against it. Send { \"type\": \"json\", \"parser\": \"amazon-product\" } to get a site's own data as json instead of reading the page; GET /v1/parsers lists the parsers. Send { \"type\": \"json\", \"rules\": { \"title\": \"h1\", \"links\": { \"selector\": \"a\", \"type\": \"list\", \"output\": \"@href\" } } } to read the page with CSS rules and no model, at the page's own price. Send { \"type\": \"attributes\", \"selectors\": [{ \"selector\": \"a\", \"attribute\": \"href\" }] } for attribute values, returned in attributes. Without a parser or rules, json needs a schema or a prompt and is filled from the page. json with a schema or a prompt, summary, highlights, question, product, menu and changeTracking in json mode cost 4 credits more each when they return something. json with rules or a parser, and attributes, cost nothing more. A screenshot, network or branding read costs 1 credit, the same as any page. A PDF comes back as markdown only, and costs 1 credit more for each page read.","items":{"anyOf":[{"enum":["markdown","summary","html","rawHtml","rawBase64","links","images","network","branding","audio","video","screenshot","changeTracking","product","menu"],"type":"string"},{"additionalProperties":false,"properties":{"type":{"enum":["markdown","summary","html","rawHtml","rawBase64","links","images","network","branding","audio","video"],"type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"modes":{"description":"git-diff returns a unified diff of the markdown. json compares the fields in schema or prompt between this read and the last one. Without modes you get git-diff.","items":{"enum":["git-diff","json"],"type":"string"},"maxItems":2,"type":"array"},"prompt":{"description":"With json mode: what to compare, in plain words, such as the price and stock.","maxLength":10000,"minLength":1,"type":"string"},"schema":{"additionalProperties":{"$ref":"#/definitions/__schema0"},"description":"The fields to fill, as a JSON Schema (draft-07 or 2020-12) object with properties. Pydantic's model_json_schema() and zod's toJSONSchema() output work as they are. enum, const, anyOf, oneOf, nullable types, $ref with $defs, required, descriptions and any key names are read. Up to 100 top-level fields and 32 KB. A field the page does not state comes back null.","propertyNames":{"type":"string"},"type":"object"},"tag":{"type":"null"},"type":{"const":"changeTracking","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"question":{"description":"A question to answer from the page, such as what the refund window is.","maxLength":10000,"minLength":1,"type":"string"},"type":{"const":"question","type":"string"}},"required":["type","question"],"type":"object"},{"additionalProperties":false,"properties":{"type":{"const":"product","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"type":{"const":"menu","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"fullPage":{"default":false,"description":"Capture the whole page from top to bottom instead of the visible part.","type":"boolean"},"quality":{"description":"JPEG quality from 1 to 100. The default is 70.","maximum":100,"minimum":1,"type":"integer"},"type":{"const":"screenshot","type":"string"},"viewport":{"additionalProperties":false,"description":"The window size in pixels, such as { width: 390, height: 844 }.","properties":{"height":{"maximum":2160,"minimum":200,"type":"integer"},"width":{"maximum":3840,"minimum":200,"type":"integer"}},"required":["width","height"],"type":"object"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"count":{"default":5,"description":"How many passages to return, best match first.","maximum":20,"minimum":1,"type":"integer"},"query":{"description":"What you are looking for on the page, such as refund policy.","maxLength":10000,"minLength":1,"type":"string"},"type":{"const":"highlights","type":"string"}},"required":["type","query"],"type":"object"},{"additionalProperties":false,"properties":{"checkPromptInjection":{"description":"Deprecated: send checkPromptInjection at the top level of the call.","type":"boolean"},"options":{"additionalProperties":{"$ref":"#/definitions/__schema1"},"description":"Only with parser: extra inputs for it, such as { \"page\": 2 } for the next page of results or { \"minRating\": 4.5 } for a filter. GET /v1/parsers lists what each parser accepts.","propertyNames":{"type":"string"},"type":"object"},"parser":{"description":"Read the page with a named parser, which gives the site's own data as json. The url must be the kind of page the parser reads. Parsers are the only way to read some sites. GET /v1/parsers lists them.","type":"string"},"prompt":{"description":"What to pull from the page in plain words, such as the version and the release date.","maxLength":10000,"minLength":1,"type":"string"},"rules":{"additionalProperties":{"$ref":"#/definitions/__schema2"},"description":"Read the page with CSS rules instead of a model, no extra fee. Each field is a selector such as \"h1\" (the first match's text), \"a@href\" (an attribute) or { \"selector\": \"li\", \"type\": \"list\", \"output\": \"text\" | \"html\" | \"@attribute\" | { nested fields } }. A missing item is null and an unmatched list is []. Relative links become absolute. Up to 100 fields, 5 levels deep. Not with schema, prompt or parser.","propertyNames":{"type":"string"},"type":"object"},"schema":{"additionalProperties":{"$ref":"#/definitions/__schema0"},"description":"The fields to fill, as a JSON Schema (draft-07 or 2020-12) object with properties. Pydantic's model_json_schema() and zod's toJSONSchema() output work as they are. enum, const, anyOf, oneOf, nullable types, $ref with $defs, required, descriptions and any key names are read. Up to 100 top-level fields and 32 KB. A field the page does not state comes back null.","propertyNames":{"type":"string"},"type":"object"},"type":{"const":"json","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"selectors":{"description":"The elements and attributes to read, such as { selector: 'a.buy', attribute: 'href' }.","items":{"additionalProperties":false,"properties":{"attribute":{"maxLength":100,"minLength":1,"type":"string"},"selector":{"minLength":1,"type":"string"}},"required":["selector","attribute"],"type":"object"},"maxItems":50,"minItems":1,"type":"array"},"type":{"const":"attributes","type":"string"}},"required":["type","selectors"],"type":"object"}]},"maxItems":20,"minItems":1,"type":"array"},"headers":{"additionalProperties":{"maxLength":2000,"pattern":"^[\\t\\x20-\\x7e]*$","type":"string"},"description":"Extra request headers to send to the site, such as { \"x-plan\": \"pro\" }. A read with headers is never answered from or saved to a stored copy.","propertyNames":{"pattern":"^[A-Za-z0-9-]{1,64}$","type":"string"},"type":"object"},"ignoreRobotsTxt":{"const":false,"type":"boolean"},"includeTags":{"description":"Keep only the parts of the page that match these CSS selectors, such as article or .price. When set, onlyMainContent is not applied.","items":{"minLength":1,"type":"string"},"minItems":1,"type":"array"},"linkStyle":{"default":"inline","description":"How links appear in the markdown. inline keeps [text](address). numbered writes Pricing⟨3⟩ and lists each address once at the end. none keeps only the link text, which makes link-heavy pages 10 to 70% shorter; ask for the links format to get the addresses.","enum":["inline","numbered","none"],"type":"string"},"location":{"additionalProperties":false,"description":"Where to read the page from. The default is the United States.","properties":{"country":{"description":"Two-letter country code to read the page from, such as DE or JP.","type":"string"},"languages":{"description":"Languages to ask the site for, best first, such as [\"de\", \"en\"]. Sent as Accept-Language. A read with languages is never answered from or saved to a stored copy.","items":{"pattern":"^[A-Za-z]{2,3}(?:-[A-Za-z0-9]{2,8})*$","type":"string"},"maxItems":5,"minItems":1,"type":"array"}},"type":"object"},"lockdown":{"description":"Send true to answer only from a stored copy of the page and never read it live, whatever its age. A page with no stored copy is notFound. The same as minAge 0.","type":"boolean"},"maxAge":{"description":"Accept a stored answer up to this many milliseconds old, at most 30 days. Without it, 2 days, or less for a site whose pages change often, and a copy up to twice that age (at most 7 days) comes back at once as stale while a fresh read runs. 0 always reads the page live. metadata.cacheState says which one you got.","maximum":9007199254740991,"minimum":0,"type":"integer"},"maxChars":{"description":"Cut the markdown at this many characters; isTruncated says when that happened.","maximum":1000000,"minimum":500,"type":"integer"},"minAge":{"description":"Answer only from a stored copy that is at least this many milliseconds old, and never read the page live. 0 accepts any stored copy. A page with no such copy is notFound.","maximum":9007199254740991,"minimum":0,"type":"integer"},"mobile":{"description":"Read the page as a phone would: a phone-sized screen and the mobile version of the site. The page loads in a browser.","type":"boolean"},"onlyCleanContent":{"description":"Send true to have a model remove what onlyMainContent leaves behind in the markdown: cookie banners, ads, share widgets, breadcrumbs, sign-up prompts, comment prompts and related-article lists. It only removes whole paragraphs and lists; it never rewrites or adds text, and code blocks are always kept. Skipped with a warning when the page is too long to clean or the model does not answer. Not with zeroDataRetention. Summary, answers and highlights are made from the cleaned markdown.","type":"boolean"},"onlyMainContent":{"default":true,"description":"Keep only the page's main content, without menus, headers, footers and ads.","type":"boolean"},"parsers":{"description":"Only the pdf parser exists. Send \"pdf\" or { \"type\": \"pdf\", mode, maxPages, pages, blocks, pageMarkers } with the same meaning as in parse. Without mode a PDF is read from its text layer only; auto reads the picture of a page that has no text, and ocr reads the picture of every page, up to 20 pages. Each page read costs 1 credit.","items":{"anyOf":[{"const":"pdf","type":"string"},{"additionalProperties":false,"properties":{"blocks":{"description":"Send true to also get the page's layout in blocks: each title, section header or run of text, with its page, reading order, position on the page (bbox as left, top, right, bottom from 0 to 1) and where its text sits in that page's markdown (span, as in pages). Tables, figures and formulas are not told apart. A page read from its picture is one block. No extra charge.","type":"boolean"},"maxPages":{"description":"Read at most this many pages, up to 100.","maximum":100,"minimum":1,"type":"integer"},"mode":{"description":"fast reads the text layer only. auto (the default) reads the text layer and reads the picture of any page that has none. ocr reads the picture of every page.","enum":["fast","auto","ocr"],"type":"string"},"pageMarkers":{"description":"Send true to mark page breaks in the markdown: pages are joined with \"---\" and a line, where N is the page that follows. No extra charge.","type":"boolean"},"pages":{"description":"Send true to also get each page's markdown in pages, as { pageNumber, markdown }. No extra charge.","type":"boolean"},"type":{"const":"pdf","type":"string"}},"required":["type"],"type":"object"}]},"minItems":1,"type":"array"},"profile":{"additionalProperties":false,"description":"Read the page with the cookies and local storage that earlier calls saved under this name, kept for your account for 30 days after the last use. A call with a profile always loads the page in a browser, costs 1 credit, the same as any page, and is never answered from a stored copy. Only one call at a time can save to a profile.","properties":{"name":{"description":"A name you choose, such as shop-login. Calls with the same name share state.","maxLength":128,"minLength":1,"type":"string"},"saveChanges":{"default":true,"description":"Keep the cookies and local storage this read leaves behind for the next call with this name. Send false to read with the profile without changing it.","type":"boolean"}},"required":["name"],"type":"object"},"proxy":{"description":"Which route reads the page. auto and basic start with the cheapest route and move up when the site refuses. enhanced starts on a residential browser. The price is the same.","enum":["auto","basic","enhanced"],"type":"string"},"redactPII":{"anyOf":[{"type":"boolean"},{"additionalProperties":false,"description":"Options for redactPII.","properties":{"entities":{"default":["PERSON","EMAIL","PHONE","LOCATION","FINANCIAL","SECRET"],"description":"What to hide: PERSON, EMAIL, PHONE, LOCATION, FINANCIAL, SECRET. All by default.","items":{"enum":["PERSON","EMAIL","PHONE","LOCATION","FINANCIAL","SECRET"],"type":"string"},"minItems":1,"type":"array"},"mode":{"default":"accurate","description":"accurate finds names and places with the model and the rest by pattern. aggressive adds guesses that catch more and may hide a little too much. fast uses patterns only, so it finds no ordinary names or places.","enum":["accurate","aggressive","fast"],"type":"string"},"replaceStyle":{"default":"tag","description":"tag writes <EMAIL>, mask writes * for each character, remove deletes it.","enum":["tag","mask","remove"],"type":"string"}},"type":"object"}],"description":"Send true, or an object, to hide personal data in the markdown and in everything made from it (summary, answers, highlights, json). Links, html and rawHtml are not changed. A page the model cannot scan is refused rather than returned unredacted."},"removeBase64Images":{"description":"Images inside the page that carry their data in the address (data:image) are dropped by default. Send false to keep them in markdown and html.","type":"boolean"},"robotsUserAgent":{"not":{}},"skipTlsVerification":{"description":"Send true to read a page whose certificate is expired, self-signed or for another name. The read is not private against someone between us and the site.","type":"boolean"},"storeInCache":{"default":true,"description":"Send false to neither read nor keep a stored copy of this page.","type":"boolean"},"threatProtection":{"not":{}},"timeout":{"description":"How long to keep trying, in milliseconds, between 10 seconds and 2 minutes. Pages behind a bot check can need 10 to 30 seconds the first time.","maximum":300000,"minimum":1000,"type":"integer"},"toolDetail":{"not":{}},"url":{"description":"The page or PDF to read, such as https://bun.com/docs.","type":"string"},"urls":{"not":{}},"waitFor":{"description":"Extra milliseconds to wait before reading, up to 60000, for pages that load their content late. To wait for an element, add a wait action with a selector. A read that waits costs 1 credit, the same as any page.","maximum":60000,"minimum":0,"type":"integer"},"zeroDataRetention":{"default":false,"description":"Send true to keep nothing from this call: no stored copy is read or made, and nothing from it is logged. Costs 1 credit more per page. Not with a screenshot.","type":"boolean"}},"required":["url"],"type":"object"}