CSV and Excel to JSON API reference

Base URL: https://api.justapi.tech. This API is in beta: the request shape may still change before general availability, and the changelog will say so.

MethodPathDescriptionModes
POST /v1/data/to-json Convert CSV or XLSX to JSON sync (sync: 58 s per call)

Request

Send source with exactly one of url, base64 or file_id. Every url passes the SSRF guard.

{
  "source": {
    "url": "https://files.example.com/leads.csv"
  },
  "options": {
    "infer_types": true
  }
}

Options

Option Type Default
format "auto", "csv" or "xlsx" "auto"
header boolean true
infer_types boolean, CSV only false
delimiter "auto", ",", ";", "\t" or " "
encoding like "utf-8" or "latin-1", CSV only detected
sheet sheet name, XLSX only first sheet
all_sheets boolean, XLSX only false
output "url" or "base64" "url"; base64 only for results up to 15 MB

Output shape

{
  "format": "csv",
  "sheets": [
    { "name": "csv", "columns": ["email", "zip"], "row_count": 2,
      "rows": [{ "email": "ana@example.com", "zip": "00501" }, { "email": "bo@example.com", "zip": "10001" }] }
  ]
}

With header: false, each row is an array instead of an object. The JSON is in result.data when it is 1 MB or smaller, and always downloadable at result.url.

Response

{
  "job_id": "job_...",
  "status": "completed",
  "result": { "url": "https://...", "expires_at": "...", "file_id": "file_...", "bytes": 48213, "content_type": "...", "filename": "..." },
  "stats": { "input_bytes": 51200, "output_bytes": 48213, "duration_ms": 640 },
  "billing": { "charged_micros": 4000, "balance_micros": 4950000 }
}

Billing and failures

$0.004 per call at the first volume tier, whatever the file size. The call is synchronous and all or nothing: an unreadable source, an encrypted PDF, a bad option or a worker failure stores nothing and charges $0.00. See pricing for the volume tiers.

Example

curl https://api.justapi.tech/v1/data/to-json \
  -H "Authorization: Bearer ak_live_..." \
  -H "Content-Type: application/json" \
  -d '{"source":{"url":"https://files.example.com/leads.csv"},"options":{"infer_types":true}}'

The envelope, error catalog and billing rule are the same across every JustAPI service: see the API reference index and error codes.