Muro
API reference

Stats endpoints

Read click analytics for one link, one tag, or every link in your account through the API.

The stats endpoints return the same click analytics you see in Links: totals, a clicks-over-time series, and breakdowns by location, device and referrer. All paths are relative to https://app.muroanalytics.com/api/v1.

MethodPathScope
GET/links/{id}/statsOne link
GET/tags/{id}/statsEvery live link carrying a tag
GET/links/statsEvery live link in your account

These cover Muro Links clicks only. There's no API for website analytics yet.

Choosing the time window

All three endpoints take the same query parameters. Pass either a named period or an exact range.

ParameterDescription
periodtoday, yesterday, 7d, 30d or 90d. Defaults to 7d, which is also used for any other value.
start_ts, end_tsUnix milliseconds. When both are valid numbers and end_ts is after start_ts, they're used instead of period.

How the named periods work:

  • All stats use UTC. today runs from midnight UTC until now, and yesterday is the previous UTC day.
  • 7d, 30d and 90d include today: 7d is today plus the previous 6 UTC days, until now.
  • The previous period used for clicks_delta_pct is the window of the same length just before.

The series is bucketed by the window's length: by minute under 1 hour, by hour under 3 days, and by day otherwise. Only buckets that had clicks are returned, so fill gaps with zero if you chart them.

GET /links/{id}/stats

{id} is a lnk_… ID or ext_{external_id}.

curl "https://app.muroanalytics.com/api/v1/links/ext_campaign-42/stats?period=30d" \
  -H "Authorization: Bearer muro_lnk_xxxxxxxxxxxx"

200 OK:

{
  "total_clicks": 284,
  "clicks_in_period": 47,
  "clicks_delta_pct": 12.4,
  "unique_visitors": 39,
  "timezone": "UTC",
  "clicks_over_time": [
    { "date": "2026-10-09", "clicks": 8 },
    { "date": "2026-10-10", "clicks": 21 }
  ],
  "top_countries": [{ "key": "US", "clicks": 21 }, { "key": "DE", "clicks": 9 }],
  "top_regions": [{ "key": "California", "clicks": 11, "country_code": "US" }],
  "top_cities": [{ "key": "Berlin", "clicks": 6, "country_code": "DE" }],
  "top_devices": [{ "key": "desktop", "clicks": 31 }, { "key": "mobile", "clicks": 16 }],
  "top_browsers": [{ "key": "Chrome", "clicks": 28 }],
  "top_os": [{ "key": "macOS", "clicks": 19 }],
  "top_referrers": [{ "key": "direct", "clicks": 22 }, { "key": "x.com", "clicks": 19 }]
}
FieldDescription
total_clicksAll-time clicks on the link.
clicks_in_periodClicks in the window.
clicks_delta_pctPercent change against the previous period, to one decimal. null when the previous period had no clicks.
unique_visitorsDistinct visitors in the window. See Unique visitors.
timezoneThe timezone used for the window and buckets. Always "UTC".
clicks_over_timeThe series, as { date, clicks }. See Series dates.
top_*Breakdowns. See Breakdown rows.

Errors: 404 LINK_NOT_FOUND if the link isn't a live link in your account.

Tag stats

GET /tags/{id}/stats

Adds up clicks across every live link that carries the tag.

curl "https://app.muroanalytics.com/api/v1/tags/tag_6a1d0c2b-4e8f-4b3a-9c7d-1e2f3a4b5c6d/stats?period=7d" \
  -H "Authorization: Bearer muro_lnk_xxxxxxxxxxxx"

The response has the same fields as link stats, without total_clicks and timezone:

{
  "clicks_in_period": 132,
  "clicks_delta_pct": -8.3,
  "unique_visitors": 104,
  "clicks_over_time": [{ "date": "2026-10-10", "clicks": 40 }],
  "top_countries": [{ "key": "US", "clicks": 58 }],
  "top_regions": [],
  "top_cities": [],
  "top_devices": [{ "key": "mobile", "clicks": 77 }],
  "top_browsers": [{ "key": "Safari", "clicks": 51 }],
  "top_os": [{ "key": "iOS", "clicks": 49 }],
  "top_referrers": [{ "key": "direct", "clicks": 70 }]
}

A tag with no links returns zeros and empty arrays, not an error. When a link is deleted, its clicks stop counting toward its tags.

Errors: 404 TAG_NOT_FOUND if the tag isn't in your account.

Account stats

GET /links/stats

Adds up clicks across every live link in your account, and ranks your top links and tags.

curl "https://app.muroanalytics.com/api/v1/links/stats?period=7d" \
  -H "Authorization: Bearer muro_lnk_xxxxxxxxxxxx"

200 OK:

{
  "total_clicks": 4918,
  "clicks_in_period": 1284,
  "clicks_delta_pct": 12.4,
  "unique_visitors": 897,
  "series": [{ "date": "2026-10-10", "clicks": 134 }],
  "top_links": [
    {
      "id": "lnk_3f2c9a1e-8b7d-4c61-9e0a-5d4b2f1c7a90",
      "title": "Product Hunt launch",
      "slug": "ph-launch",
      "short_url": "https://muro.ink/ph-launch",
      "clicks": 431
    }
  ],
  "top_tags": [
    { "id": "tag_6a1d0c2b-4e8f-4b3a-9c7d-1e2f3a4b5c6d", "name": "launch", "color": "indigo", "clicks": 579 }
  ],
  "top_countries": [{ "key": "US", "clicks": 512 }],
  "top_regions": [{ "key": "California", "clicks": 140, "country_code": "US" }],
  "top_cities": [{ "key": "London", "clicks": 88, "country_code": "GB" }],
  "top_devices": [{ "key": "mobile", "clicks": 702 }],
  "top_browsers": [{ "key": "Chrome", "clicks": 640 }],
  "top_os": [{ "key": "iOS", "clicks": 391 }],
  "top_referrers": [{ "key": "direct", "clicks": 610 }]
}
FieldDescription
total_clicksAll-time clicks across your live links.
clicks_in_period, clicks_delta_pct, unique_visitorsAs for link stats, across all your links.
seriesThe series, as { date, clicks }. Named series here, clicks_over_time on the other two endpoints.
top_linksYour top 10 links by clicks in the window, as { id, title, slug, short_url, clicks }. Links with no clicks can appear, ranked last.
top_tagsYour top 10 tags by clicks in the window, as { id, name, color, clicks }. Only tags with clicks appear. A click on a link with two tags counts toward both, so these can add up to more than clicks_in_period.
top_*Breakdowns, as below.

Reading the results

Series dates

Each series point is { "date": "…", "clicks": N }. The date format depends on the bucket:

BucketFormatExample
DayYYYY-MM-DD2026-10-10
HourYYYY-MM-DDTHH:002026-10-10T14:00
MinuteYYYY-MM-DDTHH:MM2026-10-10T14:05

All are UTC. The clicks in the series add up to clicks_in_period.

Breakdown rows

Every top_* array holds up to 10 rows of { key, clicks }, sorted by clicks, highest first.

Arraykey values
top_countriesTwo-letter country code, like US. XX when unknown.
top_regions, top_citiesThe region or city name, or Unknown. These rows also carry country_code, so "Berlin" in DE and "Berlin" in US are separate rows.
top_devicesdesktop, mobile, tablet or unknown.
top_browsersThe browser, like Chrome or Safari, or Unknown.
top_osThe operating system, like iOS or Windows, or Unknown.
top_referrersThe hostname of the site the click came from, or direct when there was no referrer.

Unique visitors

unique_visitors counts distinct visitors in the window, using an anonymous ID that resets every day. The same person clicking on two different days counts twice, and the same browser, on the same network, clicking two of your links on the same day counts once. The dashboard doesn't show this number; it's provided for your own reporting.

Clicks aren't filtered for bots

Every redirect counts as a click, including link-preview crawlers from chat apps and social networks. See What counts as a click.

Next steps

On this page