{
  "openapi": "3.0.1",
  "info": {
    "title": "Global Agri Decision Engine — Jenko Analytics",
    "description": "Decision engine for farmers, traders and governments. 3-layer intelligence: local climate (NASA satellites), production/yield outlook (USDA+FAO), and market signal (World Bank prices). Jenko proprietary metrics: JCR, JGS, JCY, JLE, JAQ, JFS, JPM, JTR.",
    "version": "1.0",
    "x-build-id": "AAGnssazJmTM7NTKl"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/jenko_systems~global-agri-decision-engine/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-jenko_systems-global-agri-decision-engine",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/jenko_systems~global-agri-decision-engine/runs": {
      "post": {
        "operationId": "runs-sync-jenko_systems-global-agri-decision-engine",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/jenko_systems~global-agri-decision-engine/run-sync": {
      "post": {
        "operationId": "run-sync-jenko_systems-global-agri-decision-engine",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "required": [
          "mode"
        ],
        "properties": {
          "mode": {
            "title": "Analysis Mode",
            "enum": [
              "farm_decision_engine",
              "farm_climate_profile",
              "regional_climate_risk",
              "crop_outlook",
              "livestock_outlook",
              "aquaculture_outlook",
              "food_security_dashboard",
              "commodity_market_signal",
              "trade_flow_analysis",
              "agri_commodities_dashboard"
            ],
            "type": "string",
            "description": "Pick a mode. Fields you leave empty are filled with a working example (shown in 'defaults_used' in the output). Which fields each mode uses:\n• farm_decision_engine: latitude, longitude, commodity (crop)\n• farm_climate_profile: latitude, longitude\n• regional_climate_risk: region\n• crop_outlook / livestock_outlook / aquaculture_outlook: commodity of that type\n• commodity_market_signal / trade_flow_analysis: commodity\n• food_security_dashboard: top_n, sort_by (vulnerable/secure)\n• agri_commodities_dashboard: top_n, sort_by (jpm_desc/jpm_asc)",
            "default": "farm_decision_engine"
          },
          "commodity": {
            "title": "Commodity",
            "enum": [
              "soybeans",
              "corn",
              "wheat",
              "rice",
              "coffee",
              "sugarcane",
              "cotton",
              "palm_oil",
              "barley",
              "cocoa",
              "sorghum",
              "canola",
              "cattle",
              "dairy_cattle",
              "poultry_broiler",
              "swine_pork",
              "sheep",
              "buffalo",
              "eggs_poultry",
              "goats",
              "atlantic_salmon",
              "tilapia",
              "shrimp",
              "carp",
              "sugar",
              "beef",
              "chicken"
            ],
            "type": "string",
            "description": "Crops for farm_decision_engine and crop_outlook; livestock for livestock_outlook; aquaculture for aquaculture_outlook. commodity_market_signal accepts crops plus sugar, beef and chicken. Empty = a sensible example for the chosen mode."
          },
          "latitude": {
            "title": "Latitude",
            "type": "string",
            "description": "Used by farm_decision_engine and farm_climate_profile. Decimal degrees, e.g. -12.55 (Sorriso, MT), 42.03 (Iowa). Empty = Sorriso, MT."
          },
          "longitude": {
            "title": "Longitude",
            "type": "string",
            "description": "Used together with latitude, e.g. -55.72 (Sorriso, MT), -93.62 (Iowa). Empty = Sorriso, MT."
          },
          "region": {
            "title": "Region preset (for regional_climate_risk)",
            "enum": [
              "iowa_corn",
              "us_winter_wheat",
              "california_almonds",
              "mato_grosso_soy",
              "parana_safrinha",
              "brazilian_coffee_belt",
              "argentina_pampas",
              "colombian_coffee",
              "mexican_corn",
              "european_wheat_belt",
              "ukraine_grain",
              "spain_olives",
              "uk_dairy",
              "swiss_alpine_dairy",
              "south_africa_corn",
              "sahel_sorghum",
              "ethiopian_coffee",
              "ivory_coast_cocoa",
              "kenya_tea",
              "indian_punjab",
              "kazakhstan_wheat",
              "china_north_plain",
              "indonesian_palm",
              "vietnam_rice",
              "thai_rice",
              "australia_wheat",
              "new_zealand_dairy"
            ],
            "type": "string",
            "description": "Used by regional_climate_risk. Empty = Mato Grosso Soy."
          },
          "country": {
            "title": "Country",
            "type": "string",
            "description": "Country name for food security analyses (Brazil, Egypt, China, India, etc)."
          },
          "top_n": {
            "title": "Top N results",
            "minimum": 3,
            "maximum": 50,
            "type": "integer",
            "description": "Number of top entries for dashboard/ranking modes.",
            "default": 15
          },
          "sort_by": {
            "title": "Sort order",
            "enum": [
              "vulnerable",
              "secure",
              "jpm_desc",
              "jpm_asc"
            ],
            "type": "string",
            "description": "food_security_dashboard uses vulnerable/secure; agri_commodities_dashboard uses jpm_desc/jpm_asc. Empty or not matching the mode = that mode's default."
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}