# Pesticides API — Rejestr Środków Ochrony Roślin

> Official Polish plant-protection-product (pesticide) registry as a clean JSON API. Ask what may be legally applied on a given crop against a given pest/disease, with dose, application method, withdrawal period (karencja), re-entry period (prewencja) and bee-safety pulled from official product labels.

Base URL: https://pesticides.apitide.dev
Auth: send header `X-API-Key: <key>`. A keyless free tier works for evaluation (5 requests/min, 15/day, per IP). Get a key for production use.
Data source: Polish Ministry of Agriculture (MRiRW) via gov.pl. Informational only — the product label is the legally binding document.
Language: crop and pest values are Polish (e.g. "pszenica ozima", "mączniak"). Use the vocabulary endpoints to discover valid values.

## Endpoints

- [GET /search](https://pesticides.apitide.dev/search?crop=jab%C5%82o%C5%84&pest=parch): Hero query — products allowed on `crop` (optionally vs `pest`), one entry per product, with dose, timing, hazard class, karencja, prewencja, bee-safety and lifecycle status. Params: `crop` (required), `pest`, `rodzaj`, `uzytkownik`, `active_only`, `limit`, `offset`.
- [GET /products](https://pesticides.apitide.dev/products?q=parch): Search/list registered products by trade name or active substance. Params: `q`, `rodzaj`, `limit`, `offset`.
- [GET /products/{nr_zezw}](https://pesticides.apitide.dev/products/R-14/2025): One product by authorisation number with all its registered uses.
- [GET /validate](https://pesticides.apitide.dev/validate?product=R-84/2017&crop=jab%C5%82o%C5%84&pest=parch%20jab%C5%82oni&dose=0.4&dose_unit=l/ha): Validate a planned treatment for legality against the register. Returns a `verdict` (`allowed`/`warning`/`not_allowed`) plus itemised `checks` (product found, registration in date, crop registered, pest registered, dose within label). Forgiving input + `suggestions` on miss; free-text label dose may yield `indeterminate`. Params: `product` (nr_zezw, required), `crop` (required), `pest`, `dose`, `dose_unit`, `date`.
- [GET /crops](https://pesticides.apitide.dev/crops?q=jab): Crop vocabulary for autocomplete/discovery. Param: `q`.
- [GET /pests](https://pesticides.apitide.dev/pests?q=parch): Pest/disease/weed vocabulary. Param: `q`.
- [GET /meta](https://pesticides.apitide.dev/meta): Source publication date and dataset sizes.

## For AI agents

- OpenAPI spec: https://pesticides.apitide.dev/openapi.json — generate a typed client in any language.
- MCP server (Model Context Protocol, Streamable HTTP): https://pesticides.apitide.dev/mcp — connect an AI agent directly; tools: `search_treatments`, `get_product`, `list_crops`, `list_pests`, `dataset_info`.
- Interactive playground: https://pesticides.apitide.dev/playground
- Getting-started guide: https://pesticides.apitide.dev/guide
- Contact / support: kontakt@apitide.dev

## Examples

- What may I spray on apple trees against scab: `GET /search?crop=jabłoń&pest=parch`
- Fungicides for winter wheat against powdery mildew: `GET /search?crop=pszenica ozima&pest=mączniak&rodzaj=Fungicyd`
- Discover crop names containing "jab": `GET /crops?q=jab`
- Full record for one product: `GET /products/R-14/2025`
- Is this treatment legal (product on crop vs pest, dose, date): `GET /validate?product=R-84/2017&crop=jabłoń&pest=parch jabłoni&dose=0.4&dose_unit=l/ha`

## Notes

- Withdrawal period (karencja) and re-entry/bee data come from official labels and are matched to the queried crop; `null` means "not stated", not "zero".
- Each product carries a lifecycle `status`: aktywny (active), wygasa (expiring ≤90 days), wycofany (withdrawn).
