Skip to main content
The crop advisor endpoint scores how well a given crop is likely to perform at a specific latitude/longitude, based on five years of historical climate data from Open-Meteo (ERA5). The API combines rainfall adequacy, temperature fit, soil moisture, biophysical suitability (GAEZ proxy), and recent fire exposure into a single 0–100 score and an aptitude label.
1

Choose your location

The API uses decimal-degree coordinates in the standard WGS 84 convention:
  • Latitude (lat): positive = north, negative = south. Range: −90 to 90.
  • Longitude (lon): positive = east, negative = west. Range: −180 to 180.
For example, Buenos Aires is lat=-34.6, lon=-58.4; Mexico City is lat=19.4, lon=-99.1.If you do not know the exact coordinates for a region, use the geocode endpoint to search by name:
The response returns a ranked list of matching places, each with lat and lon you can pass directly to the advisor.
2

Choose a crop ID

Pass a crop_id from the table below. You can use either the Spanish ID (canonical) or its English alias — the API resolves both.Passing an unrecognized crop_id returns a score of 0 with aptitude "Desconocida".
3

Choose a season

The season parameter filters which historical months are used to compute climate averages:For annual crops such as maize or soybean, annual is usually the right choice. For crops that are planted specifically in one season, use the matching season value to get a more precise score.
4

Make the request

Send a GET request to /agri/advisor with your chosen parameters:
All four parameters (lat, lon, crop_id, season) are accepted as query string values. season defaults to annual if omitted.
5

Interpret the response

The response contains a top-level score, an aptitude label, a per-factor breakdown, and a human-readable recommendation.
Key fields:
  • score — Weighted average of all factor scores, 0–100. Higher is better.
  • aptitude — Summary label: Alta (≥ 70), Media (45–69), or Baja (< 45).
  • factors — Array of individual scoring dimensions. Each factor includes:
    • score (0–100): how well the observed value fits the crop’s ideal range.
    • weight: this factor’s contribution to the final score (all weights sum to 1.0).
    • status: ok (score ≥ 70), warning (45–69), or risk (< 45).
  • recommendation_text — Plain-language summary in Spanish, listing any risk or warning factors.
To compare two crops at the same location, use the GraphQL compare query. It runs both advisor calls in parallel and returns a winner field with the higher-scoring crop_id: