Aerostack
memory

Data Extractor Edge Function — Ai

AI

Extract structured data from unstructured text. Define a schema, paste text, get JSON. Perfect for invoices, receipts, emails, and forms.

aerostack @aerostack verified
Updated Mar 13, 2025
GitHub

Edge function Data Extractor Extract structured data from unstructured text. Define a schema, paste text, get JSON. Perfect for invoices, receipts, emails, and forms.. Deployed on Cloudflare Workers — zero cold starts, globally distributed. Mount it via your Aerostack workspace to call it from any AI agent.

terminal — aerostack cli
$ npx aerostack add aerostack/data-extractor
smart_toy

Use with AI Assistants

MCP

Connect Claude, Cursor, or any MCP-compatible client — then call this function by slug

① Add MCP Server

Add this once — access all Aerostack functions from your AI tool.

claude_desktop_config.json
{
  "mcpServers": {
    "aerostack": {
      "url": "https://mcp.aerostack.dev",
      "type": "http"
    }
  }
}

② Call this function

Ask your AI to use the call_function tool with this slug:

call_function
call_function({
  slug: "data-extractor",
  args: {}
})

Data Extractor

Extract structured JSON from unstructured text using AI. Define your output schema and get clean data.

Endpoints

Method Path Description
POST /extract Extract data using a schema
POST /extract/auto Auto-detect and extract key fields
GET /health Status check

Extract with schema

curl -X POST {endpoint}/extract \
  -d '{"text":"Invoice #1234 from Acme Corp, total $99.50, due 2024-03-15","schema":{"invoice_number":"string","company":"string","total":"number","due_date":"string"}}'

Metadata

upgrade Version 1.0.0
gavel License MIT
language Language javascript
cloud Provider cloudflare-worker

Tags

ai extraction structured-data nlp json
deployed_code

Build and publish your own functions

Write a TypeScript function, deploy it to the edge, and share it with thousands of developers — in minutes.

More AI Functions

Browse AI Functions →

Frequently asked questions

What does the Data Extractor function do? +

Data Extractor is a serverless edge function for ai automation written in cloudflare-worker. Deploy it to Cloudflare Workers via your Aerostack workspace.

How do I deploy the Data Extractor function? +

Install the Aerostack CLI and run: ```bash aerostack deploy function @aerostack/data-extractor ``` It will be live on Cloudflare Workers in seconds.

What runtime does Data Extractor use? +

Data Extractor runs on cloudflare-worker on the Cloudflare Workers edge runtime — zero cold starts, globally distributed.

Can I customise the Data Extractor function? +

Yes. Fork the function from your Aerostack dashboard, modify the source, and redeploy. All changes are version-controlled.