Get Visitors by Hostname
get_hostnamesGet visitors grouped by hostname and ranked by visitor count for a date range, so you can see which domains and subdomains a tracked website receives traffic on.
Instructions
Get visitors grouped by hostname, ranked by visitors descending, for a date range. Useful when one website tracks several domains or subdomains (www, app, docs); a single-domain site returns one row. Use get_pages for paths within a host, and pass filter_hostname to any other tool to scope it to one host. Rows carry value, visitors, revenue, and percentage with pagination.total. Dates default to the last 30 days; all filter_* arguments apply. Requires websiteId or domain with a workspace token.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "get_hostnames"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| endAt | No | ISO 8601 end of the reporting window (e.g. "2026-01-31"). Defaults to now. | |
| limit | No | Page size: how many of the top rows to return in this call. Omit for 100. Raise it for long-tail lists such as cities or pages. | |
| domain | No | Website domain from list_websites (e.g. "example.com"). Alternative to websiteId with a workspace token. | |
| offset | No | How many top rows to skip, for reading the next page. Omit to start at the first row. Keep paging while offset + limit is below pagination.total in the response. | |
| startAt | No | ISO 8601 start of the reporting window, date or datetime (e.g. "2026-01-01" or "2026-01-01T00:00:00Z"). Defaults to 30 days ago. | |
| timezone | No | IANA timezone used to bound and bucket the window (e.g. "America/New_York"). Defaults to the website timezone from get_metadata. | |
| filter_os | No | Filter by operating system name as returned by get_operating_systems (e.g. "iOS") | |
| websiteId | No | Website ID from list_websites. Required with a workspace token unless domain is given; ignored with a website key. | |
| filter_ref | No | Keep only visitors whose first visit landed on a URL carrying this ?ref= tag, e.g. "producthunt" for example.com/?ref=producthunt. Values appear in get_breakdown with dimension ref. | |
| filter_via | No | Keep only sessions that landed on a URL carrying this ?via= tag, e.g. "jane" for example.com/?via=jane, the form many affiliate and referral programs use. Matched per session, not per visitor. Values appear in get_breakdown with dimension via. | |
| filter_city | No | Filter by city name as returned by get_cities | |
| filter_goal | No | Keep only visitors who completed this goal in the window, e.g. "newsletter_signup". Goal names appear in get_goals. | |
| filter_page | No | Keep only sessions that viewed this page path at least once, e.g. "/pricing". Paths appear in get_pages. | |
| workspaceId | No | Workspace to act in: an id from list_workspaces. Omit to use the default workspace. Use the same workspaceId for every call about the same workspace, since ids from one workspace do not exist in another | |
| filter_device | No | Filter by device type as returned by get_devices: "Desktop", "Mobile" or "Tablet". Matching is case-sensitive. | |
| filter_region | No | Filter by region name as returned by get_regions (e.g. "California") | |
| filter_source | No | Keep only visitors whose first visit landed on a URL carrying this ?source= tag, e.g. "twitter" for example.com/?source=twitter. Values appear in get_breakdown with dimension source. | |
| filter_browser | No | Filter by browser name as returned by get_browsers (e.g. "Chrome") | |
| filter_channel | No | Keep only visitors whose first visit came from this marketing channel, e.g. "Organic Search" or "Paid Social". Channel names appear in get_channels. | |
| filter_country | No | Filter by country name as returned by get_countries (e.g. "United States"). Every filter_* value accepts the same operators: "v" is, "!v" is not, "~v" contains, "!~v" does not contain, "a|b" any of. Filters combine with AND. | |
| filter_hostname | No | Keep only sessions with at least one pageview on this hostname, e.g. "app.example.com" when one website tracks several domains or subdomains. Hostnames appear in get_hostnames. | |
| filter_referrer | No | Filter by referrer as returned by get_referrers: a source name such as "Google" for recognized sites, otherwise the domain | |
| filter_utm_term | No | Keep only visitors whose first visit was tagged with this utm_term, usually the paid search keyword, e.g. "web analytics". Values appear in get_breakdown with dimension utm_term. | |
| filter_entry_page | No | Keep only visitors whose first visit started on this page path, their landing page, e.g. "/blog/launch". Paths appear in get_breakdown with dimension entry_page. | |
| filter_utm_medium | No | Keep only visitors whose first visit was tagged with this utm_medium, the kind of marketing, e.g. "email", "cpc" or "social". Values appear in get_breakdown with dimension utm_medium. | |
| filter_utm_source | No | Keep only visitors whose first visit was tagged with this utm_source, the sender of the traffic, e.g. "newsletter" or "google". Values appear in get_breakdown with dimension utm_source. | |
| filter_utm_content | No | Keep only visitors whose first visit was tagged with this utm_content, which tells apart ads or links in one campaign, e.g. "header_cta". Values appear in get_breakdown with dimension utm_content. | |
| filter_utm_campaign | No | Keep only visitors whose first visit was tagged with this utm_campaign, the campaign name, e.g. "black_friday". Values appear in get_campaigns. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |