getYieldForecastPlanet API
getYieldForecastPlanet
The getYieldForecast API provides Barchart proprietary grain yield forecast data. Yield Index data can be filtered by commodity, by indexGroup, by state, by district, and by county. The unit is in Bushel per Acre.
View All APIscountryrequired
The ISO-2 country code to further refine the instruments.
US
stateoptional
An ANSI-2 state abbreviation to define the state that yield forecast index will be returned for.
IL
stateFipsoptional
A valid 2-digits state fips code used to define the state that yield forecast index will be returned for. Please click here to get a list of possible values.
17
districtCodeoptional
A valid 2-digit district code used to define the district that yield forecast index will be returned for. Please click here to get a list of possible values.
50
countyoptional
A county name to define the county that yield forecast index will be returned for.
Champaign County
countyFipsoptional
A valid 3-digits county fips code to define the county that yield forecast index will be returne for. Please click here to get a list of possible values.
019
cropoptional
A commodity name to filter yield forecast index.
corn
indexGroupoptional
A valid index aggregate level to filter yield forecast index.
district
fieldsoptional
Additional output fields requested. Requested fields should be separated by a comma.
shortName
always returned
A sequence of characters. (example: GOOG)
always returned
A sequence of characters. (example: GOOG)
as requested
A sequence of characters. (example: GOOG)
always returned
A sequence of characters. (example: GOOG)
always returned
A sequence of characters. (example: GOOG)
always returned
A sequence of characters. (example: GOOG)
always returned
A sequence of characters. (example: GOOG)
always returned
A sequence of characters. (example: GOOG)
always returned
A sequence of characters. (example: GOOG)
always returned
A sequence of characters. (example: GOOG)
always returned
A sequence of characters. (example: GOOG)
always returned
A date in the format of YYYY-MM-DD.
GET
GET https://ondemand.websol.barchart.com/getYieldForecastPlanet.json?apikey=YOUR_API_KEY&country=US&state=IL&stateFips=17&districtCode=50&county=Champaign+County&countyFips=019&crop=corn&indexGroup=district&fields=shortName
Host: ondemand.websol.barchart.com
POST
POST https://ondemand.websol.barchart.com/getYieldForecastPlanet.json
Host: ondemand.websol.barchart.com
Content-Type: application/x-www-form-urlencoded
Content-Length: length
apikey=YOUR_API_KEY&country=US&state=IL&stateFips=17&districtCode=50&county=Champaign+County&countyFips=019&crop=corn&indexGroup=district&fields=shortName
Response
{
"status": {
"code": 204,
"message": "Success, but no content to return."
},
"results": []
}
GET
GET https://ondemand.websol.barchart.com/getYieldForecastPlanet.xml?apikey=YOUR_API_KEY&country=US&state=IL&stateFips=17&districtCode=50&county=Champaign+County&countyFips=019&crop=corn&indexGroup=district&fields=shortName
Host: ondemand.websol.barchart.com
POST
POST https://ondemand.websol.barchart.com/getYieldForecastPlanet.xml
Host: ondemand.websol.barchart.com
Content-Type: application/x-www-form-urlencoded
Content-Length: length
apikey=YOUR_API_KEY&country=US&state=IL&stateFips=17&districtCode=50&county=Champaign+County&countyFips=019&crop=corn&indexGroup=district&fields=shortName
Response
<?xml version="1.0" encoding="utf-8"?>
<getYieldForecastPlanet>
<status>
<code>204</code>
<message>Success, but no content to return.</message>
</status>
</getYieldForecastPlanet>
GET
GET https://ondemand.websol.barchart.com/getYieldForecastPlanet.csv?apikey=YOUR_API_KEY&country=US&state=IL&stateFips=17&districtCode=50&county=Champaign+County&countyFips=019&crop=corn&indexGroup=district&fields=shortName
Host: ondemand.websol.barchart.com
POST
POST https://ondemand.websol.barchart.com/getYieldForecastPlanet.csv
Host: ondemand.websol.barchart.com
Content-Type: application/x-www-form-urlencoded
Content-Length: length
apikey=YOUR_API_KEY&country=US&state=IL&stateFips=17&districtCode=50&county=Champaign+County&countyFips=019&crop=corn&indexGroup=district&fields=shortName
Response
<?php
$ondemand = new SoapClient('https://ondemand.websol.barchart.com/service?wsdl');
$params = [
'apikey' => 'YOUR_API_KEY',
'country' => 'US',
'state' => 'IL',
'stateFips' => '17',
'districtCode' => '50',
'county' => 'Champaign County',
'countyFips' => '019',
'crop' => 'corn',
'indexGroup' => 'district',
'fields' => 'shortName',
];
$result = $ondemand->getYieldForecastPlanet($params);
var_dump($result);
Dim ondemand
Dim result
Set ondemand = Server.CreateObject("MSSOAP.SoapClient30")
ondemand.ClientProperty("ServerHTTPRequest") = True
ondemand.MSSoapInit("https://ondemand.websol.barchart.com/service?wsdl")
Set result = ondemand.getYieldForecastPlanet("YOUR_API_KEY", "US", "IL", "17", "50", "Champaign County", "019", "corn", "district", "shortName")
use SOAP::Lite;
use SOAP::WSDL;
my $ondemand = SOAP::Lite
-> service('https://ondemand.websol.barchart.com/service?wsdl');
my $result = $ondemand->getYieldForecastPlanet('YOUR_API_KEY', 'US', 'IL', '17', '50', 'Champaign County', '019', 'corn', 'district', 'shortName');
print $result;
from suds.client import Client
ondemand = Client('https://ondemand.websol.barchart.com/service?wsdl')
result = ondemand.service.getYieldForecastPlanet('YOUR_API_KEY', 'US', 'IL', '17', '50', 'Champaign County', '019', 'corn', 'district', 'shortName')
print(result)
require 'savon'
ondemand = Savon.client(wsdl: 'https://ondemand.websol.barchart.com/service?wsdl')
response = ondemand.call(
:getYieldForecastPlanet,
message: {
apikey: 'YOUR_API_KEY',
country: 'US',
state: 'IL',
stateFips: '17',
districtCode: '50',
county: 'Champaign County',
countyFips: '019',
crop: 'corn',
indexGroup: 'district',
fields: 'shortName',
}
)
response.body