Skip to main content

POST /url

Extract data from receipts or invoices by providing a URL to a receipt or invoice file.

Authorization

API key required in the Authorization header.

Request Parameters

Headers

NameRequiredDescription
AuthorizationYesYour API key
Content-TypeYesapplication/json

Request Body

{
"url": "https://example.com/path/to/your/receipt-image.jpg",
"skipItems": false
}
FieldTypeRequiredDescription
urlURLYesURL of the receipt image or PDF file
skipItemsbooleanNoControls whether to skip the detailed item extraction process. When set to true, significantly accelerates the extraction process by omitting individual line item details. (default: false)

Supported File Types

  • Images (image/*)
  • PDF (application/pdf)

Responses

Success (200 OK)

{
"data": {
"vendor": "string",
"time": "YYYY-MM-DDTHH:mm",
"currency": "string",
"items": [
{
"name": "string",
"quantity": "string",
"unitPrice": "string",
"priceBeforeDiscount": "string",
"discount": "string",
"price": "string"
}
],
"total": "string"
}
}
FieldTypeDescription
vendorstringName of the business issuing the receipt
timestringDate and time of purchase (ISO format)
currencystringCurrency code
itemsarrayList of purchased items
totalstringTotal amount of the purchase

Errors

Status CodeDescriptionExample
400 Bad RequestNo file URL provided{"error": "No URL provided"}
400 Bad RequestNo readable text in image{"error": "No text found in the image"}
400 Bad RequestFile is not a receipt{"error": "This is not a receipt"}
400 Bad RequestThe dimensions of the image must be greater than 50 x 50 pixels and less than 16,000 x 16,000 pixels{"error": "Image resolution must be between 50px and 16000px in both dimensions"}
401 UnauthorizedAPI key missing{"error": "Missing token"}
401 UnauthorizedAPI key invalid{"error": "Invalid token"}
402 Payment RequiredInsufficient account balance{"error": "You don't have enough credits"}
500 Internal Server ErrorServer-side error{"error": "Internal Server Error"}

Examples

Request Example

curl -X POST https://api.wiseocr.com/v1/url \
-H "Authorization: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "https://example.com/path/to/your/receipt-image.jpg",
"skipItems": false
}'

Response Example

{
"data": {
"vendor": "Grocery Store",
"time": "2025-02-15T14:30",
"currency": "USD",
"items": [
{
"name": "Apples",
"quantity": "1 kg",
"unitPrice": "3.99",
"priceBeforeDiscount": "3.99",
"discount": "0.00",
"price": "3.99"
},
{
"name": "Milk",
"quantity": "1",
"unitPrice": "2.50",
"priceBeforeDiscount": "2.50",
"discount": "0.50",
"price": "2.00"
}
],
"total": "5.99"
}
}

Credit System

  • Requires available credits in user's account
  • Consumes 1 credit per successful request

What's next?