Click cells for one page
Interaction counts per grid cell, hottest first. Cells are quantized server-side: x_precision decimals of relative x (default 2, i.e. 1% columns) and y_bucket pixels vertically (default 10). The response echoes both so a renderer knows the grid it received.
truncated: true means the page has more distinct cells than limit — the coldest cells were dropped, never the hotspots.
curl -X GET "https://mythic-analytics.gulp.workers.dev/client/v1/data/heatmap?location_id=example_string&url=acme.com%2Fpricing&type=click&date_from=2024-12-25T10%3A00%3A00Z&date_to=2024-12-25T10%3A00%3A00Z&viewport_min=1200&viewport_max=20000&x_precision=2&y_bucket=10&device_type=mobile&utm_source=facebook&utm_medium=cpc&utm_campaign=example_string&country=USA&segment_id=example_string&limit=20000" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_TOKEN"
import requests
import json
url = "https://mythic-analytics.gulp.workers.dev/client/v1/data/heatmap?location_id=example_string&url=acme.com%2Fpricing&type=click&date_from=2024-12-25T10%3A00%3A00Z&date_to=2024-12-25T10%3A00%3A00Z&viewport_min=1200&viewport_max=20000&x_precision=2&y_bucket=10&device_type=mobile&utm_source=facebook&utm_medium=cpc&utm_campaign=example_string&country=USA&segment_id=example_string&limit=20000"
headers = {
"Content-Type": "application/json",
"Authorization": "Bearer YOUR_API_TOKEN"
}
response = requests.get(url, headers=headers)
print(response.json())
const response = await fetch("https://mythic-analytics.gulp.workers.dev/client/v1/data/heatmap?location_id=example_string&url=acme.com%2Fpricing&type=click&date_from=2024-12-25T10%3A00%3A00Z&date_to=2024-12-25T10%3A00%3A00Z&viewport_min=1200&viewport_max=20000&x_precision=2&y_bucket=10&device_type=mobile&utm_source=facebook&utm_medium=cpc&utm_campaign=example_string&country=USA&segment_id=example_string&limit=20000", {
method: "GET",
headers: {
"Content-Type": "application/json",
"Authorization": "Bearer YOUR_API_TOKEN"
}
});
const data = await response.json();
console.log(data);
package main
import (
"fmt"
"net/http"
)
func main() {
req, err := http.NewRequest("GET", "https://mythic-analytics.gulp.workers.dev/client/v1/data/heatmap?location_id=example_string&url=acme.com%2Fpricing&type=click&date_from=2024-12-25T10%3A00%3A00Z&date_to=2024-12-25T10%3A00%3A00Z&viewport_min=1200&viewport_max=20000&x_precision=2&y_bucket=10&device_type=mobile&utm_source=facebook&utm_medium=cpc&utm_campaign=example_string&country=USA&segment_id=example_string&limit=20000", nil)
if err != nil {
panic(err)
}
req.Header.Set("Content-Type", "application/json")
req.Header.Set("Authorization", "Bearer YOUR_API_TOKEN")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
fmt.Println("Response Status:", resp.Status)
}
require 'net/http'
require 'json'
uri = URI('https://mythic-analytics.gulp.workers.dev/client/v1/data/heatmap?location_id=example_string&url=acme.com%2Fpricing&type=click&date_from=2024-12-25T10%3A00%3A00Z&date_to=2024-12-25T10%3A00%3A00Z&viewport_min=1200&viewport_max=20000&x_precision=2&y_bucket=10&device_type=mobile&utm_source=facebook&utm_medium=cpc&utm_campaign=example_string&country=USA&segment_id=example_string&limit=20000')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Get.new(uri)
request['Content-Type'] = 'application/json'
request['Authorization'] = 'Bearer YOUR_API_TOKEN'
response = http.request(request)
puts response.body
{
"success": true,
"data": {
"page": "acme.com/pricing",
"type": "click",
"total_clicks": 4821,
"x_precision": 2,
"y_bucket": 10,
"truncated": false,
"points": [
{
"x_rel": 0.5,
"y_px": 940,
"target_fixed": 42,
"clicks": 42,
"visitors": 31
}
]
}
}
{
"error": "Bad Request",
"message": "The request contains invalid parameters or malformed data",
"code": 400,
"details": [
{
"field": "email",
"message": "Invalid email format"
}
]
}
{
"error": "Unauthorized",
"message": "Authentication required. Please provide a valid API token",
"code": 401
}
/client/v1/data/heatmap
Target server for requests. Edit to use your own host.
Agency key (ak_) or location secret key (sk_). Scoped keys (mcp_) are accepted too and need heatmaps:read. See Using an mcp_ key over HTTP.
ak_) or location secret key (sk_). Scoped keys (mcp_) are accepted too and need heatmaps:read. See Using an mcp_ key over HTTP.Required with an agency key (ak_); ignored with a location key (sk_). Can also be sent as the X-Location-Id header.
Full URL or bare host/path. Normalized the same way the SDK normalized it on capture: scheme, www., query string, hash and trailing slash removed, lowercased. https://www.acme.com/Pricing?utm_source=meta and acme.com/pricing are the same page.
Point type. Only click is captured today.
ISO 8601 or YYYY-MM-DD. Defaults to 30 days ago.
Narrow to a viewport-width window, in px. This is the precision-versus-volume trade-off: one window per breakpoint (e.g. 0–767, 768–1199, 1200+) gives positions that are true for that layout, while the default all-widths view mixes layouts.
Decimal places of relative x. 2 = 1% columns, 3 = 0.1%.
Vertical bucket size in px.
Session device — mobile, desktop, tablet. Resolved against the same session data /data/sessions reports, so the two agree.
Session source. Includes the referrer fallback: an untagged but referred session reads as google.com, not blank.
Stored segment. Scopes to sessions whose visitor is a member; membership resolves through the identity graph, so a person-level segment catches rows captured under any identity they used.
Request Preview
Response
Response will appear here after sending the request
Authentication
Bearer token. Agency key (ak_) or location secret key (sk_). Scoped keys (mcp_) are accepted too and need heatmaps:read. See Using an mcp_ key over HTTP.
Query Parameters
Required with an agency key (ak_); ignored with a location key (sk_). Can also be sent as the X-Location-Id header.
Full URL or bare host/path. Normalized the same way the SDK normalized it on capture: scheme, www., query string, hash and trailing slash removed, lowercased. https://www.acme.com/Pricing?utm_source=meta and acme.com/pricing are the same page.
acme.com/pricingISO 8601 or YYYY-MM-DD. Defaults to 30 days ago.
Narrow to a viewport-width window, in px. This is the precision-versus-volume trade-off: one window per breakpoint (e.g. 0–767, 768–1199, 1200+) gives positions that are true for that layout, while the default all-widths view mixes layouts.
120020000Decimal places of relative x. 2 = 1% columns, 3 = 0.1%.
Vertical bucket size in px.
Session device — mobile, desktop, tablet. Resolved against the same session data /data/sessions reports, so the two agree.
mobileSession source. Includes the referrer fallback: an untagged but referred session reads as google.com, not blank.
facebookcpcStored segment. Scopes to sessions whose visitor is a member; membership resolves through the identity graph, so a person-level segment catches rows captured under any identity they used.