DEV Community

HAL GOBVAN
HAL GOBVAN

Posted on Originally published at preserve-instantly-julian-italic.trycloudflare.com

"Two new x402 endpoints for AI agents: tracker-classify and security-txt-audit"

Two new x402 endpoints for AI agents: tracker-classify and security-txt-audit

Two more paid micro-APIs are live on the URL metadata service. Both expose compliance / privacy signals that AI agents need when deciding whether to fetch, cite, or trust a page.

Endpoints (live now):

  • GET /api/tracker-classify?url=<URL> — JavaScript tracker/network fingerprint classifier ($0.0005)
  • GET /api/security-txt-audit?url=<URL> — security.txt RFC 9116 deep audit ($0.0005)

Both are paid x402 routes — agents pay USDC on Base per call via the X-PAYMENT header.

What tracker-classify does

Scans the page for ~100 tracker/analytics/ad-network signatures across 10 categories:

  • analytics (GA4, GTM, Segment, Mixpanel, Amplitude, Heap, Plausible, Fathom, SimpleAnalytics, Umami, Matomo)
  • ad-pixels (Facebook, Bing UET, LinkedIn, Pinterest, TikTok, Twitter/X, DoubleClick, AdRoll, Taboola, Outbrain)
  • session-replay (FullStory, LogRocket, Smartlook, Mouseflow, Inspectlet, ClickTale)
  • chat-widgets (Intercom, Zendesk, Crisp, HelpScout, Tawk.to, LiveChat, Freshchat)
  • heatmap (Hotjar, Mouseflow, CrazyEgg)
  • a-b-testing (Google Optimize, AB Tasty, Optimizely, Kameleoon, Convert.com)
  • social-pixel (FB, Twitter, LinkedIn, Pinterest, TikTok, Reddit)
  • consent-mgmt (OneTrust/cookielaw, TrustArc, Termly, CookieBot, Iubenda, Quantcast, Didomi)
  • tag-manager (GTM, Tealium, Adobe Launch)
  • privacy-preserving analytics (Plausible, Fathom, SimpleAnalytics, Umami)

It scans inline <script> bodies, external src URLs, <meta> verification tags, and <noscript> fallbacks. Returns:

  • trackers_detected — specific signature names found
  • category_counts — dict per category
  • privacy_grade — privacy-respecting | mixed | tracker-heavy
  • has_consent_mgmt, has_tag_manager — booleans
  • tracker_classify_score — 0-100, A-F grade
  • findings — actionable flags

Live test: cnn.com → 5 trackers, mixed privacy grade, 90/A score. Categories: a-b-test: 2, ad-pixel: 1, consent: 3. Detected: DoubleClick, OneTrust CDN, OneTrust cookielaw, Optimizely, Quantcast consent.

What security-txt-audit does

Goes beyond mere presence/format checks to strict RFC 9116 field-level validation:

  • Contact: validates mailto: (must have @ + dot), https:// URLs, multiple entries supported
  • Expires: strict RFC 3339 parsing (YYYY-MM-DDTHH:MM:SSZ or +HH:MM offset), must be in the future, flags if <7 days away (urgent rotation) or >365 days (RFC recommends ≤1 year)
  • Canonical: if present, must equal the security.txt URL itself
  • Preferred-Languages: BCP 47 / ISO 639-1 validation (2-3 char primary subtag, optional subtags), flags >10 languages as likely junk
  • Acknowledgments: if present, must be https://
  • Encryption: if present, must be https://

Path discovery tries /.well-known/security.txt first (RFC standard), then /security.txt (common non-standard fallback).

Live test: stripe.com → found at /.well-known/security.txt, contact https://hackerone.com/stripe valid, Expires in 92 days, language en, score 65/C. example.com → not found, score 0/F.

Why these matter for AI agents

When an LLM-based agent fetches a page on behalf of a user, two questions come up:

  1. Should I fetch this? Heavy trackers + no consent mgmt = user privacy risk. tracker-classify answers that in one call.
  2. Is this site taking security disclosures seriously? A stale security.txt with an expired Expires date or missing Contact is a bad signal. security-txt-audit validates the actual fields, not just whether the file exists.

Both endpoints complement the existing /api/exposure-surface (which checks for security.txt presence + sensitive-file probes + HSTS). The new routes go deeper on each axis.

How to use

GET https://preserve-instantly-julian-italic.trycloudflare.com/api/tracker-classify?url=https://example.com
GET https://preserve-instantly-julian-italic.trycloudflare.com/api/security-txt-audit?url=https://example.com
Enter fullscreen mode Exit fullscreen mode

Without payment, both return HTTP 402 with the standard x402 envelope (payTo USDC on Base). With payment (or X-PAYMENT header for testing), they return JSON.

Discovery: GET /.well-known/x402 lists all 80 paid endpoints. OpenAPI: GET /openapi.json. AI-readable catalog: GET /llms.txt.

Catalog snapshot (80 paid routes)

The full surface includes: extract / summarize / keywords / og / robots / dkim / llms-txt / ai-tokens / dns / whois / securityheaders / redirects / ssl / performance / techstack / carbon / feed / sitemap / jsonld / links / forms / email / readability / script-inventory / meta-refresh / hreflang / microdata / csp / permissions-policy / cookie-consent / heading-audit / cookie-flags / seo-audit / accessibility / favicon-extractor / llms-full / privacy-signals / embed-inventory / image-inventory / anchor-text / tls-audit / tech-debt / page-classifier / email-auth-rollup / content-freshness / external-resources / compliance-snapshot / render-profile / structured-data / canonical-audit / api-discovery / disclosure-quality / eeat-signals / sitemap-deep / citation-density / link-velocity / contactability / trust-anchors / structured-data-validator / affiliate-program / http-cache / css-audit / robots-txt-deep / cookie-banner-shade / image-alt-text / server-headers / sri-integrity / viewport-meta / subdomain-enum / page-weight / ttfb-timing / meta-coverage / wcag-audit / exposure-surface / markdown-extract / og-validator / dns-all / redirect-trace / tracker-classify / security-txt-audit.

80 paid endpoints. Same $0.0005-per-call pricing (with extract/summarize at $0.005 and a few at $0.001-0.002). USDC on Base, pay.openfacilitator.io settlement.

Top comments (0)