External Analytics API
Our External Analytics API lets you pull Humblytics traffic data programmatically using the same property-scoped API keys that power the in-app dashboards. This guide covers authentication, required parameters, endpoints, and typical responses.
Base URL:
https://app.humblytics.com/api/external/v1
In-App API Access Page
The Humblytics dashboard includes a dedicated API Access page (found under Utilities in the sidebar) that provides everything you need to get started with the API.
API Key Generation and Management
Use the Generate New Key button to create a new API key for your property. You can manage existing keys from this page, including revoking keys that are no longer needed. Each key is scoped to a single property.
Quick Start
The API Access page displays a Quick Start section with your property-specific details pre-filled:
Property ID -- your unique property identifier
Base URL --
https://app.humblytics.com/api/external/v1/Example curl request -- a ready-to-copy request you can run immediately to verify your setup
AI Agent Instructions
The API Access page also includes an AI Agent Instructions section with tabs for different AI coding tools:
Claude Code -- copy-paste instructions for integrating the Humblytics API with Claude Code
Cursor -- copy-paste instructions for integrating the Humblytics API with Cursor
Generic -- general-purpose instructions that work with any AI coding assistant
These instructions provide your AI tool with the context it needs to query the Humblytics API on your behalf, including your property ID, API key, and available endpoints.
Authentication
Generate an API key for your property in the Humblytics app (sidebar → Utilities → API).
Include the key in every request using the
Authorizationheader:
Keys are property-scoped. The
propertyIdin the request path must match the property linked to the API key, otherwise the API returns403.Ensure the key has the
metricspermission enabled.
API Access by Plan
API access is included on all plans. Generate API keys from the API Access page under Utilities in the sidebar.
Plus, Business, Scale: API access included
Enterprise: Full API access with custom endpoints and priority support
Versioning
All external endpoints live under /api/external/v1. Future versions will be published side-by-side (for example, /api/external/v2) so you can migrate when ready.
Common Parameters
start
string
Yes
ISO-8601 timestamp or date (e.g. 2024-05-01 or 2024-05-01T00:00:00Z).
end
string
Yes
ISO-8601 timestamp or date that occurs after start.
timezone
string
No
IANA zone name (defaults to UTC). Determines bucket boundaries and how timestamps are formatted in responses.
Requests that cannot be parsed—invalid dates, unsupported timezones, end before start, ranges that are too large—return 400 with a descriptive error payload.
Traffic Trends
Returns time-series metrics for page views and unique visitors within a specified range.
Query Parameters
granularity
enum
No
day
Accepted values: hour, day, week, month.
Sample Request
Sample Response
Notes
Buckets include zero-filled entries when no activity occurred so charting remains continuous.
Maximum of 500 buckets per request. Very granular windows (for example, hourly over multiple months) return
400.The API excludes known bots automatically to align with the dashboard totals.
Traffic Breakdown
Returns the top traffic segments (UTM attributes, countries, devices, landing pages, and referrers) for a specified range.
Query Parameters
limit
number
No
10
Maximum entries per segment (maximum supported value: 50).
Sample Request
Sample Response
Notes
sharerepresents the fraction of total sessions contributed by each row.Null or missing values are returned as
"unknown"so you do not need to special-case missing fields.Device values are normalized (
desktop,mobile,unknown) using Humblytics’ device classification.
Clicks Breakdown
Returns aggregated click event data grouped by page and click target, along with trend data over time.
Query Parameters
granularity
enum
No
day
Accepted values: hour, day, week, month.
limit
number
No
10
Maximum entries per segment (maximum supported value: 50).
Sample Request
Sample Response
Notes
Returns both page-level click aggregations and time-series trend data in a single response.
Click targets are automatically extracted from tracked click events.
unique_clickscounts distinct sessions that performed the click action.
Clicks Details
Returns detailed click event breakdown for a specific page, showing which elements were clicked.
Query Parameters
page
string
Yes
N/A
The page path to get click details for (URL-encoded)
granularity
enum
No
day
Accepted values: hour, day, week, month.
limit
number
No
10
Maximum entries to return (maximum: 50).
Sample Request
Sample Response
Notes
Use URL encoding for the
pageparameter (e.g.,/pricing pagebecomes%2Fpricing%20page).sharerepresents the proportion of total clicks on that page attributed to each target.Returns only clicks that occurred on the specified page.
Forms Breakdown
Returns aggregated form submission data grouped by page and form target, along with trend data over time.
Query Parameters
granularity
enum
No
day
Accepted values: hour, day, week, month.
limit
number
No
10
Maximum entries per segment (maximum supported value: 50).
Sample Request
Sample Response
Notes
Returns both page-level submission aggregations and time-series trend data in a single response.
Form targets are automatically extracted from tracked form submission events.
unique_submissionscounts distinct sessions that submitted a form.
Forms Details
Returns detailed form submission breakdown for a specific page, showing which forms were submitted.
Query Parameters
page
string
Yes
N/A
The page path to get form details for (URL-encoded)
granularity
enum
No
day
Accepted values: hour, day, week, month.
limit
number
No
10
Maximum entries to return (maximum: 50).
Sample Request
Sample Response
Notes
Use URL encoding for the
pageparameter (e.g.,/contact usbecomes%2Fcontact%20us).sharerepresents the proportion of total form submissions on that page attributed to each form.Returns only form submissions that occurred on the specified page.
Errors
400
invalid_request
Bad dates, unsupported timezone or granularity, ranges that are too large.
401
unauthorized
Missing or invalid API key header.
403
forbidden
Property ID does not match the API key or the key does not have metrics permission.
429
rate_limited
Too many requests in a short window (limits will evolve with usage).
500
internal_error
Unexpected server error. Retry later or contact support.
Error payloads follow this structure:
Best Practices
Store API keys securely (environment variables or a secret manager) and rotate them periodically.
Use the
timezoneparameter to align data with the local reporting context you care about.Cache responses when possible—trend and breakdown data only changes when new traffic arrives.
Start with coarser granularity (e.g.
day) for large ranges, then request narrower windows for detailed analysis.Let us know if you need additional datasets; the roadmap for
/api/external/v1will continue to expand based on customer feedback.Looking for A/B testing endpoints? See the Split Testing API to get AI-powered test recommendations and create no-code experiments programmatically.
Last updated