# Similarweb Demographics - Specific Groups API

> Get the traffic share of one visitor age group on a website for the selected period.

Source: https://www.sandbase.ai/apis/similarweb/traffic-by-demographics-aggregated
API reference: https://www.sandbase.ai/apis/similarweb/traffic-by-demographics-aggregated/docs

## Facts

- Provider: Similarweb
- Type: Data API
- Endpoint: `POST https://api.sandbase.ai/v1/api/similarweb/traffic-by-demographics-aggregated`
- Price: From $0.45 per call
- Capabilities: api, similarweb, web analytics
- Billing: pay per use from one SandBase balance; no provider account or subscription needed

## Call it

`POST https://api.sandbase.ai/v1/api/similarweb/traffic-by-demographics-aggregated` with `Authorization: Bearer $SANDBASE_API_KEY` and the parameters as a JSON body.

| Parameter | Type | Required | Allowed values |
| --- | --- | --- | --- |
| `age_bucket` | string | yes | 18, 25, 35, 45, 55, 65 |
| `domain` | string | yes |  |
| `end_date` | string | yes |  |
| `granularity` | string | yes | monthly |
| `metrics` | string | yes |  |
| `start_date` | string | yes |  |
| `country` | string | no | ww |
| `format` | string | no | json |
| `main_domain_only` | boolean | no |  |
| `web_source` | string | no | total |

## FAQ

### How do I use the Similarweb Demographics - Specific Groups API?

Send a POST request to https://api.sandbase.ai/v1/api/similarweb/traffic-by-demographics-aggregated with your SandBase API key in the Authorization header (Bearer) and the parameters as a JSON body. You can also try it in the Playground on this page without writing code.

### How much does the Similarweb Demographics - Specific Groups API cost?

From $0.45 per call, billed from your SandBase balance. You are only charged for calls you make; there is no subscription.

### What parameters does the Similarweb Demographics - Specific Groups API accept?

Required: age_bucket (one of 18, 25, 35, 45, 55, 65), domain (string), end_date (string), granularity (one of monthly), metrics (string) and start_date (string). Optional: country (one of ww), format (one of json), main_domain_only (boolean) and web_source (one of total). The Parameters table and the Playground on this page list every field.

### What does the Similarweb Demographics - Specific Groups API return?

A JSON response returned in the same HTTP request (synchronous).

### Do I need a Similarweb developer account or API key?

No. Similarweb Demographics - Specific Groups runs through SandBase, so one SandBase API key covers this endpoint and every other API and model in the catalog. You do not need to apply for Similarweb API access separately.

## README

### Similarweb Demographics - Specific Groups API

Get the traffic share of one visitor age group on a website for the selected period.

The response is the official Similarweb API response, unchanged.

#### Request

```bash
curl -X POST "https://api.sandbase.ai/v1/run" \
  -H "Authorization: Bearer $SANDBASE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model": "similarweb/traffic-by-demographics-aggregated", "domain": "cnn.com", "start_date": "2026-09", "end_date": "2026-09", "granularity": "monthly", "metrics": "share", "age_bucket": "25"}'
```

#### Parameters

| Name | Type | Required | Description |
|---|---|---|---|
| `age_bucket` | string | Yes | Select one age bucket; age_bucket must be provided exactly once. |
| `country` | string | No | Worldwide data only; values are case-insensitive. |
| `domain` | string | Yes | domain |
| `end_date` | string | Yes | end_date |
| `format` | string | No | format |
| `granularity` | string | Yes | granularity |
| `main_domain_only` | boolean | No | main_domain_only |
| `metrics` | string | Yes | Comma-separated metrics. Supported: share. |
| `start_date` | string | Yes | start_date |
| `web_source` | string | No | web_source |

#### Pricing

$0.45 per metric per month between start_date and end_date. Failed calls are not charged.
