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

# API Reference

> Programmatically purge and refresh your pre-rendered cache with the Hado SEO API

<Info>
  The API is currently in **beta**. Endpoints and behavior are subject to change.
</Info>

The Hado SEO API lets you **programmatically invalidate cached pages** so search engines always see your latest content, and **export your crawl analytics** as JSON. When you purge a page, Hado SEO immediately re-renders it and stores fresh HTML in the cache — no waiting for the next bot visit.

## Base URL

All API requests are made to:

```
https://api.hadoseo.com/functions/v1
```

## Available Endpoints

<CardGroup cols={2}>
  <Card title="Purge Cache" icon="arrows-rotate" href="/api-reference/endpoint/purge-cache">
    Re-render a specific page and refresh its cached HTML
  </Card>

  <Card title="Export Analytics" icon="chart-line" href="/api-reference/endpoint/export-analytics">
    Export granular per-bot analytics for all your domains as JSON
  </Card>

  <Card title="Export Crawl Analytics" icon="robot" href="/api-reference/endpoint/export-crawl-analytics">
    Export verified/declared crawl totals per bot, with intent taxonomy
  </Card>

  <Card title="Export Page Analytics" icon="file-lines" href="/api-reference/endpoint/export-page-analytics">
    Export page-level crawl counts — which pages bots hit, with tier splits
  </Card>

  <Card title="Export AI Referrals" icon="sparkles" href="/api-reference/endpoint/export-ai-referrals">
    Export human visits arriving from AI answer surfaces (ChatGPT, Perplexity, …)
  </Card>
</CardGroup>

## Quick Start

<Steps>
  <Step title="Create an API Key">
    Go to **Settings → API Keys** in your [Hado SEO dashboard](https://hadoseo.com/dashboard) and create a new key. Copy it immediately — it's only shown once.
  </Step>

  <Step title="Purge a page">
    ```bash theme={null}
    curl -X POST https://api.hadoseo.com/functions/v1/purge-cache \
      -H "Authorization: Bearer hado_sk_your_key_here" \
      -H "Content-Type: application/json" \
      -d '{
        "domain": "yourapp.com",
        "path": "/about"
      }'
    ```
  </Step>

  <Step title="Verify">
    The response confirms the re-render job is queued. Fresh HTML will be available in cache within seconds.
  </Step>
</Steps>

## Common Use Cases

| Use Case                | When to Purge                                   |
| ----------------------- | ----------------------------------------------- |
| **CMS content update**  | After publishing or editing a blog post         |
| **Product page change** | After updating pricing, images, or descriptions |
| **Landing page deploy** | After pushing changes to your app               |

## Rate Limits

All API calls are subject to per-minute and monthly rate limits based on your plan. See [Authentication](/api-reference/authentication) for details.
