get
https://api.rebrandly.com/v1/analytics/query
Beta. Replaces the deprecated /clicks and /segments endpoints. Fields and limits
can change while it is in beta. See
Migrate to the analytics query endpoint for how each
legacy call maps to this one.
Returns click counts for one workspace, set with the Workspace header. For account-wide
numbers, send one request per workspace and add the results.
What you can ask for:
- Totals for a period: all clicks, clicks from people, QR scans, and bot clicks.
- Breakdowns by link, referrer, channel, UTM parameter, location, language, device,
platform, or browser, with sorting and pages of up to 100 rows. - Time series per hour, day, or month.
- Filters on any of those dimensions, for example one link or one country.
Periods: from the last 24 hours to the last 12 months, or a custom range of up to
2 years with start_date and end_date, in UTC, within the analytics history on the
workspace owner's plan.
Access: owner, admin, user, or viewer of the workspace. The owner's plan must include
analytics history.
Examples:
- Daily clicks for one link over 30 days:
?period=last_30_days&metrics=clicks,human_clicks,bot_clicks&granularity=day&filters[link_id]=<link_id> - Top 10 countries for the workspace over 30 days (the response example below):
?period=last_30_days&metrics=clicks&dimension=country_code&limit=10
Recent Requests
Log in to see full request history
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
Loading…
