Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.climatifai.com/llms.txt

Use this file to discover all available pages before exploring further.

This page documents every query available in the Climatifai GraphQL schema. Each entry shows the full argument list, the return type and its fields, and a working curl example you can copy and run immediately. All queries are read-only — the schema exposes no mutations.

advisor

Returns an agricultural aptitude score for a specific crop at a given location. The score (0–100) is derived from a weighted combination of climate, soil, and fire exposure factors.
query {
  advisor(lat: Float!, lon: Float!, cropId: String!, season: String) {
    cropId
    score
    aptitude
    recommendationText
    season
    lat
    lon
    factors {
      label
      score
      weight
      status
      description
    }
  }
}
Arguments
ArgumentTypeRequiredDefaultDescription
latFloatYesCenter latitude in decimal degrees
lonFloatYesCenter longitude in decimal degrees
cropIdStringYesCanonical crop identifier (e.g. "maiz", "cafe")
seasonStringNo"annual""lluvias", "secas", or "annual"
Return fields — AdvisorResult
FieldTypeDescription
cropIdStringCrop identifier echoed from the request
scoreFloatWeighted aptitude score 0–100
aptitudeString"Alta" (≥ 70), "Media" (45–69), "Baja" (< 45)
recommendationTextStringPlain-language recommendation
seasonStringSeason echoed from the request
latFloatLatitude echoed from the request
lonFloatLongitude echoed from the request
factors[AdvisorFactor]Individual scoring factors
factors.labelStringFactor name
factors.scoreFloatFactor score 0–100
factors.weightFloatFractional weight in the final score
factors.statusString"ok", "warning", or "risk"
factors.descriptionStringOptional description of the factor
cURL
curl --request POST \
  --url "https://api.climatifai.com/graphql" \
  --header "Content-Type: application/json" \
  --data '{
    "query": "{ advisor(lat: 19.4326, lon: -99.1332, cropId: \"maiz\", season: \"lluvias\") { score aptitude recommendationText factors { label score weight status } } }"
  }'

climate

Returns historical monthly climate data and CMIP6 climate projections for a location. Use this query to understand long-term trends and future scenarios without making separate REST calls.
query {
  climate(lat: Float!, lon: Float!, from: Int, to: Int, scenario: String) {
    lat
    lon
    scenario
    historical {
      year
      month
      tempC
      precipMm
      soilMoisture
    }
    projected {
      year
      month
      tempC
      precipMm
      soilMoisture
    }
  }
}
Arguments
ArgumentTypeRequiredDefaultDescription
latFloatYesLatitude in decimal degrees
lonFloatYesLongitude in decimal degrees
fromIntNo1991Start year for the historical series
toIntNo2020End year for the historical series
scenarioStringNo"SSP3-7.0"CMIP6 emissions scenario for projections
Return fields — ClimateResult
FieldTypeDescription
latFloatLatitude echoed from the request
lonFloatLongitude echoed from the request
scenarioStringEmissions scenario used for projections
historical[ClimateMonth]Monthly historical climate records
projected[ClimateMonth]Monthly projected climate records
*.yearIntCalendar year
*.monthIntMonth (1–12)
*.tempCFloatMean temperature in °C
*.precipMmFloatTotal precipitation in mm
*.soilMoistureFloatVolumetric soil moisture in m³/m³
cURL
curl --request POST \
  --url "https://api.climatifai.com/graphql" \
  --header "Content-Type: application/json" \
  --data '{
    "query": "{ climate(lat: -34.0, lon: -61.0, from: 2000, to: 2020, scenario: \"SSP3-7.0\") { scenario historical { year month tempC precipMm } projected { year month tempC precipMm } } }"
  }'

hotspots

