API and MCP
Use Analytics from an AI agent through the Hep.gg MCP server, and the dashboard endpoints behind it.
Analytics is used from the dashboard and through the Hep.gg MCP server. There is no API key for it: the dashboard endpoints below use your signed-in session and are listed for completeness, not for programmatic use.
From an AI agent (MCP)
Connect your agent to the Hep.gg MCP server and it can work with Analytics for you:
| Tool | What it does |
|---|---|
hepgg_analytics_sites_list | Your sites, visitors online right now, and your site limit |
hepgg_analytics_site_create | Add a site and get the tag to paste |
hepgg_analytics_stats_summary | Visitors, pageviews, sessions, bounce rate and duration for a period, with the previous period and a series |
hepgg_analytics_top | Top pages, sources, countries, devices and more for a period |
hepgg_analytics_live | Visitors right now and pageviews per minute |
Periods are today, 24h, 7d, 30d, 90d, 12m and all (all time is Prime).
Dashboard endpoints
https://api.hep.gg/v1/analytics/sitesAuth requiredYour sites with the live count, visitors in the last 24 hours and a 7-day series, plus limits (allowed, current, prime).
https://api.hep.gg/v1/analytics/sitesAuth requireddomainexample.com.nametimezoneAmerica/Toronto. Defaults to UTC.Returns the site and its install tags. Answers 402 LIMIT_REACHED at your plan's site limit.
https://api.hep.gg/v1/analytics/sites/{id}/statsAuth requiredrangetoday, 24h, 7d, 30d (default), 90d, 12m, all or custom.fromcustom: first day, YYYY-MM-DD in the site's timezone.tocustom: last day.f_<list>f_country=CA or f_page=/pricing.Returns totals, previous (the same period before), series, and lists keyed by page, entry, exit, referrer, referrer_url, channel, country, region, city, device, browser, os, screen, utm_source, utm_medium, utm_campaign and event. On free sites locked names the Prime-only lists.
https://api.hep.gg/v1/analytics/sites/{id}/liveAuth requiredVisitors in the last five minutes and pageviews per minute for the last 30 minutes.
https://api.hep.gg/v1/analytics/sites/{id}/export.csvAuth requiredPrime: daily visitors and pageviews for all time as CSV.