Get started
Quickstart
Create a table, extract a file into it and read the rows.
You need a project and one of its API keys. In the app, open the project, then API keys, and create a key. Keep it in an environment variable, with the project's id:
export ANYROW_API_KEY="ak_..."export PROJECT_ID="proj_..."Create a tableLink to section
A table is the shape of what you want back: each column has an
id, anameand atype.curl -X POST "https://api.anyrow.ai/v1/projects/$PROJECT_ID/tables" \ -H "Authorization: ApiKey $ANYROW_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "name": "Invoices", "columns_json": [ { "id": "vendor", "name": "Vendor" }, { "id": "total", "name": "Total", "type": "currency" }, { "id": "due", "name": "Due date", "type": "date" } ] }'The response is the table, with its
id.Extract a file into itLink to section
Send the file as multipart form data. The response describes the finished batch: its
batch_id,status, how many rows it wrote (total_rows) and the extractedresult.curl -X POST "https://api.anyrow.ai/v1/projects/$PROJECT_ID/tables/$TABLE_ID/extract" \ -H "Authorization: ApiKey $ANYROW_API_KEY" \ -F "file=@./invoice.pdf"NoteA long document takes a while. The streaming endpoint (
extract-stream) sends progress and rows as server-sent events instead of one response at the end.Read the rowsLink to section
Rows come back 20 per page by default; follow
nextCursorfor more (see Pagination).curl "https://api.anyrow.ai/v1/projects/$PROJECT_ID/tables/$TABLE_ID/rows?limit=50" \ -H "Authorization: ApiKey $ANYROW_API_KEY"