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 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

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/sector-reactionsCross-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-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/courtsCourt 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

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
GET/api/v1/events/{event_id}/sector-reactionPer-event sector reaction: threat-day and threat→outcome move per sector ETF, each relative to SPY

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.

Event alerts — free

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
}

Snowflake Marketplace — free live sample

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.

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.