The Climatifai API exposes a GraphQL endpoint atDocumentation Index
Fetch the complete documentation index at: https://docs.climatifai.com/llms.txt
Use this file to discover all available pages before exploring further.
/graphql, powered by Strawberry and FastAPI. It supports everything the REST API offers — crop advisor scores, climate series, fire hotspots, fire risk, and geocoding — plus three capabilities exclusive to GraphQL: side-by-side crop comparison, live agroclimatic alerts for eight LATAM zones, and semantic document search via RAG context. You can select exactly the fields you need in a single request, which is particularly useful when building dashboards or mobile clients where bandwidth matters.
Endpoint
POST requests with a JSON body containing a query string (and optionally variables).
You can also open GET api.climatifai.com/graphql in a browser to access the GraphiQL IDE, an in-browser playground where you can explore the schema, run queries interactively, and inspect field-level documentation.
Design
All operations are queries (read-only). The schema exposes no mutations or subscriptions — every call retrieves data without modifying state.Available queries
| Query | Description |
|---|---|
advisor(lat, lon, cropId, season) | Agricultural aptitude score for a crop at a location |
climate(lat, lon, from, to, scenario) | Historical climate baseline and CMIP6 projections |
hotspots(lat, lon, radiusKm, days, source) | Active NASA FIRMS fire hotspots near a point |
fireRisk(lat, lon, radiusKm) | Aggregated 0–100 fire risk score |
compare(lat, lon, cropIdA, cropIdB, season) | Side-by-side comparison of two crops with a winner |
alerts | Live agroclimatic alerts for 8 key LATAM zones |
geocode(q, count) | Place search for LATAM regions |
ragContext(query, limit) | Semantic search over agroclimatic documents |
GraphiQL playground
OpenGET /graphql in a browser to access the interactive GraphiQL IDE. It auto-completes field names and arguments, displays inline schema documentation, and lets you run queries against the live API without writing any code.
Basic usage
Send aPOST request with Content-Type: application/json and a body containing your query string.
cURL
Response