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

# API Introduction

> Complete technical reference for Crawleo's REST API. Learn about base URLs, authentication, error handling, rate limits, and best practices for integration.

## Base URL

All API requests should be made to:

```
https://api.crawleo.dev
```

## Authentication

All endpoints require authentication using your API key. You can provide it in one of two ways:

**Option 1: Authorization Header**

```bash theme={null}
Authorization: Bearer YOUR_API_KEY
```

**Option 2: X-API-Key Header**

```bash theme={null}
x-api-key: YOUR_API_KEY
```

<Card title="Get Your API Key" icon="key" href="https://www.crawleo.dev/dashboard/api-keys">
  Sign up and subscribe to get your API key.
</Card>

## Available Endpoints

Crawleo provides four API endpoints:

<CardGroup cols={2}>
  <Card title="Bing Search API" icon="magnifying-glass" href="/api-reference/endpoint/search">
    **GET /search**

    Bing-powered web search with auto-crawling and content extraction. Optimized for LLM and RAG pipelines.
  </Card>

  <Card title="Google Search API" icon="google" href="/api-reference/endpoint/google-search">
    **GET /google-search**

    Google SERP data with knowledge graphs, news, images, places, and shopping. Ideal for SEO and lead generation.
  </Card>

  <Card title="Crawler API" icon="spider-web" href="/api-reference/endpoint/crawler">
    **GET /crawl**

    Direct URL crawling with JavaScript rendering support.
  </Card>

  <Card title="Headful Browser API" icon="browser" href="/api-reference/endpoint/headful-browser">
    **GET /headful-browser**

    Premium headed browser crawling with advanced anti-bot evasion. For sites that block standard crawlers.
  </Card>
</CardGroup>

<Info>
  **Which Search API should I use?** Use the **Bing Search API** for LLM/RAG workflows — it supports auto-crawling and returns page content in Markdown. Use the **Google Search API** for SEO monitoring, lead generation, and structured SERP analysis.
</Info>

## Output Formats

Both APIs support multiple output formats optimized for different use cases:

| Format            | Crawler Parameter              | Description                  | Best For                  |
| ----------------- | ------------------------------ | ---------------------------- | ------------------------- |
| **Raw HTML**      | `raw_html=true`                | Original page source         | Full content preservation |
| **Enhanced HTML** | `enhanced_html=true` (default) | Clean HTML (no ads, scripts) | Cleaner processing        |
| **Markdown**      | `markdown=true` (default)      | Structured markdown          | RAG pipelines, LLMs       |

<Tip>
  Use **Markdown** output (enabled by default) for AI/LLM applications to minimize token usage.
</Tip>

## Response Format

All responses are returned as JSON. Successful responses include the requested data, while errors return an error object:

```json theme={null}
{
  "error": {
    "code": "ERROR_CODE",
    "message": "Human-readable error message"
  }
}
```

## HTTP Status Codes

| Code  | Description                                           |
| ----- | ----------------------------------------------------- |
| `200` | Success                                               |
| `400` | Bad Request - Invalid parameters                      |
| `401` | Unauthorized - Invalid or missing API key             |
| `403` | Forbidden - Insufficient permissions                  |
| `429` | Credits exhausted or concurrent request limit reached |
| `500` | Internal Server Error                                 |

## Credits System

API usage is tracked using credits. Each API call deducts credits from your monthly allowance based on your subscription plan.

### Credit Costs by Endpoint

| API Endpoint                      | Credits Cost                   |
| --------------------------------- | ------------------------------ |
| **Bing Search API**               | 10 credits per page of results |
| **Google Search API**             | 10 credits per request         |
| **Crawl API** (HTTP request)      | 1 credit per URL               |
| **Crawl API** (browser rendering) | 10 credits per URL             |

### Subscription Plans

| Plan      | Credits/Month | Concurrent Requests | Price       |
| --------- | ------------- | ------------------- | ----------- |
| Free      | 10,000        | 5                   | \$0/month   |
| Developer | 100,000       | 20                  | \$20/month  |
| Pro       | 1,000,000     | 50                  | \$100/month |
| Scale     | 2,500,000     | 100                 | \$200/month |

<Card title="Credits & Pricing" icon="coins" href="/credits-pricing">
  View detailed pricing, usage examples, and optimization tips.
</Card>

## Concurrent Request Limits

Each plan has a maximum number of concurrent requests. If you exceed this limit, you'll receive a `429` response with the message:

```
Concurrent request limit reached ({limit}). Please wait for other requests to finish.
```

## MCP Integration

For AI assistants and IDEs, Crawleo also provides a Model Context Protocol (MCP) endpoint:

```
https://api.crawleo.dev/mcp
```

<Card title="MCP Integration" icon="plug" href="/mcp/overview">
  Learn how to connect AI assistants directly to Crawleo.
</Card>
