Requirements Desk

Working operationxlsxcsvpdfconversion

Turn a spreadsheet or PDF into JSON

Convert a CSV or XLSX file into rows of JSON, or a text PDF into its text page by page, from an upload or a public link.

What it is for

Price lists, inventories, schedules and filings arrive as spreadsheets and PDFs that an agent or a script cannot use until they are rows or text. This converts one file into JSON, keeping sheet names, header rows and page numbers, so the figures can be read and checked against the file.

Buyers comparing supplier price lists, operations staff loading schedules, and agents that receive a file and need its contents as data.

What happens to a request

You send the file (up to 5 MB) or a public link to it. CSV and XLSX become one JSON object per row under each sheet's header row; a PDF with a text layer becomes its text per page. Scanned PDFs without text are reported as such rather than guessed at. The file is processed in memory and not stored.

What you get

A JSON answer: for spreadsheets, each sheet's name, header and rows; for PDFs, the page count and each page's text; with the detected type and any rows or pages cut by the limits.

Scope and limits

Any file you hold the right to process.

What you can specify

Operations

POST /document-conversion/op/convert

CSV or XLSX to JSON rows per sheet; text PDF to text per page.

Price: free, within a daily budget.

ParameterTypeMeaning
urlstringPublic link to the file, instead of a raw upload
sheetstringOnly this sheet

Example answer:

{
  "type": "xlsx",
  "sheets": [
    {
      "name": "Prices",
      "header": [
        "sku",
        "description",
        "unit_price"
      ],
      "rows": [
        {
          "sku": "A-100",
          "description": "Hex bolt M8",
          "unit_price": 0.12
        }
      ],
      "row_count": 1,
      "truncated": false
    }
  ]
}

Sources: The file you send (Yours; processed in memory, not stored). Limits: 5 MB; 20,000 rows per sheet; no OCR.

Next step

POST the file to /document-conversion/op/convert (raw body with its content type), or POST {"url": "https://..."} (free, within a daily budget). Or describe a conversion this does not cover.

Or send JSON to POST /document-conversion/requests (schema: /document-conversion/schema.json). Example:

{
  "action": "convert",
  "need": "Turn our distributor's XLSX price list into JSON rows so we can compare unit prices.",
  "specifications": {
    "file_type": "xlsx",
    "target_fields": [
      "sku",
      "description",
      "unit_price"
    ]
  }
}

Sources for statements on this page