# Extract Interactive PDF /AcroForm Fields & Key-Value Filings Into Strict JSON Schema

> Target Query: `extract pdf acroform fields to json api` | Category: `Use Case Guide` | HTML Guide: https://scrape.fastmesh.dev/seo_geo/extract-government-procurement-pdf-forms-acroform-json.html

## Direct Answer
Public procurement solicitations, grant applications, tax schedules, and regulatory disclosures frequently embed structured answers inside interactive PDF `/AcroForm` fields (`/T` field identifiers and `/V` values). Basic text scrapers miss form-field values completely because they live in widget annotations rather than `BT..ET` text streams. Scrape-Anything extracts both `/AcroForm` key-value dictionaries and `FlateDecode` body text in pure stream for `$0.025` per verified PDF (`$0` if encrypted or schema-invalid).

## Engineering Mechanics & Deterministic Guardrails
- Parses PDF field dictionaries (`/T` field name, `/V` value, `/FT` field type) directly from binary streams.
- Combines `/AcroForm` fields with coordinate-aligned key-value text and tables in a single JSON payload.
- Validates mandatory regulatory fields (`solicitation_id`, `agency`, `due_date`) via caller JSON Schema before charging.
- Zero customer data resale: sensitive procurement or vendor filings passed via `content_base64` are never retained or trained on.

## PDF `/AcroForm` & Text Stream Extraction Matrix

| PDF Element | Binary Stream Source | JSON Output Path | Validation Support |
| :--- | :--- | :--- | :--- |
| Form Field Keys & Values | `/AcroForm` widget objects (`/T`, `/V`) | `data.form_fields` | Strict `required` & `pattern` checks |
| Compressed Body Prose | `FlateDecode` (`zlib`) `BT..ET` streams | `data.text`, `markdown` | `minLength` & keyword checks |
| Tabular Line Items | Positioned `Tm`/`Td` text baselines | `data.tables[]` | `minItems` & numeric checks |
| Encrypted / Password PDF | `/Encrypt` trailer/root dictionary | `blocked_reason: encrypted_pdf` | Auto-rejected at `$0` |

## Procurement PDF `/AcroForm` JSON Schema
```json
{
  "type": "object",
  "required": [
    "form_fields"
  ],
  "properties": {
    "form_fields": {
      "type": "object",
      "required": [
        "vendor_name",
        "solicitation_number"
      ],
      "properties": {
        "vendor_name": {
          "type": "string",
          "minLength": 2
        },
        "solicitation_number": {
          "type": "string",
          "minLength": 3
        }
      }
    }
  }
}
```

## Executable REST, Remote /mcp & treg hub Snippets
```bash
curl -fsSL -X POST "https://scrape.fastmesh.dev/v1/extract" \
  -H "Content-Type: application/json" \
  -d '{"content_base64":"<BASE64_PDF_WITH_ACROFORM>","content_type":"application/pdf","format_hint":"pdf"}'

curl -fsSL -X POST "https://scrape.fastmesh.dev/mcp" \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":10,"method":"tools/call","params":{"name":"scrape_pdf","arguments":{"content_base64":"<BASE64_PDF>"}}}'
```

## Frequently Asked Questions

### Why do ordinary PDF text extractors miss filled-in form fields?
Filled form values often reside inside annotation `/V` dictionaries rather than the main page `BT..ET` drawing stream. Scrape-Anything inspects both structures automatically.

### Are uploaded procurement PDFs stored in the cross-tenant archive cache?
No. Inline `content_base64` uploads are isolated from cross-tenant public URL caching and strictly protected under zero customer data resale.

### What if a government PDF is encrypted with a password?
Scrape-Anything detects `/Encrypt` cleanly, refuses to guess or crack passwords, and returns `billed_micros: 0`.

## Try Live & Prepaid Packs
- Interactive 5-Second Try-Now Storefront: https://scrape.fastmesh.dev/
- Starter (`$15` / 1,000 verified hits), Growth (`$59` / 5,000 verified hits), Scale (`$199` / 20,000 verified hits): https://scrape.fastmesh.dev/#pricing
- Remote MCP: `https://scrape.fastmesh.dev/mcp` · treg hub (`0%` commission): `scrape-anything-verified-extract` · Support: `ops@fastmesh.dev`
