API · For developers
Audit Google Tag Manager from code
The TagManifest API audits a Google Tag Manager setup in one request: send a page address or a container ID and get back a health score, a grade and a list of findings with fixes. The call is synchronous, so there is nothing to poll.
A container is the bundle of tags, triggers and variables that Google Tag Manager loads on a site. The API comes from TagManifest, the free Google Tag Manager audit, and uses the same catalogue of 92 checks as the web scan. The API needs a key. The web scan from a website address and the export audit on the scanner page are free and need no account.
One request
Send the address of a public page. The API fetches the page, finds its container ID, fetches the public container file and runs the audit.
curl https://developer.tagmanifest.com/v1/scan-url \
-H "Authorization: Bearer $TM_API_KEY" \
-H "Content-Type: application/json" \
-d '{"url":"https://example.com","top_n":25}'The response, shortened here to two findings. The values are the example from the docs, not a real site.
{
"scanned_at": "2026-05-04T13:25:53.659Z",
"duration_ms": 487,
"site": { "url": "https://example.com", "gtm_id": "GTM-K7GFJTV", "from_cache": false },
"container": {
"tag_count": 85,
"trigger_count": 34,
"variable_count": 52,
"gtm_id": "GTM-K7GFJTV",
"name": "Example Site"
},
"findings": [
{
"rule_id": "consent-no-cmp",
"title": "No CMP detected",
"severity": "critical",
"tier": "error",
"category": "consent",
"finding_count": 1,
"affected_items": [],
"affected_items_total": 0,
"action": "add-cmp",
"recommendation": "Integrate a supported CMP before deploying ad tags."
},
{
"rule_id": "ga4-debug-mode-hardcoded",
"title": "Debug mode hardcoded to true",
"severity": "high",
"tier": "warning",
"category": "ga4",
"finding_count": 1,
"affected_items": ["GA4 - Main"],
"affected_items_total": 1,
"action": "fix-debug-mode",
"recommendation": "Set debug_mode via a variable so it is off in production."
}
],
"findings_total": 20,
"findings_truncated": false,
"by_category": { "consent": 4, "ga4": 9, "quality": 7 },
"by_tier": { "error": 4, "warning": 8, "optimization": 8 },
"health_score": { "score": 82, "grade": "B", "label": "Healthy" }
} Findings are sorted by tier, then severity. top_n limits how many come back. Pass gtm_id in place of url if you already know the container ID. By default each finding lists its first three affected items; set include_evidence to get everything.
Getting a key
- Sign in with Google on the account page.
- Create a key. You can give it a label, such as the name of the client that will use it.
- Copy the key, which starts with
tm_. It is shown once and cannot be shown again. - Send it on every request as
Authorization: Bearer tm_…. The example above reads it fromTM_API_KEY.
Treat the key like a password. You can revoke it on the account page, and it stops working immediately. TagManifest stores only a hash of the key, so a lost key cannot be recovered: revoke it and create a new one.
Building an MCP client? It can sign users in through OAuth, with no API key to create. OAuth for MCP clients.
The endpoints
All of them live under https://developer.tagmanifest.com/v1.
POST /v1/scan-urlAudits a public page address or a known container ID in one call.POST /v1/scanAudits container JSON you already have, such as a parsed GTM export. No page is fetched.POST /v1/evaluate-ruleRuns one rule against a container and returns the full evidence. Useful for checking a fix.GET /v1/rulesLists the rule catalog, filtered by category, tier or status.GET /v1/rules-detailReturns the full record for one rule: description, recommendation, severity and more./v1/api-keysCreates, lists and revokes keys. Needs a signed-in session; an API key cannot manage other keys.
Rate limits
Limits are daily, counted per user rather than per key, and reset at 00:00 UTC: 100 calls to /scan-url, 200 to /scan, 500 to /evaluate-rule, and 1,000 each to /rules and /rules-detail. A second key does not raise the limit. A request that reaches rate limiting gets X-RateLimit-* headers on its response, with the cap, what is left and the reset time. A request refused before that point, for example for a missing permission or an oversized body, may not carry them. A call over the limit returns HTTP 429. Rate limit details.
Into the docs
- Getting started: keys, sign-in and recovery.
- Authentication: the bearer token and its errors.
- REST reference: requests, responses and errors for each endpoint.
- Documentation home, including a page for each rule.
Working in an AI assistant such as Claude rather than writing code? The same checks are available to it through the MCP server.