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

# fetchbean quickstart: make your first API call

> Create your fetchbean API key, make your first curated tool call, and learn how to reach any provider directly — all in under five minutes.

This guide walks you through everything you need to go from zero to a working fetchbean integration. You'll create an API key, call the `POST /v1/search` curated endpoint using your preferred language, and see how to reach any provider directly with the raw `POST /v1/run` endpoint.

<Steps>
  <Step title="Create an API key">
    Sign in at [fetchbean.com/app](https://fetchbean.com/app) and open the **API Keys** section. Click **Create key**, give it a name, and copy the value immediately — it starts with `fb_` and is shown only once. Store it as the environment variable `FETCHBEAN_KEY` so it stays out of your source code.
  </Step>

  <Step title="Call a curated tool">
    Curated tools return the same clean, normalized JSON shape every time, regardless of which provider powers them. Use `POST /v1/search` to run a web search:

    <CodeGroup>
      ```bash curl theme={null}
      curl https://api.fetchbean.com/v1/search \
        -H "X-API-Key: $FETCHBEAN_KEY" \
        -H "Content-Type: application/json" \
        -d '{"query":"best vector databases"}'
      ```

      ```javascript Node.js theme={null}
      const res = await fetch('https://api.fetchbean.com/v1/search', {
        method: 'POST',
        headers: {
          'X-API-Key': process.env.FETCHBEAN_KEY,
          'Content-Type': 'application/json'
        },
        body: JSON.stringify({ query: 'best vector databases' })
      });
      const data = await res.json();
      console.log(data.results);
      ```

      ```python Python theme={null}
      import httpx, os
      res = httpx.post(
          'https://api.fetchbean.com/v1/search',
          headers={'X-API-Key': os.environ["FETCHBEAN_KEY"]},
          json={'query': 'best vector databases'}
      )
      print(res.json()['results'])
      ```
    </CodeGroup>

    A successful search returns results in this shape:

    ```json theme={null}
    {
      "results": [
        { "title": "Qdrant", "url": "https://qdrant.tech", "snippet": "..." },
        { "title": "Weaviate", "url": "https://weaviate.io", "snippet": "..." }
      ]
    }
    ```
  </Step>

  <Step title="Or call any provider raw">
    Use `POST /v1/run` to reach a specific provider endpoint directly and receive its native, unmodified response. This gives you full access to provider-specific parameters:

    ```bash theme={null}
    curl https://api.fetchbean.com/v1/run \
      -H "X-API-Key: $FETCHBEAN_KEY" \
      -H "Content-Type: application/json" \
      -d '{"provider":"exa","endpoint":"/search","input":{"query":"best vector databases","numResults":10}}'
    ```
  </Step>
</Steps>

<Note>
  fetchbean uses prepaid credits and only charges you for calls that succeed. Provider failures and timeouts are billed at zero — you never pay for an error that wasn't your fault.
</Note>

## Next steps

<CardGroup cols={2}>
  <Card title="Credits & billing" icon="credit-card" href="/concepts/credits">
    Understand how prepaid credits work and how calls are priced.
  </Card>

  <Card title="Authentication" icon="key" href="/authentication">
    Learn how to manage API keys and handle authentication errors.
  </Card>
</CardGroup>