Returns active NASA FIRMS fire hotspot detections within a radius around a location. Each record includes brightness, fire radiative power, satellite, and confidence level.
query {
  hotspots(lat: Float!, lon: Float!, radiusKm: Float, days: Int, source: String) {
    lat
    lon
    radiusKm
    days
    count
    hotspots {
      lat
      lon
      brightness
      frp
      acqDate
      acqTime
      satellite
      confidence
    }
  }
}
Arguments
ArgumentTypeRequiredDefaultDescription
latFloatYesCenter latitude
lonFloatYesCenter longitude
radiusKmFloatNo100Search radius in kilometres
daysIntNo5Look-back period in days (1–5)
sourceStringNo"VIIRS_SNPP_NRT"FIRMS data source
Return fields — HotspotsResult
FieldTypeDescription
latFloatCenter latitude echoed from the request
lonFloatCenter longitude echoed from the request
radiusKmFloatSearch radius echoed from the request
daysIntLook-back period echoed from the request
countIntTotal number of hotspots detected
hotspots[Hotspot]Array of individual fire detections
hotspots.latFloatHotspot centroid latitude
hotspots.lonFloatHotspot centroid longitude
hotspots.brightnessFloatBrightness temperature in Kelvin
hotspots.frpFloatFire Radiative Power in megawatts
hotspots.acqDateStringAcquisition date (YYYY-MM-DD)
hotspots.acqTimeStringAcquisition time (HHMM UTC)
hotspots.satelliteStringSatellite name code
hotspots.confidenceStringDetection confidence level
cURL
curl --request POST \
  --url "https://api.climatifai.com/graphql" \
  --header "Content-Type: application/json" \
  --data '{
    "query": "{ hotspots(lat: -22.0, lon: -60.0, radiusKm: 150, days: 3) { count hotspots { lat lon brightness frp acqDate confidence } } }"
  }'

fireRisk

Returns an aggregated 0–100 fire risk score and a human-readable label for a location. This query is equivalent to the REST GET /fires/risk endpoint but lets you combine it with other data in a single request.
query {
  fireRisk(lat: Float!, lon: Float!, radiusKm: Float) {
    lat
    lon
    radiusKm
    riskScore
    riskLabel
    hotspotCount
  }
}
Arguments
ArgumentTypeRequiredDefaultDescription
latFloatYesCenter latitude
lonFloatYesCenter longitude
radiusKmFloatNo100Search radius in kilometres
Return fields — FireRiskResult
FieldTypeDescription
latFloatLatitude echoed from the request
lonFloatLongitude echoed from the request
radiusKmFloatSearch radius echoed from the request
riskScoreFloatAggregated fire risk score 0–100
riskLabelString"Alto" (≥ 60), "Medio" (30–59), "Bajo" (< 30)
hotspotCountIntNumber of active hotspots within the radius
cURL
curl --request POST \
  --url "https://api.climatifai.com/graphql" \
  --header "Content-Type: application/json" \
  --data '{
    "query": "{ fireRisk(lat: 19.4326, lon: -99.1332, radiusKm: 100) { riskScore riskLabel hotspotCount } }"
  }'

compare

Evaluates two crops at the same location and season in parallel and returns their individual advisor results alongside a winner field indicating which crop scored higher. If both crops score equally, winner is null.
query {
  compare(
    lat: Float!
    lon: Float!
    cropIdA: String!
    cropIdB: String!
    season: String
  ) {
    lat
    lon
    season
    winner
    cropA {
      cropId
      score
      aptitude
      recommendationText
    }
    cropB {
      cropId
      score
      aptitude
      recommendationText
    }
  }
}
Arguments
ArgumentTypeRequiredDefaultDescription
latFloatYesLatitude of the location to evaluate
lonFloatYesLongitude of the location to evaluate
cropIdAStringYesFirst crop’s canonical identifier
cropIdBStringYesSecond crop’s canonical identifier
seasonStringNo"annual""lluvias", "secas", or "annual"
Return fields — CompareResult
FieldTypeDescription
latFloatLatitude echoed from the request
lonFloatLongitude echoed from the request
seasonStringSeason echoed from the request
winnerStringcropId of the higher-scoring crop, or null if tied
cropAAdvisorResultFull advisor result for cropIdA
cropBAdvisorResultFull advisor result for cropIdB
cURL
curl --request POST \
  --url "https://api.climatifai.com/graphql" \
  --header "Content-Type: application/json" \
  --data '{
    "query": "{ compare(lat: 20.5, lon: -101.0, cropIdA: \"maiz\", cropIdB: \"sorgo\", season: \"secas\") { winner cropA { score aptitude } cropB { score aptitude } } }"
  }'

