Segment 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.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
🚧

Premium Endpoint

This endpoint is available to customers with access to the Segment Analysis feature in their subscription. Reach out to your Account Manager for more information.

👀

How to find your Segment ID

  • Use one of the 'List Segments' endpoints OR
  • Visit an existing segment on the Similarweb platform, and extract the ID from the URL.
DeviceGranularityMetrics
all trafficmonthly,
weekly,
daily,
last 28 days (daily, weekly)
visits,
bounce-rate,
pages-per-visit,
visit-duration,
page-views,
traffic-share,
unique-visitors
all trafficmonthlyunique-visitors

To retrieve 'Last 28 days' data, remove the start_date & end_date parameters and set granularity to "daily" or "weekly".

📘

REST API Pricing

Data credits will be charged per metric requested, e.g - metrics=visits (1 data credits), metrics=visits, share (2 data credits) up to total of 7 metrics (7 data credits). Pulling this data is limited to 1 concurrent request.
For example:
Requesting 2 months, monthly granularity, 2 metrics - the price would be 4 data credits.

When Using MTD flag it will charge additional credits.

❗️

REST API Limitations

  • Only individual segments are supported.

Now also available via Batch API

You can now retrieve this data via our Batch API to streamline large-scale data access and reduce complexity.

Benefits

  • Get bulk results in a single CSV file
  • Automate delivery to: AWS S3, Google Cloud Storage, Snowflake
  • Easily integrate into your data pipeline
  • Schedule and track report generation
  • Reduce the number of individual API calls

Limitations

  • Supported granularities: daily, monthly
  • Up to 100 segment IDs per request

Need help?

See our Batch API starter guide or check out the Batch API Reference to get started and discover more features.

Path Params
string
required
Defaults to Add_Segment_ID

Enter a segment ID, as defined on the Similarweb platform. Without brackets {}.

Query Params
string
required
Defaults to Add_Your_API_KEY

Your Similarweb API key.

string
Defaults to 2024-01

Start month (format: YYYY-MM)

string
Defaults to 2024-03

End month (format: YYYY-MM)

string
required
Defaults to us

Country filter, as a 2-letter ISO country code, or "world" for worldwide.

string
required
Defaults to visits,share,unique-visitors

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

string
Defaults to monthly

Set the granularity for the returned values. Possible values: 'daily', 'weekly' or 'monthly'.

string
Defaults to json

Format in which the reply should be returned. Possible values: 'json' (default) or 'xml'.

string
Defaults to false

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

Language
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json