domainstringwymagane
domain
https://api.sandbase.ai/v1/api/similarweb/demographicsGet the age and gender breakdown of a website's visitors for the selected period.
Twój wynik pojawi się tutaj
Uzupełnij dane wejściowe, a następnie kliknij Uruchom.
Returns the age and gender split of a website's visitors for a chosen period. You send a domain, a start_date, an end_date and granularity, and get back shares between 0 and 1.
curl -X POST "https://api.sandbase.ai/v1/api/similarweb/demographics" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"start_date": "2026-09", "end_date": "2026-09", "country": "ww", "domain": "cnn.com", "granularity": "monthly"}'
The result is returned in outputs[0].data.
| Name | Type | Required | Description |
|---|---|---|---|
domain | string | Yes | domain |
end_date | string | Yes | end_date |
granularity | string | Yes | granularity |
start_date | string | Yes | start_date |
country | string | No | Worldwide data only; values are case-insensitive. |
format | string | No | format |
main_domain_only | boolean | No | main_domain_only |
web_source | string | No | web_source |
Real response for the request above, trimmed: lists keep their first item and long strings are cut.
{
"data": [
{
"age_18_to_24_share": 0.08070495283947984,
"age_25_to_34_share": 0.18467731979384402,
"age_35_to_44_share": 0.2067059697120009,
"age_45_to_54_share": 0.20790595096812176,
"age_55_to_64_share": 0.19314205276691135,
"age_65_plus_share": 0.12686375391964214,
"female_share": 0.4365859576418669,
"male_share": 0.5634140423581331
}
],
"meta": {
"last_updated": "2026-09-30",
"request": {
"country": "ww",
"domain": "cnn.com",
"end_date": "2026-09-30",
"format": "json",
"granularity": "monthly",
"metrics": [
"age_18_to_24_share"
],
"start_date": "2026-09-01"
},
"status": "success"
}
}
| Field | Meaning |
|---|---|
data[].age_18_to_24_share | Share of the site's visitors aged 18 to 24, as a fraction of 1. |
data[].age_25_to_34_share / age_35_to_44_share / age_45_to_54_share / age_55_to_64_share | Share of visitors in each of these age brackets, as a fraction of 1. |
data[].age_65_plus_share | Share of visitors aged 65 and older. |
data[].female_share / male_share | Share of visitors who are female and male. The two values add up to 1. |
meta.last_updated | Date the data was last updated, in YYYY-MM-DD format. |
meta.request.start_date / meta.request.end_date | Period the data covers. A monthly request is expanded to the first and last day of the month. |
meta.request.metrics | Metric names tied to the request. |
meta.status | Shows success when the call worked. |
YYYY-MM format, for example 2026-09.country accepts only ww, which means worldwide data. granularity accepts only monthly.$0.6 per successful call. Failed calls are not charged.
Zacznij tworzyć
Punkt końcowy API platformy z jednolitym uwierzytelnianiem i śledzeniem użycia.
curl -X POST "https://api.sandbase.ai/v1/api/similarweb/demographics" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"domain": "cnn.com",
"country": "ww",
"end_date": "2026-09",
"start_date": "2026-09",
"granularity": "monthly"
}'Ustaw klucz API SandBase w środowisku serwera. Żądania używają uwierzytelniania Bearer.
export SANDBASE_API_KEY="YOUR_API_KEY"Przechowuj klucz na serwerze. Nie ujawniaj go w kodzie przeglądarkowym.
domainstringwymaganedomain
end_datestringwymaganeend_date
granularitystringwymaganegranularity
Możliwe wartości: monthly
start_datestringwymaganestart_date
countrystringWorldwide data only; values are case-insensitive.
Domyślnie: "ww"
Możliwe wartości: ww
formatstringformat
Możliwe wartości: json
main_domain_onlybooleanmain_domain_only
web_sourcestringweb_source
Możliwe wartości: total
Zapisany przykładowy response dla tego API; podczas wyświetlania nie jest wykonywane żadne żądanie na żywo.
Nie opublikowano zapisanego response. Uruchom API w Playground, aby sprawdzić jego odpowiedź.
Odkryj więcej
| API | Cena | Odpowiedź |
|---|---|---|
Similarweb DemographicsTo API Similarweb | $0.60 za wywołanie | JSON |
Similarweb | Od $0.225 za wywołanie | JSON |
Similarweb | Od $0.375 za wywołanie | JSON |
Similarweb | Od $0.15 za wywołanie | JSON |
Similarweb | Od $0.525 za wywołanie | JSON |
Similarweb | Od $1.275 za wywołanie | JSON |
Przewodniki:Similarweb API: request examples and billingSimilarweb API pricing: data credits vs per-call prices
Pytania
Wyślij żądanie POST do https://api.sandbase.ai/v1/api/similarweb/demographics z kluczem API SandBase w nagłówku Authorization (Bearer) oraz parametrami w treści JSON. Możesz też wypróbować je w Playground na tej stronie bez pisania kodu.
$0.60 za wywołanie, rozliczane z salda SandBase. Płacisz tylko za wykonane wywołania; nie ma subskrypcji.
Wymagane: domain (string), end_date (string), granularity (jedna z opcji: monthly) i start_date (string). Opcjonalne: country (jedna z opcji: ww), format (jedna z opcji: json), main_domain_only (boolean) i web_source (jedna z opcji: total). Tabela Parameters oraz Playground na tej stronie zawierają wszystkie pola.
Odpowiedź JSON zwrócona w tym samym żądaniu HTTP (synchronicznie). README na tej stronie zawiera przykładową odpowiedź.
Nie. Similarweb Demographics działa przez SandBase, więc jeden klucz API SandBase obejmuje ten endpoint i każde inne API oraz model w katalogu. Nie musisz osobno ubiegać się o dostęp do API Similarweb.