Skip to content

Getting started

The Neural Ledger API serves source-linked news intelligence: stories with their sources, extracted claims, contradictions, modeled impact paths, and affected assets and entities.

Base URL for every endpoint:

https://theneuralledger.com

All responses are JSON unless the endpoint is a feed (/v1/rss, /v1/atom).

1. Look at the shape first

/v1/sample/news is unauthenticated and returns a synthetic payload with the same structure as the real feed. Use it to write your parser before you have a key.

bash
curl -sS "https://theneuralledger.com/v1/sample/news?page_size=2"

2. Get an API key

Keys are issued from your account on the plans page. Each key resolves to a plan, and the plan sets your monthly call allowance.

3. Make your first authenticated call

Pass the key as a bearer token:

bash
export TNL_API_KEY="your-key"

curl -sS "https://theneuralledger.com/v1/news?page_size=5&sort=pipeline" \
  -H "Authorization: Bearer $TNL_API_KEY"

4. Confirm your plan and usage

/v1/me returns your key metadata, resolved plan, and current month's usage. It's the cheapest way to check where you stand.

bash
curl -sS "https://theneuralledger.com/v1/me" \
  -H "Authorization: Bearer $TNL_API_KEY"

A realistic first query

Stories about Japan, in the trading category, published since the start of the month, returning only the fields you need:

bash
curl -sS -G "https://theneuralledger.com/v1/news" \
  -H "Authorization: Bearer $TNL_API_KEY" \
  --data-urlencode "country=Japan" \
  --data-urlencode "category=Trading & Markets" \
  --data-urlencode "published_since=2026-07-01T00:00:00Z" \
  --data-urlencode "fields=id,title,publishedAt,impactPaths,sources" \
  --data-urlencode "page_size=25"

Requesting fields keeps responses small. body, sources, and claims are the heavy fields — omit them until you need them. See Filtering & field shaping.

Language examples

javascript
const response = await fetch(
  'https://theneuralledger.com/v1/news?' + new URLSearchParams({
    country: 'Japan',
    page_size: '25',
    fields: 'id,title,publishedAt,sources',
  }),
  { headers: { Authorization: `Bearer ${process.env.TNL_API_KEY}` } },
);

if (!response.ok) throw new Error(`TNL API ${response.status}`);
const { data, page } = await response.json();
console.log(data.length, 'stories; more available:', page.has_more);
python
import os, requests

response = requests.get(
    "https://theneuralledger.com/v1/news",
    headers={"Authorization": f"Bearer {os.environ['TNL_API_KEY']}"},
    params={"country": "Japan", "page_size": 25, "fields": "id,title,publishedAt,sources"},
    timeout=30,
)
response.raise_for_status()
payload = response.json()
print(len(payload["data"]), "stories; more available:", payload["page"]["has_more"])
bash
curl -sS -G "https://theneuralledger.com/v1/news" \
  -H "Authorization: Bearer $TNL_API_KEY" \
  --data-urlencode "country=Japan" \
  --data-urlencode "page_size=25" \
  --data-urlencode "fields=id,title,publishedAt,sources"

Next steps

The Neural Ledger API