Skip to content

Instantly share code, notes, and snippets.

@monperrus
Created August 18, 2026 17:02
Show Gist options
  • Select an option

  • Save monperrus/a40d655e2170b548afb43cc8752f2211 to your computer and use it in GitHub Desktop.

Select an option

Save monperrus/a40d655e2170b548afb43cc8752f2211 to your computer and use it in GitHub Desktop.

agrifood — DG AGRI market price series (no key at all)

GET https://api.tech.ec.europa.eu/agrifood/api/{series}?beginDate=DD/MM/YYYY&endDate=DD/MM/YYYY

No apiKey, no auth. Verified: pigmeat/prices, cereal/prices, sugar/prices return weekly/monthly per-member-state price series. milk/prices → 404, i.e. the series list is narrower than hopeful client code assumes (a public repo's "confirmed" milk series was confirmed not to exist).

pigmeat/prices — EU pig carcass reference prices (verified in depth)

Weekly series, Mon–Sun windows (beginDate/endDate are the Monday and Sunday of the ISO-ish week; 01/01/2024→07/01/2024 = week 1). One row per (member state × pig class × week):

{
  "memberStateCode": "AT",
  "memberStateName": "Austria",
  "beginDate": "01/01/2024",
  "endDate": "07/01/2024",
  "price": "€235.80",
  "unit": "100 KG",
  "weekNumber": 1,
  "pigClass": "S"
}
  • Pig classes (EU carcass classification scale): S (superior), E (excellent), R (good), Piglet, and the aggregate Average S + E — prices are €/100 kg carcass weight for S/E/R, and €/head for Piglet rows (unit: "P" there).
  • Coverage: all EU-27 member states plus aggregates (European Union, and EU + UK / UK up to 01/02/2020 for pre-Brexit weeks). Not every MS reports every class every week — e.g. week 1/2024 has 74 rows, week 1/2018 has 88; Greece reports a single flat price for S/E/R, some MS never report R.
  • History: data exists back to at least late 2013 (a window straddling 30/12/2013–05/01/2014 returns 164 rows — two weeks' worth because pre-2014 weeks are reported by both old and new member-state sets).
  • Gotchas:
    • Dates are dd/MM/yyyy and strictly validated2024-01-01 or 99/99/9999500 {"technicalErrorMessage":"Date format must be dd/MM/yyyy"} with apiSubErrors[].
    • The window must align to a reporting week. A misaligned or non-matching window (e.g. 02/01/2024→08/01/2024, or 01/06/2025→07/06/2025) returns an empty array, not an error. The API does not snap to the containing week — query whole months/years and filter client-side by weekNumber/beginDate instead.
    • Missing beginDate/endDate → the entire history (huge; multi-MB, very slow, and observed to time out / truncate mid-JSON on slow links — always bound your windows).
    • No pagination, no server-side filtering by MS or class.

Example — EU aggregate, week 1 of 2024:

Class €/100 kg
S 210.74
E 209.59
Average S + E 210.39
R 261.59
Piglet €77.33 /head

Other verified series

cereal/prices, sugar/prices (region-based: sugarRegion, marketingYear, ym, weight, contractType — monthly, not weekly).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment