Skills extract-receipt-data

Extract merchant, date, line items, tax, and total from receipts.

install
source · Clone the upstream repo
git clone https://github.com/iterationlayer/skills
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/iterationlayer/skills "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/extract-receipt-data" ~/.claude/skills/iterationlayer-skills-extract-receipt-data && rm -rf "$T"
manifest: skills/extract-receipt-data/SKILL.md
source content

Extract Receipt Data

Finance teams and expense management apps use this recipe to automate receipt processing. Upload a receipt photo or PDF and receive structured JSON with merchant name, date, individual items, and total — ready for an expense report or reimbursement workflow.

APIs Used

Document Extraction (1 credit per page)

Prerequisites

You need an Iteration Layer API key. Get one at platform.iterationlayer.com — free trial credits included, no credit card required.

For full integration guidance (SDKs, auth, MCP, error handling), see the Iteration Layer Integration Guide.

Implementation

curl -X POST https://api.iterationlayer.com/document-extraction/v1/extract \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "files": [
      {
        "type": "url",
        "name": "receipt.pdf",
        "url": "https://example.com/receipts/purchase-receipt.pdf"
      }
    ],
    "schema": {
      "fields": [
        {
          "name": "merchant_name",
          "type": "TEXT",
          "description": "Name of the merchant or store"
        },
        {
          "name": "date",
          "type": "DATE",
          "description": "Date of the transaction"
        },
        {
          "name": "items",
          "type": "ARRAY",
          "description": "Individual line items on the receipt",
          "fields": [
            {
              "name": "name",
              "type": "TEXT",
              "description": "Item name or description"
            },
            {
              "name": "amount",
              "type": "CURRENCY_AMOUNT",
              "description": "Item price"
            }
          ]
        },
        {
          "name": "total_amount",
          "type": "CURRENCY_AMOUNT",
          "description": "Total amount charged"
        },
        {
          "name": "currency",
          "type": "CURRENCY_CODE",
          "description": "Currency code (e.g. USD, EUR)"
        }
      ]
    }
  }'
import { IterationLayer } from "iterationlayer";
const client = new IterationLayer({ apiKey: "YOUR_API_KEY" });

const result = await client.extract({
  files: [
    {
      type: "url",
      name: "receipt.pdf",
      url: "https://example.com/receipts/purchase-receipt.pdf",
    },
  ],
  schema: {
    fields: [
      {
        name: "merchant_name",
        type: "TEXT",
        description: "Name of the merchant or store",
      },
      {
        name: "date",
        type: "DATE",
        description: "Date of the transaction",
      },
      {
        name: "items",
        type: "ARRAY",
        description: "Individual line items on the receipt",
        fields: [
          {
            name: "name",
            type: "TEXT",
            description: "Item name or description",
          },
          {
            name: "amount",
            type: "CURRENCY_AMOUNT",
            description: "Item price",
          },
        ],
      },
      {
        name: "total_amount",
        type: "CURRENCY_AMOUNT",
        description: "Total amount charged",
      },
      {
        name: "currency",
        type: "CURRENCY_CODE",
        description: "Currency code (e.g. USD, EUR)",
      },
    ],
  },
});
from iterationlayer import IterationLayer
client = IterationLayer(api_key="YOUR_API_KEY")

result = client.extract(
    files=[
        {
            "type": "url",
            "name": "receipt.pdf",
            "url": "https://example.com/receipts/purchase-receipt.pdf",
        }
    ],
    schema={
        "fields": [
            {
                "name": "merchant_name",
                "type": "TEXT",
                "description": "Name of the merchant or store",
            },
            {
                "name": "date",
                "type": "DATE",
                "description": "Date of the transaction",
            },
            {
                "name": "items",
                "type": "ARRAY",
                "description": "Individual line items on the receipt",
                "fields": [
                    {
                        "name": "name",
                        "type": "TEXT",
                        "description": "Item name or description",
                    },
                    {
                        "name": "amount",
                        "type": "CURRENCY_AMOUNT",
                        "description": "Item price",
                    },
                ],
            },
            {
                "name": "total_amount",
                "type": "CURRENCY_AMOUNT",
                "description": "Total amount charged",
            },
            {
                "name": "currency",
                "type": "CURRENCY_CODE",
                "description": "Currency code (e.g. USD, EUR)",
            },
        ]
    },
)
package main

import il "github.com/iterationlayer/sdk-go"

