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

# Quickstart

> Make an authenticated request and retrieve your first Meta ads.

## 1. Get your API key

Open the [Vexqo dashboard](https://dashboard.vexqo.dev) to access your account and API keys. If you need access, contact [hello@vexqo.dev](mailto:hello@vexqo.dev).

Set your key as an environment variable in your server environment:

```bash theme={null}
export VEXQO_API_KEY="YOUR_API_KEY"
```

Use `X-API-Key: YOUR_API_KEY` on authenticated requests. `Authorization: Bearer YOUR_API_KEY` is also supported. Never include your key in a URL, public repository, or client-side application.

## 2. Search for ads

This request asks for up to 30 active ads matching “running shoes” in the United States. Successful data requests use account credits.

```bash cURL theme={null}
curl --fail-with-body --get "https://api.vexqo.dev/facebook/ads" \
  --header "X-API-Key: $VEXQO_API_KEY" \
  --data-urlencode "q=running shoes" \
  --data-urlencode "country=US" \
  --data-urlencode "limit=30"
```

```python Python theme={null}
import json
import os
from urllib.parse import urlencode
from urllib.request import Request, urlopen

query = urlencode({"q": "running shoes", "country": "US", "limit": 30})
request = Request(
    "https://api.vexqo.dev/facebook/ads?" + query,
    headers={"X-API-Key": os.environ["VEXQO_API_KEY"]},
)
with urlopen(request, timeout=180) as response:
    print(json.load(response))
```

```javascript JavaScript (Node.js) theme={null}
const query = new URLSearchParams({
  q: "running shoes", country: "US", limit: "30"
});
const response = await fetch(`https://api.vexqo.dev/facebook/ads?${query}`, {
  headers: { "X-API-Key": process.env.VEXQO_API_KEY },
  signal: AbortSignal.timeout(180000)
});
if (!response.ok) {
  throw new Error(`${response.status}: ${await response.text()}`);
}
console.log(await response.json());
```

## 3. Check your account

Read your balance, usage, limits, and current credit costs without running a collection job:

```bash theme={null}
curl --fail-with-body "https://api.vexqo.dev/account" \
  --header "X-API-Key: $VEXQO_API_KEY"
```

Successful metered data responses include `X-Credits-Used` and `X-Credits-Remaining` headers. Keep `X-Request-Id` when requesting support.

## Where to go next

> [card] [Search Meta ads](https://docs.vexqo.dev/meta-ads.md)
>
> Filters, pagination, advertiser information, and ad details.

> [card] [Credits and errors](https://docs.vexqo.dev/usage.md)
>
> Understand billing, rate limits, and retry behavior.


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