# Similarweb

> Pull Similarweb web traffic and market intelligence - visits, engagement, traffic sources, geography, similar sites, and keywords.

Lets an agent pull web traffic and market-intelligence data from Similarweb's Digital Intelligence API: total visits, engagement metrics (pages per visit, average visit duration, bounce rate), traffic-source breakdowns, geographic distribution, similar (competitor) sites, and top keywords for any domain.

## What it can do

| Method | What it does |
| --- | --- |
| `similarweb_visits` | Total website visits over time. |
| `similarweb_pages_per_visit` | Average pages per visit over time. |
| `similarweb_avg_visit_duration` | Average visit duration (seconds) over time. |
| `similarweb_bounce_rate` | Bounce rate over time. |
| `similarweb_traffic_sources` | Traffic-source share (direct, referral, search, social, mail, paid). |
| `similarweb_geo` | Geographic distribution of visitors by country. |
| `similarweb_similar_sites` | Similar (competitor) sites for a domain. |
| `similarweb_keywords` | Top organic and paid keywords driving traffic. |
| `similarweb_request` | Generic passthrough to any endpoint for full API coverage. |

Most methods accept `start_date` / `end_date` (in `YYYY-MM`), a `country` (two-letter code or `world`), and a `granularity` (`daily`, `weekly`, `monthly`).

## How to get your key

Similarweb authenticates with an API key passed as the `api_key` query parameter. FlyMyAI adds it to every request for you - you only paste the key.

1. Sign in to your Similarweb account.
2. Open the **API** section of your account.
3. Copy your API key.
4. Paste it into FlyMyAI.

## Fields to fill

| FlyMyAI field | Where it comes from |
| --- | --- |
| `SIMILARWEB_API_KEY` | Similarweb account -> API section |

## Troubleshooting

- **`401` / `403`** - the key is wrong, or your subscription does not include API access for that report. Re-copy the key or check your plan.
- **`Bad request` on a metric** - check the date format (`YYYY-MM`), the `country` code, and the `granularity` value.
- **No data for a domain** - Similarweb only has data for domains above a traffic threshold. Smaller sites may return empty results.
- **Quota errors** - each call spends API units; pace your requests and watch your remaining quota.

## Links

- [Similarweb API documentation](https://developers.similarweb.com/docs)
- [Similarweb](https://www.similarweb.com/)
