> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cambioml.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Parse

> Parse the full content from your documents into markdown format.

## Overview

Using `AnyParser`, you can parse the full content from your documents into markdown.

## Setup

Refer to the [Quickstart guide](/quickstart/#setup) to install the AnyParser SDK and get your api key.

Next, set up your `AnyParser` sync or async client.

```python anyparser_sync.py theme={null}
from any_parser import AnyParser

ap = AnyParser(api_key="...")

md_output, total_time = ap.parse(file_path="/path/to/your/file")
```

```python anyparser_async.py theme={null}
from any_parser import AnyParser

ap = AnyParser(api_key="...")

file_id = ap.async_parse(file_path="/path/to/your/file")

md = ap.async_fetch(file_id=file_id)
```

## Output

A string containing the markdown representation of the given file.

## Full Notebook Examples

Check out these notebooks for more detailed examples of using AnyParser BASE and PRO models:

* [AnyParser Sync API](https://github.com/CambioML/any-parser/blob/main/examples/parse_pdf.ipynb): Parse 1-2 pages short documents (which will time out after 30 seconds).
* [AnyParser Async API](https://github.com/CambioML/any-parser/blob/main/examples/async_parse_pdf.ipynb): Parse longer documents (which may take longer than 30 seconds).

<CardGroup cols={2}>
  <Card title="AnyParser Sync Parse Example" icon="bolt-lightning" href="https://github.com/CambioML/any-parser/blob/main/examples/parse_pdf.ipynb">
    Extracting content from a table of contents.
  </Card>

  <Card title="AnyParser Async Parse Example" icon="rotate" href="https://github.com/CambioML/any-parser/blob/main/examples/async_parse_pdf.ipynb">
    Extracting content from a table of contents.
  </Card>
</CardGroup>
