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 |
Free teaser snapshot — headline index, stats, live pressure, and event summaries with outcome provenance. Paid arrays (price/sector impact, tariff rates, indicators) require a key — full payload via /api/v1/snapshot/full (Standard) |
| GET | /api/v1/index/branch/{branch} |
Government-branch reaction sub-index (judicial or congressional) — 0–100 decay-weighted activity intensity from public court dockets and Congress.gov bill actions, with 30d/90d trends and activity counts |
| GET | /api/v1/sources/status |
Live source freshness — per source: last_changed (data through: newest reference period) and last_ingested (when the pipeline last pulled). No key required. |
| GET | /api/v1/status/api-health |
Per-endpoint API health from the post-deploy probe — ok / gap / slippage / drift / breakage per endpoint, plus data-through dates. Powers the public status page. 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/sector-reactions | Cross-event sector reaction rollup — per-ETF (XLP/XLI/XLY/EEM) threat-day and threat→outcome moves vs SPY, ranked by reactivity |
| 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 | Court registry — the courts tracked by CourtListener: CIT, CAFC, SCOTUS and the EO-litigation courts (D.D.C., D.C./1st/4th/9th Circuits); PACER PCL is the CIT/CAFC 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 |
| GET | /api/v1/events/{event_id}/sector-reaction | Per-event sector reaction: threat-day and threat→outcome move per sector ETF, each relative to SPY |
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.
Subscribe to be notified when a new threat event is detected or a tracked event
resolves. Double opt-in — nothing is sent until the confirmation
email is clicked. One digest email per pipeline cycle (never per-event floods),
plus optional per-event webhook POSTs signed with
X-PEPI-Signature: sha256=<HMAC-SHA256 over the raw body>
(the signing secret is returned once at subscribe). Payloads carry the same
teaser-safe fields as the free snapshot. Unsubscribe is one click from any email footer.
POST https://api.pepi.apiautomations.com/api/v1/alerts/subscribe
Content-Type: application/json
{
"email": "you@example.com",
"min_severity": 60, // 0–100 floor; omit for all events
"domains": ["trade"], // omit for all domains
"webhook_url": "https://example.com/pepi-hook" // optional, https only
}
PEPIndex is also on the Snowflake Marketplace as a free live sample: the last 30 days of events (teaser columns), 90 days of the daily index, the re-threat lineage view, and the full economic stack for the documented 2018–2026 calibration benchmark events. Full history and the live economic stack are served by this REST API (see pricing); private full-dataset Snowflake shares and clean-room arrangements are available for enterprise — data@apiautomations.com.
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.