domainstringobbligatorio
domain
https://api.sandbase.ai/v1/api/similarweb/traffic-engagementGet a website's traffic and engagement metrics month by month: visits, page views, visit duration, bounce rate and more.
Il tuo output apparirà qui
Completa gli input, poi fai clic su Esegui.
Returns monthly traffic and engagement metrics for a website, such as visits, page views, visit duration and bounce rate. You send a domain, a start_date and end_date in YYYY-MM format, and the metrics you want.
curl -X POST "https://api.sandbase.ai/v1/api/similarweb/traffic-engagement" \
-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", "metrics": "visits", "granularity": "monthly"}'
The result is returned in outputs[0].data.
| Name | Type | Required | Description |
|---|---|---|---|
domain | string | Yes | domain |
end_date | string | Yes | end_date |
metrics | string | Yes | metrics |
start_date | string | Yes | start_date |
country | string | No | Worldwide data only; values are case-insensitive. |
granularity | string | No | granularity |
main_domain_only | boolean | No | main_domain_only |
mtd | boolean | No | mtd |
web_source | string | No | web_source |
Real response for the request above, trimmed: lists keep their first item and long strings are cut.
{
"data": [
{
"average_visit_duration": null,
"bounce_rate": null,
"date": "2026-09-01",
"new_users": null,
"page_views": null,
"pages_per_visit": null,
"returning_users": null,
"unique_visitors": null,
"visits": 188658557.46746868
}
],
"meta": {
"last_updated": "2026-09-30",
"request": {
"country": "ww",
"domain": "cnn.com",
"end_date": "2026-09-30",
"format": "json",
"granularity": "monthly",
"main_domain_only": true,
"metrics": [
"visits"
],
"mtd": false,
"start_date": "2026-09-01",
"state": null,
"web_source": "total",
"week_start_day": "default"
},
"status": "success"
}
}
| Field | Meaning |
|---|---|
data[].date | First day of the month the row covers, for example 2026-09-01. |
data[].visits | Estimated number of visits to the domain in that month. This is a decimal number, not a rounded count. |
data[].page_views / data[].unique_visitors | Page view and unique visitor counts for the month. They are null unless you request those metrics. |
data[].average_visit_duration / data[].bounce_rate / data[].pages_per_visit | Engagement metrics for the month. They are null unless you request them in metrics. |
data[].new_users / data[].returning_users | Split of new and returning users for the month. They are null when not requested. |
meta.last_updated | Date of the most recent data update, shown as YYYY-MM-DD. |
meta.request.web_source | Traffic source the data covers. The response shows total when you do not set web_source. |
meta.request.metrics | List of the metrics the call applied. |
meta.status | Shows success when the call worked. |
null in each data[] row, so set metrics to the ones you need.start_date and end_date as YYYY-MM. The response echoes them as full dates, such as 2026-09-01 and 2026-09-30.web_source to desktop, mobile_web or total to pick the traffic source. country accepts only ww (worldwide) and granularity accepts only monthly.Billed at the actual cost of each call, about $0.075 for the request above. Failed calls are not charged.
Use Traffic & Engagement for a domain's month-by-month estimates. Start with a bare domain such as cnn.com, metrics set to visits, and explicit start_date and end_date in YYYY-MM format. Both dates and metrics are required. country accepts ww only and granularity accepts monthly only. main_domain_only defaults to true; choose its value explicitly when comparing domains. Check the current schema before adding other metrics or options. A past month is not a guarantee of available data.
Pricing checked on 2026-11-08: the list-price formula is $0.075 × metric count × month count, including both the start and end month. One visits metric for 2026-09 through 2026-09 estimates $0.075; 2026-04 through 2026-09 estimates $0.45. Two supported metrics over those six months estimate $0.90. These are formula estimates before any applicable discount, not billed test results. Inspect current pricing before execution; the base price alone is not the cost of every date range.
For a single-month overview instead, inspect Website Traffic Snapshot.
Already have a SandBase API key? Keep it in your local SANDBASE_API_KEY environment variable, then open this page's API tab for the POST route and request body. Send the key as a Bearer token; never put it in a shared prompt or committed file. The Quickstart explains setup.
Already connected your agent to SandBase? Ask it to inspect this exact endpoint and show the domain, month range and estimated cost before running one request. Starting a new project? Give your agent the setup Skill, this page URL and your research question. The Markdown quickstart is also ready to hand to an agent.
Read the completed response from outputs[0].data. The reference response illustrates one result; inspect your own returned payload before writing a parser. Missing estimates are unknown, not zero. Follow the Similarweb Python and traffic-comparison guide for a bounded request.
Inizia a costruire
Endpoint API della piattaforma con autenticazione unificata e tracciamento dell'utilizzo.
curl -X POST "https://api.sandbase.ai/v1/api/similarweb/traffic-engagement" \
-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",
"granularity": "monthly",
"main_domain_only": true
}'Imposta la tua SandBase API key nell'ambiente del server. Le richieste usano l'autenticazione Bearer.
export SANDBASE_API_KEY="YOUR_API_KEY"Conserva la tua key sul server. Non esporla nel codice del browser.
domainstringobbligatoriodomain
end_datestringobbligatorioend_date
metricsstringobbligatoriometrics
start_datestringobbligatoriostart_date
countrystringWorldwide data only; values are case-insensitive.
Predefinito: "ww"
Valori possibili: ww
granularitystringgranularity
Predefinito: "monthly"
Valori possibili: monthly
main_domain_onlybooleanmain_domain_only
Predefinito: true
mtdbooleanmtd
web_sourcestringweb_source
Valori possibili: desktop, mobile_web, total
Risposta di esempio salvata per questa API; durante la visualizzazione non viene eseguita alcuna richiesta live.
Nessuna risposta salvata è stata pubblicata. Esegui l'API in Playground per ispezionarne la risposta.
Esplora altro
| API | Prezzo | Risposta |
|---|---|---|
Similarweb Traffic & EngagementQuesta API Similarweb | Da $0.075 per chiamata | JSON |
Similarweb | Da $0.225 per chiamata | JSON |
Similarweb | Da $0.375 per chiamata | JSON |
Similarweb | Da $0.15 per chiamata | JSON |
Similarweb | Da $0.525 per chiamata | JSON |
Similarweb | $0.60 per chiamata | JSON |
Guide:Similarweb API: request examples and billingSimilarweb API pricing: data credits vs per-call prices
Domande
Invia una richiesta POST a https://api.sandbase.ai/v1/api/similarweb/traffic-engagement con la tua chiave API di SandBase nell'header Authorization (Bearer) e i parametri nel body JSON. Puoi anche provarla nel Playground di questa pagina senza scrivere codice.
A partire da $0.075 per chiamata, addebitato dal tuo saldo SandBase. Paghi solo le chiamate che effettui; non c'è alcun abbonamento.
Richiesti: domain (string), end_date (string), metrics (string) e start_date (string). Facoltativi: country (uno tra ww), granularity (uno tra monthly), main_domain_only (boolean), mtd (boolean) e web_source (uno tra desktop, mobile_web, total). La tabella dei parametri e il Playground di questa pagina elencano tutti i campi.
Una risposta JSON restituita nella stessa richiesta HTTP (sincrona). Il README di questa pagina include una risposta di esempio.
No. Similarweb Traffic & Engagement funziona tramite SandBase, quindi una sola chiave API SandBase copre questo endpoint e tutte le altre API e modelli del catalogo. Non è necessario richiedere separatamente l'accesso alle API Similarweb.
No. Come verificato il 2026-11-08, la formula del listino moltiplica $0.075 per il numero di metriche e per il numero di mesi inclusi. Una metrica su sei mesi stima $0.45 prima di eventuali sconti applicabili. Questa è una stima di formula, non un risultato di test fatturato; ricontrolla i prezzi attuali prima di eseguire.
Invia domain, start_date, end_date e metrics. Usa un dominio nudo come cnn.com, date in formato YYYY-MM e la metrica visits. Questa variante accetta solo country ww e granularity monthly. main_domain_only è true per impostazione predefinita. Usa la scheda API per la richiesta POST esatta; non dare per scontato che un mese passato abbia stime disponibili.
Dagli il Skill di configurazione di SandBase e l'URL di questo endpoint, poi specifica il tuo dominio, i mesi e la metrica. Se è già connesso, chiedigli prima di ispezionare l'endpoint. Tieni la chiave in una variabile d'ambiente locale e rivedi il costo completo della richiesta prima dell'esecuzione. Leggi solo outputs[0].data da una risposta completata; data mancante non significa zero visite.