Structured Data & Markdown Output
Extract data into structured JSON formats or Markdown with custom schemas or free-form AI extraction for powerful data integration and analysis.
Three powerful output formats with schema validation and free-form AI extraction
Formats
Three Output Formats
Choose from structured JSON, per-page structured formats, or Markdown with powerful AI extraction capabilities.
Structured JSON
Define custom JSON schemas or use free-form AI extraction. Perfect for API integration, automated workflows, and structured data analysis.
Per-Page Parsing
Extract data with page-by-page structure or markdown. Perfect for detailed document analysis and page-specific workflows.
Markdown Output
Convert documents into clean, structured Markdown. Ideal for LLM context injection, content management systems, and documentation.
Examples
Real Output Examples
See how your data looks in structured JSON formats with free-form AI extraction and custom schemas.
Invoice Processing - Document Output
Complete API response showing structured financial data extracted from invoice PDF using free-form AI instructions.

curl https://api.leapocr.com/api/v1/ocr/uploads/url \
-X POST \
-H "Content-Type: application/json" \
-H "x-api-key: YOUR_API_KEY" \
-d '{
"url": "https://example.com/invoice.pdf",
"file_name": "invoice.pdf",
"format": "structured",
"instructions": "Extract all invoice details including buyer and seller info, date, invoice number, and line items with quantities and prices.",
"model": "pro-v1"
}'{
"job_id": "019aac22-ea27-7b57-a104-5cb5ae64e3cb",
"status": "completed",
"result_format": "structured",
"completed_at": "2025-11-22T20:46:19.155732+05:30",
"pages": [
{
"id": "019aac23-31e4-78fd-8911-427e43298e91",
"page_number": 1,
"result": {
"buyer_info": {
"location": "Niherne",
"name": "Vve LABRUNE"
},
"invoice_details": {
"date": "Avril 1920",
"invoice_number": "1560",
"place_of_issue": "Châteauroux"
},
"line_items": [
{
"description": "1/2 tomate",
"quantity": 24,
"total_price": 12,
"unit_price": 0.5
},
{
"description": "4/4 tomate",
"quantity": 24,
"total_price": 24,
"unit_price": 1
},
{
"description": "Lessive k",
"quantity": 10,
"total_price": 7,
"unit_price": 0.7
},
{
"description": "Boite pains epice",
"quantity": 1,
"total_price": 3.4,
"unit_price": null
},
{
"description": "Tapioca",
"quantity": 3,
"total_price": 9.75,
"unit_price": 3.25
},
{
"description": "Paquets de bougies 6 T",
"quantity": 10,
"total_price": 34,
"unit_price": 3.4
},
{
"description": "Sortie",
"quantity": null,
"total_price": 0.1,
"unit_price": null
}
],
"seller_info": {
"address": "66-68, Place Voltaire - CHATEAUROUX",
"business_type": "EPICERIE EN GROS",
"name": "MAISON JEAN ÉLION",
"phone": "89"
},
"total_amount": 90.25
}
}
],
"credits_used": 5,
"total_pages": 1,
"processed_pages": 1,
"file_name": "test-inoivce-french.pdf",
"model": "pro-v1",
"pagination": {
"page": 1,
"limit": 100,
"total": 1,
"total_pages": 1
}
}Business Card Processing - Schema Example
Small example showing structured extraction with custom JSON schema for consistent output validation.

{
"type": "object",
"properties": {
"name": {"type": "string"},
"title": {"type": "string"},
"company": {"type": "string"},
"email": {"type": "string", "format": "email"},
"phone": {"type": "string"},
"website": {"type": "string", "format": "uri"}
},
"required": ["name", "company"]
}{
"job_id": "019ab1a2-3c4d-5e6f-7a8b-9c0d1e2f3a4b",
"status": "completed",
"result_format": "per_page_structured",
"completed_at": "2025-11-23T22:10:15.123456+05:30",
"pages": [
{
"id": "019ab1a2-4d5e-6f7a-8b9c-0d1e2f3a4b5c",
"page_number": 1,
"result": {
"name": "Sarah Johnson",
"title": "Product Manager",
"company": "TechCorp Inc.",
"email": "sarah.johnson@techcorp.com",
"phone": "+1 (555) 123-4567",
"website": "https://techcorp.com"
}
}
],
"credits_used": 3,
"total_pages": 1,
"processed_pages": 1,
"file_name": "business_card.pdf",
"model": "pro-v1",
"pagination": {
"page": 1,
"limit": 100,
"total": 1,
"total_pages": 1
}
}Resume Processing - Per-Page Schema Example
Structured resume data extraction with page-level validation using custom schema.

