Skip to content

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_..."
  1. Create a table

    A table is the shape of what you want back: each column has an id, a name and a type.

    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.

  2. Extract a file into it

    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 extracted result.

    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"
    Note

    A 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.

  3. Read the rows

    Rows come back 20 per page by default; follow nextCursor for more (see Pagination).

    curl "https://api.anyrow.ai/v1/projects/$PROJECT_ID/tables/$TABLE_ID/rows?limit=50" \  -H "Authorization: ApiKey $ANYROW_API_KEY"

What's next