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": "UD04006M.CS",
"seriesDescription": "Corn;Production,Annual,Bushel;Colorado;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": "UD040085.CS",
"seriesDescription": "Corn;Production - Aug Forecast,Annual,Bushel;Kansas;Corn for Grain Area Harvested, Yield, and Production"
},
{
"shortSymbol": "UD04008Q.CS",
"seriesDescription": "Corn;Production - Aug Forecast,Annual,Bushel;Washington;Corn for Grain Area Harvested, Yield, and Production"
},
{
"shortSymbol": "UD04008X.CS",
"seriesDescription": "Corn;Production - Sep Forecast,Annual,Bushel;Delaware;Corn for Grain Area Harvested, Yield, and Production"
},
{
"shortSymbol": "UD04009P.CS",
"seriesDescription": "Corn;Production - Sep Forecast,Annual,Bushel;Wisconsin;Corn for Grain Area Harvested, Yield, and Production"
},
{
"shortSymbol": "UD0400AG.CS",
"seriesDescription": "Corn;Production - Oct Forecast,Annual,Bushel;Pennsylvania;Corn for Grain Area Harvested, Yield, and Production"
},
{
"shortSymbol": "UD0400AP.CS",
"seriesDescription": "Corn;Production - Nov Forecast,Annual,Bushel;Alabama;Corn for Grain Area Harvested, Yield, and Production"
},
{
"shortSymbol": "UD0400AT.CS",
"seriesDescription": "Corn;Production - Nov Forecast,Annual,Bushel;Delaware;Corn for Grain Area Harvested, Yield, and Production"
},
{
"shortSymbol": "UD0400BG.CS",
"seriesDescription": "Corn;Production - Nov Forecast,Annual,Bushel;South Dakota;Corn for Grain Area Harvested, Yield, and Production"
},
{
"shortSymbol": "UD04031W.CS",
"seriesDescription": "Corn;Inventory,Quarterly,Bushel;Indiana;Corn Stocks by Position"
},
{
"shortSymbol": "UD040320.CS",
"seriesDescription": "Corn;Inventory,Quarterly,Bushel;Louisiana;Corn Stocks by Position"
},
{
"shortSymbol": "UD04032A.CS",
"seriesDescription": "Corn;Inventory,Quarterly,Bushel;New Jersey;Corn Stocks by Position"
},
{
"shortSymbol": "UD04032E.CS",
"seriesDescription": "Corn;Inventory,Quarterly,Bushel;North Dakota;Corn Stocks by Position"
},
{
"shortSymbol": "UD04032K.CS",
"seriesDescription": "Corn;Inventory,Quarterly,Bushel;South Dakota;Corn Stocks by Position"
},
{
"shortSymbol": "UD04032O.CS",
"seriesDescription": "Corn;Inventory,Quarterly,Bushel;Virginia;Corn Stocks by Position"
},
{
"shortSymbol": "UD0403EK.CS",
"seriesDescription": "Corn;Production, Annual, Bushel;CO-D80;Corn for Grain Area Harvested, Yield, and Production"
},
{
"shortSymbol": "UD0403EL.CS",
"seriesDescription": "Corn;Production, Annual, Bushel;CO-D90;Corn for Grain Area Harvested, Yield, and Production"
},
{
"shortSymbol": "UD0403FZ.CS",
"seriesDescription": "Corn;Production, Annual, Bushel;KS-D30;Corn for Grain Area Harvested, Yield, and Production"
},
{
"shortSymbol": "UD0403GG.CS",
"seriesDescription": "Corn;Production, Annual, Bushel;LA-D50;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>UD04006M.CS</shortSymbol>
<seriesDescription>Corn;Production,Annual,Bushel;Colorado;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>UD040085.CS</shortSymbol>
<seriesDescription>Corn;Production - Aug Forecast,Annual,Bushel;Kansas;Corn for Grain Area Harvested, Yield, and Production</seriesDescription>
</item>
<item>
<shortSymbol>UD04008Q.CS</shortSymbol>
<seriesDescription>Corn;Production - Aug Forecast,Annual,Bushel;Washington;Corn for Grain Area Harvested, Yield, and Production</seriesDescription>
</item>
<item>
<shortSymbol>UD04008X.CS</shortSymbol>
<seriesDescription>Corn;Production - Sep Forecast,Annual,Bushel;Delaware;Corn for Grain Area Harvested, Yield, and Production</seriesDescription>
</item>
<item>
<shortSymbol>UD04009P.CS</shortSymbol>
<seriesDescription>Corn;Production - Sep Forecast,Annual,Bushel;Wisconsin;Corn for Grain Area Harvested, Yield, and Production</seriesDescription>
</item>
<item>
<shortSymbol>UD0400AG.CS</shortSymbol>
<seriesDescription>Corn;Production - Oct Forecast,Annual,Bushel;Pennsylvania;Corn for Grain Area Harvested, Yield, and Production</seriesDescription>
</item>
<item>
<shortSymbol>UD0400AP.CS</shortSymbol>
<seriesDescription>Corn;Production - Nov Forecast,Annual,Bushel;Alabama;Corn for Grain Area Harvested, Yield, and Production</seriesDescription>
</item>
<item>
<shortSymbol>UD0400AT.CS</shortSymbol>
<seriesDescription>Corn;Production - Nov Forecast,Annual,Bushel;Delaware;Corn for Grain Area Harvested, Yield, and Production</seriesDescription>
</item>
<item>
<shortSymbol>UD0400BG.CS</shortSymbol>
<seriesDescription>Corn;Production - Nov Forecast,Annual,Bushel;South Dakota;Corn for Grain Area Harvested, Yield, and Production</seriesDescription>
</item>
<item>
<shortSymbol>UD04031W.CS</shortSymbol>
<seriesDescription>Corn;Inventory,Quarterly,Bushel;Indiana;Corn Stocks by Position</seriesDescription>
</item>
<item>
<shortSymbol>UD040320.CS</shortSymbol>
<seriesDescription>Corn;Inventory,Quarterly,Bushel;Louisiana;Corn Stocks by Position</seriesDescription>
</item>
<item>
<shortSymbol>UD04032A.CS</shortSymbol>
<seriesDescription>Corn;Inventory,Quarterly,Bushel;New Jersey;Corn Stocks by Position</seriesDescription>
</item>
<item>
<shortSymbol>UD04032E.CS</shortSymbol>
<seriesDescription>Corn;Inventory,Quarterly,Bushel;North Dakota;Corn Stocks by Position</seriesDescription>
</item>
<item>
<shortSymbol>UD04032K.CS</shortSymbol>
<seriesDescription>Corn;Inventory,Quarterly,Bushel;South Dakota;Corn Stocks by Position</seriesDescription>
</item>
<item>
<shortSymbol>UD04032O.CS</shortSymbol>
<seriesDescription>Corn;Inventory,Quarterly,Bushel;Virginia;Corn Stocks by Position</seriesDescription>
</item>
<item>
<shortSymbol>UD0403EK.CS</shortSymbol>
<seriesDescription>Corn;Production, Annual, Bushel;CO-D80;Corn for Grain Area Harvested, Yield, and Production</seriesDescription>
</item>
<item>
<shortSymbol>UD0403EL.CS</shortSymbol>
<seriesDescription>Corn;Production, Annual, Bushel;CO-D90;Corn for Grain Area Harvested, Yield, and Production</seriesDescription>
</item>
<item>
<shortSymbol>UD0403FZ.CS</shortSymbol>
<seriesDescription>Corn;Production, Annual, Bushel;KS-D30;Corn for Grain Area Harvested, Yield, and Production</seriesDescription>
</item>
<item>
<shortSymbol>UD0403GG.CS</shortSymbol>
<seriesDescription>Corn;Production, Annual, Bushel;LA-D50;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
"UD04006M.CS","Corn;Production,Annual,Bushel;Colorado;Corn for Grain Area Harvested, Yield, and Production"
"UD04007F.CS","Corn;Production,Annual,Bushel;Oklahoma;Corn for Grain Area Harvested, Yield, and Production"
"UD040085.CS","Corn;Production - Aug Forecast,Annual,Bushel;Kansas;Corn for Grain Area Harvested, Yield, and Production"
"UD04008Q.CS","Corn;Production - Aug Forecast,Annual,Bushel;Washington;Corn for Grain Area Harvested, Yield, and Production"
"UD04008X.CS","Corn;Production - Sep Forecast,Annual,Bushel;Delaware;Corn for Grain Area Harvested, Yield, and Production"
"UD04009P.CS","Corn;Production - Sep Forecast,Annual,Bushel;Wisconsin;Corn for Grain Area Harvested, Yield, and Production"
"UD0400AG.CS","Corn;Production - Oct Forecast,Annual,Bushel;Pennsylvania;Corn for Grain Area Harvested, Yield, and Production"
"UD0400AP.CS","Corn;Production - Nov Forecast,Annual,Bushel;Alabama;Corn for Grain Area Harvested, Yield, and Production"
"UD0400AT.CS","Corn;Production - Nov Forecast,Annual,Bushel;Delaware;Corn for Grain Area Harvested, Yield, and Production"
"UD0400BG.CS","Corn;Production - Nov Forecast,Annual,Bushel;South Dakota;Corn for Grain Area Harvested, Yield, and Production"
"UD04031W.CS","Corn;Inventory,Quarterly,Bushel;Indiana;Corn Stocks by Position"
"UD040320.CS","Corn;Inventory,Quarterly,Bushel;Louisiana;Corn Stocks by Position"
"UD04032A.CS","Corn;Inventory,Quarterly,Bushel;New Jersey;Corn Stocks by Position"
"UD04032E.CS","Corn;Inventory,Quarterly,Bushel;North Dakota;Corn Stocks by Position"
"UD04032K.CS","Corn;Inventory,Quarterly,Bushel;South Dakota;Corn Stocks by Position"
"UD04032O.CS","Corn;Inventory,Quarterly,Bushel;Virginia;Corn Stocks by Position"
"UD0403EK.CS","Corn;Production, Annual, Bushel;CO-D80;Corn for Grain Area Harvested, Yield, and Production"
"UD0403EL.CS","Corn;Production, Annual, Bushel;CO-D90;Corn for Grain Area Harvested, Yield, and Production"
"UD0403FZ.CS","Corn;Production, Annual, Bushel;KS-D30;Corn for Grain Area Harvested, Yield, and Production"
"UD0403GG.CS","Corn;Production, Annual, Bushel;LA-D50;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