func main() {
	client := il.NewClient("YOUR_API_KEY")

	result, err := client.Extract(il.ExtractRequest{
		Files: []il.FileInput{
			il.NewFileFromURL(
				"receipt.pdf",
				"https://example.com/receipts/purchase-receipt.pdf",
			),
		},
		Schema: il.ExtractionSchema{
			"merchant_name": il.NewTextFieldConfig(
				"merchant_name",
				"Name of the merchant or store",
			),
			"date": il.NewDateFieldConfig(
				"date",
				"Date of the transaction",
			),
			"items": il.NewArrayFieldConfig(
				"items",
				"Individual line items on the receipt",
				[]il.FieldConfig{
					il.NewTextFieldConfig(
						"name",
						"Item name or description",
					),
					il.NewCurrencyAmountFieldConfig(
						"amount",
						"Item price",
					),
				},
			),
			"total_amount": il.NewCurrencyAmountFieldConfig(
				"total_amount",
				"Total amount charged",
			),
			"currency": il.NewCurrencyCodeFieldConfig(
				"currency",
				"Currency code (e.g. USD, EUR)",
			),
		},
	})
	if err != nil {
		panic(err)
	}
}
{
  "name": "Extract Receipt Data",
  "nodes": [
    {
      "parameters": {
        "content": "## Extract Receipt Data\n\nFinance teams and expense management apps use this recipe to automate receipt processing. Upload a receipt photo or PDF and receive structured JSON with merchant name, date, individual items, and total \u2014 ready for an expense report or reimbursement workflow.\n\n**Note:** This workflow uses the Iteration Layer community node (`n8n-nodes-iterationlayer`). Install it via Settings > Community Nodes before importing. Self-hosted n8n only.",
        "height": 280,
        "width": 500,
        "color": 2
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        200,
        40
      ],
      "id": "4bdb62b6-66d8-4616-a7e1-6e8f48477da7",
      "name": "Overview"
    },
    {
      "parameters": {
        "content": "### Step 1: Extract Data\nResource: **Document Extraction**\n\nConfigure the Document Extraction parameters below, then connect your credentials.",
        "height": 160,
        "width": 300,
        "color": 6
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        475,
        100
      ],
      "id": "0c6511af-1417-4e1f-9fbb-73f019a130c3",
      "name": "Step 1 Note"
    },
    {
      "parameters": {},
      "type": "n8n-nodes-base.manualTrigger",
      "typeVersion": 1,
      "position": [
        250,
        300
      ],
      "id": "c1d2e3f4-a5b6-7890-cdef-901234567cde",
      "name": "Manual Trigger"
    },
    {
      "parameters": {
        "resource": "documentExtraction",
        "schemaInputMode": "rawJson",
        "schemaJson": "{\"fields\":[{\"name\":\"merchant_name\",\"type\":\"TEXT\",\"description\":\"Name of the merchant or store\"},{\"name\":\"date\",\"type\":\"DATE\",\"description\":\"Date of the transaction\"},{\"name\":\"items\",\"type\":\"ARRAY\",\"description\":\"Individual line items on the receipt\",\"fields\":[{\"name\":\"name\",\"type\":\"TEXT\",\"description\":\"Item name or description\"},{\"name\":\"amount\",\"type\":\"CURRENCY_AMOUNT\",\"description\":\"Item price\"}]},{\"name\":\"total_amount\",\"type\":\"CURRENCY_AMOUNT\",\"description\":\"Total amount charged\"},{\"name\":\"currency\",\"type\":\"CURRENCY_CODE\",\"description\":\"Currency code (e.g. USD, EUR)\"}]}",
        "files": {
          "fileValues": [
            {
              "fileInputMode": "url",
              "fileName": "receipt.pdf",
              "fileUrl": "https://example.com/receipts/purchase-receipt.pdf"
            }
          ]
        }
      },
      "type": "n8n-nodes-iterationlayer.iterationLayer",
      "typeVersion": 1,
      "position": [
        500,
        300
      ],
      "id": "d2e3f4a5-b6c7-8901-defa-012345678def",
      "name": "Extract Data",
      "credentials": {
        "iterationLayerApi": {
          "id": "1",
          "name": "Iteration Layer API"
        }
      }
    }
  ],
  "connections": {
    "Manual Trigger": {
      "main": [
        [
          {
            "node": "Extract Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "settings": {
    "executionOrder": "v1"
  }
}
Extract receipt data from the file at [file URL]. Use the extract_document tool with these fields:

- merchant_name (TEXT): Name of the merchant or store
- date (DATE): Date of the transaction
- items (ARRAY): Each with name (TEXT) and amount (CURRENCY_AMOUNT)
- total_amount (CURRENCY_AMOUNT): Total amount charged
- currency (CURRENCY_CODE): Currency code

Response

{
  "success": true,
  "data": {
    "merchant_name": {
      "value": "Whole Foods Market",
      "confidence": 0.98,
      "citations": ["WHOLE FOODS MARKET"]
    },
    "date": {
      "value": "2026-02-18",
      "confidence": 0.97,
      "citations": ["02/18/2026"]
    },
    "items": {
      "value": [
        {
          "name": {
            "value": "Organic Avocados (3pk)",
            "confidence": 0.95,
            "citations": ["Organic Avocados 3pk"]
          },
          "amount": {
            "value": {
              "amount": "5.99",
              "currency": "USD"
            },
            "confidence": 0.97,
            "citations": ["$5.99"]
          }
        },
        {
          "name": {
            "value": "Sourdough Bread",
            "confidence": 0.96,
            "citations": ["Sourdough Bread"]
          },
          "amount": {
            "value": {
              "amount": "4.49",
              "currency": "USD"
            },
            "confidence": 0.98,
            "citations": ["$4.49"]
          }
        }
      ],
      "confidence": 0.96,
      "citations": []
    },
    "total_amount": {
      "value": {
        "amount": "10.48",
        "currency": "USD"
      },
      "confidence": 0.99,
      "citations": ["TOTAL: $10.48"]
    },
    "currency": {
      "value": "USD",
      "confidence": 0.99,
      "citations": ["$"]
    }
  }
}

Links