AgentFlare

Guides · Using AgentFlare data · Beginner

Reading .data.json: A Field Guide for Agents

Every AgentFlare .data.json shares one envelope, and only its data block changes by vertical. Fetch it with the X-Crawler-Token header; anonymous requests to paid files return HTTP 402.

LevelBeginner
Reading time6 min
Steps66 with code
Sources5primary 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 developers and agent builders who want to pull structured AgentFlare data instead of scraping HTML. You will learn which files are paid, how to send a crawler token, and how to read the envelope fields that every .data.json carries. You will also see how the vertical-specific data block differs between Markets files (index, dated, per-ticker) and Newswire files (digest index and cluster files). By the end you can fetch a file, parse the envelope, and branch on the shape of data without guessing field names.

How the flow works

Using AgentFlare dataDrawn from the AISA agent and publisher documentation
Reading AgentFlare data: free discovery, then paid datasets: 1. Your agent to AgentFlare: read llms.txt, pricing.json, .md; 2. AgentFlare to Your agent: summaries + prices, $0; 3. Your agent to AgentFlare: GET .data.json + crawler token; 4. AgentFlare to Your agent: 200 full dataset, priced per requestYour agentAgentFlarefree tierAgentFlarepaid tier1. read llms.txt, pricing.json, .md2. summaries + prices, $03. GET .data.json + crawler token4. 200 full dataset, priced per request
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 registered crawler account and its crawler token
  • curl and Python 3 with the requests library
  • Basic familiarity with JSON and HTTP status codes

Step by step

  1. Check which files are paid

    AgentFlare splits content into two tiers. L1_free covers index pages, .html articles, .md teasers, llms.txt, sitemap.xml and robots.txt. L2_paid covers every *.data.json and *.full.md file. Each file is metered per request by directory: markets is 0.01 USD, news is 0.005 USD. Read pricing.json once to confirm the rule for the directory you plan to crawl before you automate anything.

    bash
    curl -s https://agentflare.org/pricing.json | jq '.directory_pricing_usd, .tiers'
  2. Request a paid file anonymously

    Fetch a Markets file with no token to see the gate. The server answers HTTP 402 Payment Required with Cache-Control: no-cache, no-store and a JSON body whose error is invalid_token. The body also carries an onboarding URL, https://esa.aisa.one/agent/guide.html, which is where you register a crawler account and get a token. Treat this 402 as a signal to fix your token, not to retry blindly.

    bash
    curl -i https://agentflare.org/markets/index.data.json
    # Expect: HTTP/1.1 402 Payment Required
    # Body error field: invalid_token
  3. Fetch with the crawler token

    Send your token in the X-Crawler-Token header, which replaces the earlier name X-AISA-Crawler-Token that older AISA pages still show. Never put the token in Authorization: Bearer, because that header is reserved for the gateway layer. The same request shape works for every file pattern: /markets/index.data.json, /markets/YYYY-MM-DD.data.json, /markets/<slug>.data.json and the /news/ equivalents.

    bash
    curl -s \
      -H 'X-Crawler-Token: YOUR_CRAWLER_TOKEN' \
      https://agentflare.org/markets/xom.data.json \
      | jq 'keys'
  4. Parse the shared envelope

    Every file starts with the same top-level fields. The strings are @context, type, tier, title, description, canonical, category, updated and generated_at, plus powered_by. Then come facts (objects with label and value strings), analysis_md, sources (title and url), related (name and url) and a pricing object. Read these first, then hand data to a vertical-specific parser.

    python
    import requests
    
    URL = 'https://agentflare.org/markets/xom.data.json'
    HEADERS = {'X-Crawler-Token': 'YOUR_CRAWLER_TOKEN'}
    doc = requests.get(URL, headers=HEADERS).json()
    
    for key in ['type', 'tier', 'title', 'canonical', 'category', 'updated', 'generated_at']:
        print(key, doc[key])
    for fact in doc['facts']:
        print(fact['label'], fact['value'])
    print(doc['pricing']['price_usd'], doc['pricing']['endpoint'])
  5. Read the Markets data block

    In Markets, the shape of data depends on the file. The index and dated files hold count, advancers, decliners, sectors and a stocks array with ticker, price_usd, day_change_pct, return_6m_pct, market_cap_usd, pe and sector. A per-ticker file such as xom.data.json instead holds ticker, name, price_usd, day_change_pct, returns_pct (m1, m3, m6), a long metrics object and a company object.

    python
    import requests
    
    HEADERS = {'X-Crawler-Token': 'YOUR_CRAWLER_TOKEN'}
    base = 'https://agentflare.org/markets/'
    
    idx = requests.get(base + 'index.data.json', headers=HEADERS).json()['data']
    print(idx['count'], idx['advancers'], idx['decliners'])
    for s in idx['stocks']:
        print(s['ticker'], s['price_usd'], s['day_change_pct'], s['sector'])
    
    xom = requests.get(base + 'xom.data.json', headers=HEADERS).json()['data']
    print(xom['returns_pct']['m6'], xom['metrics']['price_to_earnings_ratio'])
    print(xom['company']['name'], xom['company']['sector'])
  6. Read the Newswire data block

    Newswire files use the same envelope with a different data block. The news index holds date and a digests array (date, cluster, headline, url, stories). Cluster files such as YYYY-MM-DD-ai.data.json and YYYY-MM-DD-crypto.data.json hold date, cluster, headline, dek, freshness_hours, stories, watch, takeaways, faq, count and items. Only the crypto file shows typed market and prediction_markets entries.

    python
    import requests
    
    HEADERS = {'X-Crawler-Token': 'YOUR_CRAWLER_TOKEN'}
    url = 'https://agentflare.org/news/index.data.json'
    doc = requests.get(url, headers=HEADERS).json()
    
    print(doc['data']['date'])
    for d in doc['data']['digests']:
        print(d['cluster'], d['headline'], d['stories'], d['url'])

