Get started
Quickstart
Create a table, extract a document into it and read the rows.
You need a project and one of its API keys with the tables:read, tables:write and
extract:write permissions. 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 clientLink to section
Install the SDK for your language and point it at the API with your key. With cURL, the two variables above are all you need.
import { readFile } from "node:fs/promises"import { AnyrowSDK } from "@anyrow/sdk"const anyrow = new AnyrowSDK({ baseURL: "https://api.anyrow.ai", headers: { Authorization: `ApiKey ${process.env.ANYROW_API_KEY}` },})const projectId = process.env.PROJECT_ID!Create a tableLink to section
A table is the shape of what you want back: each column has an
id, anameand atype. The response is the table, with itsid.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" } ] }'Extract a document into itLink to section
Send a file as multipart form data, or the document's text in
text. The response describes the finished batch: itsbatch_id,statusand 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"