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

# Fetch overview

> Real-time page content extractor. Clean, LLM-ready markdown from any public URL — HTML or PDF.

**Fetch** is Linkup's real-time page content extractor. Given a URL, the `/fetch` route returns a
clean markdown rendering of the page, optimized for LLM consumption. HTML and PDF documents are
supported. Optional JavaScript rendering is available for HTML pages, along with optional raw HTML
and extracted image URLs.

## Parameters

| Parameter        | Default      | Description                                                                                                                                                                                  |
| ---------------- | ------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `url`            | *(required)* | The page to fetch. Must be a valid HTTP/HTTPS URL.                                                                                                                                           |
| `renderJs`       | `false`      | Render the page's JavaScript before extraction. Required for client-side-rendered pages (SPAs, dashboards, many modern marketing sites). See [pricing](#pricing) for the rendered-call rate. |
| `includeRawHtml` | `false`      | Return the original HTML alongside the markdown. Used for custom parsing or preservation of structures that markdown does not represent.                                                     |
| `extractImages`  | `false`      | Return a separate list of image URLs alongside the markdown.                                                                                                                                 |

<Tip>
  In agentic pipelines, set `renderJs` to `true` by default. Many modern sites
  are client-side rendered; switch to `false` only after confirming the
  specific site renders server-side.
</Tip>

When and how to use `renderJs`, `includeRawHtml`, and `extractImages` is
covered on the
[Fetch best practices](/pages/documentation/endpoints/fetch/best-practices)
page.

## Constraints

<Warning>
  **Fetch** supports HTML and PDF. Other binary URLs (ZIP, image, video) return
  a `400` error.
</Warning>

<Warning>
  **Fetch** does not authenticate. Pages behind a login wall return what
  an anonymous visitor would see.
</Warning>

<Info>
  Pages over 20 MB return a `400` error. See the
  [rate-limits page](/pages/documentation/platform/rate-limits) for
  request-rate limits.
</Info>

## Pricing

| Mode                  | Cost             |
| --------------------- | ---------------- |
| `renderJs` is `false` | \$0.001 per call |
| `renderJs` is `true`  | \$0.005 per call |

## Example

<Card title="Get your API key" icon="key" href="https://app.linkup.so" horizontal="True">
  Create a Linkup account for free to get your API key.
</Card>

<CodeGroup>
  ```python python theme={"system"}
  from linkup import LinkupClient

  client = LinkupClient(api_key="<YOUR_LINKUP_API_KEY>")

  response = client.fetch(
      url="https://docs.linkup.so",
      render_js=True,
  )
  print(response)
  ```

  ```js js theme={"system"}
  import { LinkupClient } from 'linkup-sdk';

  const client = new LinkupClient({ apiKey: '<YOUR_LINKUP_API_KEY>' });

  const response = await client.fetch({
    url: 'https://docs.linkup.so',
    renderJs: true,
  });
  console.log(response);
  ```

  ```shell curl theme={"system"}
  curl -X POST "https://api.linkup.so/v1/fetch" \
    -H "Authorization: Bearer $LINKUP_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "url": "https://docs.linkup.so",
      "renderJs": true
    }'
  ```
</CodeGroup>

Successful response:

```json theme={"system"}
{
  "markdown": "# Linkup docs\n\nGet started for free, no credit card required...",
  "rawHtml": "<!doctype html><html>...</html>",
  "images": [
    { "alt": "Linkup logo", "url": "https://docs.linkup.so/images/logo-light.svg" }
  ]
}
```

`rawHtml` is present only when `includeRawHtml` is `true`. `images` is present
only when `extractImages` is `true`. `markdown` is always returned.

## Next

<CardGroup cols={3}>
  <Card title="Best practices" icon="sparkles" href="/pages/documentation/endpoints/fetch/best-practices">
    JavaScript rendering, common patterns, constraints.
  </Card>

  <Card title="For AI agents" icon="robot" href="/pages/documentation/endpoints/fetch/for-agents">
    Tool definition and integration prompt.
  </Card>

  <Card title="API reference" icon="code" href="/pages/documentation/endpoints/fetch/reference">
    Full parameter spec and response schema.
  </Card>
</CardGroup>
