Clicks API Documentation
Clicks API
The Clicks API returns click rows for advertisers within a requested date range. It is designed for analytics workflows, answer engines, and AI agents that need raw click activity instead of a pre-ranked report snapshot.
Endpoint
Base endpoint
GET /api/v1/clicks
Returns click rows ordered by date and click volume.
Authentication
X-Api-Key: YOUR_API_KEY
Required for all requests.
400 error.
API Playground
Use the examples below to inspect click rows for a fixed date range. The API is publisher-aware: publisher users automatically get their own publisher, while admins can optionally pass publisher_id.
Sign in to enable live testing with your API key.
| Action | Method | Endpoint | Description |
|---|---|---|---|
| Clicks for last 31 days | GET |
/api/v1/clicks?start_date=2026-03-01&end_date=2026-03-31 |
Pull click rows for the current publisher scope. |
| Clicks for one publisher | GET |
/api/v1/clicks?start_date=2026-03-01&end_date=2026-03-31&publisher_id=1338 |
Admin-only publisher override. |
| Paginate click rows | GET |
/api/v1/clicks?start_date=2026-03-01&end_date=2026-03-31&page=1&per_page=100 |
Offset pagination for larger exports. |
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
start_date |
date | Yes | Inclusive start date in YYYY-MM-DD format. |
end_date |
date | Yes | Inclusive end date in YYYY-MM-DD format. Must be on or after start_date. |
publisher_id |
integer | No | Admin-only publisher override. Publisher users are always scoped to their own publisher. |
page |
integer | No | Offset pagination page number. |
per_page |
integer | No | Results per page. Maximum 1000. |
limit |
integer | No | Alternative row cap for clients that prefer limit over per_page. |
Response format
{
"data": [
{
"advertiser_id": 123,
"advertiser_name": "Alpha Store",
"advertiser_slug": "alpha-store",
"publisher_id": 45,
"publisher_name": "Example Publisher",
"network_id": 7,
"network_name": "Awin",
"click_date": "2026-03-31",
"click_count": 120
}
],
"meta": {
"current_page": 1,
"next_page": null,
"prev_page": null,
"total_pages": 1,
"total_count": 1,
"start_date": "2026-03-01",
"end_date": "2026-03-31",
"days": 31,
"publisher_id": 45
}
}
MCP access
MCP clients can call this endpoint directly with the named get_clicks tool. The generic api_request tool also works, but get_clicks gives agents a cleaner schema for date-range click analysis.
get_clicks
Named MCP tool for retrieving raw click rows.
{
"name": "get_clicks",
"arguments": {
"start_date": "2026-03-01",
"end_date": "2026-03-31",
"publisher_id": 1338
}
}
Examples
Fetch clicks for a date range
curl -H "X-Api-Key: YOUR_KEY" \
"https://app.hienergy.ai/api/v1/clicks?start_date=2026-03-01&end_date=2026-03-31"
Admin filter for one publisher
curl -H "X-Api-Key: YOUR_KEY" \
"https://app.hienergy.ai/api/v1/clicks?start_date=2026-03-01&end_date=2026-03-31&publisher_id=1338"