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 Shape

JSON
{
  "meta": {
    "year": <integer>,
    "anonymization": { "min_farms_threshold": 10 }
  },
  "data": [{
    "region_name": <string>,
    "farm_count": <integer>,
    "psy": { <statistic>: <number>, ... },
    "farrowing_rate": { <statistic>: <number>, ... }
  }]
}

Field shape only. Actual benchmark values depend on the requested year, region and the eligible farm population at request time. Regional aggregates are returned only where the minimum farm threshold is met.

Supply Signals API

Returns quarterly and monthly supply indicators for Korean and global swine markets, including herd size trends, slaughter volume changes, and regional variance. Monitor inventory, production and trade data, together with transparent derived metrics such as year-over-year change, moving averages and market concentration. Data is updated according to the publication schedule of each source.

Signals are descriptive indicators derived from observed data and are not forecasts or predictions.

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

Parameters

ParameterTypeDescription
regionstringrequiredISO region code. See Regions reference.
periodstringrequiredPeriod 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 observed indicators for supply, disease reporting, and market stress, derived from 150M+ records and 12 years of historical data.

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