alerts

Returns live agroclimatic alerts for eight key agricultural zones across LATAM (excluding Brazil). Alerts are generated in real time from NASA FIRMS fire data and Open-Meteo forecasts, and cover fire activity, heat waves, drought, and heavy rain events.
query {
  alerts {
    generatedAt
    zonesChecked
    alerts {
      title
      severity
      message
      generatedAt
      region
      alertType
    }
  }
}
Arguments This query takes no arguments. Return fields — AlertsResult
FieldTypeDescription
generatedAtStringISO 8601 timestamp when this batch of alerts was generated
zonesCheckedIntNumber of LATAM zones evaluated (always 8)
alerts[Alert]List of active alerts sorted by severity (high first)
alerts.titleStringShort alert title
alerts.severityString"alta", "media", or "baja"
alerts.messageStringFull alert description with actionable guidance
alerts.generatedAtStringISO 8601 timestamp for this individual alert
alerts.regionStringName of the LATAM zone the alert applies to
alerts.alertTypeString"fire", "heat", "drought", or "rain"
Monitored zones: Orinoquía (Colombia/Venezuela), Chaco (Paraguay/Argentina), Bajío (México), Centroamérica, Llanos Orientales (Colombia), Pampa Húmeda (Argentina), Valle Central (Chile), Sierra Peruana.
cURL
curl --request POST \
  --url "https://api.climatifai.com/graphql" \
  --header "Content-Type: application/json" \
  --data '{
    "query": "{ alerts { generatedAt zonesChecked alerts { title severity message region alertType } } }"
  }'

geocode

Searches for place names within LATAM and returns matching locations with coordinates, country, and elevation metadata. Use this query to resolve a user-supplied location string into lat/lon coordinates before calling other queries.
query {
  geocode(q: String!, count: Int) {
    results {
      name
      lat
      lon
      country
      admin1
      elevation
      population
    }
  }
}
Arguments
ArgumentTypeRequiredDefaultDescription
qStringYesPlace name search query
countIntNo5Maximum number of results to return
Return fields — GeocodeResult
FieldTypeDescription
results[GeocodePlace]Array of matching places
results.nameStringPlace name
results.latFloatLatitude
results.lonFloatLongitude
results.countryStringCountry name
results.admin1StringFirst-level administrative region
results.elevationFloatElevation in metres above sea level
results.populationIntPopulation estimate
cURL
curl --request POST \
  --url "https://api.climatifai.com/graphql" \
  --header "Content-Type: application/json" \
  --data '{
    "query": "{ geocode(q: \"Bajío México\", count: 3) { results { name lat lon country admin1 } } }"
  }'

ragContext

Performs semantic search over the agroclimatic document corpus using ClimateBERT embeddings and Qdrant vector search. Returns the most relevant text passages along with their source identifiers and similarity scores.
query {
  ragContext(query: String!, limit: Int) {
    text
    source
    score
  }
}
Arguments
ArgumentTypeRequiredDefaultDescription
queryStringYesNatural-language search query
limitIntNo3Maximum number of passages to return
Return fields — [RagPassage]
FieldTypeDescription
textStringExtracted passage text
sourceStringSource document identifier
scoreFloatCosine similarity score (higher is more relevant)
cURL
curl --request POST \
  --url "https://api.climatifai.com/graphql" \
  --header "Content-Type: application/json" \
  --data '{
    "query": "{ ragContext(query: \"drought tolerance maize LATAM\", limit: 3) { text source score } }"
  }'