AgentPMT - The Agentic Economy

File To JSON Parsing

Core Utility
$0.05/requestMin Purchase: 20Min Purchase Price: $1

Details

A powerful data extraction tool that converts a wide variety of binary file formats into structured JSON output for seamless processing in automated workflows. This function supports eleven extraction actions covering the most common document and data formats: CSV for tabular data parsing, HTML for extracting text content and table structures using BeautifulSoup, JSON for direct parsing, ICS for calendar event extraction, ODS and XLSX/XLS for spreadsheet processing across LibreOffice and Microsoft Excel formats, PDF for page-by-page text and table extraction using pdfplumber, RTF for rich text conversion, and plain text for basic content retrieval. Users can provide input via base64-encoded content or cloud storage file ID, with support for files up to 100MB and inline base64 returns up to 10MB. Configurable parameters allow fine-tuning of extraction behavior including maximum row limits up to 100,000 for spreadsheets, maximum page counts up to 1,000 for PDFs, and toggles for text and table inclusion in applicable formats. The function automatically handles character encoding detection and returns consistently structured JSON with customizable output field names, making it an essential bridge between raw file uploads and downstream data processing pipelines.

Use Cases

Parsing uploaded CSV files into structured records for database import or API submission, extracting tabular data from HTML reports or web page snapshots for analysis, converting calendar ICS files into event objects for scheduling integrations, processing Excel spreadsheets from user uploads into JSON for data transformation pipelines, extracting text and tables from PDF invoices or contracts for automated document processing, converting legacy XLS files from enterprise systems into modern JSON formats, parsing RTF documents from email attachments into plaintext for content indexing, scraping structured table data from HTML exports for reporting dashboards, extracting event details from shared calendar files for synchronization workflows, converting uploaded spreadsheet data into API-compatible payloads for third-party service integrations

Parameters

(required properties listed first)

action*required
Type:string
Description:Extraction action to perform.
Allowed values:
get_instructionsextract-csvextract-htmlextract-jsonextract-icsextract-odsextract-pdfextract-rtfextract-textextract-xlsextract-xlsxfile-to-base64
input_base64
Type:string
Description:Base64-encoded file content.
file_id
Type:string
Description:File ID from cloud storage.
output_field
Type:string
Description:Output field name for extracted data.
Default:data
max_rows
Type:integer
Description:Maximum rows to extract.
Default:1000
Minimum:1
Maximum:100000
max_pages
Type:integer
Description:Maximum pages to process (PDF).
Default:50
Minimum:1
Maximum:1000
include_text
Type:boolean
Description:Include text extraction where applicable.
Default:true
include_tables
Type:boolean
Description:Include table extraction where applicable.
Default:true

API Example

curl -X POST "https://api.agentpmt.com/products/purchase" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: your-api-key-here" \
  -H "X-Budget-Key: your-budget-key-here" \
  -d '{
    "product_id": "695c3797767df5adfd9bc872",
    "parameters": {
      "action": "get_instructions",
      "output_field": "data",
      "max_rows": 1000,
      "max_pages": 50,
      "include_text": true,
      "include_tables": true
    }
  }'

Login to view your API and budget keys. The example above uses placeholder values. Sign in to see personalized code with your actual credentials.

About The Developer

Apoth3osis logo

Apoth3osis

13 stars

Joined Agent Payment: August 14, 2025

We build tools that enable AI agents to excel in the mathematical realm.

Our small team develops experimental and unique solutions in the AI arena, with a strong focus on modular computing for agentic applications and custom model deployment. We have handled projects for a variety of applications across many sectors, from algorithmic trading and financial analysis, to molecular simulations and predictions, to habitat and biodiversity monitoring and wildlife conservation.

Dependencies

1 dependencies will be automatically added when you enable this product.

Dependencies are not available to view right now.