• JSON
  • HUMAN
  • DB
  • LOG

How to extract structured data from documents with your AI

Connect Affinda to your AI client once. After that, you can point your agent at any document to pull out the exact data points you need.

Ask AI about this page

Short answer

How can I turn my PDFs and images into JSON?

Your AI uses Affinda to read the files and map the content into structured JSON. You'll get clean, usable data ready for your spreadsheets or databases.

Where your data lands.

The results of extraction.

The extraction process moves data from raw files into these specific outcomes.

JSON

Structured JSON output

The AI converts the document content into a clean JSON object. This makes the data ready for immediate use in other apps.

HUMAN

Manual review needed

If the AI is unsure about a specific field, it flags it for you. You decide if the extracted value is correct.

DB

Database ready

Once the data is structured, you can push it directly into your existing databases or CRM. The AI handles the heavy lifting of parsing.

LOG

Audit trails

Every extraction creates a record of what was pulled. You can track exactly how the data was mapped from the original file.

The workflow

What your AI does when the document arrives.

The AI handles the parsing and mapping so you don't have to type out values manually.

  1. Upload the file

    You provide the PDF or image to your AI client. It sends the file to Affinda to begin the processing.

    create_document
  2. Parse the content

    The system reads the text and visual elements within the file. It identifies key fields like names, dates, or totals.

    create_document
  3. Retrieve the data

    The AI pulls the identified information out of the document. It organizes everything into a structured format.

    get_document
  4. Format for use

    The agent takes the retrieved information and prepares it as a JSON object. This makes it easy to pass to your next tool.

    get_document

Try it

Copy these to start.

Use these prompts to kick off your first extraction task.

Starting points

These are just ideas. Swap out the document types or specific field names to match your actual files.

Affinda Connector

You're all set. Choose your MCP client and follow the setup instructions.

Connector linkhttps://edge.vinkius.com/vk_preview_yFIGwqYMwMGDzAPprZCYJ7ppMcFfsuopOw4ljSHA/mcp

Claude Desktop

Follow the steps below to connect in seconds.

  1. 1In Claude Desktop, open Settings → Connectors.
  2. 2Click “Add custom connector” and paste the connector link above as the remote MCP server URL.
  3. 3Click Add and start a new chat — Affinda capabilities are ready to use.
Configuration · claude_desktop_config.jsonCopy
{
  "mcpServers": {
    "affinda-mcp": {
      "url": "https://edge.vinkius.com/vk_preview_yFIGwqYMwMGDzAPprZCYJ7ppMcFfsuopOw4ljSHA/mcp"
    }
  }
}
Copy into chat04
  • Extract the invoice number and total amount from this PDF using Affinda.

  • Look at this image of a receipt and give me the JSON for the vendor name and date.

  • Use Affinda to pull all the contact information from this scanned document.

  • Read this document and list all the line items in a structured format.

  • Claude
  • ChatGPT
  • Cursor
  • VS Code
  • Windsurf
  • Claude Code
  • JetBrains
  • Cline

Start here

Connect Affinda once, then ask.

Just click the link to connect your account. Your credentials stay encrypted, and you can start chatting with your documents immediately.

Connect Affinda to your AI

FAQ

How this task behaves.

  • 01

    Can the AI edit my original PDF files?

    No. The AI only reads the data from your files; it cannot change or overwrite the original documents.

  • 02

    What happens if the document is blurry?

    If the AI cannot clearly read the text, it will flag the data as uncertain. You will need to review those specific fields manually.

  • 03

    Can I use this to update my database automatically?

    The AI can prepare the JSON data for your database, but you must use a separate tool or workflow to actually write that data to your database.

  • 04

    Does the AI store my documents?

    No. The AI uses the documents to perform the extraction task, but it does not keep a permanent storage of your files.

  • 05

    Can the AI extract data from handwritten notes?

    Yes, as long as the handwriting is legible enough for the OCR process to identify the characters.

  • More questions about Affinda? See everything the Affinda Connector can do

Connect Affinda to Claude, Cursor, ChatGPT & more