---
name: eu-agri-food-data-api-ingestion
description: "How to get EU Agri-food Data Portal API data into a pandas DataFrame and Parquet: access, the request, the format, limits, quirks and terms."
---

# Load EU pigmeat prices into pandas and Parquet

Source entry: https://signal-lab-jet.vercel.app/datasets/eu-agri-food-data-api
Provider: https://agridata.ec.europa.eu/extensions/API_Documentation/GeneralInfo.html
Checked against the provider's documentation: 2026-11-01

## Access
- No account or API key was needed for the checked endpoint.
- The current API base is https://api.tech.ec.europa.eu/agrifood; the documentation says the previous domain is temporary.

## Request
```bash
curl 'https://api.tech.ec.europa.eu/agrifood/api/pigmeat/prices?memberStateCodes=SI&pigClasses=S&beginDate=22/01/2020&endDate=09/02/2020'
```

## Format
JSON array with member-state code and name, begin and end dates, formatted price, unit, week number and pig class.

## Load into pandas and Parquet
Needs Python 3 with requests, pandas and pyarrow.
```python
"""EU Agri-food weekly pigmeat prices -> pandas -> Parquet."""
import requests
import pandas as pd

URL = "https://api.tech.ec.europa.eu/agrifood/api/pigmeat/prices"
PARAMS = {
    "memberStateCodes": "SI", "pigClasses": "S",
    "beginDate": "22/01/2020", "endDate": "09/02/2020"
}
r = requests.get(URL, params=PARAMS, timeout=60)
r.raise_for_status()
df = pd.DataFrame(r.json())
df["beginDate"] = pd.to_datetime(df["beginDate"], format="%d/%m/%Y")
df["endDate"] = pd.to_datetime(df["endDate"], format="%d/%m/%Y")
df.to_parquet("eu_pigmeat_prices.parquet", index=False)
print(len(df), "weekly prices", df["memberStateName"].iloc[0],
      df["beginDate"].min().date(), "to", df["endDate"].max().date())
```
Run by us on 2026-11-01 (python 3.13.5 | pandas 3.1.0 | pyarrow 26.0.0 | requests 2.34.2). Result: 2 weekly prices Slovenia 2020-01-27 to 2020-02-09

## Limits
- Rate limit: Not stated.
- The gateway documents 429 and 503 responses without a numeric quota.
- Available filters and historical depth vary by service.

## Quirks
- Dates use day/month/year strings.
- The price field includes a currency symbol and is not directly numeric; preserve the unit before parsing it.
- CORS is disabled on endpoint responses, so browser applications need a same-origin proxy; server-side Python is unaffected.

## Terms and attribution
- EU-owned website content is CC BY 4.0 unless a specific notice says otherwise.
- Give credit, indicate changes and clear any separately marked third-party rights.
- Terms page: https://commission.europa.eu/legal-notice_en

## Sources
- https://agridata.ec.europa.eu/extensions/API_Documentation/GeneralInfo.html: "the format is suitable for consumption by computers rather than human beings"
- https://agridata.ec.europa.eu/extensions/dataportal/help.html: "Bulk download - available for some visualisations"
- https://commission.europa.eu/legal-notice_en: "content owned by the EU on this website is licensed under the Creative Commons Attribution 4.0 International (CC BY 4.0) licence"

## Help improve this skill
Missing a source, or see something to improve? Call the MCP tool suggest_source or feedback (or POST /api/suggest or /api/feedback). Reviewed ideas: https://signal-lab-jet.vercel.app/agent-suggestions

Information for educational purposes only. Free tiers, limits and licenses belong to the providers and may change; check the provider's own terms before using the data.
