AgentFlare

Guides · For publishers · Intermediate

Building an Agent-Readable Site: HTML, Markdown and .data.json

AgentFlare serves every article at one path as HTML, a free .md teaser, and a metered .data.json or .full.md. A shared JSON envelope lets agents parse any section with the same code.

LevelIntermediate
Reading time6 min
Steps66 with code
Sources6primary docs
✓ Open accessFree

You're reading the full report — free for humans. The machine-readable dataset for this section is open to all agents too — no payment required.

⚡ Agents: fetch .data.json → agents: allowed (no charge) · verify at https://esa.aisa.one/api/v1/access/verify

This guide is for publishers who want AI agents to read their site without scraping HTML. You will learn how AgentFlare exposes one path in three forms, which tier is free and which is priced per crawl, how pricing rules map deep files to a price, and how a shared JSON envelope keeps every section parseable by the same agent code. By the end you can lay out your own URLs, write metering rules and fetch a deep payload with a crawler token.

How the flow works

For publishersDrawn from the AISA agent and publisher documentation
Publisher-side access decision flow: 1. Crawler to Your edge: GET /dir/file; 2. Your edge to AISA verify: POST verify: URL, token, UA; 3. AISA verify to Your edge: decision: allow / pay / block; 4. Your edge to Your origin: fetch when granted; 5. Your edge to Crawler: 200 content; 6. Your edge to Crawler: or 402 / 403 JSONCrawlerany agentYour edgeCDN / gatewayAISA verify/api/v1/access/verifyYour origincontent1. GET /dir/file2. POST verify: URL, token, UA3. decision: allow / pay / block4. fetch when granted5. 200 content6. or 402 / 403 JSON
Price per paid request, by directoryAgentFlare pricing.json · deep files (.data.json, .full.md) only; HTML and .md are free
USD per request: /research/ $0.02, /scholar/ $0.02, /crypto/ $0.01, /markets/ $0.01, /predictions/ $0.01, /news/ $0.005, /social/ $0.005/research/$0.02/scholar/$0.02/crypto/$0.01/markets/$0.01/predictions/$0.01/news/$0.005/social/$0.005

Before you start

  • A site where each article has a stable URL path
  • An AISA account registered at the agent login page
  • curl or Python with the requests library installed
  • Access to edit robots.txt and your CDN content rules

Step by step

  1. Publish one path in three forms

    Give every article a single base path and serve it in three forms: the HTML page for humans, a free Markdown teaser at .md, and a metered .data.json or .full.md that carries the complete dataset and full analysis. Agents then never need a separate API host; they pick the format by changing the file extension on a path they already know.

    text
    https://PUBLISHER-SITE/news/SLUG.html       free, for humans
    https://PUBLISHER-SITE/news/SLUG.md         free teaser
    https://PUBLISHER-SITE/news/SLUG.data.json  metered, structured data
    https://PUBLISHER-SITE/news/SLUG.full.md    metered, full analysis
  2. Keep the free tier open to crawlers

    AgentFlare treats index pages, .html articles, .md teasers, llms.txt, sitemap.xml and robots.txt as L1 free. Its robots.txt allows every user agent, including GPTBot, ClaudeBot and PerplexityBot, and points to the sitemap. Open teasers drive SEO and GEO discovery, while llms.txt acts as a map that tells agents the three forms exist and where to pay.

    text
    User-agent: *
    Allow: /
    
    User-agent: GPTBot
    Allow: /
    
    User-agent: ClaudeBot
    Allow: /
    
    Sitemap: https://PUBLISHER-SITE/sitemap.xml
  3. Meter deep payloads with path rules

    Put a pricing.json beside your site and describe each directory with a rule. A regex urlPattern selects the .data.json and .full.md files, mode set to pay attaches a per-request price, and priority orders the rules. Anything not matched stays free by default, so the open surface is untouched. The rules import into cdn-agent Content Controls.

    text
    urlPattern: ^/news/.*\.(data\.json|full\.md)$
    patternType: regex
    mode: pay
    price: 0.005
    currency: USD
    billingType: per-request
    priority: 100
  4. Fetch the deep payload with a token

    Paid files settle through the AISA HTTP 402 protocol at https://esa.aisa.one/api/v1/access/verify. Agents set crawlerAutoPrice=true and identify themselves with the X-Crawler-Token header, which replaces the earlier name X-AISA-Crawler-Token still shown on older AISA pages. Keep the token out of Authorization: Bearer, which is reserved for the gateway layer.

    bash
    curl -s \
      -H 'X-Crawler-Token: YOUR_CRAWLER_TOKEN' \
      'https://PUBLISHER-SITE/news/SLUG.data.json'
  5. Use one JSON envelope everywhere

    Every .data.json shares the same top-level fields, whichever section it comes from. Only the data object changes shape: news carries stories and market arrays, while a markets stock file carries ticker, price_usd, returns_pct and metrics. An agent can read title, facts and sources from any file before it learns the section-specific schema.

    text
    @context, type, tier, title, description
    canonical, category, updated, generated_at
    facts[] with label and value
    data (shape varies by section)
    analysis_md
    sources[] with title and url
    related[]
    pricing with price_usd, method, endpoint, autopay_hint, onboarding
    powered_by
  6. Parse the envelope in an agent

    Because the envelope is stable, the reading code is short. Request the file with the crawler header, parse the JSON, then read the common fields first and drill into data only for the section you care about. This example reads a stock file from the markets directory and prints its facts alongside the price and daily change.

    python
    import requests
    
    url = 'https://PUBLISHER-SITE/markets/xom.data.json'
    headers = {'X-Crawler-Token': 'YOUR_CRAWLER_TOKEN'}
    doc = requests.get(url, headers=headers, timeout=30).json()
    
    print(doc['title'], doc['updated'])
    for fact in doc['facts']:
        print(fact['label'], fact['value'])
    
    data = doc['data']
    print(data['ticker'], data['price_usd'], data['day_change_pct'])
    print(doc['analysis_md'][:200])

Deep payload rules by directory

DirectoryPattern coveredModePrice (USD)
/news/.data.json and .full.mdpay0.005
/social/.data.json and .full.mdpay0.005
/markets/.data.json and .full.mdpay0.01
/predictions/.data.json and .full.mdpay0.01
/crypto/.data.json and .full.mdpay0.01
/research/.data.json and .full.mdpay0.02
/scholar/.data.json and .full.mdpay0.02
/guides/.data.json and .full.mdallow0

Common pitfalls

  • Never send the crawler token in Authorization: Bearer. That header is reserved for the gateway layer; the token belongs in X-Crawler-Token.
  • Older AISA pages still show X-AISA-Crawler-Token. Copying that name from them means your crawler identity header is wrong.
  • Rules only meter URLs matching the pattern. Paid payloads must end in .data.json or .full.md, or they fall under default allow and stay free.
  • The members directory is set to block for crawlers, so a crawler cannot buy its deep files at any price.

Key takeaways

  • One path in three forms: open HTML, a free .md teaser, and a metered .data.json or .full.md for deep data.
  • Regex rules in pricing.json set per-request prices by directory; unmatched URLs stay free by default.
  • A shared envelope with facts, data, analysis_md, sources and pricing lets one parser read every section.

FAQ

What is the difference between .md and .full.md?

The .md file is a free teaser in the L1 tier. The .full.md file sits in the L2 paid tier alongside .data.json and carries the full analysis, metered per crawl through the verify endpoint.

Which header identifies an AgentFlare crawler?

Send X-Crawler-Token with your token. It replaces the older X-AISA-Crawler-Token name. Do not use Authorization: Bearer for it, because that header is reserved for the gateway layer.

How do agents pay for a .data.json file?

Payment settles through the AISA HTTP 402 protocol at https://esa.aisa.one/api/v1/access/verify. Agents set crawlerAutoPrice=true with an X-Crawler-Token header. Register at https://esa.aisa.one/agent/login.html.

Does every section use the same JSON fields?

The top-level envelope is shared: title, canonical, facts, data, analysis_md, sources and related. The data object differs by section, for example stories in news versus stocks and sectors in markets.

How this page is made. Written from 6 primary sources — the AISA agent and publisher documentation and AgentFlare's own files (pricing.json, robots.txt, llms.txt, live responses, .data.json field lists). Each step links the sources it relies on; steps naming a header, endpoint, error code or figure that the sources do not contain are removed. Refreshed weekly.

Sources & citations

  1. Header name: X-Crawler-Token esa.aisa.one
  2. AgentFlare llms.txt (header and structure) agentflare.org
  3. AgentFlare pricing.json (directory price map) agentflare.org
  4. AgentFlare Newswire .data.json field reference agentflare.org
  5. AgentFlare Markets .data.json field reference agentflare.org
  6. AgentFlare robots.txt agentflare.org