# Semrush Website Traffic

Returns the Semrush Traffic Analytics block for a domain: monthly visits, pages per visit, average visit duration, bounce rate, desktop/mobile split, 3-month visit history, and traffic by country. Domains without coverage return covered=false (never charged).

- **Documentation:** [https://scrappa.co/docs/semrush-api/semrush_website_traffic](https://scrappa.co/docs/semrush-api/semrush_website_traffic)
- **API group:** Semrush API
- **Endpoint:** `GET https://scrappa.co/api/semrush/website/traffic`

## Authentication

Send your Scrappa API key in the `X-API-KEY` request header. Paid endpoints also support accountless x402 payments when called without an API key.

## Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `domain` | string | Yes | Root domain or subdomain to analyze (e.g. semrush.com). Subdomains resolve to their root domain where Semrush only tracks the root. |

## Example request

```bash
#!/bin/bash

curl -X GET \
    -H "x-api-key: YOUR_API_KEY_HERE" \
    "https://scrappa.co/api/semrush/website/traffic?domain=semrush.com"
```

## Example response

```json
{
    "search_parameters": {
        "engine": "semrush_website_traffic",
        "domain": "semrush.com"
    },
    "covered": true,
    "domain": "semrush.com",
    "visits": 24500000,
    "engagement": {
        "pages_per_visit": 4.2,
        "avg_visit_duration_seconds": 412,
        "bounce_rate": 0.41
    },
    "traffic_by_country": [
        {
            "country": "us",
            "share": 0.32
        }
    ]
}
```

## Errors

| Status | Error | Description |
| --- | --- | --- |
| 422 | Validation Error | A parameter failed validation. |
| 503 | Semrush Upstream Unavailable | The upstream service is temporarily unavailable. Please retry shortly. |

## More Scrappa resources

- [API documentation](https://scrappa.co/docs)
- [Full LLM-readable API reference](https://scrappa.co/llms-full.txt)
- [OpenAPI specification](https://scrappa.co/docs/api.json)
- [Pricing](https://scrappa.co/pricing)
