API Reference

PigSignal API Documentation

Structured supply intelligence for the global swine industry. Four endpoints return typed quantitative signals designed for AI agent consumption and enterprise decision systems.

Quick Start

All requests are made to the base URL below. Include your API key in the X-API-Key header on every request.

Base URL
https://pigsignal.io/api/v1

Authentication

PigSignal uses API key authentication. Pass your API key in the X-API-Key header with every request.

HTTP Header
X-API-Key: YOUR_API_KEY
Keep your API key secret. Do not expose it in client-side code or public repositories. Rotate keys from your dashboard if compromised.

Benchmark API

Returns regional reproduction benchmarks for PSY, LSY, farrowing rate, NPD, and litter metrics. N≥10 anonymized from 150M+ records across 18+ countries.

GET/api/v1/benchmarks/reproduction

Parameters

ParameterTypeDescription
regionstringoptionalRegion name such as 충남, 경기, or 전북. Omit for national coverage.
yearintegeroptionalAnalysis year. Available range: 2023–2025. Default: 2024.

Example Response

JSON
{
  "meta": {
    "year": 2024,
    "anonymization": { "min_farms_threshold": 10 }
  },
  "data": [{
    "region_name": "충남",
    "farm_count": 171,
    "psy": { "mean": 20.75, "p25": 22.4, "p75": 27.6 },
    "farrowing_rate": { "mean": 67.55, "p25": 74.8, "p75": 88.8 }
  }]
}

Supply Forecast API

Returns quarterly and monthly supply projections for Korean and global swine markets, including herd size trends, slaughter volume forecasts, and regional variance analysis.

Availability: Q3 2026 — Early access available now
GET/api/v1/benchmarks/supply-forecast

Parameters

ParameterTypeDescription
regionstringrequiredISO region code. See Regions reference.
periodstringrequiredForecast period in YYYY-QN format. E.g. 2026-Q3.
include_breakdownbooleanoptionalInclude regional sub-breakdown in response. Default false.

Example Request

cURL
curl -X GET \
  "https://pigsignal.io/api/v1/benchmarks/supply-forecast?region=KR&period=2026-Q3" \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Accept: application/json"

Example Response

JSON
{
  "status":         "ok",
  "region":         "KR",
  "period":         "2026-Q3",
  "supply_index":   94.2,     // 100 = 5-year baseline
  "trend":          "DECLINING",
  "yoy_change_pct": -3.8,
  "confidence":     0.91
}

Risk Signals API

Returns early-warning signals for supply disruptions, disease events, and market stress — calibrated against 150M+ records and 12 years of historical context.

Availability: Q1 2027 — Design partner program open
GET/api/v1/benchmarks/disease-alert

Parameters

ParameterTypeDescription
regionstringrequiredISO region code. See Regions reference.
risk_typesstring[]optionalRisk types to filter: disease, supply, weather, market. Default: all.
thresholdfloatoptionalMinimum risk_score to include signals. Range 0.0–1.0. Default: 0.3.

Example Response

JSON
{
  "status":       "ok",
  "region":       "KR",
  "risk_level":   "ELEVATED",
  "risk_score":   0.74,     // 0.0–1.0
  "signals": [
    { "type": "DISEASE_PROXIMITY",   "severity": "HIGH" },
    { "type": "SUPPLY_CONCENTRATION", "severity": "MEDIUM" }
  ]
}

Market Intelligence API

Returns weekly global market intelligence briefings including pork price movements, supply dynamics, and regional risk factors. Delivered as structured JSON and PDF digest.

Availability: Q4 2026 — Join waitlist for beta access
GET/api/v1/benchmarks/supply-shock

Parameters

ParameterTypeDescription
weekstringoptionalISO week in YYYY-WNN format. Defaults to latest available.
formatstringoptionalResponse format: json or pdf. Default: json.
regionsstring[]optionalList of region codes to include. Default: all available.

Error Codes

PigSignal uses standard HTTP status codes. Errors return a JSON body with a detail field.

CodeMeaning
401Missing or invalid API key.
403Your plan does not include this endpoint.
429Rate limit exceeded. Check your plan limits.
503Temporary service outage. Retry with exponential backoff.

Integration Notes

PigSignal responses use stable field names, explicit types, and versioned endpoints so agents can parse benchmark and supply signals without scraping prose.

Schema stability is part of the contract. Field changes require a versioned endpoint update, making the API safe for dashboards and agent workflows.

Region Codes

Use these region codes in the region parameter. KR is the most data-dense region with 12+ years of coverage.

CodeMeaningCoverage
KRSouth KoreaFull coverage · 12+ years · 150M+ records
KR-NORTHNorthern Korea (Gyeonggi, Gangwon)Regional subset of KR
KR-SOUTHSouthern Korea (Jeolla, Gyeongsang)Regional subset of KR
GLOBALAggregated global index (KR-weighted)Composite index · 18+ countries