WEB_SCRAPE reads one page and returns its main content as Markdown: headings, paragraphs, lists, tables, links and images, with the site’s header, footer and navigation removed. Pages that script draws, such as shop product pages, are rendered before they are read. To read a search result, pass a link from GOOGLE_SERP’s organicResults.
Request
Parameters
Response
For example:PDFs
HTML, plain text and text-based PDFs are supported. A PDF returns its text in page order, its title, author, subject (asdescription) and language when present, and images: []. OCR, attachments and layout reconstruction are not supported.
The whole document is checked regardless of
maxChars; only the returned Markdown is shortened. Textless, encrypted, damaged, incomplete and over-limit PDFs fail with PAGE_UNAVAILABLE.
Limits and errors
- A page that cannot be read fails the task with
PAGE_UNAVAILABLEand the reason: an unsupported format, a page answering 404 or 410, or a site that refuses the request. - A redirect to an address that breaks the
urlrules fails the task. The rules are checked again on every redirect hop. WEB_SCRAPEignoresmarkdown,rawResponseandsearchQueries. It rejectshtmlandanalysiswith422andcitationAnalysiswith400; see unsupported flags.- Other request errors are listed in Errors.