Economic Data Series API
getCmdtyStatsId
The getCmdtyStatsId API is used identify instrument identifiers that can be passed to getCmdtyStats in order to request data on the applicable series. Users can search for data series based on search parameters covering content, source, area, frequency, and more.
View All APIscommodityoptional
The primary subject of item of a data series. User can pass values such as "soy" and expect data series infomation for "soybean" and "soybeans" to be returned
Corn
measurementoptional
The measured aspect of a item
Production
areaoptional
The geographic location of data series. Passing less specific queires - such as "america" in lieu of "united states" may be preferable to return meta for all possibly applicable data series
United States of America
sourceoptional
The originating sources of a data series. May include organization, associated report, data table, down to sourcing figure
USDA
maxRecordsoptional
The maximum amount of records returned. This parameter should be set to the maximum number of records desired.
50
pageoptional
The page value to use in order to determine the offset while returning results.
1
always returned
A sequence of characters. (example: GOOG)
always returned
A sequence of characters. (example: GOOG)
GET
GET https://ondemand.websol.barchart.com/getCmdtyStatsId.json?apikey=YOUR_API_KEY&commodity=Corn&measurement=Production&area=United+States+of+America&source=USDA&maxRecords=50&page=1
Host: ondemand.websol.barchart.com
POST
POST https://ondemand.websol.barchart.com/getCmdtyStatsId.json
Host: ondemand.websol.barchart.com
Content-Type: application/x-www-form-urlencoded
Content-Length: length
apikey=YOUR_API_KEY&commodity=Corn&measurement=Production&area=United+States+of+America&source=USDA&maxRecords=50&page=1
Response
{
"status": {
"code": 200,
"message": "Success."
},
"results": [
{
"shortSymbol": "UD04006K.CS",
"seriesDescription": "Corn;Production,Annual,Bushel;Arkansas;Corn for Grain Area Harvested, Yield, and Production"
},
{
"shortSymbol": "UD04006L.CS",
"seriesDescription": "Corn;Production,Annual,Bushel;California;Corn for Grain Area Harvested, Yield, and Production"
},
{
"shortSymbol": "UD04006M.CS",
"seriesDescription": "Corn;Production,Annual,Bushel;Colorado;Corn for Grain Area Harvested, Yield, and Production"
},
{
"shortSymbol": "UD04006N.CS",
"seriesDescription": "Corn;Production,Annual,Bushel;Connecticut;Corn for Grain Area Harvested, Yield, and Production"
},
{
"shortSymbol": "UD04006O.CS",
"seriesDescription": "Corn;Production,Annual,Bushel;Delaware;Corn for Grain Area Harvested, Yield, and Production"
},
{
"shortSymbol": "UD04006Q.CS",
"seriesDescription": "Corn;Production,Annual,Bushel;Georgia;Corn for Grain Area Harvested, Yield, and Production"
},
{
"shortSymbol": "UD04006R.CS",
"seriesDescription": "Corn;Production,Annual,Bushel;Idaho;Corn for Grain Area Harvested, Yield, and Production"
},
{
"shortSymbol": "UD04006S.CS",
"seriesDescription": "Corn;Production,Annual,Bushel;Illinois;Corn for Grain Area Harvested, Yield, and Production"
},
{
"shortSymbol": "UD04006X.CS",
"seriesDescription": "Corn;Production,Annual,Bushel;Louisiana;Corn for Grain Area Harvested, Yield, and Production"
},
{
"shortSymbol": "UD04006Y.CS",
"seriesDescription": "Corn;Production,Annual,Bushel;Maine;Corn for Grain Area Harvested, Yield, and Production"
},
{
"shortSymbol": "UD040072.CS",
"seriesDescription": "Corn;Production,Annual,Bushel;Minnesota;Corn for Grain Area Harvested, Yield, and Production"
},
{
"shortSymbol": "UD040073.CS",
"seriesDescription": "Corn;Production,Annual,Bushel;Mississippi;Corn for Grain Area Harvested, Yield, and Production"
},
{
"shortSymbol": "UD040077.CS",
"seriesDescription": "Corn;Production,Annual,Bushel;Nevada;Corn for Grain Area Harvested, Yield, and Production"
},
{
"shortSymbol": "UD04007C.CS",
"seriesDescription": "Corn;Production,Annual,Bushel;North Carolina;Corn for Grain Area Harvested, Yield, and Production"
},
{
"shortSymbol": "UD04007E.CS",
"seriesDescription": "Corn;Production,Annual,Bushel;Ohio;Corn for Grain Area Harvested, Yield, and Production"
},
{
"shortSymbol": "UD04007F.CS",
"seriesDescription": "Corn;Production,Annual,Bushel;Oklahoma;Corn for Grain Area Harvested, Yield, and Production"
},
{
"shortSymbol": "UD04007H.CS",
"seriesDescription": "Corn;Production,Annual,Bushel;Pennsylvania;Corn for Grain Area Harvested, Yield, and Production"
},
{
"shortSymbol": "UD04007I.CS",
"seriesDescription": "Corn;Production,Annual,Bushel;Rhode Island;Corn for Grain Area Harvested, Yield, and Production"
},
{
"shortSymbol": "UD04007L.CS",
"seriesDescription": "Corn;Production,Annual,Bushel;Tennessee;Corn for Grain Area Harvested, Yield, and Production"
},
{
"shortSymbol": "UD04007M.CS",
"seriesDescription": "Corn;Production,Annual,Bushel;Texas;Corn for Grain Area Harvested, Yield, and Production"
}
]
}
GET
GET https://ondemand.websol.barchart.com/getCmdtyStatsId.xml?apikey=YOUR_API_KEY&commodity=Corn&measurement=Production&area=United+States+of+America&source=USDA&maxRecords=50&page=1
Host: ondemand.websol.barchart.com
POST
POST https://ondemand.websol.barchart.com/getCmdtyStatsId.xml
Host: ondemand.websol.barchart.com
Content-Type: application/x-www-form-urlencoded
Content-Length: length
apikey=YOUR_API_KEY&commodity=Corn&measurement=Production&area=United+States+of+America&source=USDA&maxRecords=50&page=1
Response
<?xml version="1.0" encoding="utf-8"?>
<getCmdtyStatsId>
<status>
<code>200</code>
<message>Success.</message>
</status>
<item>
<shortSymbol>UD04006K.CS</shortSymbol>
<seriesDescription>Corn;Production,Annual,Bushel;Arkansas;Corn for Grain Area Harvested, Yield, and Production</seriesDescription>
</item>
<item>
<shortSymbol>UD04006L.CS</shortSymbol>
<seriesDescription>Corn;Production,Annual,Bushel;California;Corn for Grain Area Harvested, Yield, and Production</seriesDescription>
</item>
<item>
<shortSymbol>UD04006M.CS</shortSymbol>
<seriesDescription>Corn;Production,Annual,Bushel;Colorado;Corn for Grain Area Harvested, Yield, and Production</seriesDescription>
</item>
<item>
<shortSymbol>UD04006N.CS</shortSymbol>
<seriesDescription>Corn;Production,Annual,Bushel;Connecticut;Corn for Grain Area Harvested, Yield, and Production</seriesDescription>
</item>
<item>
<shortSymbol>UD04006O.CS</shortSymbol>
<seriesDescription>Corn;Production,Annual,Bushel;Delaware;Corn for Grain Area Harvested, Yield, and Production</seriesDescription>
</item>
<item>
<shortSymbol>UD04006Q.CS</shortSymbol>
<seriesDescription>Corn;Production,Annual,Bushel;Georgia;Corn for Grain Area Harvested, Yield, and Production</seriesDescription>
</item>
<item>
<shortSymbol>UD04006R.CS</shortSymbol>
<seriesDescription>Corn;Production,Annual,Bushel;Idaho;Corn for Grain Area Harvested, Yield, and Production</seriesDescription>
</item>
<item>
<shortSymbol>UD04006S.CS</shortSymbol>
<seriesDescription>Corn;Production,Annual,Bushel;Illinois;Corn for Grain Area Harvested, Yield, and Production</seriesDescription>
</item>
<item>
<shortSymbol>UD04006X.CS</shortSymbol>
<seriesDescription>Corn;Production,Annual,Bushel;Louisiana;Corn for Grain Area Harvested, Yield, and Production</seriesDescription>
</item>
<item>
<shortSymbol>UD04006Y.CS</shortSymbol>
<seriesDescription>Corn;Production,Annual,Bushel;Maine;Corn for Grain Area Harvested, Yield, and Production</seriesDescription>
</item>
<item>
<shortSymbol>UD040072.CS</shortSymbol>
<seriesDescription>Corn;Production,Annual,Bushel;Minnesota;Corn for Grain Area Harvested, Yield, and Production</seriesDescription>
</item>
<item>
<shortSymbol>UD040073.CS</shortSymbol>
<seriesDescription>Corn;Production,Annual,Bushel;Mississippi;Corn for Grain Area Harvested, Yield, and Production</seriesDescription>
</item>
<item>
<shortSymbol>UD040077.CS</shortSymbol>
<seriesDescription>Corn;Production,Annual,Bushel;Nevada;Corn for Grain Area Harvested, Yield, and Production</seriesDescription>
</item>
<item>
<shortSymbol>UD04007C.CS</shortSymbol>
<seriesDescription>Corn;Production,Annual,Bushel;North Carolina;Corn for Grain Area Harvested, Yield, and Production</seriesDescription>
</item>
<item>
<shortSymbol>UD04007E.CS</shortSymbol>
<seriesDescription>Corn;Production,Annual,Bushel;Ohio;Corn for Grain Area Harvested, Yield, and Production</seriesDescription>
</item>
<item>
<shortSymbol>UD04007F.CS</shortSymbol>
<seriesDescription>Corn;Production,Annual,Bushel;Oklahoma;Corn for Grain Area Harvested, Yield, and Production</seriesDescription>
</item>
<item>
<shortSymbol>UD04007H.CS</shortSymbol>
<seriesDescription>Corn;Production,Annual,Bushel;Pennsylvania;Corn for Grain Area Harvested, Yield, and Production</seriesDescription>
</item>
<item>
<shortSymbol>UD04007I.CS</shortSymbol>
<seriesDescription>Corn;Production,Annual,Bushel;Rhode Island;Corn for Grain Area Harvested, Yield, and Production</seriesDescription>
</item>
<item>
<shortSymbol>UD04007L.CS</shortSymbol>
<seriesDescription>Corn;Production,Annual,Bushel;Tennessee;Corn for Grain Area Harvested, Yield, and Production</seriesDescription>
</item>
<item>
<shortSymbol>UD04007M.CS</shortSymbol>
<seriesDescription>Corn;Production,Annual,Bushel;Texas;Corn for Grain Area Harvested, Yield, and Production</seriesDescription>
</item>
</getCmdtyStatsId>
GET
GET https://ondemand.websol.barchart.com/getCmdtyStatsId.csv?apikey=YOUR_API_KEY&commodity=Corn&measurement=Production&area=United+States+of+America&source=USDA&maxRecords=50&page=1
Host: ondemand.websol.barchart.com
POST
POST https://ondemand.websol.barchart.com/getCmdtyStatsId.csv
Host: ondemand.websol.barchart.com
Content-Type: application/x-www-form-urlencoded
Content-Length: length
apikey=YOUR_API_KEY&commodity=Corn&measurement=Production&area=United+States+of+America&source=USDA&maxRecords=50&page=1
Response
shortSymbol,seriesDescription
"UD04006K.CS","Corn;Production,Annual,Bushel;Arkansas;Corn for Grain Area Harvested, Yield, and Production"
"UD04006L.CS","Corn;Production,Annual,Bushel;California;Corn for Grain Area Harvested, Yield, and Production"
"UD04006M.CS","Corn;Production,Annual,Bushel;Colorado;Corn for Grain Area Harvested, Yield, and Production"
"UD04006N.CS","Corn;Production,Annual,Bushel;Connecticut;Corn for Grain Area Harvested, Yield, and Production"
"UD04006O.CS","Corn;Production,Annual,Bushel;Delaware;Corn for Grain Area Harvested, Yield, and Production"
"UD04006Q.CS","Corn;Production,Annual,Bushel;Georgia;Corn for Grain Area Harvested, Yield, and Production"
"UD04006R.CS","Corn;Production,Annual,Bushel;Idaho;Corn for Grain Area Harvested, Yield, and Production"
"UD04006S.CS","Corn;Production,Annual,Bushel;Illinois;Corn for Grain Area Harvested, Yield, and Production"
"UD04006X.CS","Corn;Production,Annual,Bushel;Louisiana;Corn for Grain Area Harvested, Yield, and Production"
"UD04006Y.CS","Corn;Production,Annual,Bushel;Maine;Corn for Grain Area Harvested, Yield, and Production"
"UD040072.CS","Corn;Production,Annual,Bushel;Minnesota;Corn for Grain Area Harvested, Yield, and Production"
"UD040073.CS","Corn;Production,Annual,Bushel;Mississippi;Corn for Grain Area Harvested, Yield, and Production"
"UD040077.CS","Corn;Production,Annual,Bushel;Nevada;Corn for Grain Area Harvested, Yield, and Production"
"UD04007C.CS","Corn;Production,Annual,Bushel;North Carolina;Corn for Grain Area Harvested, Yield, and Production"
"UD04007E.CS","Corn;Production,Annual,Bushel;Ohio;Corn for Grain Area Harvested, Yield, and Production"
"UD04007F.CS","Corn;Production,Annual,Bushel;Oklahoma;Corn for Grain Area Harvested, Yield, and Production"
"UD04007H.CS","Corn;Production,Annual,Bushel;Pennsylvania;Corn for Grain Area Harvested, Yield, and Production"
"UD04007I.CS","Corn;Production,Annual,Bushel;Rhode Island;Corn for Grain Area Harvested, Yield, and Production"
"UD04007L.CS","Corn;Production,Annual,Bushel;Tennessee;Corn for Grain Area Harvested, Yield, and Production"
"UD04007M.CS","Corn;Production,Annual,Bushel;Texas;Corn for Grain Area Harvested, Yield, and Production"
<?php
$ondemand = new SoapClient('https://ondemand.websol.barchart.com/service?wsdl');
$params = [
'apikey' => 'YOUR_API_KEY',
'commodity' => 'Corn',
'measurement' => 'Production',
'area' => 'United States of America',
'source' => 'USDA',
'maxRecords' => '50',
'page' => '1',
];
$result = $ondemand->getCmdtyStatsId($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.getCmdtyStatsId("YOUR_API_KEY", "Corn", "Production", "United States of America", "USDA", "50", "1")
use SOAP::Lite;
use SOAP::WSDL;
my $ondemand = SOAP::Lite
-> service('https://ondemand.websol.barchart.com/service?wsdl');
my $result = $ondemand->getCmdtyStatsId('YOUR_API_KEY', 'Corn', 'Production', 'United States of America', 'USDA', '50', '1');
print $result;
from suds.client import Client
ondemand = Client('https://ondemand.websol.barchart.com/service?wsdl')
result = ondemand.service.getCmdtyStatsId('YOUR_API_KEY', 'Corn', 'Production', 'United States of America', 'USDA', '50', '1')
print(result)
require 'savon'
ondemand = Savon.client(wsdl: 'https://ondemand.websol.barchart.com/service?wsdl')
response = ondemand.call(
:getCmdtyStatsId,
message: {
apikey: 'YOUR_API_KEY',
commodity: 'Corn',
measurement: 'Production',
area: 'United States of America',
source: 'USDA',
maxRecords: '50',
page: '1',
}
)
response.body