Guides · Using AgentFlare data · Beginner
Using AgentFlare Newswire and Markets Data
AgentFlare newswire files cost 0.005 USD per request and markets files cost 0.01 USD per request, both as .data.json. This guide lists the fields in each file, the dated URL patterns, and a working fetch example.
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.
https://esa.aisa.one/api/v1/access/verify
This guide is for developers and agent builders who want to pull AgentFlare's structured newswire and markets datasets into their own code. You will learn what each .data.json file contains field by field, what each request costs, how the dated archive URLs are named, and how to find valid dates from the newswire index. You will finish with a runnable curl command and a short Python script that fetches a daily AI digest, reads its stories, and then pulls the daily markets snapshot and a single ticker file.
How the flow works
Before you start
- A crawler token registered with AISA
- curl and Python 3 installed
- Basic familiarity with JSON and HTTP headers
Step by step
Check which files are paid
AgentFlare serves index pages, .html articles, .md teasers, llms.txt, sitemap.xml and robots.txt for free. The complete datasets, *.data.json and *.full.md, are the paid L2 tier, metered per request. The price map is published at pricing.json: newswire under /news/ is 0.005 USD per request, and markets under /markets/ is 0.01 USD per request. Read the map before you start so your budget matches your crawl size.
bash curl -s https://agentflare.org/pricing.jsonList available dates from the index
Start with the newswire index file. Its data.digests array has one entry per digest, each with date, cluster, headline, url and stories, so you can pick a valid date without guessing. Send your crawler identity in the X-Crawler-Token header, which replaces the earlier name X-AISA-Crawler-Token. Do not put the token in Authorization: Bearer, because that header is reserved for the gateway layer.
bash curl -s https://agentflare.org/news/index.data.json \ -H 'X-Crawler-Token: YOUR_CRAWLER_TOKEN'Fetch a dated newswire file
Dated files follow the pattern /news/YYYY-MM-DD-CLUSTER.data.json, where the cluster is ai, crypto, earnings, macro or markets. Replace YYYY-MM-DD with a date from the index. Each file carries facts, a data object, analysis_md, sources, related and a pricing object with price_usd, method, endpoint, autopay_hint and onboarding. Per-item files use /news/SLUG.data.json.
bash curl -i https://agentflare.org/news/YYYY-MM-DD-ai.data.json \ -H 'X-Crawler-Token: YOUR_CRAWLER_TOKEN'Read the stories in Python
Inside data you will find date, cluster, headline, dek, generated_at and freshness_hours, then stories, watch, takeaways, faq, count and items. Each story has title, summary, why, sources and entities. Each item has title, url, source, date, tickers and iso. The crypto file also fills data.market with symbol, name, last, asOf, d1, d7 and series, plus prediction_markets.
python import json import urllib.request url = 'https://agentflare.org/news/YYYY-MM-DD-ai.data.json' req = urllib.request.Request( url, headers={'X-Crawler-Token': 'YOUR_CRAWLER_TOKEN'} ) with urllib.request.urlopen(req) as resp: doc = json.load(resp) data = doc['data'] print(data['headline']) for story in data['stories']: print(story['title'], story['entities']) print(doc['pricing']['price_usd'])Pull markets snapshots and tickers
The daily snapshot lives at /markets/YYYY-MM-DD.data.json. Its data holds count, advancers, decliners, sectors (label, value, n) and stocks (ticker, price_usd, day_change_pct, return_6m_pct, market_cap_usd, pe, sector). Single companies use /markets/SLUG.data.json, such as xom, with returns_pct (m1, m3, m6), a long metrics object and company details including cik, sector and industry.
bash curl -s https://agentflare.org/markets/YYYY-MM-DD.data.json \ -H 'X-Crawler-Token: YOUR_CRAWLER_TOKEN' curl -s https://agentflare.org/markets/xom.data.json \ -H 'X-Crawler-Token: YOUR_CRAWLER_TOKEN'
Newswire and markets files
| File pattern | Price per request | Key data fields |
|---|---|---|
/news/index.data.json | 0.005 USD | data.date, data.digests[] (date, cluster, headline, url, stories) |
/news/YYYY-MM-DD-ai.data.json | 0.005 USD | data.headline, data.dek, data.stories[], data.items[], data.watch[], data.faq[] |
/news/YYYY-MM-DD-crypto.data.json | 0.005 USD | Same as ai, plus data.market[] (symbol, last, d1, d7, series) and data.prediction_markets[] |
/news/SLUG.data.json | 0.005 USD | One file per item |
/markets/index.data.json | 0.01 USD | data.count, data.advancers, data.decliners, data.sectors[], data.stocks[] |
/markets/YYYY-MM-DD.data.json | 0.01 USD | Same fields as the markets index, for one date |
/markets/xom.data.json | 0.01 USD | data.returns_pct (m1, m3, m6), data.metrics, data.company |
Common pitfalls
- Sending the crawler token in Authorization: Bearer is wrong; that header is reserved for the gateway layer. Use X-Crawler-Token.
- The placeholder YYYY-MM-DD in URL patterns must be replaced with a real date, which you can read from data.digests[].date in the newswire index.
- In the ai file, data.market, data.policy_rates and data.prediction_markets are empty arrays, while the crypto file fills market and prediction_markets. Do not assume every cluster has the same populated fields.
- Markets files cost 0.01 USD per request, twice the 0.005 USD newswire price, so budget a ticker-by-ticker crawl accordingly.
Key takeaways
- Newswire .data.json files cost 0.005 USD per request; markets .data.json files cost 0.01 USD per request.
- Find valid dates in data.digests of /news/index.data.json, then build YYYY-MM-DD-cluster URLs.
- Always authenticate with the X-Crawler-Token header, never Authorization: Bearer.
FAQ
How much does an AgentFlare newswire request cost?
Files under /news/ ending in .data.json or .full.md are priced at 0.005 USD per request, billed per-request. Markets files under /markets/ are 0.01 USD per request. Index pages, .html articles and .md teasers stay free.
Which header carries my crawler token?
Use X-Crawler-Token, as defined in the Open Verify specification. It replaces the older name X-AISA-Crawler-Token still shown on some AISA pages. Never send the token in Authorization: Bearer.
What clusters exist for dated newswire files?
Dated newswire files are named YYYY-MM-DD-ai, YYYY-MM-DD-crypto, YYYY-MM-DD-earnings, YYYY-MM-DD-macro and YYYY-MM-DD-markets, each ending in .data.json. Per-item files use a slug instead of a date.
What does a markets ticker file include?
A file such as /markets/xom.data.json has price_usd, day_change_pct, returns_pct (m1, m3, m6), a metrics object with valuation, margin, growth and liquidity ratios, and company details: ticker, name, cik, sector and industry.
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
- Header name: X-Crawler-Token esa.aisa.one
- AgentFlare Newswire .data.json field reference agentflare.org
- AgentFlare Markets .data.json field reference agentflare.org
- AgentFlare pricing.json (directory price map) agentflare.org
- AgentFlare llms.txt (header and structure) agentflare.org