v1

latestOpenAPI 3.1.02026-07-2414103.5 MB

Unique Visitors - Desktop

Returns the daily or monthly unique visitors to a domain on desktop devices. Historical data goes back 37 months, depending on your subscription.

get/{domain_name}/unique-visitors/desktop_unique_visitors

Path parameters

domain_namestring required

Enter website of interest, without 'www.' or brackets {}.

Query parameters

api_keystring required

Your Similarweb API key.

start_datestring

Start month (format: YYYY-MM)

end_datestring

End month (format: YYYY-MM)

countrystring required

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.

granularitystring required

Select monthly or daily granularity. In daily granularity, if you want to retrieve last 28 days, remove the start and end date parameters.

statestring

[optional] Select US state on which to filter the data. Only available when country = US, leave blank otherwise! Supported states: az, ca, ga, fl, il, ma, mi, nj, ny, nc, oh, pa, tx, va, wa.

main_domain_onlystring

[optional] Return values for the main domain only ('true'), or include also the subdomains ('false')

formatstring

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

show_verifiedstring

[optional] Show shared Google Analytics data when available. Default value is 'false'. Google Analytics data is not available in daily granularity.

mtdstring

[optional] Default is false. when true, end_date is set to the latest available date (Month To Date).

Response

200

Example response

{
  "meta": {
    "request": {
      "granularity": "Monthly",
      "state": "az",
      "format": "json",
      "domain": "cnn.com",
      "start_date": "2023-01-01",
      "end_date": "2023-03-31",
      "country": "us"
    },
    "status": "Success",
    "last_updated": "2023-05-31"
  },
  "unique_visitors": [
    {
      "date": "2023-01-01",
      "unique_visitors": 500134.01570029836
    }
  ]
}