Envelope fields shared by every .data.json

FieldTypeNotes
@context, type, tier, title, descriptionstringTop-level descriptors present in every file
canonical, category, updated, generated_atstringTop-level descriptors present in every file
factsarray of objectEach entry has label and value, both strings
dataobjectVertical-specific block; shape differs by file
analysis_mdstringAnalysis text in Markdown
sourcesarray of objectEach entry has title and url
relatedarray of objectEach entry has name and url
pricingobjectprice_usd (number); method, endpoint, autopay_hint, onboarding (strings)
powered_bystringLast top-level field

Common pitfalls

  • Sending the token as Authorization: Bearer is wrong; that header is reserved for the gateway layer. Use X-Crawler-Token only.
  • An HTTP 402 with error invalid_token means the token matches no registered crawler. Check the value or register through the onboarding URL.
  • Do not reuse one data parser across files. Markets index has data.stocks, while a ticker file has data.metrics and data.company instead.
  • Some data arrays are untyped in the news files, for example market and policy_rates in the ai file. Check for items before reading fields.

Key takeaways

  • Every .data.json shares one envelope; only the data block changes by vertical and file type.
  • Send the token in X-Crawler-Token, never in Authorization: Bearer; the old name X-AISA-Crawler-Token is superseded.
  • A 402 response with error invalid_token means fix or register your crawler token before retrying.

FAQ

Are AgentFlare .data.json files free?

No. They sit in the L2_paid tier and are metered per request. Markets files are priced at 0.01 USD and news files at 0.005 USD. Index pages, .html articles and .md teasers are free.

Which header carries the crawler token?

X-Crawler-Token, per the Open Verify specification. It replaces the earlier X-AISA-Crawler-Token name that older AISA pages still show. Do not use Authorization: Bearer for the token.

Why do I get HTTP 402 Payment Required?

The request had no recognized crawler token. The JSON body returns error invalid_token and an onboarding URL, https://esa.aisa.one/agent/guide.html, where you can register an account.

How do I know what is inside the data object?

It depends on the file. Markets index and dated files list stocks and sectors, per-ticker files carry metrics and company, and Newswire files carry digests or stories. Check the file pattern first, then parse.

How this page is made. Written from 5 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 Markets .data.json field reference agentflare.org
  3. AgentFlare Newswire .data.json field reference agentflare.org
  4. AgentFlare pricing.json (directory price map) agentflare.org
  5. Live capture: anonymous request to a paid AgentFlare file agentflare.org