AgentFlare

Guides · For publishers · Intermediate

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

AgentFlare serves each article at one path in three forms: HTML, a free .md teaser, and a metered .data.json or .full.md. Every JSON file shares one envelope, so agents parse the same top-level fields everywhere.

LevelIntermediate
Reading time6 min
Steps55 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 their site to work for AI agents as well as human readers. You will see how AgentFlare publishes one path in HTML, a free Markdown teaser and a paid .data.json or .full.md, how pricing rules map to directories, and how the shared JSON envelope keeps parsing simple. By the end you can lay out your own paths, write per-directory pricing rules, shape an envelope, and test a paid fetch as an agent would.

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, /social/ $0.01, /predictions/ $0.01, /news/ $0.005/research/$0.02/scholar/$0.02/crypto/$0.01/markets/$0.01/social/$0.01/predictions/$0.01/news/$0.005

Before you start

  • A site that can serve static files per path
  • Basic JSON and regular expression knowledge
  • A crawler token from the AISA agent registration page

Step by step

  1. Publish one path in three formats

    Give every article a single base path and serve it in several forms. The HTML page is for people and search. The .md file is a free teaser that agents can read without paying. The .data.json and .full.md files hold the complete dataset and full analysis and sit behind metering. Because only the suffix changes, an agent that finds the HTML URL can derive every other form without a lookup.

    text
    https://PUBLISHER-SITE/news/YYYY-MM-DD-ai.html       free, for humans and search
    https://PUBLISHER-SITE/news/YYYY-MM-DD-ai.md         free Markdown teaser
    https://PUBLISHER-SITE/news/YYYY-MM-DD-ai.data.json  metered, structured data
    https://PUBLISHER-SITE/news/YYYY-MM-DD-ai.full.md    metered, full analysis
  2. Price deep payloads by directory

    Keep the free tier and the paid tier separate in your pricing map. AgentFlare lists index pages, .html articles, .md teasers, llms.txt, sitemap.xml and robots.txt as free, and *.data.json plus *.full.md as paid. Each directory gets one rule with a regex urlPattern, a mode of pay, allow or block, a price, a currency, a billingType and a priority. Anything no rule matches stays free by default.

    text
    urlPattern:  ^/news/.*\.(data\.json|full\.md)$
    patternType: regex
    mode:        pay
    price:       0.005
    currency:    USD
    billingType: per-request
    priority:    100
  3. Give every JSON file the same envelope

    Wrap each .data.json in the same top-level fields so an agent can parse any file with one routine. AgentFlare uses @context, type, tier, title, description, canonical, category, updated, generated_at, facts, data, analysis_md, sources and related. The index files also carry a pricing object and powered_by. Only the contents of data change per file type, such as data.stories for a news digest or data.stocks for a markets page.

    text
    envelope: @context, type, tier, title, description, canonical,
              category, updated, generated_at, facts[label,value],
              data, analysis_md, sources[title,url], related
    pricing:  price_usd, method, endpoint, autopay_hint, onboarding
    news data:    date, cluster, headline, dek, stories, market, takeaways, faq
    markets data: count, advancers, decliners, sectors, stocks
  4. Advertise the pattern to crawlers

    Tell agents the pattern exists before they ask. Put a short description in llms.txt that states the three forms, points to the pricing map and names the verify endpoint, and keep each section's own llms.txt listing its pages. Leave robots.txt open for the crawlers you want, and list your sitemap there. AgentFlare allows GPTBot, ClaudeBot, PerplexityBot, Google-Extended, CCBot, Bytespider, Googlebot and Bingbot.

    text
    # llms.txt
    Every article exists at one path in three forms: HTML, a free Markdown teaser (.md), and a metered .data.json / .full.md.
    Pricing map: https://PUBLISHER-SITE/pricing.json
    
    # robots.txt
    User-agent: *
    Allow: /
    Sitemap: https://PUBLISHER-SITE/sitemap.xml
  5. Test a paid fetch as an agent

    Request the .data.json the way an agent would. The crawler identity header is X-Crawler-Token, which replaces the earlier name X-AISA-Crawler-Token still shown on older AISA pages. Never put the token in Authorization: Bearer, which is reserved for the gateway layer. Agents should also set crawlerAutoPrice=true so the HTTP 402 flow settles through the verify endpoint. Then read the shared fields and the price.

    python
    import requests
    
    url = 'https://PUBLISHER-SITE/news/YYYY-MM-DD-ai.data.json'
    headers = {'X-Crawler-Token': 'YOUR_CRAWLER_TOKEN'}
    r = requests.get(url, headers=headers)
    doc = r.json()
    
    print(doc['title'], doc['tier'], doc['updated'])
    print(doc['pricing']['price_usd'], doc['pricing']['endpoint'])
    for story in doc['data']['stories']:
        print(story['title'])

AgentFlare L2 rules by directory

DirectoryModePrice USD per request
newspay0.005
social, markets, predictions, cryptopay0.01
researchpay0.02
scholarpay0.02
guidesallow0
membersblock0

Common pitfalls

  • Do not send the crawler token in Authorization: Bearer. That header is reserved for the gateway layer; use X-Crawler-Token.
  • Older AISA pages show X-AISA-Crawler-Token. Use the current name, X-Crawler-Token, or your requests will not identify the crawler correctly.
  • Paths no rule matches stay free by default, so a new directory serves its .data.json at no charge until you add a pay rule.
  • The envelope is shared, but data differs by file: news files use data.stories, markets index files use data.stocks. Branch on the file type before reading data.

Key takeaways

  • One path, three formats: HTML and the .md teaser stay free, while .data.json and .full.md carry the metered deep data.
  • A shared envelope lets an agent read title, tier, sources and pricing from any file before it touches data.
  • Per-directory regex rules set mode and price, and unmatched paths remain free, keeping the SEO surface open.

FAQ

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

The .md file is the free Markdown teaser. The .full.md file is the metered complete analysis. Both sit at the same base path as the HTML page, and .full.md is billed per request under the directory rule.

Which header identifies my crawler?

Send X-Crawler-Token with your crawler 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 and send an X-Crawler-Token header. Prices come from the pricing map at /pricing.json.

Can some paths be free or blocked for agents?

Yes. A rule's mode can be pay, allow or block. AgentFlare allows the guides directory at price 0 and blocks members to crawlers. Unmatched paths default to allow.

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