Features
What the Extract API can do.
The Extract API is designed for document workflows that need structured output, clear evidence, and integration-friendly tooling.
Format
Struct PDF supports both PDFs and common image formats for extraction workflows:
PDF IMG PNG JPG JPEG HEIC
That means you can use the same extraction flow for:
- standard PDF documents
- camera photos and screenshots
- scanned forms and receipts
- mobile uploads in HEIC format
Schema Builder
Struct PDF includes a visual Schema Builder that helps you create extraction schemas without writing the full JSON structure by hand. It is useful when you want to prototype a schema quickly, share it with teammates, or keep saved schemas ready for repeated extractions.
You can use the Schema Builder to:
- create schemas visually
- save schemas to your account
- reuse saved schemas through
schema_id - iterate on extraction shapes without rewriting the whole request payload
Saved schemas are especially useful when the same document type appears again and again in your workflow.
OpenAPI
Struct PDF publishes a standard OpenAPI schema, which makes the Extract API easy to connect with tooling that already understands Swagger, client generation, and API exploration.
That means you can:
- inspect the full API contract in the live API Reference
- generate or validate typed clients
- integrate the schema into internal developer tooling
import SwaggerClient from 'swagger-client';
const client = await SwaggerClient({
url: 'https://api.structpdf.com/openapi.json',
});
console.log(client.spec.paths['/v1/extract']);
Zod
Struct PDF also works well with schemas that start in Zod. That makes it easier to keep your extraction shape close to the same schema definitions you already use for validation inside your application.
You can define your shape in Zod, convert it to JSON schema, and send it directly to the Extract API:
import { z } from 'zod';
import { zodToJsonSchema } from 'zod-to-json-schema';
const ReceiptSchema = z.object({
total: z.number(),
tax: z.number(),
});
const extractionSchema = zodToJsonSchema(ReceiptSchema, 'ReceiptSchema');
console.log(JSON.stringify(extractionSchema, null, 2));