PDF Vector

Image Extraction API with JSON Schema

Extract structured data from any image using AI and JSON Schema. Perfect for receipts, forms, invoices, screenshots, and any visual data that needs to be digitized.

  • Schema-Based ExtractionDefine your data structure with JSON Schema and extract consistently from any image
  • Visual + OCR IntelligenceAdvanced AI combines OCR with visual understanding to extract data accurately
  • Type-Safe ResultsGet validated, structured JSON output ready for your database or application

Image Extract API

API Docs
import { readFile } from "fs/promises";
import { PDFVector } from "pdfvector";

const client = new PDFVector({
  apiKey: "pdfvector_xxxxxxx"
});

// Define schema for receipt data extraction
const schema = {
  type: "object",
  properties: {
    storeName: { type: "string" },
    date: { type: "string" },
    totalAmount: { type: "number" },
    items: {
      type: "array",
      items: {
        type: "object",
        properties: {
          name: { type: "string" },
          quantity: { type: "number" },
          price: { type: "number" }
        }
      }
    },
    paymentMethod: { type: "string" }
  }
};

// Extract from image URL
const result = await client.extract({
  url: "https://example.com/receipt.jpg",
  schema: schema
});

// Extract from image file
const fileResult = await client.extract({
  data: await readFile("invoice.png"),
  contentType: "image/png",
  schema: schema
});

Structured Data from Images

Turn images into structured, validated data. Define your schema once and extract consistently from screenshots, photos, scanned documents, and more.

Get started

Schema-Driven Extraction

Define your data structure with JSON Schema. Extract exactly what you need with type-safe, validated results every time.

Visual AI Extraction

Combines OCR with visual understanding to extract data from any image format, handling text, tables, forms, and visual elements.

Application-Ready Data

Receive clean, validated JSON that's ready for your database or application. No manual processing or cleanup required.

Universal Image Support

Extract from receipts, invoices, screenshots, forms, ID cards, and more. Handles PNG, JPEG, GIF, BMP, TIFF with high accuracy.

Example Output

Real examples of questions and AI-generated answers from Word documents

Original Document

With invoice

Output

AI-generated answer to your question

Question

Extract all invoice details

Schema

{
  "type": "object",
  "properties": {
    "date": {
      "type": "string"
    },
    "totalAmount": {
      "type": "number"
    },
    "items": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "quantity": {
            "type": "number"
          },
          "price": {
            "type": "number"
          }
        }
      }
    }
  },
  "required": [
    "date",
    "totalAmount"
  ],
  "additionalProperties": false
}

Answer

{
  "data": {
    "date": "11/02/2019",
    "totalAmount": 154.06,
    "items": [
      {
        "name": "Front and rear brake cables",
        "quantity": 1,
        "price": 100
      },
      {
        "name": "New set of pedal arms",
        "quantity": 2,
        "price": 15
      },
      {
        "name": "Labor 3hrs",
        "quantity": 3,
        "price": 5
      }
    ]
  },
  "pageCount": 1,
  "creditCount": 3
}

One subscription, all APIs

Start for free, then scale as you grow. No hidden fees.

Save one month

Free

$0

Credit Card Required

Perfect for testing and small projects

  • Access to all APIs
  • 100 credits
Subscribe to Free

Basic

$15/month

$176 billed annually

Great for personal projects and small businesses

  • Access to all APIs
  • 3,000 credits
Subscribe to Basic
Most Popular

Pro

$72/month

$869 billed annually

Most popular plan for growing businesses

  • Access to all APIs
  • 100,000 credits
Subscribe to Pro

Enterprise

$305/month

$3663 billed annually

For large-scale applications and enterprises

  • Access to all APIs
  • 500,000 credits
Subscribe to Enterprise

Ready to Extract Structured Data from Images?

Transform images into structured data with our powerful extraction API. Define your schema once, extract data from any image format consistently.

No setup fees • Integrate in minutes • Cancel anytime

Frequently asked questions