Skip to content
AI Skill Index

Extract structured data from messy text

Pulls fields into JSON and marks what was missing instead of inventing it.

Author: Editorial
Sign in to save
Extract the following fields from the text below and return JSON only.

Fields:
[LIST FIELDS AND TYPES]

Text:
[PASTE TEXT]

Rules that matter more than the extraction:
- If a field is not present, use `null`. Never infer, never fill with a plausible value.
- If a value is ambiguous, use `null` and add it to a `"uncertain"` array with a short note.
- Preserve the original wording for free-text fields. Do not tidy them.
- Dates as ISO 8601. If only a year is given, that is what you return — do not pick a month.

Return only the JSON object. No commentary before or after.

Highlighted parts are placeholders. Replace them before you send.

Worked example

The input is invented for this page. The output shows what the prompt asks for with that input.

Example input (invented)

Fields

  • customer_name (string)
  • order_number (string)
  • order_date (date)
  • amount_paid (number)
  • currency (string)
  • complaint (free text)
  • wants_refund (boolean)

Text

hi, this is Jo from the allotment society again. order no. is 20-4471 i think, or 20-4417, can't read my own writing. we ordered the 12 seed trays on 3rd March and only 9 turned up, two of them cracked!! paid 86.40 by card. can someone ring me back, mornings are best

Example output

{
  "customer_name": "Jo",
  "order_number": null,
  "order_date": null,
  "amount_paid": 86.40,
  "currency": null,
  "complaint": "we ordered the 12 seed trays on 3rd March and only 9 turned up, two of them cracked!!",
  "wants_refund": null,
  "uncertain": [
    {
      "field": "order_number",
      "note": "Two candidates in the text, 20-4471 and 20-4417."
    },
    {
      "field": "order_date",
      "note": "3rd March, no year given."
    }
  ]
}
ShareXLinkedIn

3 of the 5 other prompts filed under Data.

Data tools and skills

1 tool and 3 skills are filed under Data, the same category as this prompt.

Tool

Julius AI

Chat with a spreadsheet and get analysis plus charts.

Freemium
Skill

Data cleaner

Profiles a messy dataset and proposes fixes before changing anything.

Claude Code, Any agent
Skill

Data table analyst

Reads a table and reports what changed, with the caveats left in.

Claude.ai, ChatGPT, Any agent
Skill

Migration safety checker

Finds the database migrations that will lock a table or break running code.

Claude Code, Cursor, Any agent

Cookies

We use only the cookies this site needs to work. Optional analytics helps us see which content is worth writing more of — nothing loads until you say yes.

Read the privacy policy