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

# API Overview

> Complete reference for the WebLinq API endpoints

The WebLinq API provides powerful endpoints for web automation and content extraction. All endpoints use REST principles and require authentication.

<Note>Need to get started quickly? Check our [quickstart guide](/quickstart).</Note>

## Base URL

```bash theme={null}
https://api.weblinq.dev/v1
```

<Warning>Always use HTTPS and include the `/v1` prefix for all API requests.</Warning>

## Authentication

Include your API key in the Authorization header:

<CodeGroup>
  ```bash cURL theme={null}
  curl -X POST "https://api.weblinq.dev/v1/web/screenshot" \
    -H "Authorization: Bearer YOUR_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{"url": "https://example.com"}'
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch('https://api.weblinq.dev/v1/web/screenshot', {
    method: 'POST',
    headers: {
      Authorization: 'Bearer YOUR_API_KEY',
      'Content-Type': 'application/json',
    },
    body: JSON.stringify({ url: 'https://example.com' }),
  });
  ```

  ```python Python theme={null}
  import requests

  response = requests.post(
      'https://api.weblinq.dev/v1/web/screenshot',
      headers={'Authorization': 'Bearer YOUR_API_KEY'},
      json={'url': 'https://example.com'}
  )
  ```
</CodeGroup>

## Available Endpoints

### Web Operations

<CardGroup cols={2}>
  <Card title="Screenshot" icon="camera" href="/api-reference/web/take-a-screenshot-of-a-web-page">
    Capture webpage screenshots
  </Card>

  <Card title="Extract Markdown" icon="markdown" href="/api-reference/web/extract-markdown-from-a-web-page">
    Convert pages to clean Markdown
  </Card>

  <Card title="Extract JSON" icon="layout-template" href="/api-reference/web/extract-structured-data-from-a-web-page">
    AI-powered structured data extraction
  </Card>

  <Card title="Generate PDF" icon="file" href="/api-reference/web/generate-pdf-from-a-web-page">
    Create PDFs from web pages
  </Card>

  <Card title="Get HTML Content" icon="code" href="/api-reference/web/get-raw-html-content-from-a-web-page">
    Retrieve raw HTML content
  </Card>

  <Card title="Scrape Elements" icon="bug" href="/api-reference/web/scrape-specific-elements-from-a-web-page">
    Extract specific elements with selectors
  </Card>

  <Card title="Extract Links" icon="link" href="/api-reference/web/extract-links-from-a-web-page">
    Get all links from a page
  </Card>

  <Card title="Web Search" icon="search" href="/api-reference/web/search-the-web">
    Search the web programmatically
  </Card>
</CardGroup>

### API Keys

<CardGroup cols={2}>
  <Card title="Create Key" icon="key" href="/api-reference/api-keys/create-a-new-api-key">
    Generate a new API key
  </Card>

  <Card title="List Keys" icon="list" href="/api-reference/api-keys/list-user-api-keys">
    View all your API keys
  </Card>

  <Card title="Get Key Details" icon="file-key-2" href="/api-reference/api-keys/get-api-key-details">
    View details of a specific key
  </Card>

  <Card title="Delete Key" icon="trash" href="/api-reference/api-keys/delete-api-key">
    Revoke an API key
  </Card>
</CardGroup>

### User

<CardGroup cols={2}>
  <Card title="Current User" icon="user" href="/api-reference/user/get-current-user-information">
    Get current user details
  </Card>
</CardGroup>

### Files

<CardGroup cols={2}>
  <Card title="List Files" icon="folder" href="/api-reference/files/list-user-files">
    View stored files
  </Card>

  <Card title="Delete File" icon="trash" href="/api-reference/files/delete-a-file">
    Remove stored files
  </Card>
</CardGroup>

## Response Format

All responses follow a standard format:

```json Success Response theme={null}
{
  "success": true,
  "data": {
    // Your response data here
  },
  "creditsCost": 1
}
```

```json Error Response theme={null}
{
  "success": false,
  "error": {
    "message": "Error description",
    "code": "error_code"
  }
}
```

## Rate Limits

Rate limits are enforced per API key:

* **Free plan**: 100 requests/hour
* **Pro plan**: 1,000 requests/hour

Rate limit headers are included in responses:

* `X-RateLimit-Limit`: Total requests allowed
* `X-RateLimit-Remaining`: Remaining requests
* `X-RateLimit-Reset`: Reset timestamp

## Need Help?

<CardGroup cols={2}>
  <Card title="Get Support" icon="envelope" href="mailto:support@weblinq.dev">
    Email us for technical support
  </Card>

  <Card title="Error Handling" icon="triangle-exclamation" href="/api-reference/errors">
    Learn about error codes
  </Card>
</CardGroup>
