{
  "@context": "https://agentflare.org/schema",
  "type": "Article",
  "tier": "L2-full",
  "title": "Building an Agent-Readable Site: HTML, Markdown and .data.json",
  "description": "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…",
  "canonical": "https://agentflare.org/guides/building-an-agent-readable-site-html-markdown-and-datajson.html",
  "category": "guides",
  "updated": "2026-11-21",
  "generated_at": "2026-11-21T00:37:02.004Z",
  "facts": [
    {
      "label": "Track",
      "value": "For publishers"
    },
    {
      "label": "Level",
      "value": "Intermediate"
    },
    {
      "label": "Access",
      "value": "Free / open"
    },
    {
      "label": "Updated",
      "value": "2026-11-21"
    }
  ],
  "data": {
    "topic": "Building an Agent-Readable Site: HTML, Markdown and .data.json",
    "track": "publisher",
    "access": "free",
    "generated_at": "2026-11-21T00:37:02.004Z",
    "difficulty": "Intermediate",
    "tldr": "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.",
    "intro": "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.",
    "prerequisites": [
      "A site that can serve static files per path",
      "Basic JSON and regular expression knowledge",
      "A crawler token from the AISA agent registration page"
    ],
    "steps": [
      {
        "title": "Publish one path in three formats",
        "body": "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.",
        "code": {
          "lang": "text",
          "text": "https://PUBLISHER-SITE/news/YYYY-MM-DD-ai.html       free, for humans and search\nhttps://PUBLISHER-SITE/news/YYYY-MM-DD-ai.md         free Markdown teaser\nhttps://PUBLISHER-SITE/news/YYYY-MM-DD-ai.data.json  metered, structured data\nhttps://PUBLISHER-SITE/news/YYYY-MM-DD-ai.full.md    metered, full analysis"
        },
        "sources": [
          "S2",
          "S4"
        ]
      },
      {
        "title": "Price deep payloads by directory",
        "body": "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.",
        "code": {
          "lang": "text",
          "text": "urlPattern:  ^/news/.*\\.(data\\.json|full\\.md)$\npatternType: regex\nmode:        pay\nprice:       0.005\ncurrency:    USD\nbillingType: per-request\npriority:    100"
        },
        "sources": [
          "S3"
        ]
      },
      {
        "title": "Give every JSON file the same envelope",
        "body": "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.",
        "code": {
          "lang": "text",
          "text": "envelope: @context, type, tier, title, description, canonical,\n          category, updated, generated_at, facts[label,value],\n          data, analysis_md, sources[title,url], related\npricing:  price_usd, method, endpoint, autopay_hint, onboarding\nnews data:    date, cluster, headline, dek, stories, market, takeaways, faq\nmarkets data: count, advancers, decliners, sectors, stocks"
        },
        "sources": [
          "S4",
          "S5"
        ]
      },
      {
        "title": "Advertise the pattern to crawlers",
        "body": "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.",
        "code": {
          "lang": "text",
          "text": "# llms.txt\nEvery article exists at one path in three forms: HTML, a free Markdown teaser (.md), and a metered .data.json / .full.md.\nPricing map: https://PUBLISHER-SITE/pricing.json\n\n# robots.txt\nUser-agent: *\nAllow: /\nSitemap: https://PUBLISHER-SITE/sitemap.xml"
        },
        "sources": [
          "S2",
          "S6"
        ]
      },
      {
        "title": "Test a paid fetch as an agent",
        "body": "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.",
        "code": {
          "lang": "python",
          "text": "import requests\n\nurl = 'https://PUBLISHER-SITE/news/YYYY-MM-DD-ai.data.json'\nheaders = {'X-Crawler-Token': 'YOUR_CRAWLER_TOKEN'}\nr = requests.get(url, headers=headers)\ndoc = r.json()\n\nprint(doc['title'], doc['tier'], doc['updated'])\nprint(doc['pricing']['price_usd'], doc['pricing']['endpoint'])\nfor story in doc['data']['stories']:\n    print(story['title'])"
        },
        "sources": [
          "S1",
          "S2",
          "S4"
        ]
      }
    ],
    "reference": {
      "title": "AgentFlare L2 rules by directory",
      "columns": [
        "Directory",
        "Mode",
        "Price USD per request"
      ],
      "rows": [
        [
          "news",
          "pay",
          "0.005"
        ],
        [
          "social, markets, predictions, crypto",
          "pay",
          "0.01"
        ],
        [
          "research",
          "pay",
          "0.02"
        ],
        [
          "scholar",
          "pay",
          "0.02"
        ],
        [
          "guides",
          "allow",
          "0"
        ],
        [
          "members",
          "block",
          "0"
        ]
      ],
      "sources": [
        "S3"
      ]
    },
    "pitfalls": [
      {
        "text": "Do not send the crawler token in Authorization: Bearer. That header is reserved for the gateway layer; use X-Crawler-Token.",
        "source": "S1"
      },
      {
        "text": "Older AISA pages show X-AISA-Crawler-Token. Use the current name, X-Crawler-Token, or your requests will not identify the crawler correctly.",
        "source": "S1"
      },
      {
        "text": "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.",
        "source": "S3"
      },
      {
        "text": "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.",
        "source": "S4"
      }
    ],
    "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": [
      {
        "q": "What is the difference between .md and .full.md?",
        "a": "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."
      },
      {
        "q": "Which header identifies my crawler?",
        "a": "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."
      },
      {
        "q": "How do agents pay for a .data.json file?",
        "a": "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."
      },
      {
        "q": "Can some paths be free or blocked for agents?",
        "a": "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."
      }
    ],
    "sources": [
      {
        "title": "Header name: X-Crawler-Token",
        "url": "https://esa.aisa.one/cdn/open-verify.html",
        "domain": "esa.aisa.one"
      },
      {
        "title": "AgentFlare llms.txt (header and structure)",
        "url": "https://agentflare.org/llms.txt",
        "domain": "agentflare.org"
      },
      {
        "title": "AgentFlare pricing.json (directory price map)",
        "url": "https://agentflare.org/pricing.json",
        "domain": "agentflare.org"
      },
      {
        "title": "AgentFlare Newswire .data.json field reference",
        "url": "https://agentflare.org/news/index.html",
        "domain": "agentflare.org"
      },
      {
        "title": "AgentFlare Markets .data.json field reference",
        "url": "https://agentflare.org/markets/index.html",
        "domain": "agentflare.org"
      },
      {
        "title": "AgentFlare robots.txt",
        "url": "https://agentflare.org/robots.txt",
        "domain": "agentflare.org"
      }
    ]
  },
  "analysis_md": "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.\n\nThis 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.\n\n## Before you start\n\n- A site that can serve static files per path\n- Basic JSON and regular expression knowledge\n- A crawler token from the AISA agent registration page\n\n## Step by step\n\n### 1. Publish one path in three formats\n\nGive 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.\n\n```text\nhttps://PUBLISHER-SITE/news/YYYY-MM-DD-ai.html       free, for humans and search\nhttps://PUBLISHER-SITE/news/YYYY-MM-DD-ai.md         free Markdown teaser\nhttps://PUBLISHER-SITE/news/YYYY-MM-DD-ai.data.json  metered, structured data\nhttps://PUBLISHER-SITE/news/YYYY-MM-DD-ai.full.md    metered, full analysis\n```\n\n### 2. Price deep payloads by directory\n\nKeep 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.\n\n```text\nurlPattern:  ^/news/.*\\.(data\\.json|full\\.md)$\npatternType: regex\nmode:        pay\nprice:       0.005\ncurrency:    USD\nbillingType: per-request\npriority:    100\n```\n\n### 3. Give every JSON file the same envelope\n\nWrap 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.\n\n```text\nenvelope: @context, type, tier, title, description, canonical,\n          category, updated, generated_at, facts[label,value],\n          data, analysis_md, sources[title,url], related\npricing:  price_usd, method, endpoint, autopay_hint, onboarding\nnews data:    date, cluster, headline, dek, stories, market, takeaways, faq\nmarkets data: count, advancers, decliners, sectors, stocks\n```\n\n### 4. Advertise the pattern to crawlers\n\nTell 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.\n\n```text\n# llms.txt\nEvery article exists at one path in three forms: HTML, a free Markdown teaser (.md), and a metered .data.json / .full.md.\nPricing map: https://PUBLISHER-SITE/pricing.json\n\n# robots.txt\nUser-agent: *\nAllow: /\nSitemap: https://PUBLISHER-SITE/sitemap.xml\n```\n\n### 5. Test a paid fetch as an agent\n\nRequest 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.\n\n```python\nimport requests\n\nurl = 'https://PUBLISHER-SITE/news/YYYY-MM-DD-ai.data.json'\nheaders = {'X-Crawler-Token': 'YOUR_CRAWLER_TOKEN'}\nr = requests.get(url, headers=headers)\ndoc = r.json()\n\nprint(doc['title'], doc['tier'], doc['updated'])\nprint(doc['pricing']['price_usd'], doc['pricing']['endpoint'])\nfor story in doc['data']['stories']:\n    print(story['title'])\n```\n\n## AgentFlare L2 rules by directory\n\n| Directory | Mode | Price USD per request |\n| --- | --- | --- |\n| news | pay | 0.005 |\n| social, markets, predictions, crypto | pay | 0.01 |\n| research | pay | 0.02 |\n| scholar | pay | 0.02 |\n| guides | allow | 0 |\n| members | block | 0 |\n\n## Common pitfalls\n\n- Do not send the crawler token in Authorization: Bearer. That header is reserved for the gateway layer; use X-Crawler-Token.\n- Older AISA pages show X-AISA-Crawler-Token. Use the current name, X-Crawler-Token, or your requests will not identify the crawler correctly.\n- 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.\n- 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.\n\n## Key takeaways\n\n- One path, three formats: HTML and the .md teaser stay free, while .data.json and .full.md carry the metered deep data.\n- A shared envelope lets an agent read title, tier, sources and pricing from any file before it touches data.\n- Per-directory regex rules set mode and price, and unmatched paths remain free, keeping the SEO surface open.\n\n## FAQ\n\n**What is the difference between .md and .full.md?**\nThe .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.\n\n**Which header identifies my crawler?**\nSend 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.\n\n**How do agents pay for a .data.json file?**\nPayment 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.\n\n**Can some paths be free or blocked for agents?**\nYes. 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.\n",
  "sources": [
    {
      "title": "Header name: X-Crawler-Token",
      "url": "https://esa.aisa.one/cdn/open-verify.html"
    },
    {
      "title": "AgentFlare llms.txt (header and structure)",
      "url": "https://agentflare.org/llms.txt"
    },
    {
      "title": "AgentFlare pricing.json (directory price map)",
      "url": "https://agentflare.org/pricing.json"
    },
    {
      "title": "AgentFlare Newswire .data.json field reference",
      "url": "https://agentflare.org/news/index.html"
    },
    {
      "title": "AgentFlare Markets .data.json field reference",
      "url": "https://agentflare.org/markets/index.html"
    },
    {
      "title": "AgentFlare robots.txt",
      "url": "https://agentflare.org/robots.txt"
    }
  ],
  "related": [
    {
      "name": "Reading .data.json: A Field Guide for Agents",
      "url": "https://agentflare.org/guides/reading-datajson-a-field-guide-for-agents.html"
    },
    {
      "name": "Using AgentFlare Newswire and Markets Data",
      "url": "https://agentflare.org/guides/using-agentflare-newswire-and-markets-data.html"
    }
  ],
  "pricing": {
    "price_usd": 0,
    "method": "402",
    "endpoint": "https://esa.aisa.one/api/v1/access/verify",
    "autopay_hint": "set crawlerAutoPrice=true with the X-Crawler-Token header",
    "onboarding": "https://esa.aisa.one/agent/guide.html"
  },
  "powered_by": "AISA — agent-native search, settlement & delivery (https://aisa.one)"
}