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

# Quickstart

> Create an API key and scrape your first page.

This quickstart returns readable Markdown and HTML for a public URL.

## Prerequisites

You need a PagePith account and an API key. Create a key in the [PagePith dashboard](https://pagepith.com/dashboard/keys).

<Warning>
  Copy a new API key when it is created. PagePith does not display the full key again. Keep it out of client-side code and source control.
</Warning>

## Scrape a page

<Steps>
  <Step title="Set your API key">
    Store the key in an environment variable.

    ```bash theme={null}
    export PAGEPITH_API_KEY="pp_live_your_key"
    ```
  </Step>

  <Step title="Send a request">
    Call the synchronous scrape endpoint with a public URL.

    ```bash theme={null}
    curl --request POST \
      --url https://api.pagepith.com/v1/api/scrape \
      --header "Authorization: Bearer $PAGEPITH_API_KEY" \
      --header "Content-Type: application/json" \
      --data '{"url":"https://example.com"}'
    ```
  </Step>

  <Step title="Use the result">
    Read `markdown` for model-ready text or `html` when you need the extracted markup.

    ```json theme={null}
    {
      "url": "https://example.com",
      "finalUrl": "https://example.com/",
      "title": "Example Domain",
      "markdown": "# Example Domain\n\nThis domain is for use in illustrative examples...",
      "html": "<h1>Example Domain</h1>...",
      "contentLength": 125,
      "fetchedAt": "2026-08-28T12:00:00.000Z",
      "cached": false
    }
    ```
  </Step>
</Steps>

<Check>
  A `200` response means the page was converted successfully. Each successful scrape consumes one credit.
</Check>

## Next steps

<Columns cols={2}>
  <Card title="Scraping options" icon="sliders" href="/guides/scraping">
    Control caching, timeouts, and dynamic content.
  </Card>

  <Card title="API reference" icon="brackets-curly" href="/api-reference/scrape/scrape-url">
    Open the interactive endpoint reference.
  </Card>
</Columns>
