domainstringwymagane
Bare website hostname without scheme, path, port, or credentials.
https://api.sandbase.ai/v1/api/similarweb/website-traffic-trendGet a website's monthly traffic trend for chosen metrics over a date range.
Twój wynik pojawi się tutaj
Uzupełnij dane wejściowe, a następnie kliknij Uruchom.
Returns a month-by-month series of traffic metrics for one website, such as visits. It needs a bare domain and can take a month range and up to four metrics.
visits for a news site over the past year to spot seasonal peaks.curl -X POST "https://api.sandbase.ai/v1/api/similarweb/website-traffic-trend" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"domain": "cnn.com", "metrics": "visits", "start_date": "2026-09", "end_date": "2026-09"}'
The result is returned in outputs[0].data.
| Name | Type | Required | Description |
|---|---|---|---|
domain | string | Yes | Bare website hostname without scheme, path, port, or credentials. |
country | string | No | Worldwide data only; values are case-insensitive. |
end_date | string | No | Inclusive last complete UTC month in YYYY-MM. |
metrics | string | No | One to four supported Traffic & Engagement metrics. |
start_date | string | No | Inclusive first month in YYYY-MM; provide together with end_date. |
Real response for the request above, trimmed: lists keep their first item and long strings are cut.
{
"data": {
"domain": "cnn.com",
"metrics": [
"visits"
],
"points": [
{
"month": "2026-09",
"values": {
"visits": 188658557.46746868
}
}
]
},
"meta": {
"country": "ww",
"end_date": "2026-09",
"granularity": "monthly",
"request_id": "imc_91aa25a81e679d4b7772b913a288205efd08f83d9fb1f33e22cd849fd23f7b4e",
"retrieved_at": "2026-11-03T07:43:23.747988977Z",
"source": "similarweb",
"start_date": "2026-09"
}
}
| Field | Meaning |
|---|---|
data.domain | The website the series describes, echoed from the request. |
data.metrics | List of the metrics included in the response, for example visits. |
data.points[].month | The month for this data point, in YYYY-MM format. |
data.points[].values.visits | The value of the visits metric for that month. The response shows it as a decimal number, so round it before display. Other requested metrics appear as sibling keys under values. |
meta.country | The region the data covers. The response shows ww. |
meta.start_date / meta.end_date | The first and last month of the range the response covers. |
meta.granularity | Time step between points. The response shows monthly. |
meta.retrieved_at | UTC timestamp of when the data was fetched. |
start_date and end_date together, both in YYYY-MM format. end_date must be a complete UTC month.domain as a bare hostname such as cnn.com, with no scheme, path or port.metrics takes one to four values in a single string. It defaults to visits.$0.45 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/website-traffic-trend" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"domain": "cnn.com",
"country": "ww",
"metrics": "visits",
"end_date": "2026-09",
"start_date": "2026-09"
}'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.
domainstringwymaganeBare website hostname without scheme, path, port, or credentials.
countrystringWorldwide data only; values are case-insensitive.
Domyślnie: "ww"
Możliwe wartości: ww
end_datestringInclusive last complete UTC month in YYYY-MM.
metricsstringOne to four supported Traffic & Engagement metrics.
Domyślnie: "visits"
start_datestringInclusive first month in YYYY-MM; provide together with end_date.
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 | $0.45 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 | $0.60 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/website-traffic-trend 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.45 za wywołanie, rozliczane z salda SandBase. Płacisz tylko za wykonane wywołania; nie ma subskrypcji.
Wymagane: domain (string). Opcjonalne: country (jedna z opcji: ww), end_date (string), metrics (string) i start_date (string). 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 Website Traffic Trend 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.