External Analytics API
Our External Analytics API lets you pull Humblytics data programmatically — traffic, pages, clicks, forms, and funnels — 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 (sidebar → Utilities → API) that serves as your activation console for the API and AI coding agents.
The page walks you through a four-step guided flow:
Generate key — create a property-scoped API key (shown once at creation)
Pick your agent — copy a secure install prompt for Claude Code, Cursor, or a generic agent
Install the skills — copy a setup prompt to install all 12 humblytics-marketing-skills from GitHub
Verify it works — run a live
GET /traffic/summarytest and confirm your connection
A sticky Your setup pane on the right keeps your Property ID, Base URL, and one-click copy actions (install prompt, skills setup, first test command) always visible. Below the steps you will find a reference curl example and a collapsible endpoint list grouped by the CRO loop (Read → Decide → Ship → Onboard).
See API Access & Agent Setup for the full walkthrough, skills catalog, security practices, and workflow examples.
Authentication
Generate an API key for your property in the Humblytics app (sidebar → Utilities → API).
Include the key in every request using the
Authorizationheader:
Authorization: Bearer <your_api_key>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 key management is available on the Plus plan and above. 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.
limit
number
No
Maximum results to return (default: 50).
page
string
For details endpoints
URL path to filter (e.g. /pricing). Required for detail endpoints.
source
string
No
Filter forms by source.
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 Summary
Returns aggregate traffic metrics for a specified range, including total page views, sessions, bounce rate, and average session duration.
Sample Request
Sample Response
Notes
bounce_rateis expressed as a decimal (e.g.0.423= 42.3%).avg_session_durationis in seconds.Bot traffic is excluded automatically.
Traffic Realtime
Returns the current live visitor count and a feed of recent visitor activity. This endpoint does not require start, end, or timezone parameters.
Sample Request
Sample Response
Notes
This endpoint returns a snapshot of current activity — no date range parameters are needed.
The
feedarray shows the most recent visitor events in reverse chronological order.active_visitorsreflects sessions active within the last few minutes.
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.
Traffic Entry & Exit Pages
Returns the top entry pages (where sessions begin) and exit pages (where sessions end) for a specified range.
Query Parameters
limit
number
No
10
Maximum entries per list (maximum supported value: 50).
Sample Request
Sample Response
Notes
sharerepresents the fraction of total sessions for each entry or exit page.Entry pages indicate where visitors first land; exit pages indicate the last page viewed before leaving.
Pages Breakdown
Returns performance metrics for all pages, including views, unique visitors, average scroll depth, and bounce rate.
Query Parameters
limit
number
No
10
Maximum entries to return (maximum supported value: 50).
Sample Request
Sample Response
Notes
avg_scroll_depthis a decimal representing the average percentage of the page scrolled (e.g.0.62= 62%).bounce_rateis page-level, not site-level.Results are sorted by
page_viewsin descending order by default.
Pages Details
Returns a deep dive for a single page, including UTM attribution, device breakdown, and country breakdown.
Query Parameters
page
string
Yes
N/A
The page path to get details for (URL-encoded).
limit
number
No
10
Maximum entries per breakdown (maximum: 50).
Sample Request
Sample Response
Notes
Use URL encoding for the
pageparameter (e.g./pricing pagebecomes%2Fpricing%20page).Breakdowns (UTM, devices, countries) are specific to the requested page.
Combines aggregate page metrics with dimensional breakdowns in a single response.
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.
Funnels
Runs a funnel query across a defined sequence of steps, returning conversion rates between each step.
Query Parameters
steps
JSON
Yes
N/A
JSON array of funnel step definitions (URL-encoded).
mode
enum
No
unbounded
unbounded (steps in any order) or sequential (steps must occur in defined order).
breakdownBy
string
No
N/A
Optional dimension to break results down by (e.g. device, country, utm_source).
Sample Request
Sample Response
Notes
The
stepsparameter must be a JSON-encoded array. URL-encode it when passing as a query parameter.conversion_rateat each step is relative to the previous step.overall_conversion_rateis step 1 → last step.Use
mode=sequentialwhen order matters (e.g. homepage → pricing → signup). Useunboundedfor unordered funnels.
Funnels Sankey
Returns path flow data for a funnel in a Sankey diagram format, showing how sessions move between steps.
Query Parameters
Accepts all the same parameters as the /funnels endpoint, plus:
maxPaths
number
No
20
Maximum number of paths to return.
minSessions
number
No
1
Minimum sessions a path must have to appear.
Sample Request
Sample Response
Notes
(drop-off)nodes indicate where sessions exited the funnel.Use
maxPathsandminSessionsto control the granularity of the output.Useful for visualizing where users leave the funnel and which alternative paths they take.
Funnels Suggestions
Returns AI-generated funnel suggestions for a specific page, based on traffic patterns and user behavior.
Query Parameters
page
string
Yes
N/A
The page path to get funnel suggestions for.
Sample Request
Sample Response
Notes
Suggestions are based on your actual traffic data, not generic templates.
Each suggestion includes a human-readable
rationaleexplaining why the funnel is recommended.Use these suggestions as a starting point — you can modify the steps before saving.
Saved Funnels
List Saved Funnels
Returns all saved funnel configurations for the property.
Sample Request
Sample Response
Create or Update a Saved Funnel
Creates a new saved funnel configuration. Include id in the body to update an existing funnel.
Request Body
id
string
No
Include to update an existing saved funnel.
name
string
Yes
A descriptive name for the funnel.
steps
array
Yes
Array of step objects, each with a page field.
Sample Request
Sample Response (201 Created)
Delete a Saved Funnel
Deletes a saved funnel configuration.
Sample Request
Notes
Deleting a saved funnel does not affect historical funnel query results.
Saved funnels are property-scoped — they are visible to all API keys for the same property.
Multi-Property Aggregate
These POST endpoints let you query data across multiple properties in a single request. Send a JSON body with { "propertyIds": [...] } along with the same query parameters used by the corresponding single-property endpoints.
All aggregate endpoints require the API key to have access to every property listed in the request.
POST /properties/aggregate/traffic/trends
Aggregate traffic trends across properties.
POST /properties/aggregate/traffic/summary
Aggregate traffic summary across properties.
POST /properties/aggregate/traffic/breakdown
Aggregate traffic breakdowns across properties.
POST /properties/aggregate/traffic/realtime
Aggregate realtime visitor data across properties.
POST /properties/aggregate/traffic/entry-exit-pages
Aggregate entry/exit pages across properties.
POST /properties/aggregate/clicks/breakdown
Aggregate click data across properties.
POST /properties/aggregate/forms/breakdown
Aggregate form submission data across properties.
Sample Request
Notes
Response format matches the corresponding single-property endpoint, with data aggregated across all specified properties.
The
metaobject will include aproperty_idsarray instead of a singleproperty_id.The realtime aggregate endpoint does not require date parameters, same as the single-property version.
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.Use the Multi-Property Aggregate endpoints to consolidate reporting across multiple sites without making separate requests per property.
Save frequently-used funnel definitions with the Saved Funnels endpoints so they can be re-run without redefining steps each time.
Looking for A/B testing endpoints? See the Split Testing API to get AI-powered test recommendations, create no-code experiments, and manage running tests programmatically.
Last updated