To access APIFarmer Agriculture API, you need to obtain an API key. You can get an API key by visiting our pricing page and subscribing to one of our three API plans. Once you have subscribed you will receive an email with your API key included. Come back to our documentation page after you received your API key. With your API key in hand, use the {YOUR_API_KEY} parameter with any valid API endpoint URL and set it to your access key.
api-key={YOUR_API_KEY}
https://api.apifarmer.com/api/v0/stat?api-key={YOUR_API_KEY}
The base URL for all API endpoints is:
https://api.apifarmer.com/v0/
Each APIFarmer API subscription has a monthly database request package that allows you to access the database and consume the database request points.
Each request to the APIFarmer database is an API call. Depending on which endpoint you are going to call, a different number is subtracted from your subscription monthly package. Upon reaching the max monthly calls you can choose to upgrade to a higher plan or to wait until the package renewal date.
You can always find your request statistics and current usage by calling this API:
https://api.apifarmer.com/api/v0/stat?api-key={YOUR_API_KEY}
If your API request is not successful, APIFarmer will return an error with an error message.
This documentation table should help you understand Agriculture API terminologies.
| Parameter | Data Type | Description | Example Value |
|---|---|---|---|
latitude | Float | Latitude coordinate of the location | 40.7128 |
longitude | Float | Longitude coordinate of the location | -74.006 |
country | String | The UN/LOCODE for the country | US |
city | String | The UN/LOCODE for the city | USNYC |
postal_code | String | Postal code of the location | 10001 |
sunrise | String | Time of sunrise in HH:MM format | 5:30 |
sunset | String | Time of sunset in HH:MM format | 20:15 |
timezone | String | Timezone of the location | UTC-5 |
last_observation_time | String | Time of the last weather observation in ISO 8601 format | 2024-05-28T14:00:00Z |
temp_c | Float | Temperature in Celsius | 22 |
temp_f | Float | Temperature in Fahrenheit | 71.6 |
feelslike_c | Float | Feels like temperature in Celsius | 21 |
feelslike_f | Float | Feels like temperature in Fahrenheit | 69.8 |
windchill_c | Float | Wind chill temperature in Celsius | 20 |
windchill_f | Float | Wind chill temperature in Fahrenheit | 68 |
heatindex_c | Float | Heat index temperature in Celsius | 24 |
heatindex_f | Float | Heat index temperature in Fahrenheit | 75.2 |
dewpoint_c | Float | Dew point temperature in Celsius | 15 |
dewpoint_f | Float | Dew point temperature in Fahrenheit | 59 |
wind_speed_mph | Float | Wind speed in miles per hour | 10 |
wind_speed_kph | Float | Wind speed in kilometers per hour | 16.1 |
wind_direction | Integer | Wind direction in degrees | 270 |
humidity | Integer | Humidity percentage | 60 |
gust_mph | Float | Wind gust speed in miles per hour | 15 |
gust_kph | Float | Wind gust speed in kilometers per hour | 24.1 |
rain_probability | Integer | Probability of rain in percentage | 40 |
temperature_min_c | Float | Minimum temperature in Celsius for the day | 15 |
temperature_min_f | Float | Minimum temperature in Fahrenheit for the day | 59 |
temperature_max_c | Float | Maximum temperature in Celsius for the day | 28 |
temperature_max_f | Float | Maximum temperature in Fahrenheit for the day | 82.4 |
weather_description | String | Short description of the weather conditions | Partly cloudy |
cloud_cover | Integer | Cloud cover percentage | 75 |
pressure | Float | Atmospheric pressure in hPa | 1013.25 |
sea_level_pressure | Float | Sea level pressure in hPa | 1015.5 |
visibility | Float | Visibility in kilometers | 10 |
precipitation | Float | Precipitation amount in mm | 2.5 |
snow | Float | Snow amount in mm | 0 |
uv_index | Integer | UV index | 7 |
air_quality_index | Integer | Air quality index | 42 |
solar_rad | Float | Solar radiation in W/m² | 250 |
last_updated | String | Time when data was last updated in ISO 8601 format | 2024-05-28T14:05:00Z |
| Parameter | Data Type | Description | Example Value |
|---|---|---|---|
plant_id | String | Unique internal identifier for the plant | PLNT001 |
scientific_name | String | Scientific name of the plant | Zea mays |
symbol | String | USDA symbol for the plant | ZEAMX |
common_name | String | Common name of the plant | Corn |
family | String | Family name of the plant | Poaceae |
genus | String | Genus name of the plant | Zea |
species | String | Species name of the plant | Mays |
duration | String | Life duration of the plant (e.g., annual, perennial) | Annual |
kingdom | String | Kingdom classification of the plant | Plantae |
subkingdom | String | Subkingdom classification of the plant | Tracheobionta |
superdivision | String | Superdivision classification of the plant | Spermatophyta |
division | String | Division classification of the plant | Magnoliophyta |
class | String | Class classification of the plant | Liliopsida |
subclass | String | Subclass classification of the plant | Commelinidae |
order | String | Order classification of the plant | Poales |
growth_habit | String | Growth habit of the plant (e.g., tree, shrub, herb) | Herb |
native_status | String | Native status (e.g., native, introduced) | Native |
wetland_regions | String | Wetland regions where the plant is commonly found | FACU |
image_url | String | URL for an image of the plant | https://example.com/corn.jpg |
| Parameter | Data Type | Description | Example Value |
|---|---|---|---|
commodity | String | Name of the commodity | Corn |
price | Float | Current price of the commodity (in USD) | 3.5 |
high | Float | Highest price of the commodity for the day (in USD) | 3.6 |
low | Float | Lowest price of the commodity for the day (in USD) | 3.4 |
open | Float | Opening price of the commodity for the day (in USD) | 3.55 |
close | Float | Closing price of the commodity for the day (in USD) | 3.5 |
daily_change | Float | Change in price from open to close for the day (in USD) | 0.05 |
weekly_change | Float | Change in price over the past week (in USD) | 0.1 |
monthly_change | Float | Change in price over the past month (in USD) | 0.15 |
q1_change | Float | Change in price over the first quarter (in USD) | 0.2 |
q2_change | Float | Change in price over the second quarter (in USD) | 0.25 |
q3_change | Float | Change in price over the third quarter (in USD) | 0.3 |
q4_change | Float | Change in price over the fourth quarter (in USD) | 0.35 |
date | String | Date of the price data in YYYY-MM-DD | 2024-06-15 |
time | String | Time of the price data in HH:MM in UTC | 14:30 |
unit | String | Unit of measurement for the price | USD per bushel |
currency | String | Currency in which the price is denominated | USD |
symbol | String | Symbol representing the commodity | CORN |
| Parameter | Data Type | Description | Example Value |
|---|---|---|---|
equipment_id | String | Unique identifier for the equipment | FM001 |
manufacturer | String | Manufacturer of the equipment | John Deere |
model | String | Model name or number | Model 9300 |
type | String | Type of equipment (tractor, harvester, plow, etc.) | Tractor |
engine_power_hp | Float | Engine power in horsepower | 150.5 |
horsepower | Float | Horsepower of the equipment | 160 |
fuel_capacity_liters | Float | Fuel capacity in liters | 250 |
weight_kg | Float | Weight of the equipment in kilograms | 3500 |
dimensions_mm | String | Dimensions of the equipment (length x width x height) | 5000 x 2000 x 2500 |
operating_speed_kph | Float | Operating speed in kilometers per hour | 25 |
features | String | Additional features or capabilities | GPS navigation, AC |
year_manufactured | Integer | Year the equipment was manufactured | 2023 |
price_usd | Float | Price of the equipment in USD | 45000 |
manuals | Array | Array of URLs or paths to equipment manuals | https://example.com/manual.pdf , https://example.com/specs.pdf |
warranty_info | String | Warranty information for the equipment | 3 years limited warranty |
maintenance_schedule | String | Recommended maintenance schedule for the equipment | Service every 200 hours |
service_centers | Array | Array of locations or contact details for service centers | Farm Equipment Co. - Service Center A, Farm Equipment Co. - Service Center B |
compatible_attachments | Array | Array of compatible attachments or implements | Plow attachment, Seeder attachment |
operational_videos | Array | Array of URLs or paths to operational videos | https://example.com/video1.mp4, https://example.com/video2.mp4 |
This endpoint allows you to obtain weather data conditions by using latitude and longitude of the desired location.
https://api.apifarmer.com/api/v0/weather?api-key={YOUR_API_KEY}&lat=40.7128&lon=-74.006
{
"data": {
"latitude": 40.7128,
"longitude": -74.006,
"country": "US",
"city": "USNYC",
"sunrise": "5:30",
"sunset": "20:15",
"timezone": "UTC-5",
"temp_c": 22,
"feelslike_c": 21,
"windchill_c": 20,
"heatindex_c": 24,
"dewpoint_c": 15,
"wind_speed_kph": 16.1,
"wind_direction": 270,
"humidity": 60,
"gust_kph": 24.1,
"rain_probability": 40,
"temperature_min_c": 15,
"temperature_max_c": 28,
"weather_description": "Partly cloudy",
"cloud_cover": 75,
"pressure": 1013.25,
"sea_level_pressure": 1015.5,
"visibility": 10,
"precipitation": 2.5,
"snow": 0,
"uv_index": 7,
"air_quality_index": 42,
"solar_rad": 250,
"last_updated": "2024-05-28T14:05:00Z"
},
"meta": {
"duration": 0.00246942,
"endpoint": "/api/v0/weather",
"success": true
}
}
https://api.apifarmer.com/api/v0/weather?api-key={YOUR_API_KEY}&lat=40.7128&lon=-74.006&start_date=2023-01-01T00:00:00Z&end_date=2023-06-01T00:00:00Z
{
"data": {
"start_date": "2023-01-01T00:00:00Z",
"end_date": "2023-06-01T00:00:00Z",
"latitude": 40.7128,
"longitude": -74.006,
"country": "US",
"city": "USNYC",
"sunrise": "5:30",
"sunset": "20:15",
"timezone": "UTC-5",
"temp_c": 22,
"feelslike_c": 21,
"windchill_c": 20,
"heatindex_c": 24,
"dewpoint_c": 15,
"wind_speed_kph": 16.1,
"wind_direction": 270,
"humidity": 60,
"gust_kph": 24.1,
"rain_probability": 40,
"temperature_min_c": 15,
"temperature_max_c": 28,
"weather_description": "Partly cloudy",
"cloud_cover": 75,
"pressure": 1013.25,
"sea_level_pressure": 1015.5,
"visibility": 10,
"precipitation": 2.5,
"snow": 0,
"uv_index": 7,
"air_quality_index": 42,
"solar_rad": 250,
"last_updated": "2024-05-28T14:05:00Z"
},
"meta": {
"duration": 0.00246942,
"endpoint": "/api/v0/weather",
"success": true
}
}
https://api.apifarmer.com/api/v0/weather?api-key={YOUR_API_KEY}&lat=40.7128&lon=-74.006&forecast_date=2023-06-16T14:00:00Z
{
"data": {
"forecast_date": "2023-06-16T14:00:00Z",
"latitude": 40.7128,
"longitude": -74.006,
"country": "US",
"city": "USNYC",
"sunrise": "5:30",
"sunset": "20:15",
"timezone": "UTC-5",
"temp_c": 22,
"feelslike_c": 21,
"windchill_c": 20,
"heatindex_c": 24,
"dewpoint_c": 15,
"wind_speed_kph": 16.1,
"wind_direction": 270,
"humidity": 60,
"gust_kph": 24.1,
"rain_probability": 40,
"temperature_min_c": 15,
"temperature_max_c": 28,
"weather_description": "Partly cloudy",
"cloud_cover": 75,
"pressure": 1013.25,
"sea_level_pressure": 1015.5,
"visibility": 10,
"precipitation": 2.5,
"snow": 0,
"uv_index": 7,
"air_quality_index": 42,
"solar_rad": 250,
"last_updated": "2024-05-28T14:05:00Z"
},
"meta": {
"duration": 0.00246942,
"endpoint": "/api/v0/weather",
"success": true
}
}
This endpoint gives you a list of plants based on your search parameter, such as: ID, common name, scientific name, symbol.
The next endpoint gives you access to plant details and characteristics based on your search parameter.
The following endpoint gives you growth requirements for a specified plant:
Finally, this last plant endpoint retrieves plant reproduction and suitability/use data:
https://api.apifarmer.com/api/v0/plant?api-key={YOUR_API_KEY}&{scientific_name}=Penstemon
{
"data": [
{
"plant_id": "01PD",
"scientific_name": "Penstemon digitalis",
"symbol": "PEDI",
"common_name": "Foxglove beardtongue"
},
{
"plant_id": "01PG",
"scientific_name": "Penstemon grandiflorus",
"symbol": "PEGR",
"common_name": "Large beardtongue"
},
{
"plant_id": "01PH",
"scientific_name": "Penstemon heterophyllus",
"symbol": "PEHE",
"common_name": "Foothill beardtongue"
}
],
"meta": {
"duration": 0.00246942,
"endpoint": "/api/v0/plant",
"success": true
}
}
https://api.apifarmer.com/api/v0/plant_details?api-key={YOUR_API_KEY}&{scientific_name}=Penstemon%20digitalis
{
"data": {
"plant_id": "01PD",
"scientific_name": "Penstemon Digitalis",
"symbol": "PEDI",
"common_name": "Foxglove beardtongue",
"family": "Scrophulariaceae Juss",
"genus": "Penstemon Schmidel",
"species": "Penstemon digitalis Nutt. ex Sim",
"duration": "Perennial",
"kingdom": "Plantae - Plants",
"subkingdom": "Tracheobionta - Vascular plants",
"superdivision": "Spermatophyta - Seed plants",
"division": "Magnoliophyta - Flowering plants",
"class": "Magnoliopsida - Dicotyledons",
"subclass": "Asteridae",
"order": "Scrophulariales",
"growth_habit": "Forb/herb",
"native_status": "CAN I, L48 N",
"wetland_regions": "Atlantic and Gulf Coastal Plain FAC, Eastern Mountains and Piedmont FAC, Great Plains FACW, Midwest FAC, Northcentral & Northeast FAC",
"active_growth_period": "Spring and Summer",
"bloat": "None",
"cn_ratio": "High",
"coppice_potential": "No",
"fall_conspicuous": "No",
"fire_resistant": "No",
"flower_color": "Purple",
"flower_conspicuous": "Yes",
"foliage_color": "Red",
"foliage_porosity_summer": "Porous",
"foliage_porosity_winter": "Porous",
"foliage_texture": "Fine",
"fruit_seed_color": "Brown",
"fruit_seed_conspicuous": "No",
"growth_form": "Rhizomatous",
"growth_rate": "Moderate",
"height_mature_ft": 4.0,
"known_allelopath": "No",
"leaf_retention": "No",
"lifespan": "Moderate",
"low_growing_grass": "No",
"nitrogen_fixation": "None",
"resprout_ability": "No",
"shape_and_orientation": "Erect",
"toxicity": "None"
},
"meta": {
"duration": 0.00246942,
"endpoint": "/api/v0/plant_details",
"success": true
}
}
https://api.apifarmer.com/api/v0/plant_growth?api-key={YOUR_API_KEY}&{scientific_name}=Penstemon%20digitalis
{
"data": {
"plant_id": "01PD",
"scientific_name": "Penstemon Digitalis",
"symbol": "PEDI",
"common_name": "Foxglove beardtongue",
"adapted_to_coarse_textured_soils": "Yes",
"adapted_to_fine_textured_soils": "Yes",
"adapted_to_medium_textured_soils": "Yes",
"cold_stratification_required": "No",
"drought_tolerance": "High",
"fertility_requirement": "Medium",
"fire_tolerance": "Medium",
"frost_free_days_minimum": "110",
"planting_density_per_acre_maximum": 4800,
"planting_density_per_acre_minimum": 2700,
"root_depth_minimum_inches": 8,
"salinity_tolerance": "Medium",
"shade_tolerance": "Tolerant",
"moisture_use": "Low",
"pH_maximum": 7.0,
"pH_minimum": 5.5,
"temperature_minimum_f": -38
},
"meta": {
"duration": 0.00246942,
"endpoint": "/api/v0/plant_growth",
"success": true
}
}
https://api.apifarmer.com/api/v0/plant_reproduction?api-key={YOUR_API_KEY}&{scientific_name}=Penstemon%20digitalis
{
"data": {
"plant_id": "01PD",
"scientific_name": "Penstemon Digitalis",
"symbol": "PEDI",
"common_name": "Foxglove beardtongue",
"bloom_period": "Late Spring",
"commercial_availability": "Routinely Available",
"fruit_seed_abundance": "Medium",
"fruit_seed_period_begin": "Summer",
"fruit_seed_period_end": "Summer",
"fruit_seed_persistence": "No",
"propagated_by_bare_root": "No",
"propagated_by_bulb": "No",
"propagated_by_container": "Yes",
"propagated_by_corm": "No",
"propagated_by_cuttings": "No",
"propagated_by_seed": "Yes",
"propagated_by_sod": "No",
"propagated_by_sprigs": "Yes",
"propagated_by_tubers": "No",
"seed_per_pound": 400000,
"seed_spread_rate": "Slow",
"seedling_vigor": "Medium",
"small_grain": "No",
"vegetative_spread_rate": "Moderate",
"berry_nut_seed_product": "No",
"christmas_tree_product": "No",
"fodder_product": "Yes",
"lumber_product": "No",
"naval_store_product": "No",
"nursery_stock_product": "No",
"palatable_browse_animal": "Medium",
"palatable_graze_animal": "Low",
"palatable_human": "No",
"post_product": "No",
"pulpwood_product": "No",
"veneer_product": "No",
"protein_potential": "Low"
},
"meta": {
"duration": 0.00246942,
"endpoint": "/api/v0/plant_reproduction",
"success": true
}
}
This endpoint allows you to gather real-time data on various commodities such as food, metal, and livestock commodities.
https://api.apifarmer.com/api/v0/commodities?api-key={YOUR_API_KEY}
See the Agriculture Commodity Prices API values legend above for the full list of response fields, such as commodity, price, daily_change, unit and symbol.
This endpoint gives you a vast repository of farm machinery data, technical details, specifications, usage guidelines, operating manuals, maintenance recommendations and more for agricultural & farm equipment.
https://api.apifarmer.com/api/v0/farm_machinery?api-key={YOUR_API_KEY}
See the Farm Machinery and Equipment API values legend above for the full list of response fields, such as manufacturer, model, engine_power_hp and maintenance_schedule.
This endpoint allows you to bring a new level of standardization for your agriculture data, ensure accuracy and relevance and get rid of any manual data entry errors.
https://api.apifarmer.com/api/v0/agriculture_input?api-key={YOUR_API_KEY}
To get started, simply visit our pricing page and choose the API plan that best fits your needs. Click “Get API Key” and follow the instructions. After completing the payment, you will receive an API key and Agriculture API documentation to integrate APIFarmer with your application via email. Additionally, if you have any questions, you can always contact us for assistance and support.
No, there is no contract and commitment required. You can cancel your APIFarmer subscription anytime without any penalties and fees, because we believe in providing flexibility of our Agriculture API solutions to our customers. Therefore, you have the freedom to choose the API plan that suits your business needs without any long-term obligations.
To integrate APIFarmer APIs with your application, you can use our documentation and code examples as a guide. We provide detailed documentation for each of our APIs, including endpoint URLs, request and response formats, and sample code in multiple programming languages. To get started, sign up for an account and choose one of our API solutions, such as the Plant Database API key. By following the provided documentation and code examples, you can easily authenticate your API requests using the provided API key. Once authenticated, you can start making API calls using HTTP and HTTPS protocols.
And if you have any questions you can contact us via email and through our support email support@apifarmer.com.
If you exceed your monthly API request limit, you will receive an error message indicating that you have reached your limit. At this point, you have several options to consider. Firstly, you can choose to upgrade to a higher API plan, such as the Nectar API plan, which offers higher request limits to accommodate your needs. Alternatively, you can also purchase additional APIFarmer API requests to cover the overage — the overage charges will be billed to your account at the rate specified in your plan. To ensure a seamless experience with our Agriculture API or other products, we highly recommend closely monitoring your API usage.
Certainly! We understand that your business needs may evolve over time. Therefore, you have the flexibility to upgrade or downgrade your API plan anytime according to your changing requirements. To make the switch, simply log into your account and select the new API plan you wish to switch to. The changes will take effect immediately, and you will be charged the prorated amount for the remaining days of the month. If you choose to upgrade to a higher APIFarmer solution, such as the Honeycomb API Plan or Nectar API Plan, you will gain access to additional features and higher request limits. On the other hand, if you decide to downgrade, your request limits will be adjusted accordingly to align with the chosen plan.