PDF to Structured JSON for Openclaw

A zero-configuration, intelligent document parsing skill powered by Laiye ADP that converts PDFs, images, and Office documents into structured JSON layouts.

laiye-adp
v1.0.0
May 20, 2026
0
722
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install adp-pdf-to-structured-json

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install adp-pdf-to-structured-json using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is PDF to Structured JSON?

The PDF to Structured JSON skill is a universal document parsing utility powered by the Laiye Agentic Document Processing (ADP) platform. It allows AI agents and development environments to leverage advanced model capabilities to intelligently parse over 10 document formats—including PDFs, images, scanned files, and Microsoft Office documents. The underlying processor automatically reads document contents, extracts key-value fields, recognizes complex structures, and outputs standard, production-ready JSON data.

By integrating this powerful utility as part of Openclaw Skills, developers can easily automate cross-system document processing, build high-speed content pipelines, and structure previously unsearchable assets. The engine is highly optimized, completing the parsing of a standard 200-page document in under 30 seconds with minimal friction, making it an excellent fit for modern automated workflows.

PDF to Structured JSON Use Cases

Integrating this parser from Openclaw Skills allows teams to optimize their document intelligence workflows across various key scenarios:

  • Structured Storage and Semantic Retrieval: Convert complex PDFs, invoices, and legal documents into clean JSON to facilitate instant database inserts and vector database indexing.
  • Automated Data Processing Pipelines: Build automated ETL ingestion workflows that standardize incoming documents across different formats into unified schemas for downstream systems.
  • Document Content Auditing: Systematically review high-volume paperwork by validating OCR confidence levels and checking exact positional coordinates returned in the JSON payload.
  • System-to-System Document Exchange: Standardize documents originating from divergent third-party suppliers, clients, or platforms into a common structured interface.

How PDF to Structured JSON Works

  1. CLI Verification: The skill checks for and installs the official Laiye ADP CLI wrapper globally on the host environment.
  2. Credential Setup: Secures the connection by configuring the local CLI with the developer's API Key and the corresponding regional API Base URL.
  3. Application ID Mapping: Retrieves the specialized "Document Parsing" template ID from the active account using cached lookup strategies for high-speed reuse.
  4. Execution and Upload: Sends the target local file, online URL, or Base64-encoded string to the secure parsing engine.
  5. Structured Parsing & Output: Parses the detailed layout, converting columns, tables, images, and texts into a cleanly formatted, multi-tier JSON response containing positional geometry and OCR confidence ratings.

PDF to Structured JSON Setup

Follow these configuration steps to integrate the Laiye ADP document parsing tools into Openclaw Skills:

1. Install the CLI Dependency

# Standard cross-platform installation via npm
npm install -g @laiye-adp/agentic-doc-parse-and-extract-cli

2. Configure Your API Environment

Set up your credentials by linking your unique API key and designating your regional gateway endpoint:

adp config set --api-key <your-api-key>
adp config set --api-base-url https://adp-global.laiye.com

Verify that your CLI configuration is active and authenticated:

adp config get

3. Retrieve the Parse Application ID

Query the out-of-the-box (OOTB) capabilities to locate the application template for general Document Parsing:

adp app-id list --app-type 0

Save the retrieved app_id (prefixed with ootb_) in your local context for direct reuse in document parsing calls.

PDF to Structured JSON Data Schema & Taxonomy

The skill translates documents into a standardized JSON schema, organized into top-level execution metrics, page metrics, and detailed positional coordinates.

Top-Level Properties

Property Type Description
success boolean Indicates if the parsing completed without errors
status number Task status code of the processor
task_id string Unique tracking code for audit trails
file_url string URL reference of the processed file (if remote)
doc_recognize_result array Contains structured extraction results categorized by page

Page-Level Properties (doc_recognize_result[])

Property Type Description
page_num number Sequential index of the page (1-based)
document_content string Full unstructured text dump of the entire page
document_details array Highly granular breakdown of individual structural elements

Element-Level Properties (document_details[])

Property Type Description
type string Element type classification: Picture, Title, Text, or Table
text string Extracted text content. Complex tables are formatted as valid HTML <table> strings
position array Array containing bounding coordinate vertices {x, y}
ocr_confidence object Metric containing overall, mean, and minimum OCR confidence ratings

PDF to Structured JSON Advanced Features

  • Bulk & Folder Batching: Process whole local directories or batch URL targets concurrently while outputting distinct JSON files directly to designated export directories.
  • Asynchronous Execution Mode: Submit large PDFs or high-volume batches in async mode, receiving a task ID to query, monitor, or watch progress without blocking connection processes.
  • Resilient Error Resolution: Stderr outputs structured JSON metadata defining error types (e.g., authorization, argument errors) alongside troubleshooting instructions and retry flags.
  • Configurable Command-Line Retry: Increase job reliability across flaky networks by utilizing parameters such as --retry to automate execution recovery.
  • Multi-Modal Feature Set: Convert complicated unstructured tabular fields into clean, structured HTML layouts ready for browser-rendering or programmatic spreadsheet reconstruction.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*