AgriCrave Logo
HomeFeaturesDocumentationAPIAboutContact
HomeFeaturesDocumentationAPIAboutContact

API Reference

v2.0

Integrate AgriCrave's powerful agricultural AI into your applications with our RESTful API.

Getting Started
Endpoints
SDKs

Introduction

The AgriCrave API provides programmatic access to our agricultural AI platform. Use it to integrate crop monitoring, weather predictions, and market insights into your own applications.

Base URL

url
https://api.agricrave.site/v2

Fast

Average response time under 100ms

Secure

TLS encryption and OAuth 2.0

RESTful

Standard HTTP methods and JSON responses

Authentication

All API requests require authentication using an API key. Include your key in the Authorization header.

Request Header

bash
curl -X GET "https://api.agricrave.site/v2/farms" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json"

Getting Your API Key

  1. 1Log in to your AgriCrave dashboard
  2. 2Navigate to Settings → API Keys
  3. 3Click "Generate New Key"
  4. 4Copy and securely store your key

Rate Limiting

API requests are rate limited to ensure fair usage and platform stability.

PlanRequests/HourRequests/Day
Free1001,000
Pro1,00010,000
EnterpriseUnlimitedUnlimited
GET

Farms

Manage farm data including boundaries, crops, and monitoring settings.

List All Farms

json
GET /v2/farms

# Response
{
  "data": [
    {
      "id": "farm_abc123",
      "name": "Olu's Cassava Farm",
      "location": {
        "lat": 7.3775,
        "lng": 3.9470
      },
      "size_hectares": 5.2,
      "crops": ["cassava", "maize"],
      "created_at": "2024-01-15T10:30:00Z"
    }
  ],
  "meta": {
    "total": 1,
    "page": 1
  }
}

Create a Farm

json
POST /v2/farms

# Request Body
{
  "name": "New Farm",
  "location": {
    "lat": 7.3775,
    "lng": 3.9470
  },
  "size_hectares": 10,
  "crops": ["rice", "vegetables"]
}

# Response
{
  "data": {
    "id": "farm_xyz789",
    "name": "New Farm",
    ...
  }
}
GET

Weather

Get hyperlocal weather forecasts and alerts for your farm locations.

Get Weather Forecast

json
GET /v2/weather/farm_abc123

# Response
{
  "data": {
    "farm_id": "farm_abc123",
    "current": {
      "temp_c": 28,
      "humidity": 75,
      "conditions": "partly_cloudy"
    },
    "forecast": [
      {
        "date": "2024-01-20",
        "high_c": 32,
        "low_c": 24,
        "rain_probability": 0.3,
        "conditions": "rain_likely"
      }
    ],
    "alerts": [
      {
        "type": "heavy_rain",
        "severity": "moderate",
        "message": "Heavy rain expected in 48 hours"
      }
    ]
  }
}

JavaScript SDK

Install our JavaScript SDK to quickly integrate AgriCrave into your Node.js or browser applications.

Installation

bash
npm install @agricrave/sdk

Usage Example

javascript
import { AgriCrave } from '@agricrave/sdk';

const client = new AgriCrave({
  apiKey: process.env.AGRICRAVE_API_KEY
});

// Get all farms
const farms = await client.farms.list();

// Get weather for a farm
const weather = await client.weather.get('farm_abc123');

// Get yield prediction
const prediction = await client.predictions.yield('farm_abc123');

API Explorer

Test API endpoints directly in your browser.

Response will appear here...

AgriCrave Logo

Empowering African farmers with AI-powered insights for smarter, more profitable farming.

Subscribe to our newsletter

Product

  • Features
  • Pricing
  • API
  • Documentation

Resources

  • Support Center
  • Blog
  • Community
  • Webinars

Company

  • About Us
  • Careers
  • Contact
  • Partners

Legal

  • Privacy Policy
  • Terms of Service
  • Cookie Policy
Language:

© 2026 AgriCrave. All rights reserved.