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

# Data Extraction APIs

> Public data extraction endpoints for web and email/domain intelligence workflows

## Overview

NanoGPT exposes data extraction APIs for web and email/domain intelligence workflows.

For new integrations that need a stable, discoverable entry point across these tools, use the unified [Data API](https://docs.nano-gpt.com/api-reference/endpoint/data-api.md) under `/api/v1/data`. It wraps the direct endpoints documented here without changing their response bodies, billing, validation rules, async behavior, or provider-specific options.

These endpoints require API key authentication. Each request estimates a maximum charge before running. Some endpoints require `maxTotalChargeUsd` when the result count is unbounded.

## Authentication

Use either header:

* `Authorization: Bearer YOUR_API_KEY`
* `x-api-key: YOUR_API_KEY`

## Shared Billing and Runtime Behavior

* Responses include returned data plus NanoGPT billing metadata.
* Partial results may still be billed if the extraction job produced usable data before failing.
* Result limits exist; each endpoint documents its own.
* Long-running calls can take up to several minutes.
* For unbounded searches, set `maxTotalChargeUsd` to cap spend.
* Use `resultLimit`, `resultsLimit`, or endpoint-specific max-count fields to keep runs bounded.

Typical responses include a data payload and billing metadata:

```json theme={null}
{
  "data": [],
  "meta": {
    "nanogpt": {
      "costUsd": 0.05,
      "itemsReturned": 25
    }
  }
}
```

## Endpoints

| Data API Path | Direct Endpoint | Method | Purpose |
| - | - | - | - |
| `/api/v1/data/firecrawl` | `/api/v1/firecrawl` | POST | Web page scraping, site maps, and crawls. |
| `/api/v1/data/hunter/{path}` | `/api/v1/hunter/{path}` | GET, POST | Email/domain intelligence pass-through with path selection. |

> [!NOTE]
>
> The direct endpoints remain available. Use the Data API paths when you want endpoint discovery, stable public tool IDs, body-style dispatch for dynamic clients, or response headers identifying both the Data API endpoint and direct endpoint.

## Web Crawling

```text theme={null}
POST https://api.nano-gpt.com/api/v1/firecrawl
```

### Body

```json theme={null}
{
  "operation": "scrape",
  "url": "https://example.com",
  "formats": ["markdown"],
  "waitForFinishSecs": 120
}
```

### Operations

* `scrape`
* `map`
* `crawl`

### Important Parameters

| Parameter | Description |
| - | - |
| `url` | Required target URL. |
| `operation` | Operation to run. Must be one of `scrape`, `map`, or `crawl` when provided. |
| `limit` | Page or item limit for `map` and `crawl`. |
| `search` | Optional search string for `map`. |
| `maxReturnedPages` | Maximum pages returned for `crawl`. |
| `waitForFinishSecs` | Wait time, capped at 240 seconds. |

PDF parsing has max page controls when PDF parsing is enabled.

## Hunter

Hunter endpoints provide pass-through style email/domain intelligence with NanoGPT billing. Users authenticate with NanoGPT; do not pass a separate Hunter API key.

Supported examples include:

* `domain-search`
* `email-finder`
* `email-verifier`
* `discover`

### Endpoints

```text theme={null}
GET  https://api.nano-gpt.com/api/v1/hunter/{path}
POST https://api.nano-gpt.com/api/v1/hunter/{path}
GET  https://api.nano-gpt.com/api/v1/hunter?endpoint=domain-search
POST https://api.nano-gpt.com/api/v1/hunter
```

For `GET`, query params are forwarded except:

* `api_key`
* `apiKey`
* `endpoint`
* `path`

For `POST`, JSON body params are forwarded. Use `endpoint` or `path` to select the target path. A nested `params` object is also supported.

### Response Shape

```json theme={null}
{
  "data": {},
  "meta": {
    "nanogpt": {
      "endpoint": "domain-search",
      "hunterSearchesBilled": 1,
      "hunterVerificationsBilled": 0,
      "hunterEnrichmentsBilled": 0,
      "costUsd": 0.01
    }
  }
}
```

## Example

```bash theme={null}
curl -X POST https://api.nano-gpt.com/api/v1/firecrawl \
  -H "Authorization: Bearer $NANOGPT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "operation": "scrape",
    "url": "https://example.com",
    "formats": ["markdown"]
  }'
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.