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

# Quick start

> Start scraping in 2 minutes with the FetchFox API

## Get your API key

First, you'll need your API key. You can find it in the FetchFox app at [<u>https://fetchfox.ai/settings/api-keys</u>](https://fetchfox.ai/settings/api-keys).

## Run a scrape

To run a scrape, use the `/api/scrape` endpoint with:

* `pattern` for URL matching
* `template` for the output shape

<CodeGroup>
  ```bash curl theme={null}
  curl -X POST https://api.fetchfox.ai/api/scrape \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{
    "pattern": "https://pokemondb.net/pokedex/*",
    "template": {
      "name": "Pokemon name",
      "number": "Pokemon number"
    },
    "maxVisits": 10,
    "maxExtracts": 10
  }'
  ```

  ```javascript javascript theme={null}
  import fetch from 'node-fetch';

  const response = await fetch('https://api.fetchfox.ai/api/scrape', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
      'Authorization': 'Bearer YOUR_API_KEY',
    },
    body: JSON.stringify({
      pattern: 'https://pokemondb.net/pokedex/*',
      template: {
        name: 'Pokemon name',
        number: 'Pokemon number'
      },
      maxVisits: 10,
      maxExtracts: 10
    })
  });

  const data = await response.json();
  console.log(data.results.items);
  ```

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

  url = "https://api.fetchfox.ai/api/scrape"
  headers = {
      "Content-Type": "application/json",
      "Authorization": "Bearer YOUR_API_KEY"
  }
  data = {
      "pattern": "https://pokemondb.net/pokedex/*",
      "template": {
          "name": "Pokemon name",
          "number": "Pokemon number"
      },
      "maxVisits": 10,
      "maxExtracts": 10
  }

  response = requests.post(url, json=data, headers=headers)
  print(response.json()['results']['items'])
  ```
</CodeGroup>

When the scrape finishes, the extracted items are in `results.items`.

## Next Steps

Now that you've run a simple scrape:

1. Learn how [crawl and extract work together](/scrape-equals-crawl-extract).
2. Learn how to [control crawl scope and cost](/limiting-crawls).
