Skip to main content
Parse converts a document into Markdown and structured elements while preserving reading order, layout, tables, images, and formulas. In this quickstart, you will:
  1. Install Python dependencies.
  2. Parse a sample document.
  3. Read the returned Markdown and structured elements.

Before you start

You need:
  • TextIn API credentials. See Authentication.
  • Python 3.8 or later.
  • A PDF, image, Office file, or other supported document.
You can use your own file or download a sample PDF.
For supported formats, file size limits, page limits, and concurrency limits, see Supported Files & Limits.

Install dependencies

Set your credentials

Set your App ID and Secret Code as environment variables:
On Windows PowerShell:

Parse a document

Inspect the result

Parse returns Markdown and structured document elements.

Markdown

Use Markdown for:
  • RAG pipelines and retrieval workflows
  • Full-text search and indexing
  • Summarization
  • Chunking and embedding
  • Document review applications

Structured elements

Each element represents part of the document, such as a heading, paragraph, table, image, or formula.
Common element fields include:
See Response Format for the complete response structure.

Save the output

Use cURL

You can also call the synchronous Parse endpoint directly:

Use the Python SDK

If you are using the Python SDK version that exposes XParseClient, you can call Parse like this:
The SDK interface may vary by package version. If your installed xparse-client package does not expose XParseClient, use the REST API examples above or the SDK version provided by TextIn.

Next steps

Configuration

Customize parsing behavior and returned data.

Response Format

Understand Markdown, elements, coordinates, pages, and optional fields.

Async Processing

Process large documents or batch jobs asynchronously.

Examples

Explore common implementation patterns.