v1
latestOpenAPI 3.1.02026-07-2414103.5 MBSegment Marketing Channels - Desktop
Returns traffic and engagement data per traffic channel for a predefined website segment. Desktop devices only. 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. To see the country filters you have access to, please refer to the Check Capabilities endpoint.
List the metrics for which you would like to retrieve data for, separated by commas. Possible values: visits, pages-per-visit, page-views, bounce-rate, and visit-duration.
Set the granularity for the returned values. Possible values: 'weekly' or 'monthly'.
[optional] Format in which the reply should be returned. Possible values: 'json' (default) or 'xml'.
Response
200
Example response
{
"meta": {
"request": {
"granularity": "Monthly",
"segment_name": "Segment Name",
"segment": "001d2632-dccd-4c1b-bbde-d49fd0ac4d4e",
"metrics": [
"Visits"
],
"format": "json",
"start_date": "2023-01-01",
"end_date": "2023-03-31",
"country": "us"
},
"status": "Success",
"last_updated": "2024-09-30",
"device": "Desktop"
},
"segments": [
{
"source_type": "Paid Search",
"metrics": [
{
"date": "2023-01-01",
"confidence": "High",
"visits": 4122.098034259826,
"bounce_rate": 0.8695538404445536,
"pages_per_visit": 1.4039165853782025,
"visit_duration": 42.66338312898276,
"page_views": 5787.081796852256
}
]
}
]
}