API Reference

Base URL: https://extractai.com/api/v1

Authentication

Getting an API key

Sign up at extractai.com/signup to get a free API key instantly. Free keys include 50 calls with no credit card required. Keys are prefixed with eak_ and look like eak_a1b2c3d4e5...

Using your key

Pass your key in the Authorization header as a Bearer token on every request.

Example
curl https://extractai.com/api/v1/extract \
  -H "Authorization: Bearer eak_your_key_here"

Every response includes X-Calls-Used and X-Calls-Remaining headers so you can track your usage.

POST /api/v1/extract

Parameters

FieldTypeRequiredDescription
urlstringYesHTTP or HTTPS URL to extract data from
promptstringYesPlain-English description of what to extract
schemaobjectNoJSON schema to enforce output shape

Response format

200 OK
{
  "data": { ... },
  "source_url": "https://example.com",
  "extracted_at": "2026-03-23T12:00:00.000Z"
}

data contains the structured JSON extracted by the LLM. Shape depends on your prompt and optional schema. source_url echoes the input. extracted_at is the ISO timestamp of extraction.

Response headers

HeaderDescription
X-Calls-UsedTotal calls used this billing period
X-Calls-RemainingCalls remaining before hitting your limit

The Schema Parameter

By default, the LLM decides the output shape based on your prompt. Pass a schema object to force a specific structure. The LLM will conform its output to match your schema exactly.

This is useful when you need consistent field names across different pages, or when piping results into a database or typed system.

Example request

POST /api/v1/extract
{
  "url": "https://example.com/team",
  "prompt": "extract all team members",
  "schema": {
    "members": [
      {
        "name": "string",
        "role": "string",
        "linkedin": "string"
      }
    ]
  }
}

Example response

200 OK
{
  "data": {
    "members": [
      {
        "name": "Sarah Chen",
        "role": "CEO & Co-founder",
        "linkedin": "https://linkedin.com/in/sarachen"
      },
      {
        "name": "James Park",
        "role": "CTO",
        "linkedin": "https://linkedin.com/in/jamespark"
      }
    ]
  },
  "source_url": "https://example.com/team",
  "extracted_at": "2026-03-23T12:00:00.000Z"
}

The schema uses a simple convention: use "string", "number", or "boolean" as placeholder values to indicate expected types. Arrays indicate the LLM should return multiple items matching that shape.

Error Codes

StatusErrorDescription
401Invalid API keyMissing or unrecognized Bearer token
422Missing parametersurl is not a valid HTTP/HTTPS URL, or prompt is empty
429Usage limit reachedYou've hit your tier's call limit for this billing period
500Extraction failedPage could not be fetched or LLM failed to return valid JSON

All errors return { "error": "message" }

Rate Limits by Tier

TierPriceCalls / monthOverage
Free$050Hard limit
Starter$29/mo500Hard limit
Pro$99/mo5,000Hard limit
Business$299/mo25,000Hard limit

Check X-Calls-Remaining in any response to see how many calls you have left. Upgrade anytime at extractai.com/pricing.

Code Examples

curl -X POST https://extractai.com/api/v1/extract \
  -H "Authorization: Bearer eak_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://news.ycombinator.com",
    "prompt": "Extract the top 5 stories with title and points"
  }'