Prompt
JSON Extractor Prompt
Extract structured JSON from any unstructured text.
1 min readupdated 2026-07-04
/ quick answer
Use for entity extraction, invoice parsing, form intake, etc. Extract structured JSON from any unstructured text.
Extract structured JSON from any unstructured text. Use for entity extraction, invoice parsing, form intake, etc. Copy the prompt below, swap the bracketed variables for your own context, and run it in any capable model. This prompt node is part of the Onexial knowledge graph and links to related concepts, workflows and tools below.
Context
Use for entity extraction, invoice parsing, form intake, etc.
Prompt
Extract the fields from the text into JSON matching this schema:
Schema:
{{schema}}
Text:
{{text}}
Rules:
- Return ONLY valid JSON.
- If a field is missing, use null.
- Never invent values.Example Output
{ "vendor": "Notion", "amount": 96.00, "currency": "USD", "date": "2026-07-01" }/ frequently asked
What does the JSON Extractor Prompt prompt do?
Use for entity extraction, invoice parsing, form intake, etc.
Which AI models work with this prompt?
It is model-agnostic: it works with any capable general model. Replace the bracketed variables with your own context before running it.
What output should I expect?
{ "vendor": "Notion", "amount": 96.00, "currency": "USD", "date": "2026-07-01" }.
↳ connected nodes
Prompt↳ linked
Prompt Improver Prompt
Iterate a weak prompt into a strong one using best practices.
Prompt↳ linked
Brand Voice Extractor Prompt
Distill 5-10 samples into a reusable brand voice profile.
Dictionary↳ linked
Prompt Chaining
Pipelining LLM calls where each step's output feeds the next.
Dictionary↳ linked
Few-Shot Prompting
Showing the model 2–5 examples of the task inside the prompt so it mirrors the pattern.
Dictionary↳ linked
System Prompt
A high-priority instruction that sets the model's role, tone and constraints for the whole conversation.
Dictionary↳ linked
JSON Mode
A model setting that guarantees valid JSON output.