Skip to main content
Scrape reads a document at a public URL as Markdown. For a file on your own disk, use Parse documents. This request reads the first two pages of a paper and marks where each page starts:
Use "pdf" in parsers for the defaults, or send an object: metadata also has totalPages (pages in the file) and ocrPages (pages read from their picture). See Page metadata.

Other documents

Send the public URL without a PDF parser.
  • A CSV file comes back as a Markdown table, and so does each sheet of an .xlsx file. The first row becomes the table header.
  • A .docx or .pptx file comes back as Markdown text.
  • The older .doc, .xls and .ppt formats cannot be read.

Limits and errors

  • The picture of at most 20 pages is read per call, in auto or ocr mode. Without an API key, only the text layer is read.
  • A file larger than 20 MB, or too large once unpacked, returns 400 invalidRequest. So do a password protected file, a file that cannot be opened, a URL that is an image or another download, and a PDF that takes too long to read, which suggests a smaller maxPages.
  • Read a long document in parts with maxChars and offset. See Content filtering.
  • A PDF read with maxChars, offset or query is charged for the share of its pages that comes back. A file that cannot be read costs nothing. See Pricing.