# Similarweb Website Subdomains API

> Get a website's subdomains with each subdomain's share of traffic.

Source: https://www.sandbase.ai/apis/similarweb/subdomains
API reference: https://www.sandbase.ai/apis/similarweb/subdomains/docs

## Facts

- Provider: Similarweb
- Type: Data API
- Endpoint: `POST https://api.sandbase.ai/v1/api/similarweb/subdomains`
- Price: From $0.15 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/subdomains` with `Authorization: Bearer $SANDBASE_API_KEY` and the parameters as a JSON body.

| Parameter | Type | Required | Allowed values |
| --- | --- | --- | --- |
| `domain` | string | yes |  |
| `end_date` | string | yes |  |
| `limit` | integer | yes |  |
| `start_date` | string | yes |  |
| `country` | string | no | ww |
| `granularity` | string | no | monthly |
| `main_domain_only` | boolean | no |  |
| `offset` | integer | no |  |
| `traffic_source` | string | no |  |
| `web_source` | string | no | desktop, mobile_web, total |

## FAQ

### How do I use the Similarweb Website Subdomains API?

Send a POST request to https://api.sandbase.ai/v1/api/similarweb/subdomains 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 Website Subdomains API cost?

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

### What parameters does the Similarweb Website Subdomains API accept?

Required: domain (string), end_date (string), limit (integer) and start_date (string). Optional: country (one of ww), granularity (one of monthly), main_domain_only (boolean), offset (integer), traffic_source (string) and web_source (one of desktop, mobile_web, total). The Parameters table and the Playground on this page list every field.

### What does the Similarweb Website Subdomains API return?

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

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

No. Similarweb Website Subdomains 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 Website Subdomains API

Get a website's subdomains with each subdomain's share of traffic.

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/subdomains", "start_date": "2026-09", "end_date": "2026-09", "country": "ww", "domain": "cnn.com", "limit": 2, "granularity": "monthly"}'
```

#### Parameters

| Name | Type | Required | Description |
|---|---|---|---|
| `country` | string | No | Worldwide data only; values are case-insensitive. |
| `domain` | string | Yes | domain |
| `end_date` | string | Yes | end_date |
| `granularity` | string | No | granularity |
| `limit` | integer | Yes | limit |
| `main_domain_only` | boolean | No | main_domain_only |
| `offset` | integer | No | offset |
| `start_date` | string | Yes | start_date |
| `traffic_source` | string | No | traffic_source |
| `web_source` | string | No | web_source |

#### Pricing

$0.15 per returned row (2 Similarweb credits), up to 20 rows; billed on rows returned. Failed calls are not charged.
