Analytics
Aggregate rollups — an overview snapshot plus breakdowns by domain, category and content type for any market and window.
The Analytics endpoints return aggregate statistics for one region over a recent window: feed health, article volume, top domains, and the category and content-type mix. All four are region-scoped and API-key protected, and they share the same base parameters — a required region, an optional period, and an optional lang. Each request resolves the profiles for the region, collects the runs in the window, gathers the observed URLs, then aggregates in memory.
#Overview
/v1/analytics/overviewAPI keyOverview statistics for a region: feed-run health, unique articles, parsing status, and enrichment coverage over the window.
regionstringrequired- ISO alpha-2 country code. Validated against the key whitelist.
periodstringoptionaldefault24h- Window ending now (UTC). One of
1h,24h,7d. langstringoptional- Restrict to profiles with this language code.
city_idstringoptional- Restrict runs to a single city (
discover_profile_runs.city_id).
curl "https://d2tr.com/api/v1/analytics/overview?region=US&period=24h" \
-H "X-API-Key: $D2TR_API_KEY"{
"region": "US",
"period": "24h",
"feeds": {
"total_runs": 480,
"successful": 468,
"failed": 12,
"success_rate": 0.975
},
"articles": {
"total_unique": 3120
},
"parsing": {
"parsed": 2890,
"parsing": 40,
"failed": 190,
"parse_rate": 0.926
},
"analysis": {
"with_summary": 2705,
"with_category": 2960,
"with_entities": 2610
},
"top_categories": [
{ "category": "Sports", "count": 640 },
{ "category": "Business", "count": 512 }
]
}#Top domains
/v1/analytics/domainsAPI keyTop publishing domains for a region in the window, sorted and paginated.
regionstringrequired- ISO alpha-2 country code.
periodstringoptionaldefault24h- One of
1h,24h,7d. langstringoptional- Restrict to profiles with this language code.
sort_bystringoptionaldefaultarticles_count- One of
articles_count,observations_count. Sorted descending. limitintegeroptionaldefault201–100.offsetintegeroptionaldefault0>= 0.
curl "https://d2tr.com/api/v1/analytics/domains?region=US&period=7d&sort_by=observations_count&limit=3" \
-H "X-API-Key: $D2TR_API_KEY"{
"region": "US",
"period": "7d",
"domains": [
{ "domain": "example-sports.com", "articles_count": 210, "observations_count": 1840 },
{ "domain": "example-news.com", "articles_count": 185, "observations_count": 1502 }
],
"total": 96
}#Category distribution
/v1/analytics/categoriesAPI keyShare of articles per Google News-style category (gnl_category) for a region in the window.
regionstringrequired- ISO alpha-2 country code.
periodstringoptionaldefault24h- One of
1h,24h,7d. langstringoptional- Restrict to profiles with this language code.
curl "https://d2tr.com/api/v1/analytics/categories?region=US&period=24h" \
-H "X-API-Key: $D2TR_API_KEY"{
"region": "US",
"period": "24h",
"categories": [
{ "category": "Sports", "article_count": 640, "percentage": 20.5 },
{ "category": "Business", "article_count": 512, "percentage": 16.4 }
],
"total_articles": 3120
}#Content types
/v1/analytics/content-typesAPI keyDistribution of AI-classified content types (ai_content_type) for a region in the window.
regionstringrequired- ISO alpha-2 country code.
periodstringoptionaldefault24h- One of
1h,24h,7d. langstringoptional- Restrict to profiles with this language code.
curl "https://d2tr.com/api/v1/analytics/content-types?region=US&period=24h" \
-H "X-API-Key: $D2TR_API_KEY"{
"region": "US",
"period": "24h",
"content_types": [
{ "type": "news_article", "count": 2450, "percentage": 78.5 },
{ "type": "opinion", "count": 320, "percentage": 10.3 }
],
"total_articles": 3120
}