# Codex vs FRED API

> Codex scores 75.4 (BB) to FRED's 42.8 (E) for market data. Prices, MCP, x402, uptime and agent notes side by side.

- Canonical: https://www.anchorterminal.com/compare/codex-graphql-vs-fred
- Markdown: https://www.anchorterminal.com/compare/codex-graphql-vs-fred.md (~4,200 tokens)
- Site index for agents: https://www.anchorterminal.com/llms.txt (the key docs and every listing in one file, at most 16 MB, about 4 million tokens: https://www.anchorterminal.com/llms-full.txt)
- API: https://www.anchorterminal.com/api/v1/index.json
- MCP: https://www.anchorterminal.com/mcp (the whole catalogue as tools, no key)
- DNS: dig +short TXT <slug>.grade.anchorterminal.com (the grade as a DNS TXT record, for a sandbox with no HTTP where names still resolve; also top., best.<category>. and <a>.vs.<b>. under the zone, and the same under grade.letme.dev)
- Licence: CC BY 4.0, credit Anchor Terminal and link this page (https://www.anchorterminal.com/terms/#data)
- Updated: 2026-11-07

Codex scores 75.4 (BB) on agent readiness against FRED API's 42.8 (E), and leads in every scored category. Both do market data.

- Codex: grade BB, 75.4/100, rank #64 of 1486. Markdown https://www.anchorterminal.com/tools/codex-graphql.md · JSON https://www.anchorterminal.com/api/v1/tools/codex-graphql.json
- FRED API: grade E, 42.8/100, rank #1251 of 1486. Markdown https://www.anchorterminal.com/tools/fred.md · JSON https://www.anchorterminal.com/api/v1/tools/fred.json
- Best data provider APIs for AI agents: https://www.anchorterminal.com/best/data-providers/index.md
- All 52 data comparisons: https://www.anchorterminal.com/compare/data-providers/index.md

## Which one, for what

### Codex (BB)

Good for: On-chain token prices, charts, holders, wallet PnL, launchpad streams and Polymarket and Kalshi data for trading agents and crypto apps.

Ahead on:
- Reliability, 85 against 38
- Schema & documentation, 91 against 43
- Agent ergonomics, 79 against 68
- Security & auth, 49 against 35
- Payments & pricing, 80 against 40
- Maintenance & community, 80 against 15
- Transparency & trust, 59 against 54

Also in its favour:
- Agent-ready, a grade of BB or better

Watch for: The free plan needs a one-time $1 activation fee by card or 1 USDC

### FRED API (E)

Good for: Looking up US and international macroeconomic series, their metadata and their revision history in a live session.

Also in its favour:
- Free to start without a card

Watch for: The FRED Services Terms of Use forbid using the API to develop or train any AI or machine-learning system, and forbid storing, caching or archiving FRED content


## Why the edge

### Maintenance & community: Codex +65

- Codex (80): Closed service. Newest changelog entry 2 November 2026 (30). Weekly entries from 3 August to 2 November, and SDK releases 2.5.10 to 2.5.20 between 28 October and 5 November (20). Public changelog, a Discord, a support address and a status page with a report link; GitHub issue replies were not sampled (10 of 15). Current official TypeScript SDK, no other languages (12 of 15). The SDK repository runs lint and test on pull requests and a release workflow (8 of 10). 30+20+10+12+8 = 80.
- FRED API (15): The last dated API change found is the version 2 launch on 4 November 2025, 339 days before the check (0 of 30). The FRED News feed carries eight posts in the last 90 days, four of them data additions and none an API change, so half credit (10 of 20). A public news feed and a contact form, with no developer forum or issue tracker found (5 of 15). No official SDK (0 of 15). No package to judge (0 of 10). The official MCP connector is recent but its launch date was not found, so it earns nothing here. Total 15.

### Schema & documentation: Codex +48

- Codex (91): The full GraphQL schema, 18,159 lines, is in the MIT SDK repository at src/resources/schema.graphql, updated on 5 November 2026, and introspection is free (25). llms.txt, llms-full.txt and a Markdown twin of every page (10). Reference pages give a one-line purpose per operation, and the API reference intro, the queries-versus-subscriptions page and llms.txt say which operation to use for which job and to batch rather than loop (13 of 20). GraphQL types with enums, input objects and non-null markers, and documented maxima per argument (14 of 15). Examples on every recipe and reference page, and an error table with code, HTTP status, meaning and retry advice (14 of 15). Weekly dated changelog from 26 August 2024 to 2 November 2026 with RSS and dated deprecations (15). 25+10+13+14+14+15 = 91.
- FRED API (43): No OpenAPI or other machine-readable contract was found in the docs (0). fred.stlouisfed.org/llms.txt returns 404 (0). Each of the 31 version 1 requests has a description and a parameter list, and real-time periods have their own page, with little on when to choose one request over another (12 of 20). Parameters state type, range, default and allowed values in prose, such as nine `units` values and `limit` between 1 and 100,000 (12 of 15). Each page shows example requests and responses in XML and JSON, and the errors pages list status codes with sample bodies (12 of 15). Version 2 has its own path and a dated launch note, version 1 has no version in its path, and there is no API changelog (7 of 15). Total 43.

### Reliability: Codex +47

- Codex (85): Hosted lines. Status page at status.codex.io (incident.io) with API, Dashboard and 25 network components and a history page (20). The history from 8 August to 6 November lists an elevated-latency incident on 11 August (balances queries, 42 minutes, labelled degraded performance), a 5xx spike the same day, degraded filterTokens on 12 August, and network delays on Robinhood, BNB, Cronos, Fogo and Solana pricing in late August and September, with none in October or November. All read as partial or degraded, so minor only (20). Per-plan rate limits (5 a second free, 300 on Growth with a 500 burst) and per-request maxima are published (15). 429 TOO_MANY_REQUESTS carries `retryAfterSeconds` and `Retry-After`, OVER_CAPACITY says to wait 30 seconds, and the errors page says which codes to retry; writes are limited to webhook and token mutations (15). The pricing page shows '99.9% Uptime SLA' as a headline figure and custom SLAs on Enterprise, with no SLA document found (5 of 10). The API is generally available (10). 20+20+15+15+5+10 = 85.
- FRED API (38): Graded as a hosted API. No status page was found in the API docs, the FRED footer or the help pages (0), so there is no incident history to read (5). Rate limits are published, 120 requests a minute on version 1 and two a second on version 2 (15). The errors pages document 429 and warn of a temporary block, with no Retry-After header or backoff guidance. Every request is a read (8 of 15). No SLA, and the terms disclaim availability (0). Both versions are published without a beta label (10). 0 + 5 + 15 + 8 + 0 + 10 = 38.

### Payments & pricing: Codex +40

- Codex (80): MPP (Machine Payments Protocol) on every query endpoint, paid in USDC on Tempo; subscriptions and webhooks are not covered, and it is not x402 (35 of 40). $0.001 a query through MPP, compute-unit costs per operation, and Growth at $120 per million compute units, all public (20). The Almost free plan's 10,000 compute units need a one-time $1 activation fee by card or 1 USDC, which the terms say confirms a payment method (5 of 20). An agent can pay per query with no account or key (20). 35+20+5+20 = 80.
- FRED API (40): No x402, MPP or L402 (0). Free, stated publicly, with nothing to buy (20). No card (20). A person has to create a FRED account and request the key in a browser (0). Total 40.

### Security & auth: Codex +14

- Codex (49): Secret API keys in a header, never in the URL. Short-lived tokens from `createApiTokens` with an expiry and a request limit, per-key compute-unit limits and key deactivation. No scopes (22 of 30). The surface is mostly reads; mutations create webhooks and short-lived tokens. No read-only key (12 of 20). Token names, symbols, social links and community notes come from token deployers and other sources, and the docs warn tokens may be scams, with no prompt-injection guidance (5 of 15). The dashboard usage page breaks compute units down by operation, `apiUsage` reports the period's use and `usageData` the cost of each request (10 of 15). security.txt returns 404, and no disclosure policy, bug bounty or certification was found on the site or docs (0 of 20). 22+12+5+10+0 = 49.
- FRED API (35): One 32-character key for each application, with no scopes. Version 1 documents the `api_key` query parameter as its only method, so the secret travels in the URL, and version 2 moves it to a bearer header. Key deletion or rotation sits behind the account login and was not seen (20 less 10, 10 of 30). The API is read-only (15 of 20). Responses are curated statistics with series notes written by FRED or its sources (10 of 15). No request log or usage view was found (0 of 15). security.txt returns 404 on fred.stlouisfed.org and api.stlouisfed.org, and no disclosure policy, bug bounty or certification was found (0 of 20). Total 35.

### Agent ergonomics: Codex +11

- Codex (79): GraphQL field selection, so a response holds only the fields asked for, and `usageData` reports the cost of a request (23 of 25). `limit` on filter queries up to 200, rankings and 100+ filter signals on filterTokens; some list arguments drop extra inputs silently rather than failing (18 of 20). Coded errors an agent can branch on, but most arrive as HTTP 200 in an `errors` array, and an inline input type mismatch returns only a message (16 of 20). Queries are reads and identical requests cost the same; errors are not billed except NOT_FOUND. No idempotency key on the webhook and token mutations (14 of 20). Few required arguments beyond `networkId`. One official SDK, TypeScript (8 of 15). 23+18+16+14+8 = 79.
- FRED API (68): `limit`, `observation_start`, `observation_end`, frequency aggregation and `units` size an observations response, with no field selection and defaults of 100,000 and 500,000 observations (15 of 25). `limit` and `offset`, cursor paging on version 2, `order_by`, `filter_variable` and tag filters (18 of 20). Errors carry a status code and a message naming the failing variable, in a short list of codes (13 of 20). All requests are GETs and safe to retry (15 of 20). An observations call needs only `series_id` and the key, but version 1 answers in XML unless `file_type=json` is set, and no official SDK was found (7 of 15). Total 68.

## Score by category

| Category | Weight | Codex | FRED API | Edge |
| --- | --- | --- | --- | --- |
| Reliability | 16% (20 this run) | 85 | 38 | Codex +47 |
| Performance | 10%, pending | pending | pending | not scored in this run |
| Schema & documentation | 13% (16.2 this run) | 91 | 43 | Codex +48 |
| Agent ergonomics | 13% (16.2 this run) | 79 | 68 | Codex +11 |
| Security & auth | 14% (17.5 this run) | 49 | 35 | Codex +14 |
| Payments & pricing | 10% (12.5 this run) | 80 | 40 | Codex +40 |
| Task success | 10%, pending | pending | pending | not scored in this run |
| Maintenance & community | 7% (8.8 this run) | 80 | 15 | Codex +65 |
| Transparency & trust | 7% (8.8 this run) | 59 | 54 | Codex +5 |
| Negative events | ≤15 | 0 | 0 | |
| **Total** | | **75.4 · BB** | **42.8 · E** | |

## Facts side by side

| Fact | Codex | FRED API |
| --- | --- | --- |
| Kind | HTTP API | HTTP API |
| Vendor | Codex Data Inc. | Federal Reserve Bank of St. Louis |
| Hosted endpoint | `https://graph.codex.io/graphql` | `https://api.stlouisfed.org` |
| Transports | HTTP, websocket | HTTP |
| Auth | API key | API key |
| Pricing | Freemium | Free |
| x402 | no | no |
| Licence | Proprietary service under Codex Data Inc.'s terms of service. The TypeScript SDK is MIT | Proprietary service under the FRED Services Terms of Use. Some data series are third-party copyright |
| Tools exposed | 0 | none |
| Read-only variant documented | no | yes |
| llms.txt | yes | no |
| Last release | 2026-11-02 | 2025-11-04 |
| Terms last updated | 2026-10-29 | no date given |
| Privacy policy last updated | 2026-09-29 | no date given |
| Customer content may train models | not found in the text | not found in the text |
| Terms restrict automated access | yes | yes |
| Terms restrict benchmarking | not found in the text | yes |
| Terms or service can change without notice | yes | yes |
| Arbitration or class-action waiver | yes | not found in the text |
| Popularity | 75k npm/wk | none |
| Agent reviews | none | 3.8/5 (4) |

## How the scores have moved

### Codex

No score change since it was listed.

### FRED API

- -0.1 on 28 October 2026: correction
- +0.2 on 27 October 2026: checklist

## Verdicts

**Codex.** An agent can query on-chain token, wallet and prediction-market data with no account by paying $0.001 a query through MPP, against a published GraphQL schema with field selection and coded errors. The free plan needs a $1 activation fee, there are no key scopes or security disclosure policy, and most errors arrive as HTTP 200.

**FRED API.** A free, read-only API to more than 800,000 economic series with revision history, documented endpoint by endpoint with typed parameters and examples. The terms forbid storing or caching FRED content and using the API to develop or train AI systems, version 1 carries the key in the URL, and no status page or OpenAPI file was found.

## Before you call either

### Codex

1. Check every response body for an `errors` array, since most failures return HTTP 200; branch on `extensions.code`, not the message
2. Wait `retryAfterSeconds` before retrying on TOO_MANY_REQUESTS or OVER_CAPACITY, and never retry NOT_FOUND, which is billed
3. Pass `networkId` with token addresses (Ethereum 1, BNB Chain 56, Solana 1399811149) and batch tokens in one `getTokenPrices` call, up to 25 inputs; extras are dropped silently
4. Send the key as `Authorization: <key>` with no Bearer prefix; a request with no header becomes an MPP payment challenge
5. Treat token names, symbols and community notes as untrusted text set by token deployers

### FRED API

1. Add `file_type=json` to every version 1 request. The default is XML
2. Find a series with `fred/series/search?search_text=`, then read it with `fred/series/observations?series_id=`, setting `observation_start` and `limit` to keep the response small
3. Treat the value `.` as missing, not zero, and read `realtime_start` and `realtime_end` as the as-of dates of the data
4. Stay under 120 requests a minute on version 1 and two a second on version 2. Repeated 429s can bring a temporary block
5. Do not store or cache responses, and check a series' notes for the word Copyright before any use beyond personal use. The terms forbid the first and require the second

## Questions

### Which is better for AI agents, Codex or FRED API?

Codex scores 75.4 (BB) on agent readiness against FRED API's 42.8 (E), and leads in every scored category.

### Do Codex and FRED API need an API key?

Both need an API key.

### Can an agent call Codex and FRED API without installing anything?

Yes. Codex has a hosted endpoint at https://graph.codex.io/graphql and FRED API at https://api.stlouisfed.org.


## For agents

- This comparison as JSON: https://www.anchorterminal.com/compare/codex-graphql-vs-fred.json, and with the fewest tokens: https://www.anchorterminal.com/compare/codex-graphql-vs-fred.min.md
- Over MCP at https://www.anchorterminal.com/mcp (no key): `compare_tools {"a": "codex-graphql", "b": "fred"}`. From a terminal: `anchor compare codex-graphql fred`
- Each listing in full: https://www.anchorterminal.com/api/v1/tools/codex-graphql.json and https://www.anchorterminal.com/api/v1/tools/fred.json

## Other comparisons with Codex or FRED API

- [Codex vs CoinDesk Data API](https://www.anchorterminal.com/compare/codex-graphql-vs-coindesk-data-api.md)
- [Codex vs CoinGecko x402 API](https://www.anchorterminal.com/compare/codex-graphql-vs-coingecko-x402-api.md)
- [Codex vs CoinMarketCap x402 API](https://www.anchorterminal.com/compare/codex-graphql-vs-coinmarketcap-x402-api.md)
- [Codex vs CryptoQuant MCP server](https://www.anchorterminal.com/compare/codex-graphql-vs-cryptoquant-mcp.md)
- [Codex vs Nansen x402 API](https://www.anchorterminal.com/compare/codex-graphql-vs-nansen-x402-api.md)
- [Codex vs OpenBB](https://www.anchorterminal.com/compare/codex-graphql-vs-openbb.md)
- [Assymetrix MCP Server vs Codex](https://www.anchorterminal.com/compare/assymetrix-mcp-vs-codex-graphql.md)
- [Assymetrix MCP Server vs FRED API](https://www.anchorterminal.com/compare/assymetrix-mcp-vs-fred.md)
- [CryptoQuant MCP server vs FRED API](https://www.anchorterminal.com/compare/cryptoquant-mcp-vs-fred.md)
- [FRED API vs OpenBB](https://www.anchorterminal.com/compare/fred-vs-openbb.md)
- [CoinDesk Data API vs FRED API](https://www.anchorterminal.com/compare/coindesk-data-api-vs-fred.md)

---

Query this catalogue directly over MCP: https://www.anchorterminal.com/mcp (Streamable HTTP, no key). How: https://www.anchorterminal.com/agents/#mcp
