PEPIndex API

Trade Policy Intelligence API & Tariff Risk Data Feed

Base URL: https://api.pepi.apiautomations.com
Free endpoints require no API key. Standard and Premium endpoints require an X-API-Key header.
Interactive docs: Swagger UI · ReDoc · OpenAPI spec (openapi.json)
Request an API key →

Authentication

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.

Free endpoints — no key required

MethodPathDescription
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

Sample response — /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.

Code examples — /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"

Rate limits

Limits are enforced per API key over a rolling 24-hour window (reset at midnight UTC). Free endpoints are throttled per IP.

TierKey prefixRequests / day
Free— (no key)Per-IP throttle on public endpoints
Standardpepi_std_1,000
Premiumpepi_pro_10,000

List endpoints (e.g. /api/v1/events) support limit, offset, and sort query parameters for pagination.

Errors

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.

Statuserror codeMeaning
401api_key_required / invalid_api_keyNo key supplied, or the key is not recognised
403insufficient_tier / key_inactiveKey valid but tier too low for the endpoint, or deactivated
404Resource not found (e.g. unknown event_id)
429rate_limit_exceededDaily request limit for the key's tier reached
500Server 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"
  }
}

Standard tier — pepi_std_ key

MethodPathDescription
GET/api/v1/index/historyDaily 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/eventsPaginated 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-registerLinked Federal Register documents (EOs, proclamations, tariff schedules)
GET/api/v1/events/{event_id}/timelineChronological lifecycle: threat → escalation → deadline → action → outcome
GET/api/v1/events/{event_id}/sector-impactPer-COICOP-3 sector price impact from the USITC × COICOP crosswalk
GET/api/v1/tariff-ratesLatest applied rates by country (weighted avg, HS chapter count, data_as_of)
GET/api/v1/tariff-rates/detailPer-HS-2 chapter applied rates for a single country
GET/api/v1/economic-indicatorsBLS + FRED time series: CPI, PPI, employment cost, dollar index, yields
GET/api/v1/economic-statsAggregate trade stats: avg tariff gap, total CPI contribution, consumer burden
GET/api/v1/research-sourcesMethodological bibliography
GET/api/v1/courtsCIT and CAFC courts tracked by CourtListener (primary) and PACER PCL (automated fallback)

Premium tier — pepi_pro_ key

MethodPathDescription
GET/api/v1/events/{event_id}/tariff-ratesTime series of statutory vs. applied rates + gap per event
GET/api/v1/events/{event_id}/price-impactDaily four-group price impact (imported affected/unaffected, domestic affected/unaffected)
GET/api/v1/events/{event_id}/economic-impactFull impact: tariff gap, CPI contribution, consumer incidence, distributional burden
GET/api/v1/events/{event_id}/market-impactMarket data around threat/outcome: SPY, VIX, XLP, XLI, XLY, EEM
GET/api/v1/events/{event_id}/taco-tradeTACO trade return: threat/low/outcome prices, hold days, annualized return

Event provenance

Every scored event is auditable. For a given event_id, these endpoints return its primary-source lineage so you can verify the score independently:

See validation & backtesting for the calibration events and external benchmarks behind the scoring.

Sample notebook

A runnable Jupyter quickstart that hits the free endpoints with requests and pandas is in the repo at notebooks/pepi-quickstart.ipynb.

Key self-service

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"
}
Ready to get started?
The free /api/v1/index endpoint requires no key. For events, history, and tariff data, see pricing & tiers or request a Standard key.