v1
latestOpenAPI 3.1.02026-07-2414103.5 MBSegment Traffic and Engagement - Total
Returns traffic and engagement metrics for a predefined segment of a website, including visits, traffic share, unique visitors, bounce rate, and more — across both desktop and mobile traffic. Historical data goes back 37 months, depending on your subscription.
Path parameters
Enter a segment ID, as defined on the Similarweb platform. Without brackets {}.
Query parameters
Your Similarweb API key.
Start month (format: YYYY-MM)
End month (format: YYYY-MM)
Country filter, as a 2-letter ISO country code, or "world" for worldwide.
List the metrics for which you would like to retrieve data for, separated by commas. Possible values: visits, bounce-rate, pages-per-visit, visit-duration, page-views, share, unique-visitors
Set the granularity for the returned values. Possible values: 'daily', 'weekly' or 'monthly'.
Format in which the reply should be returned. Possible values: 'json' (default) or 'xml'.
When 'true', end_date is set to the latest available days' data (month-to-date). To use, set granularity to 'daily'. Default value is 'false'.
Response
200
Example response
{
"meta": {
"request": {
"granularity": "Monthly",
"segment": "d0c606f2-747f-4a9e-bab9-26e72fce8ee7",
"segment_name": "aviv test",
"metrics": [
"Visits"
],
"format": "json",
"start_date": "2023-11-01",
"end_date": "2023-12-31",
"country": "us"
},
"status": "Success",
"last_updated": "2024-02-29",
"device": "Total"
},
"segments": [
{
"date": "2023-11-01",
"visits": 53952554.05631079,
"bounce_rate": 0.6969141012865219,
"pages_per_visit": 1.6759571055146425,
"visit_duration": 143.4720663292357,
"page_views": 90422166.33133692,
"share": 0.1448702929180798,
"unique_visitors": 16986267.90153005,
"confidence": "High"
}
]
}