ScanToExcel API
Integrate AI-powered document extraction directly into your app. Send an image, get structured spreadsheet data back as JSON or .xlsx.
Base URL
https://api.scantoexcel.ai/v1Authentication
All API requests require an API key sent via the Authorization header.
Authorization: Bearer sk_live_your_api_key
Get your API key from the API plan dashboard after subscribing.
Quick Start
Extract data from a document image in one API call.
cURL
curl -X POST https://api.scantoexcel.ai/v1/extract \ -H "Authorization: Bearer sk_live_your_api_key" \ -F "file=@receipt.jpg" \ -F "output=json"
Python
import requests
response = requests.post(
"https://api.scantoexcel.ai/v1/extract",
headers={"Authorization": "Bearer sk_live_your_api_key"},
files={"file": open("receipt.jpg", "rb")},
data={"output": "json"}
)
data = response.json()
print(data["title"]) # "Receipt"
print(data["rows"]) # [["Item", "Qty", "Price"], ...]JavaScript / Node.js
const form = new FormData();
form.append("file", fs.createReadStream("receipt.jpg"));
form.append("output", "json");
const res = await fetch("https://api.scantoexcel.ai/v1/extract", {
method: "POST",
headers: { Authorization: "Bearer sk_live_your_api_key" },
body: form,
});
const data = await res.json();
console.log(data.title); // "Receipt"
console.log(data.rows); // [["Item", "Qty", "Price"], ...]API Reference
/v1/extractUpload a document image or PDF and receive structured spreadsheet data. The AI analyzes the visual layout and maps every piece of text to the correct row and column.
Request (multipart/form-data)
| Parameter | Type | Required | Description |
|---|---|---|---|
file | File | Yes | Image (JPG, PNG, WebP, HEIC) or PDF. Max 20 MB. |
output | String | No | "json" (default) or "xlsx". JSON returns structured data; xlsx returns a binary file. |
detail | String | No | "low" (default, faster) or "high" (better for dense documents). |
Response (JSON)
{
"id": "ext_abc123",
"status": "completed",
"title": "Receipt - Coffee Shop",
"rows": [
["Item", "Qty", "Price"],
["Latte", "2", "9.50"],
["Croissant", "1", "4.25"],
["", "Total", "13.75"]
],
"pages": 1,
"usage": {
"credits_used": 1,
"credits_remaining": 999
}
}Response Fields
| Field | Type | Description |
|---|---|---|
id | String | Unique extraction ID |
status | String | completed or failed |
title | String | AI-generated title for the document |
rows | String[][] | 2D array of cell values. First row is typically headers. |
pages | Number | Number of pages processed |
usage | Object | Credits used and remaining for the billing period |
Rate Limits
10 requests/second per API key
1,000 extractions/month on API plan
20 MB max file size
Need higher limits? Contact us for enterprise plans.
Webhooks
Receive a POST notification when an extraction completes. Configure your webhook URL in the API dashboard.
{
"event": "extraction.completed",
"id": "ext_abc123",
"status": "completed",
"title": "Invoice #1042"
}