Trade Policy Intelligence API & Tariff Risk Data Feed
https://api.pepi.apiautomations.comX-API-Key header.Pass your API key in the request header:
X-API-Key: pepi_std_your_key_here
Key prefixes: pepi_std_ for Standard tier, pepi_pro_ for Premium tier.
| Method | Path | Description |
|---|---|---|
| GET | /api/v1/index |
Current composite index value, 30-day trend, 90-day trend, active event count |
| GET | /api/v1/stats |
Aggregate stats: total events, average score, chicken rate %, most-targeted entities |
| GET | /api/v1/snapshot |
Full data snapshot — all events, history, tariff rates, indicators, sector impacts |
| GET | /api/v1/sources/status |
Live source freshness — last ingested date per data source. No key required. |
| GET | /health |
API health check |
/api/v1/index{
"value": 72.4,
"trend_30d": 4.1,
"trend_90d": 9.7,
"active_events": 8,
"resolved_30d": 3,
"as_of": "2026-05-26"
}
value is the current composite index (0–100). trend_30d /
trend_90d are the change in value versus 30 and 90 days ago.
as_of is the publication date of the latest index. Domain sub-indices are served
by the Standard-tier /api/v1/index/domain/{domain} endpoint.
/api/v1/index (free, no key)curl
curl https://api.pepi.apiautomations.com/api/v1/index
JavaScript (fetch)
const res = await fetch("https://api.pepi.apiautomations.com/api/v1/index");
const index = await res.json();
console.log(index.value, index.as_of);
Python (requests)
import requests
r = requests.get("https://api.pepi.apiautomations.com/api/v1/index")
r.raise_for_status()
index = r.json()
print(index["value"], index["as_of"])
Authenticated request (Standard / Premium) — pass your key in the X-API-Key header:
curl -H "X-API-Key: pepi_std_your_key_here" \
"https://api.pepi.apiautomations.com/api/v1/events?domain=trade&limit=20&offset=0"
Limits are enforced per API key over a rolling 24-hour window (reset at midnight UTC). Free endpoints are throttled per IP.
| Tier | Key prefix | Requests / day |
|---|---|---|
| Free | — (no key) | Per-IP throttle on public endpoints |
| Standard | pepi_std_ | 1,000 |
| Premium | pepi_pro_ | 10,000 |
List endpoints (e.g. /api/v1/events) support limit, offset, and sort query parameters for pagination.
Auth and rate-limit errors return a structured detail object with an
error code and a human-readable message; some include extra hints
(docs, upgrade, resets_at). A 429 also
carries a Retry-After header.
| Status | error code | Meaning |
|---|---|---|
401 | api_key_required / invalid_api_key | No key supplied, or the key is not recognised |
403 | insufficient_tier / key_inactive | Key valid but tier too low for the endpoint, or deactivated |
404 | — | Resource not found (e.g. unknown event_id) |
429 | rate_limit_exceeded | Daily request limit for the key's tier reached |
500 | — | Server error |
Example — 401 when no key is supplied:
{
"detail": {
"error": "api_key_required",
"message": "An API key is required. Include it as: X-API-Key: ",
"docs": "https://pepi.apiautomations.com/docs#authentication"
}
}
Example — 429 when the daily limit is reached:
{
"detail": {
"error": "rate_limit_exceeded",
"message": "Daily limit of 1000 requests reached.",
"resets_at": "midnight UTC"
}
}
pepi_std_ key| Method | Path | Description |
|---|---|---|
| GET | /api/v1/index/history | Daily index time series with domain breakdowns (trade, foreign_policy, domestic, rhetorical) |
| GET | /api/v1/index/domain/{domain} | Sub-index for a single domain |
| GET | /api/v1/events | Paginated events with filters: domain, status, min_score, sort, limit, offset |
| GET | /api/v1/events/{event_id} | Full event detail: threat text, timeline, analyst notes, confidence, statutory authority |
| GET | /api/v1/events/{event_id}/federal-register | Linked Federal Register documents (EOs, proclamations, tariff schedules) |
| GET | /api/v1/events/{event_id}/timeline | Chronological lifecycle: threat → escalation → deadline → action → outcome |
| GET | /api/v1/events/{event_id}/sector-impact | Per-COICOP-3 sector price impact from the USITC × COICOP crosswalk |
| GET | /api/v1/tariff-rates | Latest applied rates by country (weighted avg, HS chapter count, data_as_of) |
| GET | /api/v1/tariff-rates/detail | Per-HS-2 chapter applied rates for a single country |
| GET | /api/v1/economic-indicators | BLS + FRED time series: CPI, PPI, employment cost, dollar index, yields |
| GET | /api/v1/economic-stats | Aggregate trade stats: avg tariff gap, total CPI contribution, consumer burden |
| GET | /api/v1/research-sources | Methodological bibliography |
| GET | /api/v1/courts | CIT and CAFC courts tracked by CourtListener (primary) and PACER PCL (automated fallback) |
pepi_pro_ key| Method | Path | Description |
|---|---|---|
| GET | /api/v1/events/{event_id}/tariff-rates | Time series of statutory vs. applied rates + gap per event |
| GET | /api/v1/events/{event_id}/price-impact | Daily four-group price impact (imported affected/unaffected, domestic affected/unaffected) |
| GET | /api/v1/events/{event_id}/economic-impact | Full impact: tariff gap, CPI contribution, consumer incidence, distributional burden |
| GET | /api/v1/events/{event_id}/market-impact | Market data around threat/outcome: SPY, VIX, XLP, XLI, XLY, EEM |
| GET | /api/v1/events/{event_id}/taco-trade | TACO trade return: threat/low/outcome prices, hold days, annualized return |
Every scored event is auditable. For a given event_id, these endpoints return its
primary-source lineage so you can verify the score independently:
/api/v1/events/{event_id} — statutory authority, confidence, analyst notes, threat/outcome dates/api/v1/events/{event_id}/federal-register — linked Federal Register documents (EOs, proclamations, USTR notices)/api/v1/events/{event_id}/timeline — chronological lifecycle from threat to outcome/api/v1/events/{event_id}/tariff-rates — statutory vs. applied rate history with snapshot dates PremiumSee validation & backtesting for the calibration events and external benchmarks behind the scoring.
A runnable Jupyter quickstart that hits the free endpoints with requests and
pandas is in the repo at notebooks/pepi-quickstart.ipynb.
POST https://api.pepi.apiautomations.com/api/v1/keys/request
Content-Type: application/json
{
"name": "Your Name",
"email": "you@example.com",
"organization": "Your Organization",
"use_case": "Brief description of intended use",
"tier_requested": "standard"
}
/api/v1/index endpoint requires no key.
For events, history, and tariff data, see pricing & tiers or
request a Standard key.