Pest & Disease API

This section contains all the endpoints related to pest and disease management, including identification, information, and alerts.

GET /v1/pests/alerts
Rate Limit: 500/min Cost: ₦0.0200

Get Pest & Disease Alerts

Get pest and disease alerts for a specific location or crop.

Example API Call

curl -X GET "https://api.riwe.io/v1/pests/alerts" \
  -H "X-API-KEY: your_api_key_here"

Parameters

Name Type Required Description

Example Response

{
    "date": "2023-08-01",
    "alerts": [
        {
            "id": 123,
            "name": "Maize Leaf Blight",
            "type": "disease",
            "risk_level": "high",
            "alert_message": "High risk of Maize Leaf Blight due to recent rainfall and moderate temperatures.",
            "affected_crops": "Maize"
        }
    ],
    "location": "Abuja, Nigeria"
}
GET /v1/pests/{id}
Rate Limit: 1000/min Cost: ₦0.0100

Get Pest & Disease Information

Get detailed information about a specific pest or disease.

Example API Call

curl -X GET "https://api.riwe.io/v1/pests/{id}" \
  -H "X-API-KEY: your_api_key_here"

Parameters

Name Type Required Description

Example Response

{
    "id": 15,
    "name": "Maize Leaf Blight",
    "type": "disease",
    "symptoms": "Long, elliptical lesions (2.5-15 cm) on leaves. Lesions are grayish-green to tan in color.",
    "management": "Apply fungicide containing Azoxystrobin + Propiconazole. Rotate crops with non-host crops.",
    "description": "Northern corn leaf blight is a fungal disease that affects corn crops worldwide.",
    "scientific_name": "Exserohilum turcicum"
}
POST /v1/pests/identify
Rate Limit: 100/min Cost: ₦0.0500

Identify Pest or Disease

Identify a pest or disease from an image.

Example API Call

curl -X POST "https://api.riwe.io/v1/pests/identify" \
  -H "X-API-KEY: your_api_key_here"

Parameters

Name Type Required Description

Example Response

{
    "identification": [
        {
            "name": "Maize Leaf Blight",
            "type": "disease",
            "confidence": 92.5,
            "description": "Northern corn leaf blight is a fungal disease that affects corn crops, causing long, narrow lesions on leaves.",
            "scientific_name": "Exserohilum turcicum"
        }
    ],
    "recommendations": "Apply fungicide containing Azoxystrobin + Propiconazole at 0.75-1.0 L/ha. Rotate crops with non-host crops for at least one year."
}