{
Free Form JSON (Schema not specified)
}{
"job_id": "019ab18f-ece6-7948-a905-2641602f3eca",
"status": "completed",
"result_format": "per_page_structured",
"completed_at": "2025-11-23T22:03:32.557992+05:30",
"pages": [
{
"id": "019ab190-014c-736d-ad60-739fe5a7fb84",
"page_number": 1,
"result": {
"career_objective": "Full Stack Developer with 6+ years of hands-on experience designing, developing, and implementing applications and solutions using a range of technologies and programming languages. Seeking to leverage broad development experience and hands-on technical expertise in a challenging role as a Full Stack Developer.",
"education": [
{
"degree": "Bachelor of Science in Software Development",
"gpa": "3.7/4.0",
"graduation_date": "May 2017",
"institution": "Georgia Institute of Technology",
"location": "Atlanta, GA"
}
],
"personal_information": {
"contact": {
"email": "dave.wallace@gmail.com",
"linkedin": "linkedin.com/in/dave-wallace/",
"phone": "(314) 174-7754"
},
"name": "Dave Wallace",
"title": "Full Stack Developer"
},
"professional_experience": [
{
"company": "Aggregate Singularity, Inc.",
"end_date": "Present",
"location": "Atlanta, GA",
"responsibilities": [
"Developed more than 10 highly functional web applications to analyze and process data for various clients",
"Ensure applications’ ability to interact with multiple APIs and databases",
"Designed and created a knowledge management platform using technologies like Node.js, Typescript, Dgraph, React, and Mobx",
"Developed and implemented a standalone data extraction “agent” and main-application features for a financial product",
"Work closely with app development team to determine problems, testing methods, and best practices",
"Optimized the company’s complaint handling process by creating and delivering highly efficient app-based solutions"
],
"start_date": "September 2021",
"title": "Full Stack Developer"
},
{
"company": "Powerplan Inc.",
"end_date": "August 2021",
"location": "Atlanta, GA",
"responsibilities": [
"Developed full-stack applications across various platforms using latest industry-adopted technologies and frameworks",
"Played a key role in the development, improvement, and operation of web-based software",
"Gained hands-on expertise in Bootstrap, Foundation, Express, and similar back-end Node.js as well as front-end presentation frameworks and web application frameworks",
"Conducted unit and load testing for high profile customer-facing applications, which reduced system failure by 70%"
],
"start_date": "April 2018",
"title": "Full Stack Developer"
}
],
"skills": [
"JavaScript",
"HTML5 & CSS3",
"JSON",
"ReactJS",
"Node.js",
"Express",
"SQL",
"MongoDB",
"Bootstrap",
"jQuery"
]
}
}
],
"credits_used": 3,
"total_pages": 1,
"processed_pages": 1,
"file_name": "full-stack-developer-resume-example-1-2820146552.pdf",
"model": "english-pro-v1",
"pagination": {
"page": 1,
"limit": 100,
"total": 1,
"total_pages": 1
}
}Document to Markdown
Convert complex documents into clean, structured Markdown perfect for LLM context windows and content pipelines.

curl https://api.leapocr.com/api/v1/ocr/uploads/url \
-X POST \
-H "Content-Type: application/json" \
-H "x-api-key: YOUR_API_KEY" \
-d '{
"url": "https://example.com/invoice.pdf",
"file_name": "invoice.pdf",
"format": "markdown",
"model": "pro-v1"
}'{
"job_id": "019ab183-29a6-7117-86c3-54ead7875f89",
"status": "completed",
"result_format": "markdown",
"completed_at": "2025-11-23T21:50:14.755382+05:30",
"pages": [
{
"id": "019ab183-3e00-7dc7-9b7b-0f981d40f9ca",
"page_number": 1,
"result": "FORM 2 (Revised)
NOMINATION AND DECLARATION FORM
(For Unexempted / Exempted Establishments)
Declaration and Nomination Form under the Employees Provident Funds & Employees’ Pension Scheme
(Paragraph 33 and 61(1) of the Employees’ Provident Fund Scheme, 1952 & Paragraph 18
of the Employees’ Pension Scheme, 1995)
1. Name: Employee
(in block letters)
2. Father’s / husband’s Name: Whatever applicable
3. Date of Birth: employee’s DOB
4. Sex: Male / Female
5. Marital Status: Single / Married
6. Account No.: — (Blank)
7. Address:
Permanent: to be mentioned
Temporary: to be mentioned
PART A (EPF)
I hereby nominate the person(s) / cancel the nomination made by me previously and nominate the person(s), mentioned below receive the amount standing to my credit in the Employees’ Provident Fund, in the event of my Death:
<table>
<tr>
<th>Name of the nominee/ nominee’s</th>
<th>Address</th>
<th>Nominee’s relationship with the member</th>
<th>Date of Birth (must)</th>
<th>Total amount of share of accumulations in Provident Fund to be paid to each nominee</th>
<th>If the nominee is a minor, name & relationship & address of the guardian who may receive the amount during the minority of nominee</th>
</tr>
<tr>
<td>Nominee #1</td>
<td>Nominee’s address</td>
<td>Father / Mother</td>
<td>Nominee DOB</td>
<td>100%</td>
<td>2</td>
</tr>
<tr>
<td>Nominee #2 (if any)</td>
<td></td>
<td>— same</td>
<td>same</td>
<td></td>
<td>Sum should be 100% only</td>
</tr>
<tr>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
</table>
1. * Certified that I have no family as defined in para 2 (g) of the Employees’ Provident Fund Scheme, 1952 and should I acquire a family hereafter the above nomination should be deemed as cancelled.
2. * Certified that my father / mother is/ are dependent upon me.
* Strike out whichever is not applicable
Signature or thumb impression of the Subscriber
Signature"
}
],
"credits_used": 3,
"total_pages": 1,
"processed_pages": 1,
"file_name": "1-2563449077.pdf",
"model": "pro-v1",
"pagination": {
"page": 1,
"limit": 100,
"total": 1,
"total_pages": 1
}
}Schema-Based vs Free-Form Extraction
Choose between strict schema validation for compliance or flexible AI extraction for rapid development.
Schema-Based
Free-Form AI
Start Extracting Structured Data
Transform your documents into structured JSON formats with powerful AI extraction capabilities.
Ready to transform your documents with AI?