01

HTML is an outline

Use the heading tags as the Markdown headings. Keep lists as lists. A table in the page is a table in the result.

Navigation and cookie banners stay in the result when they are headings, paragraphs, lists, or tables. This path does not strip chrome. Filter that furniture after the parse if you only want the article body.

02

CSV is a sheet with one grid

The header row names the columns. Each later row is a record. Chunks should repeat the header.

A CSV has no pages. Say so. Do not invent page numbers. The row range is the citation.

03

URL import is not a browser

POST /v1/parse can take a permitted HTTPS URL. The fetch follows the workspace egress policy: HTTPS, host allowlists, and no private addresses.

If the URL is blocked, the job fails closed. That is the correct outcome. Do not retry against an internal address.

04

What HTML, XML, and CSV become

HTML and XML share one path. The file is decoded as UTF-8. Headings h1 through h6, paragraphs, list items, and tables become blocks on a single page. Navigation and other chrome are kept when they use those elements. The parser does not run a browser and does not strip a cookie banner by itself.

CSV is decoded as UTF-8 with an optional BOM, then stored as one table block of every row, including the header. DocIR still has a page entry for that grid. Cite the row range. Do not label those rows as PDF pages.

The HTML walk includes nested elements. A paragraph inside a list item can appear twice, once as the list item and once as its own paragraph. A paragraph inside a table cell can appear in the table rows and again as a paragraph block. A heading's level is the number in the tag, so an h3 becomes a level-3 heading block. Invalid UTF-8 bytes are replaced rather than failing the job. XML uses this same path. Cite CSV rows from the single table block.

  • A heading in the HTML source becomes a heading block at that level.
  • A CSV header is row 1 of the table, not a separate schema.
  • XML is parsed on the HTML path.
  • A blocked URL fails closed. Do not retry it against a private address.
05

The file to send

Send records.csv first. The result is one DocIR page and one table, header row included. Cite the file name and the row range. The page index is not a printed PDF page number.

For HTML, use the same call with file=@page.html. Headings, paragraphs, lists, and tables are kept, including navigation and cookie text when they use those tags. A paragraph nested in a list item can appear twice. The fetch does not run a browser.

  • result.manifest.decision.route is container for CSV and HTML.
  • CSV: read the header from the first table row.
  • HTML: filter chrome after the parse if you only want the article.
export DOCPARSE_URL="https://docparse.genedai.me"
export DOCPARSE_API_KEY="your_key"

curl -fsS -X POST \
  "$DOCPARSE_URL/v1/parse?wait=true" \
  -H "Authorization: Bearer $DOCPARSE_API_KEY" \
  -F "file=@records.csv" \
  -F "mode=both" \
  -o result.json

jq -r '.result.markdown' result.json
jq '.result.document.schemaVersion, .result.document.pages[0].blockIds' result.json
jq '.result.manifest.decision.route, .result.manifest.parserVersion' result.json

Frequently asked questions

Questions this guide answers

Does DocParse parse HTML and CSV?

Yes. HTML, XML, and CSV are routed through POST /v1/parse. The outputs are Markdown and docir.v1. HTML and XML become headings, paragraphs, list items, and tables. CSV becomes one table block.

Should a CSV cite page numbers?

Cite the source file name and the row range. The CSV path creates one DocIR page for the grid, and that page index is not a printed PDF page number.

Can I point the API at any URL?

Only at a permitted HTTPS URL that passes the workspace egress policy. Private and special-use addresses are rejected, and a blocked import fails closed. The fetch is not a browser. Do not retry that URL against an internal address.