Data Application Programming Interface (API)
Introduction
The Bureau of Economic Analysis (BEA) publishes economic statistics in a variety of formats. This document describes the BEA Data Retrieval Application Programming Interface (API) – including detailed instructions for retrieving data and meta-data published by BEA. The API is intended to provide programmatic access to published economic statistics using industry-standard methods and procedures. The intended audience of this document is programmers who are familiar with the concepts and techniques of retrieving data from Web Services.
The BEA API includes methods for retrieving a subset of BEA statistical data, and meta-data that describes it. As additional datasets are added, the meta-data retrieval methods can be used to discover the current data accessible through the API.
API users must provide their name (or organization name), a valid email address, and agree to the published terms of service.
After completing the registration form an email is sent containing the assigned UserID, and a link that completes the registration process. Assigned UserIDs are activated when the link has been clicked.
RegisterAccess to the BEA API
The API is available to registered users on the BEA public web site. Before using the API, users must obtain a unique 36-character UserID by registering at /api/signup/. To register, API users must provide their name (or organization name), a valid email address, and agree to the published terms of service. After completing the registration form an email is sent containing the assigned UserID, and a link that completes the registration process. Assigned UserIDs are activated when the link has been clicked.
The Uniform Resource Identifier (URI) of the API is:
-
/api/data
All API access is through this URI; no other paths are used. Data is retrieved by sending an HTTP GET to the URI with appropriate (querystring) parameters supplied. The minimum parameters for every request include the UserID and the name of the method being invoked.
- Example - This example would retrieve a list of the datasets currently offered by the BEA API (if the UserID was valid – it’s not).
-
/api/data?&UserID=Your-36Character-Key&method=GETDATASETLIST&
Statistical data offered by the API is organized into defined “Datasets”. An API data retrieval request always specifies one dataset by name. Each dataset has a number of defined parameters, and each parameter has a defined set of valid values. There are four API methods that return meta-data about the API – corresponding to datasets, parameters, and valid parameter values. There is one method that returns data.
JavaScript Usage
While the API may be used from any language capable of issuing HTTP requests (Java, PHP, Perl, Python, C, etc. ), two features are supported that allow JavaScript to issue requests without violating same-origin security checks - CORS and JSONP.
If you're writing a browser-based web application for modern web browsers with support for CORS then you may simply use an XMLHttpRequest as usual, without any changes. All HTTP responses generated by the API will include the necessary CORS headers.
If you're writing a browser-based web application for legacy browsers without support for CORS then your request URL query string may include a jsonp argument. If present, this prefix will be wrapped around the response, allowing you to capture the result of the query.
Data Return Format
The API returns data in one of two formats: JSON or XML . The optional ResultFormat parameter can be included on any request to specify the format of the results. If ResultFormat is not supplied on the request, or an invalid ResultFormat is specified, the default format returned is JSON.
The valid values for ResultFormat are “JSON” and “XML”. For example, the following request would return a list of the available datasets in XML format:
/api/data?&UserID=Your-36Character-Key&method=GETDATASETLIST&ResultFormat=XML&
This request would return a list of the available datasets in JSON format:
/api/data?&UserID=Your-36Character-Key&method=GETDATASETLIST&ResultFormat=JSON&
The data returned from the API always has the following basic structure, with some additional structure depending on the data requested:
<BEAAPI> <Request> <RequestParam ParameterValue="GETDATASETLIST" ParameterName="METHOD"/> <RequestParam ParameterValue=" Your-36Character-Key" ParameterName="USERID"/> <RequestParam ParameterValue="XML" ParameterName="RESULTFORMAT"/> </Request> <Results> <Dataset DatasetDescription="Standard NIPA tables" DatasetName="NIPA"/> <Dataset DatasetDescription="Standard NI underlying detail tables" DatasetName="NIUnderlyingDetail"/> <Dataset DatasetDescription="Multinational Enterprises" DatasetName="MNE"/> <Dataset DatasetDescription="Standard Fixed Assets tables" DatasetName="FixedAssets"/> <Dataset DatasetDescription="International Transactions Accounts" DatasetName="ITA"/> <Dataset DatasetDescription="International Investment Position" DatasetName="IIP"/> <Dataset DatasetDescription="GDP by Industry" DatasetName="GDPbyIndustry"/> <Dataset DatasetDescription="Regional Income data sets" DatasetName="RegionalIncome"/> <Dataset DatasetDescription="Regional Product data sets" DatasetName="RegionalProduct"/> </Results> </BEAAPI>
In XML form, the root node is always <BEAAPI>, followed by the child node <Request>. The <Request> node contains <RequestParam> children that echo the parameters passed in the request. The root node, <BEAAPI>, then has another child node, <Results>, containing the results of the request. The Results content is different depending on the method and parameters passed. In this example, the result of the GetDatasetList method is shown to be a simple list of Dataset names and descriptions.
In JSON form, the example above returns data as follows (white-space and indentation added for clarity):
{ "BEAAPI":{ "Request":{ "RequestParam":[ { "ParameterName":"USERID", "ParameterValue":"Your-36Character-Key" }, { "ParameterName":"ResultFormat", "ParameterValue":"JSON" }, { "ParameterName":"METHOD", "ParameterValue":"GETDATASETLIST" } ] }, "Results":{ "Dataset":[ { "DatasetName":"NIPA", "DatasetDescription":"Standard NIPA tables" }, { "DatasetName":"NIUnderlyingDetail", "DatasetDescription":"Standard NI underlying detail tables" }, { "DatasetName":"MNE", "DatasetDescription":"Multinational Enterprises" }, { "DatasetName":"FixedAssets", "DatasetDescription":"Standard Fixed Assets tables" }, { "DatasetName":"ITA", "DatasetDescription":"International Transactions Accounts" }, { "DatasetName":"IIP", "DatasetDescription":"International Investment Position" }, { "DatasetName":"GDPbyIndustry", "DatasetDescription":"GDP by Industry" }, { "DatasetName":"RegionalIncome", "DatasetDescription":"Regional Income data sets" }, { "DatasetName":"RegionalProduct", "DatasetDescription":"Regional Product data sets" }, { "DatasetDescription":"Retrieves various Regional datasets" } ] } } }
Error Return Format
When invalid values are supplied for parameters in a request, or required parameters are missing, the results contain an error message – for example:
<BEAAPI> <Request> <RequestParam ParameterName="USERID" ParameterValue="Your-36Character-Key" /> <RequestParam ParameterName="METHOD" ParameterValue="GETDATASETLIST" /> <RequestParam ParameterName="ResultFormat" ParameterValue="XML" /> </Request> <Results> <Error APIErrorCode="3" APIErrorDescription="The BEA API UserID provided in the request does not exist." /> </Results> </BEAAPI>
API Calling Limits
The API has default calling limits as shown below. These limits are meant to protect BEA’s API and webserver infrastructure from activity that may be detrimental to that infrastructure and/or unfairly impede other API users.
- 1000 API calls per minute, and/or
- 30 errors per minute, and/or
- 50 MB (raw data) per minute.
Any user that exceeds the above calling limits will receive an explanatory error message for each API call until the per-minute cause has expired. The best way to avoid such errors is to design your application to call the API within these limits, e.g., programmatically regulate the frequency/size of API calls.
Meta-Data API Methods
The API contains four methods for retrieving meta-data as follows:
GetDataSetList – retrieves a list of the datasets currently offered.
Required | UserID, Method |
---|---|
Optional | ResultFormat |
Dataset node with DatasetName and DatasetDescription attributes.
Request
/api/data?&UserID=Your-36Character-Key&method=GETDATASETLIST&ResultFormat=XML&
Return
<BEAAPI> <Request> <RequestParam ParameterName="USERID" ParameterValue="Your-36Character-Key" /> <RequestParam ParameterName="METHOD" ParameterValue="GETDATASETLIST" /> <RequestParam ParameterName="ResultFormat" ParameterValue="XML" /> </Request> <Results> <Dataset DatasetDescription="Standard NIPA tables" DatasetName="NIPA" /> <Dataset DatasetDescription="Standard NI underlying detail tables" DatasetName="NIUnderlyingDetail" /> <Dataset DatasetDescription="Multinational Enterprises" DatasetName="MNE" /> <Dataset DatasetDescription="Standard Fixed Assets tables" DatasetName="FixedAssets" /> <Dataset DatasetDescription="International Transactions Accounts" DatasetName="ITA" /> <Dataset DatasetDescription="International Investment Position" DatasetName="IIP" /> <Dataset DatasetDescription="GDP by Industry" DatasetName="GDPbyIndustry" /> <Dataset DatasetDescription="Regional Income data sets" DatasetName="RegionalIncome" /> <Dataset DatasetDescription="Regional Product data sets" DatasetName="RegionalProduct" /> </Results> </BEAAPI>
GetParameterList – retrieves a list of the parameters (required and optional) for a particular dataset.
Required | UserID, Method, DatasetName |
---|---|
Optional | ResultFormat |
Parameter node with attributes:
Attribute | Definition |
---|---|
ParameterName | Name of the parameter as used in a data request |
ParameterDataType | String or Integer |
ParameterDescription | Description of the parameter |
ParameterIsRequired | 0 if the parameter can be omitted from a request, 1 if required |
ParameterDefaultValue | Default value used for the request if the parameter is not supplied |
MultipleAcceptedFlag | 0 if the parameter may only have a single value, 1 if multiple values are permitted. Note that multiple values for a parameter are submitted as a comma-separated string. |
AllValue | the special value for a parameter that means all valid values are used without supplying them individually. |
Request
/api/data?&UserID=Your-36Character-Key&method=getparameterlist&datasetname=RegionalIncome&ResultFormat=XML
Return
<BEAAPI> <Request> <RequestParam ParameterName="USERID" ParameterValue="Your-36Character-Key" /> <RequestParam ParameterName="METHOD" ParameterValue="GetParameterList" /> <RequestParam ParameterName="DatasetName" ParameterValue="RegionalIncome" /> <RequestParam ParameterName="ResultFormat" ParameterValue="XML" /> </Request> <Results> <Parameter ParameterName="GeoFips" MultipleAcceptedFlag="1" ParameterIsRequiredFlag="1" ParameterDataType="string" ParameterDescription="Comma-delimited list of 5-character geographic codes; COUNTY for all counties, STATE for all states, MSA for all MSAs, MIC for all Micropolitan Areas, PORT for all state metro/nonmetro portions, DIV for all Metropolitan Divisions, CSA for all Combined Statistical Areas, state post office abbreviation for all counties in one state (e.g. NY)"/> <Parameter ParameterName="TableName" MultipleAcceptedFlag="0" ParameterIsRequiredFlag="1"ParameterDataType="string" ParameterDescription="Income or employment table to retrieve" /> <Parameter ParameterName="LineCode" MultipleAcceptedFlag="0" ParameterIsRequiredFlag="1"ParameterDataType="integer" ParameterDescription="Line code for a statistic or industry" /> <Parameter ParameterName="Year" MultipleAcceptedFlag="1" ParameterIsRequiredFlag="0" ParameterDescription="Comma-delimted list of years; LAST5 for latest 5 years; LAST10 for latest 10 years; ALL for all years" ParameterDefaultValue="LAST5" ParameterDataType="string" /> </Results> </BEAAPI>
In this example, the parameters for the “RegionalIncome” dataset are being requested. The results indicate that the dataset has four parameters: GeoFips, LineCode, TableName, and Year.
GeoFips is a string typed parameter indicating the geographic codes requested. GeoFIPS is required. Multiple values are accepted, in a comma-delimited list, and there are special values such as COUNTY for all counties.
TableName is a string typed parameter that specifies what table has the statistic requested. We can’t tell from this what the valid TableNames are, but we can see that it is required (and therefore has no default value), and Page 6 of 14 March 6, 2017 that multiple values are not allowed (and therefore there is no special “all” value).
LineCode specifies the requested statistic in the table. This integer is the line code in the table specified in the TableName parameter. We don’t know what these line codes are, but we can send another request to find out.
Year is a string typed parameter containing the years requested. It is not required in a request, and if is not included, the default value used is “LAST5”. A comma-delimited list of years is accepted, as well as other special values like “LAST10” and “ALL”.
Request
/api/data?&UserID=Your-36Character-Key&method=getparameterlist&datasetname=RegionalIncome&ResultFormat=XML
Return
<BEAAPI> <Request> <RequestParam ParameterValue="XML" ParameterName="RESULTFORMAT"/> <RequestParam ParameterValue="Your-36Character-Key" ParameterName="USERID"/> <RequestParam ParameterValue="REGIONALPRODUCT" ParameterName="DATASETNAME"/> <RequestParam ParameterValue="GETPARAMETERLIST" ParameterName="METHOD"/> </Request> <Results> <Parameter ParameterName="Component" MultipleAcceptedFlag="0" ParameterIsRequiredFlag="1" ParameterDescription="GDP component code" ParameterDataType="integer"/> <Parameter ParameterName="GeoFips" MultipleAcceptedFlag="1" ParameterIsRequiredFlag="1" ParameterDescription="Comma-delimited list of 5-character geographic codes; STATE for all states, MSA for all MSAs" ParameterDataType="string"/> <Parameter ParameterName="IndustryId" MultipleAcceptedFlag="0" ParameterIsRequiredFlag="1" ParameterDescription="Industry code to retrieve from component" ParameterDataType="integer" /> <Parameter ParameterName="Year" MultipleAcceptedFlag="1" ParameterIsRequiredFlag="0" ParameterDescription="Comma-delimted list of years; LAST5 for latest 5 years; LAST10 for latest 10 years; ALL for all years" ParameterDataType="string" ParameterDefaultValue="LAST5"/> <Results> <BEAAPI>
In this example, the parameters for the “RegionalProduct” dataset are being requested. The results indicate that the dataset has four parameters: GeoFips, Component, IndustryId, and Year.
GeoFIPS is a string typed parameter described as the GeoFIPS code. GeoFIPS is required. Multiple values are accepted, and there are special parameters to specify a group of areas, like “STATE” for all states.
Component is an integer corresponding to a GDP component. We don’t have the list of Components in this request but we can tell it is required.
Industry is an integer used to specify which industry is being requested for a given Component. We can’t tell from this what the industryIds are, but we can see that it is required (and therefore has no default value), and that multiple values are not allowed (and therefore there is no special “all” value).
Year is string typed parameter described as “Year”. It is not required in a request, and if is not included, the default value used is “LAST5” for the last available five years. “ALL” and “LAST10” are also available. To choose specific years, submit a comma-delimited list of years, like “1990,2000,2010”.
GetParameterValues – retrieves a list of the valid values for a particular parameter.
Required | UserID, Method, DatasetName, ParameterName |
---|---|
Optional | ResultFormat |
ParamValue node with attributes that contain the actual permissible values (and usually a description of the value).
Request
/api/data?&UserID=Your-36Character-Key&method=GetParameterValues&datasetname=RegionalProduct&ParameterName=Comp onent&
Return
<BEAAPI> <Request> <RequestParam ParameterName="USERID" ParameterValue="Your-36Character-Key" /> <RequestParam ParameterName="METHOD" ParameterValue="GetParameterValues" /> <RequestParam ParameterName="DatasetName" ParameterValue="RegionalProduct" /> <RequestParam ParameterName="ParameterName" ParameterValue="Component" /> <RequestParam ParameterName="ResultFormat" ParameterValue="XML" /> </Request> <Results> <ParamValue Desc="Compensation of employees [State Annual NAICS]" Key="COMP_SAN" /> <ParamValue Desc="Compensation of employees [State Annual SIC]" Key="COMP_SAS" /> <ParamValue Desc="Gross domestic product (GDP) by metropolitan area [Metro Annual NAICS]" Key="GDP_MAN " /> <ParamValue Desc="Gross domestic product (GDP) by state [State Annual NAICS]" Key="GDP_SAN" /> <ParamValue Desc="Gross operating surplus [State Annual SIC]" Key="GOS_SAS" /> <ParamValue Desc="Total personal consumption expenditures (PCE) by state [State Personal Consumption Expenditures]" Key="PCE_SAN" /> <ParamValue Desc="Per capita personal consumption expenditures (PCE) by state [State Personal Consumption Expenditures]" Key="PCPCE_SAN" /> <ParamValue Desc="Per capita real GDP by metropolitan area [Metro Annual NAICS] " Key="PCRGDP_MAN" /> <ParamValue Desc="Per capita real GDP by state [State Annual NAICS] " Key="PCRGDP_SAN" /> > <ParamValue Desc="Per capita real GDP by state [State Annual SIC] " Key="PCRGDP_SAS" /> > <ParamValue Desc="Quantity indexes for real GDP by metropolitan area [Metro Annual NAICS] " Key="QI_MAN" /> <ParamValue Desc="Quantity indexes for real GDP by state [State Annual NAICS] " Key="QI_SAN" /> <ParamValue Desc="Quantity indexes for real GDP by state [State Annual SIC] " Key="QI_SAS" /> <ParamValue Desc="Quantity indexes for real GDP by state [State Quarterly NAICS] " Key="QI_SQN" /> <ParamValue Desc="Real GDP by metropolitan area [Metro Annual NAICS] " Key="RGDP_MAN" /> <ParamValue Desc="Real GDP by state [State Annual NAICS] " Key="RGDP_SAN" /> <ParamValue Desc="Real GDP by state [State Annual SIC] " Key="RGDP_SAS" /> <ParamValue Desc="Real GDP by state [State Quarterly NAICS] " Key="RGDP_SQN" /> <ParamValue Desc="Subsidies [State Annual NAICS] " Key="SUBS_SAN" /> <ParamValue Desc="Subsidies [State Annual SIC] " Key="SUBS_SAS" /> <ParamValue Desc="Taxes on production and imports [State Annual NAICS]" Key="TOPI_SAN" /> <ParamValue Desc="Taxes on production and imports [State Annual SIC]" Key="TOPI_SAS" /> <ParamValue Desc="Taxes on production and imports less subsidies [State Annual NAICS]" Key="TOPILS_SAN" /> <ParamValue Desc="Taxes on production and imports less subsidies [State Annual SIC]" Key="TOPILS_SAS" /> </Results> </BEAAPI>
Request
/api/data?&UserID=Your-36Character-Key&method=GetParameterValues&datasetname=RegionalIncome&ParameterName=TableName&ResultFormat=XML
Return
<BEAAPI> <Request> <RequestParam ParameterValue="Your-36Character-Key" ParameterName="USERID" /> <RequestParam ParameterValue="XML" ParameterName="RESULTFORMAT" /> <RequestParam ParameterValue="REGIONALINCOME" ParameterName="DATASETNAME" /> <RequestParam ParameterValue="GETPARAMETERVALUES" ParameterName="METHOD" /> <RequestParam ParameterValue="TABLENAME" ParameterName="PARAMETERNAME" /> </Request> <Results> <ParamValue Desc="Personal Income Summary: Personal Income, Population, Per Capita Personal Income (Non-Industry) [A]" Key="CA1" /> <ParamValue Desc="Total Full-Time and Part-Time Employment by SIC Industry (SIC) [A]" Key="CA25" /> <ParamValue Desc="Total Full-Time and Part-Time Employment by NAICS Industry (NAICS) [A]" Key="CA25N" /> <ParamValue Desc="Economic Profile (Non-Industry) [A]" Key="CA30" /> <ParamValue Desc="Personal Current Transfer Receipts (Non-Industry) [A]" Key="CA35" /> <ParamValue Desc="Personal Income and Employment by Major Component (Non-Industry) [A]" Key="CA4" /> <ParamValue Desc="Farm Income and Expenses (Non-Industry) [A]" Key="CA45" /> <ParamValue Desc="Personal Income by Major Component and Earnings by SIC Industry (SIC) [A]" Key="CA5" /> <ParamValue Desc="Personal Income by Major Component and Earnings by NAICS Industry (NAICS) [A]" Key="CA5N" /> <ParamValue Desc="Compensation of Employees by SIC Industry (SIC) [A]" Key="CA6" /> <ParamValue Desc="Compensation of Employees by NAICS Industry (NAICS) [A]" Key="CA6N" /> <ParamValue Desc="Gross Flow of Earnings (Non-Industry) [A]" Key="CA91" /> <ParamValue Desc="Implicit Regional Price Deflator (Non-Industry) [A]" Key="IRPD1" /> <ParamValue Desc="Real Personal Income (Non-Industry) [A]" Key="RPI1" /> <ParamValue Desc="Regional Price Parities (Non-Industry) [A]" Key="RPP1" /> <ParamValue Desc="Personal Income Summary: Personal Income, Population, Per Capita Personal Income (Non-Industry) [A]" Key="SA1" /> <ParamValue Desc="Total Full-Time and Part-Time Employment by SIC Industry (SIC) [A]" Key="SA25" /> <ParamValue Desc="Total Full-Time and Part-Time Employment by NAICS Industry (NAICS) [A]" Key="SA25N" /> <ParamValue Desc="Full-Time and Part-Time Wage and Salary Employment by SIC Industry (SIC) [A]" Key="SA27" /> <ParamValue Desc="Full-Time and Part-Time Wage and Salary Employment by NAICS Industry (NAICS) [A]" Key="SA27N" /> <ParamValue Desc="Economic Profile (Non-Industry) [A]" Key="SA30" /> <ParamValue Desc="Personal Current Transfer Receipts (Non-Industry) [A]" Key="SA35" /> <ParamValue Desc="Personal Income and Employment by Major Component (Non-Industry) [A]" Key="SA4" /> <ParamValue Desc="Property Income (Non-Industry) [A]" Key="SA40" /> <ParamValue Desc="Farm Income and Expenses (Non-Industry) [A]" Key="SA45" /> <ParamValue Desc="Personal Income by Major Component and Earnings by SIC Industry (SIC) [A]" Key="SA5" /> <ParamValue Desc="Personal Current Taxes (Non-Industry) [A]" Key="SA50" /> <ParamValue Desc="Disposable Personal Income Summary: Disposable Personal Income, Population, and Per Capita Disposable Personal Income (Non-Industry) [A]" Key="SA51" /> <ParamValue Desc="Personal Income by Major Component and Earnings by Industry (Historical) (SIC) [A]" Key="SA5H" /> <ParamValue Desc="Personal Income by Major Component and Earnings by NAICS Industry (NAICS) [A]" Key="SA5N" /> <ParamValue Desc="Compensation of Employees by SIC Industry (SIC) [A]" Key="SA6" /> <ParamValue Desc="Compensation of Employees by NAICS Industry (NAICS) [A]" Key="SA6N" /> <ParamValue Desc="Wages and Salaries by SIC Industry (SIC) [A]" Key="SA7" /> <ParamValue Desc="Wages and Salaries by Industry (Historical) (SIC) [A]" Key="SA7H" /> <ParamValue Desc="Wages and Salaries by NAICS Industry (NAICS) [A]" Key="SA7N" /> <ParamValue Desc="Personal Income (Non-Industry) [Q]" Key="SQ1" /> <ParamValue Desc="Personal Current Transfer Receipts (Non-Industry) [Q]" Key="SQ35" /> <ParamValue Desc="Personal Income by Major Component (Non-Industry) [Q]" Key="SQ4" /> <ParamValue Desc="Personal Income by Major Component and Earnings by SIC Industry (SIC) [Q]" Key="SQ5" /> <ParamValue Desc="Personal Income by Major Component and Earnings by Industry (Historical) (SIC) [Q]" Key="SQ5H" /> <ParamValue Desc="Personal Income by Major Component and Earnings by NAICS Industry (NAICS) [Q]" Key="SQ5N" /> <ParamValue Desc="Compensation of Employees by SIC Industry (SIC) [Q]" Key="SQ6" /> <ParamValue Desc="Compensation of Employees by NAICS Industry (NAICS) [Q]" Key="SQ6N" /> <ParamValue Desc="Wages and Salaries by SIC Industry (SIC) [Q]" Key="SQ7" /> <ParamValue Desc="Wages and Salaries by Industry (Historical) (SIC) [Q]" Key="SQ7H" /> <ParamValue Desc="Wages and Salaries by NAICS Industry (NAICS) [Q]" Key="SQ7N" /> </Results> </BEAAPI>
To summarize, the API includes three methods that retrieve meta-data about the statistics that are available: GetDatasetList, GetParameterList, and GetParameterValues. There is also a new method called GetParameterValuesFiltered.
GetParameterValuesFiltered – retrieves a list of the valid values for a particular parameter based on other provided parameters .
In our example above with the RegionalIncome data set, it is necessary to supply a TableName and LineCode. You will want to discover the LineCode values available for a given TableName. The GetParameterValuesFiltered method is designed to do this.
GetParameterValuesFiltered will return values for one target parameter based on the values of other named parameters.
Request
/api/data?&UserID=Your-36Character-Key&method=GetParameterValuesFiltered&datasetname=RegionalIncome&TargetParameter=LineCode&TableName=SA1&ResultFormat=XML
Return
<BEAAPI> <Request> <RequestParam ParameterValue="Your-36Character-Key" ParameterName="USERID" /> <RequestParam ParameterValue="XML" ParameterName="RESULTFORMAT" /> <RequestParam ParameterValue="LINECODE" ParameterName="TARGETPARAMETER" /> <RequestParam ParameterValue="SA1" ParameterName="TABLENAME" /> <RequestParam ParameterValue="REGIONALINCOME" ParameterName="DATASETNAME" /> <RequestParam ParameterValue="GETPARAMETERVALUESFILTERED" ParameterName="METHOD" /> </Request> <Results> <ParamValue Desc="[SA1] Personal income (thousands of dollars)" Key="1" /> <ParamValue Desc="[SA1] Population (persons)" Key="2" /> <ParamValue Desc="[SA1] Per capita personal income (dollars)" Key="3" /> </Results> </BEAAPI>
All results from GetParameterValuesFiltered contain “Desc” and “Key”. Key is the value you will want to pass in as a parameter to the data request for the target parameter you specified. In our example, a desired Key will be passed into LineCode.
Although there is only one TargetParameter, mulitiple other parameters may be passed in. For example you may want to know what years are available for a given TableName and GeoFips--
Request
/api/data/?&UserID=Your-36Character-Key&method=GetParameterValuesFiltered&datasetname=RegionalIncome&TargetParameter=Year&TableName=CA5N&GeoFips=01001&ResultFormat=XML
Return
<BEAAPI> <Request> <RequestParam ParameterValue="YEAR" ParameterName="TARGETPARAMETER"/> <RequestParam ParameterValue="CA5N" ParameterName="TABLENAME"/> <RequestParam ParameterValue="XML" ParameterName="RESULTFORMAT"/> <RequestParam ParameterValue="REGIONALINCOME" ParameterName="DATASETNAME"/> <RequestParam ParameterValue="01001" ParameterName="GEOFIPS"/> <RequestParam ParameterValue="GETPARAMETERVALUESFILTERED" ParameterName="METHOD"/> <RequestParam ParameterValue="Your-36CharacterKey" ParameterName="USERID"/> </Request> <Results> <ParamValue Desc="2001" Key="2001"/> <ParamValue Desc="2002" Key="2002"/> <ParamValue Desc="2003" Key="2003"/> <ParamValue Desc="2004" Key="2004"/> <ParamValue Desc="2005" Key="2005"/> <ParamValue Desc="2006" Key="2006"/> <ParamValue Desc="2007" Key="2007"/> <ParamValue Desc="2008" Key="2008"/> <ParamValue Desc="2009" Key="2009"/> <ParamValue Desc="2010" Key="2010"/> <ParamValue Desc="2011" Key="2011"/> <ParamValue Desc="2012" Key="2012"/> <ParamValue Desc="2013" Key="2013"/> <ParamValue Desc="2013" Key="2014"/> </Results> </BEAAPI>
There are many more examples of using GetParameterValuesFiltered in the Regional appendices I and J.
Please note that the GetParameterValuesFiltered method does not yet work with all BEA data sets. If you try GetParametersValuesFiltered on a data set that does not yet support it, an error will be returned--
<BEAAPI> <Request> <RequestParam ParameterValue="GETPARAMETERVALUESFILTERED" ParameterName="METHOD"/> <RequestParam ParameterValue="Your-36CharacterKey" ParameterName="USERID"/> <RequestParam ParameterValue="1" ParameterName="TABLEID"/> <RequestParam ParameterValue="NIPA" ParameterName="DATASETNAME"/> <RequestParam ParameterValue="XML" ParameterName="RESULTFORMAT"/> <RequestParam ParameterValue="Q" ParameterName="FREQUENCY"/> <RequestParam ParameterValue="YEAR" ParameterName="TARGETPARAMETER"/> </Request> <Results> <Error APIErrorDescription="The GetParameterValuesFiltered method has not been implemented on this dataset (coming soon)." APIErrorCode="34"/> </Results> </BEAAPI>
Data Retrieval API Method
The API has one method for retrieving data – GetData.
Every data retrieval request requires the UserID, Method, and DatasetName parameters. Each dataset has a defined set of parameters – some required and others optional. Each dataset returns different results that are documented in appendices to this document.
Required | UserID, Method, DatasetName, (plus additional required parameters depending on the dataset) |
---|---|
Optional | ResultFormat, (plus additional optional parameters depending on the dataset) |
Dimensions nodes with attributes:
Attribute | Definition |
---|---|
Ordinal | Ordinal number indicating a standardized order of returned dimensions – note that attributes in returned data are not guaranteed to be in any particular order. Programmatic usage of attributes should refer to them by name. |
Name | Name of each data dimension returned. |
DataType | String or numeric – whether the data dimension is purely numeric or should be treated as string data. |
IsValue | Most datasets have one dimension that represents the statistic of interest, and the other dimensions are descriptive of the statistic. IsValue = 1 for the data dimension that is the statistic of interest, otherwise 0. The statistic of interest is usually numeric so that it can be summarized or aggregated based on the descriptive dimension values. |
Each Dataset contains different dimensions. There are a few pre-defined dimensions that are common to most Datasets, including:
- CL_UNIT – a descriptor of the units reported for the data value (e.g. USD for U.S. dollars, and PC for percent)
- UNIT_MULT – a descriptor of the multiplier that applies to the data value. This value is the base-10 exponent that should be applied to the data value (e.g. amounts reported in millions would have a UNIT_MULT of 6; amounts reported in billions would have a UNIT_MULT of 9).
The specific meaning of each dimension is described in the Appendix for each dataset.
The result then includes Data nodes containing the actual results specified in the parameters. Each Data node contains one attribute for each data dimension (specified in the Dimensions nodes).
Finally, the result may include Note nodes. Notes (as in footnotes) further describe or qualify any of the other nodes in the result (or the result node itself). A result node qualified by a Note has an attribute named NoteRef. If a result node includes the NoteRef attribute, the value for it will always be present among the Notes nodes.
Request
/api/data?&UserID=Your-36Character-Key&method=GetData&datasetname=RegionalIncome&TableName=CA1&LineCode=3&GeoFIPS=DE&Year=2014&ResultFormat=XML&
In this example, the GetData method is used to return the dataset named RegionalIncome. The TableId and LineCode parameters are used to request statistic for “Per Capita personal income (county annual income)”. The GeoFIPS parameter value is “DE” – meaning the data for all counties in Delaware are requested. A single year’s data is requested – 2015.
Note that the GeoFIPS parameter could have been “COUNTY” for all counties, or a list of individual state or county GeoFIPS codes. Also, multiple years could have been requested by providing them in a comma-separated list, or the special year parameters “LAST5” or “LAST10” could be used.
Return
<BEAAPI> <Request> <RequestParam ParameterValue="Your-36Character-Key" ParameterName="USERID" /> <RequestParam ParameterValue="REGIONALINCOME" ParameterName="DATASETNAME" /> <RequestParam ParameterValue="GETDATA" ParameterName="METHOD" /> <RequestParam ParameterValue="DE" ParameterName="GEOFIPS" /> <RequestParam ParameterValue="CA1" ParameterName="TABLENAME" /> <RequestParam ParameterValue="3" ParameterName="LINECODE" /> <RequestParam ParameterValue="2014" ParameterName="YEAR" /> <RequestParam ParameterValue="XML" ParameterName="RESULTFORMAT" /> </Request> <Results NoteRef="2" UTCProductionTime="2017-03-03T14:37:59.443" PublicTable="CA1 Personal Income Summary: Personal Income, Population, Per Capita Personal Income" UnitOfMeasure="dollars" Statistic="Per capita personal income"> <Dimensions IsValue="0" DataType="string" Name="Code" /> <Dimensions IsValue="0" DataType="string" Name="GeoFips" /> <Dimensions IsValue="0" DataType="string" Name="GeoName" /> <Dimensions IsValue="0" DataType="string" Name="TimePeriod" /> <Dimensions IsValue="1" DataType="numeric" Name="DataValue" /> <Dimensions IsValue="0" DataType="string" Name="CL_UNIT" /> <Dimensions IsValue="0" DataType="numeric" Name="UNIT_MULT" /> <Data DataValue="45284" UNIT_MULT="0" CL_UNIT="dollars" TimePeriod="2014" GeoName="Delaware" GeoFips="10000" Code="CA1-3" /> <Data DataValue="36845" UNIT_MULT="0" CL_UNIT="dollars" TimePeriod="2014" GeoName="Kent, DE" GeoFips="10001" Code="CA1-3" /> <Data DataValue="48503" UNIT_MULT="0" CL_UNIT="dollars" TimePeriod="2014" GeoName="New Castle, DE" GeoFips="10003" Code="CA1-3" /> <Data DataValue="43710" UNIT_MULT="0" CL_UNIT="dollars" TimePeriod="2014" GeoName="Sussex, DE" GeoFips="10005" Code="CA1-3" /> <Notes NoteRef="2" NoteText="Per capita personal income was computed using Census Bureau midyear population estimates. Estimates for 2010-2015 reflect county population estimates available as of March 2016." /> <Notes NoteRef="Note--" NoteText="All dollar estimates are in current dollars (not adjusted for inflation)." /> <Notes NoteRef=" " NoteText="Last updated: November 17, 2016-- new estimates for 2015; revised estimates for 1998-2014." /> </Results> </BEAAPI>In this example the Result node contains a NoteRef attribute having the value “2”, and there is a Notes node having the NoteRef value of “2”. This should be interpreted as meaning that the NoteText attribute for that Notes node applies to the whole result.
Request
/api/data?&UserID=Your-36Character-Key&method=GetData&datasetname=RegionalIncome&TableName=SA1&GeoFIPS=STATE&LineCode=3&Year=2013&ResultFormat=XML&
In this example, the GetData method is used to return the dataset named RegionalIncome. The TableName and LineCode parameters are used to request statistic for “Per capita personal income (dollars)” – as shown in the result of the first GetParameterValuesFiltered example above. The GeoFIPS parameter value is “STATE” – meaning the data for all states is requested. Finally, a single year’s data is requested – 2013.
Note that the GeoFIPS parameter could have been a list of 5-digit geographic codes. Also, multiple years could have been requested by providing them in a comma-separated list.
Return
<BEAAPI> <Request> <RequestParam ParameterValue="2013" ParameterName="YEAR"/> <RequestParam ParameterValue="3" ParameterName="LINECODE"/> <RequestParam ParameterValue="REGIONALINCOME" ParameterName="DATASETNAME"/> <RequestParam ParameterValue="STATE" ParameterName="GEOFIPS"/> <RequestParam ParameterValue="Your-36Character-Key" ParameterName="USERID"/> <RequestParam ParameterValue="GETDATA" ParameterName="METHOD"/> <RequestParam ParameterValue="SA1" ParameterName="TABLENAME"/> <RequestParam ParameterValue="XML" ParameterName="RESULTFORMAT"/> </Request> <Results NoteRef="2" UTCProductionTime="2015-04-24T14:22:56.983" PublicTable="SA1 Personal Income Summary: Personal Income, Population, Per Capita Personal Income" UnitOfMeasure="dollars" Statistic="Per capita personal income"> <Dimensions IsValue="0" DataType="string" Name="Code" Ordinal="1"/> <Dimensions IsValue="0" DataType="string" Name="GeoFips" Ordinal="2"/> <Dimensions IsValue="0" DataType="string" Name="GeoName" Ordinal="3"/> <Dimensions IsValue="0" DataType="string" Name="TimePeriod" Ordinal="4"/> <Dimensions IsValue="1" DataType="numeric" Name="DataValue" Ordinal="5"/> <Data DataValue="44,765" UNIT_MULT="0" CL_UNIT="dollars" TimePeriod="2013" GeoName="United States" GeoFips="00000" Code="SA1-3"/> <Data DataValue="36,481" UNIT_MULT="0" CL_UNIT="dollars" TimePeriod="2013" GeoName="Alabama" GeoFips="01000" Code="SA1-3"/> <Data NoteRef="*" DataValue="50,150" UNIT_MULT="0" CL_UNIT="dollars" TimePeriod="2013" GeoName="Alaska" GeoFips="02000" Code="SA1-3"/> <Data DataValue="36,983" UNIT_MULT="0" CL_UNIT="dollars" TimePeriod="2013" GeoName="Arizona" GeoFips="04000" Code="SA1-3"/> <Data DataValue="36,698" UNIT_MULT="0" CL_UNIT="dollars" TimePeriod="2013" GeoName="Arkansas" GeoFips="05000" Code="SA1-3"/> <Data DataValue="48,434" UNIT_MULT="0" CL_UNIT="dollars" TimePeriod="2013" GeoName="California" GeoFips="06000" Code="SA1-3"/> <Data DataValue="46,897" UNIT_MULT="0" CL_UNIT="dollars" TimePeriod="2013" GeoName="Colorado" GeoFips="08000" Code="SA1-3"/> <Data DataValue="60,658" UNIT_MULT="0" CL_UNIT="dollars" TimePeriod="2013" GeoName="Connecticut" GeoFips="09000" Code="SA1-3"/> <Data DataValue="44,815" UNIT_MULT="0" CL_UNIT="dollars" TimePeriod="2013" GeoName="Delaware" GeoFips="10000" Code="SA1-3"/> <Data DataValue="75,329" UNIT_MULT="0" CL_UNIT="dollars" TimePeriod="2013" GeoName="District of Columbia" GeoFips="11000" Code="SA1-3"/> <Data DataValue="41,497" UNIT_MULT="0" CL_UNIT="dollars" TimePeriod="2013" GeoName="Florida" GeoFips="12000" Code="SA1-3"/> <Data DataValue="37,845" UNIT_MULT="0" CL_UNIT="dollars" TimePeriod="2013" GeoName="Georgia" GeoFips="13000" Code="SA1-3"/> <Data NoteRef="*" DataValue="45,204" UNIT_MULT="0" CL_UNIT="dollars" TimePeriod="2013" GeoName="Hawaii" GeoFips="15000" Code="SA1-3"/> <Data DataValue="36,146" UNIT_MULT="0" CL_UNIT="dollars" TimePeriod="2013" GeoName="Idaho" GeoFips="16000" Code="SA1-3"/> <Data DataValue="46,980" UNIT_MULT="0" CL_UNIT="dollars" TimePeriod="2013" GeoName="Illinois" GeoFips="17000" Code="SA1-3"/> <Data DataValue="38,622" UNIT_MULT="0" CL_UNIT="dollars" TimePeriod="2013" GeoName="Indiana" GeoFips="18000" Code="SA1-3"/> <Data DataValue="44,763" UNIT_MULT="0" CL_UNIT="dollars" TimePeriod="2013" GeoName="Iowa" GeoFips="19000" Code="SA1-3"/> <Data DataValue="44,417" UNIT_MULT="0" CL_UNIT="dollars" TimePeriod="2013" GeoName="Kansas" GeoFips="20000" Code="SA1-3"/> <Data DataValue="36,214" UNIT_MULT="0" CL_UNIT="dollars" TimePeriod="2013" GeoName="Kentucky" GeoFips="21000" Code="SA1-3"/> <Data DataValue="41,204" UNIT_MULT="0" CL_UNIT="dollars" TimePeriod="2013" GeoName="Louisiana" GeoFips="22000" Code="SA1-3"/> <Data DataValue="40,924" UNIT_MULT="0" CL_UNIT="dollars" TimePeriod="2013" GeoName="Maine" GeoFips="23000" Code="SA1-3"/> <Data DataValue="53,826" UNIT_MULT="0" CL_UNIT="dollars" TimePeriod="2013" GeoName="Maryland" GeoFips="24000" Code="SA1-3"/> <Data DataValue="57,248" UNIT_MULT="0" CL_UNIT="dollars" TimePeriod="2013" GeoName="Massachusetts" GeoFips="25000" Code="SA1-3"/> <Data DataValue="39,055" UNIT_MULT="0" CL_UNIT="dollars" TimePeriod="2013" GeoName="Michigan" GeoFips="26000" Code="SA1-3"/> <Data DataValue="47,500" UNIT_MULT="0" CL_UNIT="dollars" TimePeriod="2013" GeoName="Minnesota" GeoFips="27000" Code="SA1-3"/> <Data DataValue="33,913" UNIT_MULT="0" CL_UNIT="dollars" TimePeriod="2013" GeoName="Mississippi" GeoFips="28000" Code="SA1-3"/> <Data DataValue="40,663" UNIT_MULT="0" CL_UNIT="dollars" TimePeriod="2013" GeoName="Missouri" GeoFips="29000" Code="SA1-3"/> <Data DataValue="39,366" UNIT_MULT="0" CL_UNIT="dollars" TimePeriod="2013" GeoName="Montana" GeoFips="30000" Code="SA1-3"/> <Data DataValue="47,157" UNIT_MULT="0" CL_UNIT="dollars" TimePeriod="2013" GeoName="Nebraska" GeoFips="31000" Code="SA1-3"/> <Data DataValue="39,235" UNIT_MULT="0" CL_UNIT="dollars" TimePeriod="2013" GeoName="Nevada" GeoFips="32000" Code="SA1-3"/> <Data DataValue="51,013" UNIT_MULT="0" CL_UNIT="dollars" TimePeriod="2013" GeoName="New Hampshire" GeoFips="33000" Code="SA1-3"/> <Data DataValue="55,386" UNIT_MULT="0" CL_UNIT="dollars" TimePeriod="2013" GeoName="New Jersey" GeoFips="34000" Code="SA1-3"/> <Data DataValue="35,965" UNIT_MULT="0" CL_UNIT="dollars" TimePeriod="2013" GeoName="New Mexico" GeoFips="35000" Code="SA1-3"/> <Data DataValue="54,462" UNIT_MULT="0" CL_UNIT="dollars" TimePeriod="2013" GeoName="New York" GeoFips="36000" Code="SA1-3"/> <Data DataValue="38,683" UNIT_MULT="0" CL_UNIT="dollars" TimePeriod="2013" GeoName="North Carolina" GeoFips="37000" Code="SA1-3"/> <Data DataValue="53,182" UNIT_MULT="0" CL_UNIT="dollars" TimePeriod="2013" GeoName="North Dakota" GeoFips="38000" Code="SA1-3"/> <Data DataValue="41,049" UNIT_MULT="0" CL_UNIT="dollars" TimePeriod="2013" GeoName="Ohio" GeoFips="39000" Code="SA1-3"/> <Data DataValue="41,861" UNIT_MULT="0" CL_UNIT="dollars" TimePeriod="2013" GeoName="Oklahoma" GeoFips="40000" Code="SA1-3"/> <Data DataValue="39,848" UNIT_MULT="0" CL_UNIT="dollars" TimePeriod="2013" GeoName="Oregon" GeoFips="41000" Code="SA1-3"/> <Data DataValue="46,202" UNIT_MULT="0" CL_UNIT="dollars" TimePeriod="2013" GeoName="Pennsylvania" GeoFips="42000" Code="SA1-3"/> <Data DataValue="46,989" UNIT_MULT="0" CL_UNIT="dollars" TimePeriod="2013" GeoName="Rhode Island" GeoFips="44000" Code="SA1-3"/> <Data DataValue="35,831" UNIT_MULT="0" CL_UNIT="dollars" TimePeriod="2013" GeoName="South Carolina" GeoFips="45000" Code="SA1-3"/> <Data DataValue="46,039" UNIT_MULT="0" CL_UNIT="dollars" TimePeriod="2013" GeoName="South Dakota" GeoFips="46000" Code="SA1-3"/> <Data DataValue="39,558" UNIT_MULT="0" CL_UNIT="dollars" TimePeriod="2013" GeoName="Tennessee" GeoFips="47000" Code="SA1-3"/> <Data DataValue="43,862" UNIT_MULT="0" CL_UNIT="dollars" TimePeriod="2013" GeoName="Texas" GeoFips="48000" Code="SA1-3"/> <Data DataValue="36,640" UNIT_MULT="0" CL_UNIT="dollars" TimePeriod="2013" GeoName="Utah" GeoFips="49000" Code="SA1-3"/> <Data DataValue="45,483" UNIT_MULT="0" CL_UNIT="dollars" TimePeriod="2013" GeoName="Vermont" GeoFips="50000" Code="SA1-3"/> <Data DataValue="48,838" UNIT_MULT="0" CL_UNIT="dollars" TimePeriod="2013" GeoName="Virginia" GeoFips="51000" Code="SA1-3"/> <Data DataValue="47,717" UNIT_MULT="0" CL_UNIT="dollars" TimePeriod="2013" GeoName="Washington" GeoFips="53000" Code="SA1-3"/> <Data DataValue="35,533" UNIT_MULT="0" CL_UNIT="dollars" TimePeriod="2013" GeoName="West Virginia" GeoFips="54000" Code="SA1-3"/> <Data DataValue="43,244" UNIT_MULT="0" CL_UNIT="dollars" TimePeriod="2013" GeoName="Wisconsin" GeoFips="55000" Code="SA1-3"/> <Data DataValue="52,826" UNIT_MULT="0" CL_UNIT="dollars" TimePeriod="2013" GeoName="Wyoming" GeoFips="56000" Code="SA1-3"/> <Data DataValue="54,797" UNIT_MULT="0" CL_UNIT="dollars" TimePeriod="2013" GeoName="New England" GeoFips="91000" Code="SA1-3"/> <Data DataValue="52,485" UNIT_MULT="0" CL_UNIT="dollars" TimePeriod="2013" GeoName="Mideast" GeoFips="92000" Code="SA1-3"/> <Data DataValue="42,192" UNIT_MULT="0" CL_UNIT="dollars" TimePeriod="2013" GeoName="Great Lakes" GeoFips="93000" Code="SA1-3"/> <Data DataValue="44,796" UNIT_MULT="0" CL_UNIT="dollars" TimePeriod="2013" GeoName="Plains" GeoFips="94000" Code="SA1-3"/> <Data DataValue="39,760" UNIT_MULT="0" CL_UNIT="dollars" TimePeriod="2013" GeoName="Southeast" GeoFips="95000" Code="SA1-3"/> <Data DataValue="42,074" UNIT_MULT="0" CL_UNIT="dollars" TimePeriod="2013" GeoName="Southwest" GeoFips="96000" Code="SA1-3"/> <Data DataValue="42,391" UNIT_MULT="0" CL_UNIT="dollars" TimePeriod="2013" GeoName="Rocky Mountain" GeoFips="97000" Code="SA1-3"/> <Data DataValue="47,185" UNIT_MULT="0" CL_UNIT="dollars" TimePeriod="2013" GeoName="Far West" GeoFips="98000" Code="SA1-3"/> <Notes NoteRef="2" NoteText="Per capita personal income is total personal income divided by total midyear population."/> <Notes NoteRef="*" NoteText="Estimates prior to 1950 are not available for Alaska and Hawaii."/> <Notes NoteRef="Note--" NoteText="All dollar estimates are in current dollars (not adjusted for inflation)."/> <Notes NoteRef=" " NoteText="Last updated: March 25, 2015-- new estimates for 2014."/> </Results> </BEAAPI>
In this example the Result node contains a NoteRef attribute having the value “2”, and there is a Notes node having the NoteRef value of “2”. This should be interpreted as meaning that the NoteText attribute for that Notes node applies to the whole result.
There are also several Data nodes having a NoteRef attribute with the value “*”, and there are several Notes nodes having the matching NoteRef attribute (“*”). This should be interpreted to mean that the Notes nodes having NoteRef = “*” apply as a group to the corresponding Data nodes.
DataSet Documentation
BEA expects to publish several API Datasets containing a variety of economic statistics. The Datasets that are currently available are each documented separately as appendices here.
- Appendix A - RegionalData (statistics by state, county, and MSA) Deprecated
- Appendix B – NIPA (National Income and Product Accounts)
- Appendix C – NIUnderlyingDetail (National Income and Product Accounts)
- Appendix D – Fixed Assets
- Appendix E – Direct Investment and Multinational Enterprises (MNEs)
- Appendix F – Gross Domestic Product by Industry (GDPbyIndustry)
- Appendix G – ITA (International Transactions)
- Appendix H – IIP (International Investment Position)
- Appendix I – RegionalIncome (detailed regional income and employment data sets)
- Appendix J – RegionalProduct (detailed state and MSA product data sets)
- Appendix K – Input-Output Statistics (InputOutput)
- Appendix L – Underlying Gross Domestic Product by Industry (UnderlyingGDPbyIndustry) New
- Appendix M – IntlServTrade (International Services Trade) New
Appendix A - RegionalData (Deprecated)
Appendix B - NIPA (National Income and Product Accounts)
The DataSetName is NIPA. This dataset contains data from the National Income and Product Accounts which include measures of the value and composition of U.S.production and the incomes generated in producing it. NIPA data is provided on a table basis; individual tables contain between fewer than 10 to more than 200 distinct data series. Four parameters are used to retrieve data from the NIPA dataset, as follows:
Name | Type | Description | Is Required | Multiple Values Accepted | “All” value |
---|---|---|---|---|---|
TableName | String | The standard NIPA table identifier | No | No | N/A |
TableID | Integer | Database identifier; will be deprecated in December 2017 | No | No | N/A |
Frequency | String | List of frequencies to retrieve | Yes | Yes | N/A |
Year | String | List of year(s) of data to retrieve | Yes | Yes | “X” “ALL” |
Discontinued; see detailed note below |
Example Calls
Percent change in Real Gross Domestic Product, Annually and Quarterly for all years
Personal Income, Monthly, for 2015 and 2016
[Details of each are described in the section below.]
Parameter Descriptions & Error Returns
TableName Parameter – optional (will be required, December 2017)
The TableName parameter is a string that identifies a specific NIPA table. Only one NIPA table can be requested in each data request. Requests with an invalid combination of TableName, Frequency or Year values will result in an error. Either the TableName or TableID parameter must be passed or an error will result.
NOTE: This parameter is newly introduced in October 2017 and will replace the TableID parameter. Both the TableName and TableID parameter are optional; if the TableName and TableID values do not reference the same table, an error will be returned.
TableID Parameter – optional (will be discontinued, December 2017)
The TableID parameter is an integer that also refers to a specific NIPA table. Only one NIPA table can be requested in each data request. Either the TableName or TableID parameter must be passed or an error will result.
NOTE: This parameter will be discontinued in December 2017. Any request including the TableID will include a note in the response providing the TableName parameter value to perform that request once TableID is discontinued. Both the TableName and TableID parameter are optional; if the TableName and TableID values do not reference the same table, an error will be returned.
Frequency Parameter – (required, multiple values allowed)
The Frequency parameter is a string that refers to the time series for the requested NIPA table. Multiple frequencies are requested by specifying them as a comma-delimited string, e. g. “A,Q,M”.
When data is requested for frequencies that are not available for the requested NIPA table, only data that is available is returned; if no data is available for the requested frequencies, an error will be returned.
When calling the GetParameterValues method and passing a TableName value the response will identify the valid frequencies for that table.
Accepted parameter values are:
- A – Annual
- Q – Quarterly
- M – Monthly
Year Parameter – (required, multiple values allowed)
The Year parameter specifies the year(s) of the data requested. When quarterly or monthly data are requested all available quarters for the specified year(s) will be returned. Multiple years are requested by specifying them as a comma-delimited string, e. g. “2000,2001,2002”.
If the request supplies the special value X or ALL for the Year parameter, all available years of data for that NIPA table returned. Note that using the X or ALL value for all years can return large amounts of data, and should be avoided when the actual required years are known.
When data is requested for years that are not available for the requested NIPA table, only data that is available is returned; if no data is available for the requested year(s), an error will be returned.
When calling the GetParameterValues method and passing a TableName value the response will identify the valid years for that table.
ShowMillions Parameter – (discontinued; October 2017)
The ShowMillions parameter is discontinued. In its place the data response’s MULT_UNIT field now returns the scaling of each observation. Please consult the MULT_UNIT field description, below, for further details.
NIPA Dataset Result Data
Parameter Name | Ordinal | Datatype | IsValue | Description |
---|---|---|---|---|
TableName | 1 | String | No | Unique identifier for the NIPA table requested. |
TableId | 2 | String | No | Integer identifier for the NIPA table requested. |
SeriesCode | 3 | String | No | A unique identifier for the time series of the data item. |
LineNumber | 4 | String | No | Sequence of the data item within the table. |
LineDescription | 5 | String | No | A description of the transactions measured in the data item. |
TimePeriod | 6 | String | No | Time period for the data item in the form YYYY for annual data; YYYYQn for quarterly data (where n is the quarter digit); or YYYYMx for monthly data (where x is the month digit). |
Metric_Name | 7 | String | No | String indicating the measurement of the data item. Example values are Current Dollars, Fisher Price Index, etc. |
CL_UNIT | 8 | String | No | The calculation type of the data item. |
UNIT_MULT | 9 | String | No | An integer representing the base-10 exponent of the multiplier used to interpret the data value. For example “6” refers to millions (DataValue X 106). |
DataValue | 10 | Numeric | Yes | Value of the data item, formatted with commas. |
A NoteRef attribute is also included in all data elements and acts as a reference to one of the Notes elements in the returned data. The NoteRef attribute may have multiple values represented by a comma-delimited string. Any NoteRef attribute included in the data is guaranteed to have a corresponding Notes element. For the NIPA dataset, every data element includes at least one Noteref that corresponds to a Note element containing the title of the table.
Additional Information
Explanation of the estimates can be found in the National section of our website: https://bea.gov/national/. Please consult the schedule of releases which impacts data and table availability. Updates and changes to the accounts are detailed at: https://www.bea.gov/national/an1.htm. National Income and Product Account Methodologies can be found in our handbook.
Appendix C – NIUnderlyingDetail (National Income and Product Accounts)
The DataSetName is NIUnderlyingDetail. This dataset contains underlying detail data from the National Income and Product Accounts which include measures of the value and composition of U.S.production and the incomes generated in producing it. NIPA Underlying Detail data is provided on a table basis; individual tables contain between fewer than 10 to more than 200 distinct data series. Four parameters are used to retrieve data from the NIPA Underlying Detail dataset, as follows:
Name | Type | Description | Is Required | Multiple Values Accepted | “All” value |
---|---|---|---|---|---|
TableName | String | The standard NIPA table identifier | No | No | N/A |
TableID | Integer | Database identifier; will be deprecated in December 2017 | No | No | N/A |
Frequency | String | List of frequencies to retrieve | Yes | Yes | N/A |
Year | String | List of year(s) of data to retrieve | Yes | Yes | “X” “ALL” |
Example Calls
Personal Conumption Expenditures, Current Dollars, Annually, Quarterly and Monthly for all years
Auto and Truck Unit Sales, Production, Inventories, Expenditures and Price, Monthly, for 2015 and 2016
[Details of each are described in the section below.]
Parameter Descriptions & Error Returns
TableName Parameter – optional (will be required, December 2017)
The TableName parameter is a string that identifies a specific NIPA Underlying Detail table. Only one NIPA Underlying Detail table can be requested in each data request. Requests with an invalid combination of TableName, Frequency or Year values will result in an error. Either the TableName or TableID parameter must be passed or an error will result.
NOTE: This parameter is newly introduced in October 2017 and will replace the TableID parameter. Both the TableName and TableID parameter are optional; if the TableName and TableID values do not reference the same table, an error will be returned.
TableID Parameter – optional (will be discontinued, December 2017)
The TableID parameter is an integer that also refers to a specific NIPA Underlying Detail table. Only one NIPA Underlying Detail table can be requested in each data request. Either the TableName or TableID parameter must be passed or an error will result.
NOTE: This parameter will be discontinued in December 2017. Any request including the TableID will include a note in the response providing the TableName parameter value to perform that request once TableID is discontinued. Both the TableName and TableID parameter are optional; if the TableName and TableID values do not reference the same table, an error will be returned.
Frequency Parameter – (required, multiple values allowed)
The Frequency parameter is a string that refers to the time series for the requested NIPA Underlying Detail table. Multiple frequencies are requested by specifying them as a comma-delimited string, e. g. “A,Q,M”.
When data is requested for frequencies that are not available for the requested NIPA Underlying Detail table, only data that is available is returned; if no data is available for the requested frequencies, an error will be returned.
When calling the GetParameterValues method and passing a TableName value the response will identify the valid frequencies for that table.
Accepted parameter values are:
- A – Annual
- Q – Quarterly
- M – Monthly
Year Parameter – (required, multiple values allowed)
The Year parameter specifies the year(s) of the data requested. When quarterly or monthly data are requested all available quarters for the specified year(s) will be returned. Multiple years are requested by specifying them as a comma-delimited string, e. g. “2000,2001,2002”.
If the request supplies the special value X or ALL for the Year parameter, all available years of data for that NIPA Underlying Detail table are returned. Note that using the X or ALL value for all years can return large amounts of data, and should be avoided when the actual required years are known.
When data is requested for years that are not available for the requested NIPA Underlying Detail table, only data that is available is returned; if no data is available for the requested year(s), an error will be returned.
When calling the GetParameterValues method and passing a TableName value the response will identify the valid years for that table.
NIPA Underlying Detail Dataset Result Data
Parameter Name | Ordinal | Datatype | IsValue | Description |
---|---|---|---|---|
TableName | 1 | String | No | Unique identifier for the NIPA table requested. |
TableId | 2 | String | No | Integer identifier for the NIPA table requested. |
SeriesCode | 3 | String | No | A unique identifier for the time series of the data item. |
LineNumber | 4 | String | No | Sequence of the data item within the table. |
LineDescription | 5 | String | No | A description of the transactions measured in the data item. |
TimePeriod | 6 | String | No | Time period for the data item in the form YYYY for annual data; YYYYQn for quarterly data (where n is the quarter digit); or YYYYMx for monthly data (where x is the month digit). |
Metric_Name | 7 | String | No | String indicating the measurement of the data item. Example values are Current Dollars, Fisher Price Index, etc. |
CL_UNIT | 8 | String | No | The calculation type of the data item. |
UNIT_MULT | 9 | String | No | An integer representing the base-10 exponent of the multiplier used to interpret the data value. For example “6” refers to millions (DataValue X 106). |
DataValue | 10 | Numeric | Yes | Value of the data item, formatted with commas. |
A NoteRef attribute is also included in all data elements and acts as a reference to one of the Notes elements in the returned data. The NoteRef attribute may have multiple values represented by a comma-delimited string. Any NoteRef attribute included in the data is guaranteed to have a corresponding Notes element. For the NIPA dataset, every data element includes at least one Noteref that corresponds to a Note element containing the title of the table.
Additional Information
Explanation of the estimates can be found in the National section of our website: https://bea.gov/national/. Please consult the schedule of releases which impacts data and table availability. Updates and changes to the accounts are detailed at: https://www.bea.gov/national/an1.htm. National Income and Product Account Methodologies can be found in our handbook.
Appendix D – Fixed Assets
The FixedAssets dataset contains data from the standard set of Fixed Assets tables as published online. Two parameters are used to retrieve data from the Fixed Assets dataset, as follows:
Name | Type | Description | Is Required | Multiple Values Accepted | “All” value |
---|---|---|---|---|---|
TableID | Integer | The standard NIPA table identifier | Yes | No | N/A |
Year | integer | List of year(s) of data to retrieve | Yes | Yes | "X" |
TableID Parameter
The TableID parameter is an integer that refers to a specific Fixed Assets table. As shown above, the parameter is required, and only one Fixed Assets table can be requested in each GetData submission.
The full list of valid Fixed Assets TableIDs is as follows:
<ParamValue TableID="16"Description="Table 1.1. Current-Cost Net Stock of Fixed Assets and Consumer Durable Goods (A)"/> <ParamValue TableID="17"Description="Table 1.2. Chain-Type Quantity Indexes for Net Stock of Fixed Assets and Consumer Durable Goods (A)"/> <ParamValue TableID="86"Description="Table 1.3. Current-Cost Depreciation of Fixed Assets and Consumer Durable Goods (A)"/> <ParamValue TableID="87"Description="Table 1.4. Chain-Type Quantity Indexes for Depreciation of Fixed Assets and Consumer Durable Goods (A)"/> <ParamValue TableID="96"Description="Table 1.5. Investment in Fixed Assets and Consumer Durable Goods (A)"/> <ParamValue TableID="97"Description="Table 1.6. Chain-Type Quantity Indexes for Investment in Fixed Assets and Consumer Durable Goods (A)"/> <ParamValue TableID="105"Description="Table 1.7. Current-Cost Other Changes in Volume of Assets for Fixed Assets and Consumer Durable Goods (A)"/> <ParamValue TableID="124"Description="Table 1.8. Historical-Cost Other Changes in Volume of Assets for Fixed Assets and Consumer Durable Goods (A)"/> <ParamValue TableID="125"Description="Table 1.9. Current-Cost Average Age at Yearend of Fixed Assets and Consumer Durable Goods (A)"/> <ParamValue TableID="18"Description="Table 2.1. Current-Cost Net Stock of Private Fixed Assets, Equipment, Structures, and Intellectual Property Products by Type (A)" /> <ParamValue TableID="19"Description="Table 2.2. Chain-Type Quantity Indexes for Net Stock of Private Fixed Assets, Equipment, Structures, and Intellectual Property Products by Type (A)"/> <ParamValue TableID="42"Description="Table 2.3. Historical-Cost Net Stock of Private Fixed Assets, Equipment, Structures, and Intellectual Property Products by Type (A)" /> <ParamValue TableID="65"Description="Table 2.4. Current-Cost Depreciation of Private Fixed Assets, Equipment, Structures, and Intellectual Property Products by Type (A)" /> <ParamValue TableID="66"Description="Table 2.5. Chain-Type Quantity Indexes for Depreciation of Private Fixed Assets, Equipment, Structures, and Intellectual Property Products by Type (A)"/> <ParamValue TableID="67"Description="Table 2.6. Historical-Cost Depreciation of Private Fixed Assets, Equipment, Structures, and Intellectual Property Products by Type (A)"/> <ParamValue TableID="51"Description="Table 2.7. Investment in Private Fixed Assets, Equipment, Structures, and Intellectual Property Products by Type (A)"/> <ParamValue TableID="52"Description="Table 2.8. Chain-Type Quantity Indexes for Investment in Private Fixed Assets, Equipment, Structures, and Intellectual Property Products by Type (A)"/> <ParamValue TableID="106"Description="Table 2.9. Current-Cost Average Age at Yearend of Private Fixed Assets, Equipment, Structures, and Intellectual Property Products by Type (A)"/> <ParamValue TableID="107"Description="Table 2.10. Historical-Cost Average Age at Yearend of Private Fixed Assets, Equipment, Structures, and Intellectual Property Products by Type (A)"/> <ParamValue TableID="21"Description="Table 3.1E. Current-Cost Net Stock of Private Equipment by Industry (A)"/> <ParamValue TableID="126"Description="Table 3.1ESI. Current-Cost Net Stock of Private Fixed Assets by Industry (A)"/> <ParamValue TableID="127"Description="Table 3.1I. Current-Cost Net Stock of Intellectual Property Products by Industry (A)"/> <ParamValue TableID="22"Description="Table 3.1S. Current-Cost Net Stock of Private Structures by Industry (A)"/> <ParamValue TableID="24"Description="Table 3.2E. Chain-Type Quantity Indexes for Net Stock of Private Equipment by Industry (A)"/> <ParamValue TableID="128"Description="Table 3.2ESI. Chain-Type Quantity Indexes for Net Stock of Private Fixed Assets by Industry (A)"/> <ParamValue TableID="129"Description="Table 3.2I. Chain-Type Quantity Indexes for Net Stock of Intellectual Property Products by Industry (A)"/> <ParamValue TableID="25"Description="Table 3.2S. Chain-Type Quantity Indexes for Net Stock of Private Structures by Industry (A)"/> <ParamValue TableID="44"Description="Table 3.3E. Historical-Cost Net Stock of Private Equipment by Industry (A)"/> <ParamValue TableID="130"Description="Table 3.3ESI. Historical-Cost Net Stock of Private Fixed Assets by Industry (A)"/> <ParamValue TableID="131"Description="Table 3.3I. Historical-Cost Net Stock of Private Intellectual Property Products by Industry (A)"/> <ParamValue TableID="45"Description="Table 3.3S. Historical-Cost Net Stock of Private Structures by Industry (A)"/> <ParamValue TableID="69"Description="Table 3.4E. Current-Cost Depreciation of Private Equipment by Industry (A)"/> <ParamValue TableID="132"Description="Table 3.4ESI. Current-Cost Depreciation of Private Fixed Assets by Industry (A)"/> <ParamValue TableID="133"Description="Table 3.4I. Current-Cost Depreciation of Private Intellectual Property Products by Industry (A)"/> <ParamValue TableID="70"Description="Table 3.4S. Current-Cost Depreciation of Private Structures by Industry (A)"/> <ParamValue TableID="72"Description="Table 3.5E. Chain-Type Quantity Indexes for Depreciation of Private Equipment by Industry (A)"/> <ParamValue TableID="134"Description="Table 3.5ESI. Chain-Type Quantity Indexes for Depreciation of Private Fixed Assets by Industry (A)"/> <ParamValue TableID="135"Description="Table 3.5I. Chain-Type Quantity Indexes for Depreciation of Private Intellectual Property Products by Industry (A)"/> <ParamValue TableID="73"Description="Table 3.5S. Chain-Type Quantity Indexes for Depreciation of Private Structures by Industry (A)"/> <ParamValue TableID="75"Description="Table 3.6E. Historical-Cost Depreciation of Private Equipment by Industry (A)"/> <ParamValue TableID="136"Description="Table 3.6ESI. Historical-Cost Depreciation of Private Fixed Assets by Industry (A)"/> <ParamValue TableID="137"Description="Table 3.6I. Historical-Cost Depreciation of Private Intellectual Property Products by Industry (A)"/> <ParamValue TableID="76"Description="Table 3.6S. Historical-Cost Depreciation of Private Structures by Industry (A)"/> <ParamValue TableID="54"Description="Table 3.7E. Investment in Private Equipment by Industry (A)"/> <ParamValue TableID="138"Description="Table 3.7ESI. Investment in Private Fixed Assets by Industry (A)"/> <ParamValue TableID="139"Description="Table 3.7I. Investment in Private Intellectual Property Products by Industry (A)"/> <ParamValue TableID="55"Description="Table 3.7S. Investment in Private Structures by Industry (A)"/> <ParamValue TableID="57"Description="Table 3.8E. Chain-Type Quantity Indexes for Investment in Private Equipment by Industry (A)"/> <ParamValue TableID="140"Description="Table 3.8ESI. Chain-Type Quantity Indexes for Investment in Private Fixed Assets by Industry (A)"/> <ParamValue TableID="141"Description="Table 3.8I. Chain-Type Quantity Indexes for Investment in Private Intellectual Property Products by Industry (A)"/> <ParamValue TableID="58"Description="Table 3.8S. Chain-Type Quantity Indexes for Investment in Private Structures by Industry (A)"/> <ParamValue TableID="108"Description="Table 3.9E. Current-Cost Average Age at Yearend of Private Equipment by Industry (A)"/> <ParamValue TableID="142"Description="Table 3.9ESI. Current-Cost Average Age at Yearend of Private Fixed Assets by Industry (A)"/> <ParamValue TableID="143"Description="Table 3.9I. Current-Cost Average Age at Yearend of Private Intellectual Property Products by Industry (A)"/> <ParamValue TableID="110"Description="Table 3.9S. Current-Cost Average Age at Yearend of Private Structures by Industry (A)"/> <ParamValue TableID="111"Description="Table 3.10E. Historical-Cost Average Age at Yearend of Private Equipment by Industry (A)"/> <ParamValue TableID="144"Description="Table 3.10ESI. Historical-Cost Average Age at Yearend of Private Fixed Assets by Industry (A)"/> <ParamValue TableID="145"Description="Table 3.10I. Historical-Cost Average Age at Yearend of Private Intellectual Property Products by Industry (A)"/> <ParamValue TableID="113"Description="Table 3.10S. Historical-Cost Average Age at Yearend of Private Structures by Industry (A)"/> <ParamValue TableID="26"Description="Table 4.1. Current-Cost Net Stock of Private Nonresidential Fixed Assets by Industry Group and Legal Form of Organization (A)"/> <ParamValue TableID="27"Description="Table 4.2. Chain-Type Quantity Indexes for Net Stock of Private Nonresidential Fixed Assets by Industry Group and Legal Form of Organization (A)"/> <ParamValue TableID="46"Description="Table 4.3. Historical-Cost Net Stock of Private Nonresidential Fixed Assets by Industry Group and Legal Form of Organization (A)"/> <ParamValue TableID="77"Description="Table 4.4. Current-Cost Depreciation of Private Nonresidential Fixed Assets by Industry Group and Legal Form of Organization (A)" /> <ParamValue TableID="78"Description="Table 4.5. Chain-Type Quantity Indexes for Depreciation of Private Nonresidential Fixed Assets by Industry Group and Legal Form of Organization (A)"/> <ParamValue TableID="79"Description="Table 4.6. Historical-Cost Depreciation of Private Nonresidential Fixed Assets by Industry Group and Legal Form of Organization (A)" /> <ParamValue TableID="59"Description="Table 4.7. Investment in Private Nonresidential Fixed Assets by Industry Group and Legal Form of Organization (A)"/> <ParamValue TableID="60"Description="Table 4.8. Chain-Type Quantity Indexes for Investment in Private Nonresidential Fixed Assets by Industry Group and Legal Form of Organization (A)"/> <ParamValue TableID="114"Description="Table 4.9. Current-Cost Average Age at Yearend of Private Nonresidential Fixed Assets by Industry Group and Legal Form of Organization (A)"/> <ParamValue TableID="115"Description="Table 4.10. Historical-Cost Average Age at Yearend of Private Nonresidential Fixed Assets by Industry Group and Legal Form of Organization (A)"/> <ParamValue TableID="28"Description="Table 5.1. Current-Cost Net Stock of Residential Fixed Assets by Type of Owner, Legal Form of Organization, and Tenure Group (A)" /> <ParamValue TableID="29"Description="Table 5.2. Chain-Type Quantity Indexes for Net Stock of Residential Fixed Assets by Type of Owner, Legal Form of Organization, and Tenure Group (A)"/> <ParamValue TableID="47"Description="Table 5.3. Historical-Cost Net Stock of Residential Fixed Assets by Type of Owner, Legal Form of Organization, and Tenure Group (A)" /> <ParamValue TableID="88"Description="Table 5.4. Current-Cost Depreciation of Residential Fixed Assets by Type of Owner, Legal Form of Organization, and Tenure Group (A)" /> <ParamValue TableID="89"Description="Table 5.5. Chain-Type Quantity Indexes for Depreciation of Residential Fixed Assets by Type of Owner, Legal Form of Organization, and Tenure Group (A)"/> <ParamValue TableID="90"Description="Table 5.6. Historical-Cost Depreciation of Residential Fixed Assets by Type of Owner, Legal Form of Organization, and Tenure Group (A)"/> <ParamValue TableID="98"Description="Table 5.7. Investment in Residential Fixed Assets by Type of Owner, Legal Form of Organization, and Tenure Group (A)"/> <ParamValue TableID="99"Description="Table 5.8. Chain-Type Quantity Indexes for Investment in Residential Fixed Assets by Type of Owner, Legal Form of Organization, and Tenure Group (A)"/> <ParamValue TableID="116"Description="Table 5.9. Current-Cost Average Age at Yearend of Residential Fixed Assets by Type of Owner, Legal Form of Organization, and Tenure Group (A)"/> <ParamValue TableID="117"Description="Table 5.10. Historical-Cost Average Age at Yearend of Residential Fixed Assets by Type of Owner, Legal Form of Organization, and Tenure Group (A)"/> <ParamValue TableID="41"Description="Table 6.1. Current-Cost Net Stock of Private Fixed Assets by Industry Group and Legal Form of Organization (A)"/> <ParamValue TableID="48"Description="Table 6.2. Chain-Type Quantity Indexes for Net Stock of Private Fixed Assets by Industry Group and Legal Form of Organization (A)"/> <ParamValue TableID="49"Description="Table 6.3. Historical-Cost Net Stock of Private Fixed Assets by Industry Group and Legal Form of Organization (A)"/> <ParamValue TableID="80"Description="Table 6.4. Current-Cost Depreciation of Private Fixed Assets by Industry Group and Legal Form of Organization (A)"/> <ParamValue TableID="81"Description="Table 6.5. Chain-Type Quantity Indexes for Depreciation of Private Fixed Assets by Industry Group and Legal Form of Organization (A)"/> <ParamValue TableID="82"Description="Table 6.6. Historical-Cost Depreciation of Private Fixed Assets by Industry Group and Legal Form of Organization (A)"/> <ParamValue TableID="61"Description="Table 6.7. Investment in Private Fixed Assets by Industry Group and Legal Form of Organization (A)"/> <ParamValue TableID="62"Description="Table 6.8. Chain-Type Quantity Indexes for Investment in Private Fixed Assets by Industry Group and Legal Form of Organization (A)"/> <ParamValue TableID="118"Description="Table 6.9. Current-Cost Average Age at Yearend of Private Fixed Assets by Industry Group and Legal Form of Organization (A)"/> <ParamValue TableID="119"Description="Table 6.10. Historical-Cost Average Age at Yearend of Private Fixed Assets by Industry Group and Legal Form of Organization (A)" /> <ParamValue TableID="35"Description="Table 7.1A. Current-Cost Net Stock of Government Fixed Assets, 1925-1996 (A)"/> <ParamValue TableID="30"Description="Table 7.1B. Current-Cost Net Stock of Government Fixed Assets (A)"/> <ParamValue TableID="36"Description="Table 7.2A. Chain-Type Quantity Indexes for Net Stock of Government Fixed Assets, 1925-1996 (A)"/> <ParamValue TableID="31"Description="Table 7.2B. Chain-Type Quantity Indexes for Net Stock of Government Fixed Assets (A)"/> <ParamValue TableID="91"Description="Table 7.3A. Current-Cost Depreciation of Government Fixed Assets, 1925-1996 (A)"/> <ParamValue TableID="92"Description="Table 7.3B. Current-Cost Depreciation of Government Fixed Assets (A)"/> <ParamValue TableID="93"Description="Table 7.4A. Chain-Type Quantity Indexes for Depreciation of Government Fixed Assets, 1925-1996 (A)"/> <ParamValue TableID="94"Description="Table 7.4B. Chain-Type Quantity Indexes for Depreciation of Government Fixed Assets (A)"/> <ParamValue TableID="100"Description="Table 7.5A. Investment in Government Fixed Assets, 1901-1996 (A)"/> <ParamValue TableID="101"Description="Table 7.5B. Investment in Government Fixed Assets (A)" /> <ParamValue TableID="102"Description="Table 7.6A. Chain-Type Quantity Indexes for Investment in Government Fixed Assets, 1901-1996 (A)"/> <ParamValue TableID="103"Description="Table 7.6B. Chain-Type Quantity Indexes for Investment in Government Fixed Assets (A)"/> <ParamValue TableID="120"Description="Table 7.7A. Current-Cost Average Age at Yearend of Government Fixed Assets, 1925-1996 (A)"/> <ParamValue TableID="121"Description="Table 7.7B. Current-Cost Average Age at Yearend of Government Fixed Assets (A)"/> <ParamValue TableID="32"Description="Table 8.1. Current-Cost Net Stock of Consumer Durable Goods (A)"/> <ParamValue TableID="33"Description="Table 8.2. Chain-Type Quantity Indexes for Net Stock of Consumer Durable Goods (A)"/> <ParamValue TableID="50"Description="Table 8.3. Historical-Cost Net Stock of Consumer Durable Goods (A)"/> <ParamValue TableID="83"Description="Table 8.4. Current-Cost Depreciation of Consumer Durable Goods (A)"/> <ParamValue TableID="84"Description="Table 8.5. Chain-Type Quantity Indexes for Depreciation of Consumer Durable Goods (A)"/> <ParamValue TableID="85"Description="Table 8.6. Historical-Cost Depreciation of Consumer Durable Goods (A)"/> <ParamValue TableID="63"Description="Table 8.7. Investment in Consumer Durable Goods (A)"/> <ParamValue TableID="64"Description="Table 8.8. Chain-Type Quantity Indexes for Investment in Consumer Durable Goods (A)"/> <ParamValue TableID="122"Description="Table 8.9. Current-Cost Average Age at Yearend of Consumer Durable Goods (A)"/> <ParamValue TableID="123"Description="Table 8.10. Historical-Cost Average Age at Yearend of Consumer Durable Goods (A)"/> <ParamValue TableID="34"Description="Table 9.1. Real Net Stock of Fixed Assets and Consumer Durable Goods (A)"/> <ParamValue TableID="95"Description="Table 9.2. Real Depreciation of Fixed Assets and Consumer Durable Goods (A)"/> <ParamValue TableID="104"Description="Table 9.3. Real Investment in Fixed Assets and Consumer Durable Goods (A)"/>
Note that the description of each table also indicates that only annual data is available.
Requesting an invalid TableID returns this error:
<Error APIErrorCode="201" APIErrorDescription="Error retrieving Fixed Assets data."> <ErrorDetail Description="Invalid table IDs were requested." /> </Error>Omitting the TableID parameter returns this error:
<Error APIErrorCode="40" APIErrorDescription="The dataset requested requires parameters that were missing from the request."> <AdditionalDetail> <MissingParameter ParameterName="TableID" ParameterDescription="The standard Fixed Assets table identifier" /> </AdditionalDetail> </Error>
Year Parameter
The Year parameter is an integer that specifies the year(s) of data for the requested Fixed Assets table. As shown above, the parameter is required, and multiple years can be requested in each GetData submission. Multiple years are requested by specifying them as a comma-delimited string, e.g. “2000,2001,2002”. When data is requested for years that don’t exist for a particular Fixed Assets table, only data that exists is returned. For example, if years in the future are requested – like “2013,2014,2015”, the most recent available data is returned starting with 2013. If the request supplies the special value “X” for the Year parameter, all available years of data are returned. Note that using the “X” value for all years can return large amounts of data, and should be avoided when the actual required years are known.
If only years that don’t exist for a particular table are requested, this error is returned:
<Error APIErrorCode="201" APIErrorDescription="Error retrieving Fixed Assets data."> <ErrorDetail Description="The requested parameters did not return data." /> </Error>
Omitting the Year parameter returns this error:
<Error APIErrorCode="40" APIErrorDescription="The dataset requested requires parameters that were missing from the request."> <AdditionalDetail> <MissingParameter ParameterName="Year" ParameterDescription="List of year(s) of data to retrieve (X for All)" /> </AdditionalDetail> </Error>
Using the GetParameterValues meta-data retrieval method for the Year parameter returns a list of the valid year ranges for each Fixed Assets table. Each Fixed Assets table may have a different range of years. For example, Table 1 (at the time of this writing) has annual data from 1925 through 2012 available as indicated in this example return data from the GetParameterValues method:
<ParamValue TableID="16" FirstAnnualYear="1925" LastAnnualYear="2012" /> <ParamValue TableID="17" FirstAnnualYear="1925" LastAnnualYear="2012" /> <ParamValue TableID="18" FirstAnnualYear="1925" LastAnnualYear="2012" /> <ParamValue TableID="19" FirstAnnualYear="1925" LastAnnualYear="2012" /> <ParamValue TableID="21" FirstAnnualYear="1947" LastAnnualYear="2012" /> <ParamValue TableID="22" FirstAnnualYear="1947" LastAnnualYear="2012" /> <ParamValue TableID="24" FirstAnnualYear="1947" LastAnnualYear="2012" /> <ParamValue TableID="25" FirstAnnualYear="1947" LastAnnualYear="2012" /> <ParamValue TableID="26" FirstAnnualYear="1925" LastAnnualYear="2012" /> <ParamValue TableID="27" FirstAnnualYear="1925" LastAnnualYear="2012" /> <ParamValue TableID="28" FirstAnnualYear="1925" LastAnnualYear="2012" /> <ParamValue TableID="29" FirstAnnualYear="1925" LastAnnualYear="2012" /> <ParamValue TableID="30" FirstAnnualYear="1997" LastAnnualYear="2012" /> <ParamValue TableID="31" FirstAnnualYear="1997" LastAnnualYear="2012" /> <ParamValue TableID="32" FirstAnnualYear="1925" LastAnnualYear="2012" /> <ParamValue TableID="33" FirstAnnualYear="1925" LastAnnualYear="2012" /> <ParamValue TableID="34" FirstAnnualYear="1999" LastAnnualYear="2012" /> <ParamValue TableID="35" FirstAnnualYear="1925" LastAnnualYear="1996" /> <ParamValue TableID="36" FirstAnnualYear="1925" LastAnnualYear="1996" /> <ParamValue TableID="41" FirstAnnualYear="1925" LastAnnualYear="2012" /> <ParamValue TableID="42" FirstAnnualYear="1925" LastAnnualYear="2012" /> <ParamValue TableID="44" FirstAnnualYear="1947" LastAnnualYear="2012" /> <ParamValue TableID="45" FirstAnnualYear="1947" LastAnnualYear="2012" /> <ParamValue TableID="46" FirstAnnualYear="1925" LastAnnualYear="2012" /> <ParamValue TableID="47" FirstAnnualYear="1925" LastAnnualYear="2012" /> <ParamValue TableID="48" FirstAnnualYear="1925" LastAnnualYear="2012" /> <ParamValue TableID="49" FirstAnnualYear="1925" LastAnnualYear="2012" /> <ParamValue TableID="50" FirstAnnualYear="1925" LastAnnualYear="2012" /> <ParamValue TableID="51" FirstAnnualYear="1901" LastAnnualYear="2012" /> <ParamValue TableID="52" FirstAnnualYear="1901" LastAnnualYear="2012" /> <ParamValue TableID="54" FirstAnnualYear="1947" LastAnnualYear="2012" /> <ParamValue TableID="55" FirstAnnualYear="1947" LastAnnualYear="2012" /> <ParamValue TableID="57" FirstAnnualYear="1947" LastAnnualYear="2012" /> <ParamValue TableID="58" FirstAnnualYear="1947" LastAnnualYear="2012" /> <ParamValue TableID="59" FirstAnnualYear="1901" LastAnnualYear="2012" /> <ParamValue TableID="60" FirstAnnualYear="1901" LastAnnualYear="2012" /> <ParamValue TableID="61" FirstAnnualYear="1901" LastAnnualYear="2012" /> <ParamValue TableID="62" FirstAnnualYear="1901" LastAnnualYear="2012" /> <ParamValue TableID="63" FirstAnnualYear="1925" LastAnnualYear="2012" /> <ParamValue TableID="64" FirstAnnualYear="1925" LastAnnualYear="2012" /> <ParamValue TableID="65" FirstAnnualYear="1925" LastAnnualYear="2012" /> <ParamValue TableID="66" FirstAnnualYear="1925" LastAnnualYear="2012" /> <ParamValue TableID="67" FirstAnnualYear="1925" LastAnnualYear="2012" /> <ParamValue TableID="69" FirstAnnualYear="1947" LastAnnualYear="2012" /> <ParamValue TableID="70" FirstAnnualYear="1947" LastAnnualYear="2012" /> <ParamValue TableID="72" FirstAnnualYear="1947" LastAnnualYear="2012" /> <ParamValue TableID="73" FirstAnnualYear="1947" LastAnnualYear="2012" /> <ParamValue TableID="75" FirstAnnualYear="1947" LastAnnualYear="2012" /> <ParamValue TableID="76" FirstAnnualYear="1947" LastAnnualYear="2012" /> <ParamValue TableID="77" FirstAnnualYear="1925" LastAnnualYear="2012" /> <ParamValue TableID="78" FirstAnnualYear="1925" LastAnnualYear="2012" /> <ParamValue TableID="79" FirstAnnualYear="1925" LastAnnualYear="2012" /> <ParamValue TableID="80" FirstAnnualYear="1925" LastAnnualYear="2012" /> <ParamValue TableID="81" FirstAnnualYear="1925" LastAnnualYear="2012" /> <ParamValue TableID="82" FirstAnnualYear="1925" LastAnnualYear="2012" /> <ParamValue TableID="83" FirstAnnualYear="1925" LastAnnualYear="2012" /> <ParamValue TableID="84" FirstAnnualYear="1925" LastAnnualYear="2012" /> <ParamValue TableID="85" FirstAnnualYear="1925" LastAnnualYear="2012" /> <ParamValue TableID="86" FirstAnnualYear="1925" LastAnnualYear="2012" /> <ParamValue TableID="87" FirstAnnualYear="1925" LastAnnualYear="2012" /> <ParamValue TableID="88" FirstAnnualYear="1925" LastAnnualYear="2012" /> <ParamValue TableID="89" FirstAnnualYear="1925" LastAnnualYear="2012" /> <ParamValue TableID="90" FirstAnnualYear="1925" LastAnnualYear="2012" /> <ParamValue TableID="91" FirstAnnualYear="1925" LastAnnualYear="1996" /> <ParamValue TableID="92" FirstAnnualYear="1997" LastAnnualYear="2012" /> <ParamValue TableID="93" FirstAnnualYear="1925" LastAnnualYear="1996" /> <ParamValue TableID="94" FirstAnnualYear="1997" LastAnnualYear="2012" /> <ParamValue TableID="95" FirstAnnualYear="1999" LastAnnualYear="2012" /> <ParamValue TableID="96" FirstAnnualYear="1901" LastAnnualYear="2012" /> <ParamValue TableID="97" FirstAnnualYear="1901" LastAnnualYear="2012" /> <ParamValue TableID="98" FirstAnnualYear="1901" LastAnnualYear="2012" /> <ParamValue TableID="99" FirstAnnualYear="1901" LastAnnualYear="2012" /> <ParamValue TableID="100" FirstAnnualYear="1901" LastAnnualYear="1996" /> <ParamValue TableID="101" FirstAnnualYear="1997" LastAnnualYear="2012" /> <ParamValue TableID="102" FirstAnnualYear="1901" LastAnnualYear="1996" /> <ParamValue TableID="103" FirstAnnualYear="1997" LastAnnualYear="2012" /> <ParamValue TableID="104" FirstAnnualYear="1999" LastAnnualYear="2012" /> <ParamValue TableID="105" FirstAnnualYear="1925" LastAnnualYear="2012" /> <ParamValue TableID="106" FirstAnnualYear="1925" LastAnnualYear="2012" /> <ParamValue TableID="107" FirstAnnualYear="1925" LastAnnualYear="2012" /> <ParamValue TableID="108" FirstAnnualYear="1947" LastAnnualYear="2012" /> <ParamValue TableID="110" FirstAnnualYear="1947" LastAnnualYear="2012" /> <ParamValue TableID="111" FirstAnnualYear="1947" LastAnnualYear="2012" /> <ParamValue TableID="113" FirstAnnualYear="1947" LastAnnualYear="2012" /> <ParamValue TableID="114" FirstAnnualYear="1925" LastAnnualYear="2012" /> <ParamValue TableID="115" FirstAnnualYear="1925" LastAnnualYear="2012" /> <ParamValue TableID="116" FirstAnnualYear="1925" LastAnnualYear="2012" /> <ParamValue TableID="117" FirstAnnualYear="1925" LastAnnualYear="2012" /> <ParamValue TableID="118" FirstAnnualYear="1925" LastAnnualYear="2012" /> <ParamValue TableID="119" FirstAnnualYear="1925" LastAnnualYear="2012" /> <ParamValue TableID="120" FirstAnnualYear="1925" LastAnnualYear="1996" /> <ParamValue TableID="121" FirstAnnualYear="1997" LastAnnualYear="2012" /> <ParamValue TableID="122" FirstAnnualYear="1925" LastAnnualYear="2012" /> <ParamValue TableID="123" FirstAnnualYear="1925" LastAnnualYear="2012" /> <ParamValue TableID="124" FirstAnnualYear="1925" LastAnnualYear="2012" /> <ParamValue TableID="125" FirstAnnualYear="1925" LastAnnualYear="2012" /> <ParamValue TableID="126" FirstAnnualYear="1947" LastAnnualYear="2012" /> <ParamValue TableID="127" FirstAnnualYear="1947" LastAnnualYear="2012" /> <ParamValue TableID="128" FirstAnnualYear="1947" LastAnnualYear="2012" /> <ParamValue TableID="129" FirstAnnualYear="1947" LastAnnualYear="2012" /> <ParamValue TableID="130" FirstAnnualYear="1947" LastAnnualYear="2012" /> <ParamValue TableID="131" FirstAnnualYear="1947" LastAnnualYear="2012" /> <ParamValue TableID="132" FirstAnnualYear="1947" LastAnnualYear="2012" /> <ParamValue TableID="133" FirstAnnualYear="1947" LastAnnualYear="2012" /> <ParamValue TableID="134" FirstAnnualYear="1947" LastAnnualYear="2012" /> <ParamValue TableID="135" FirstAnnualYear="1947" LastAnnualYear="2012" /> <ParamValue TableID="136" FirstAnnualYear="1947" LastAnnualYear="2012" /> <ParamValue TableID="137" FirstAnnualYear="1947" LastAnnualYear="2012" /> <ParamValue TableID="138" FirstAnnualYear="1947" LastAnnualYear="2012" /> <ParamValue TableID="139" FirstAnnualYear="1947" LastAnnualYear="2012" /> <ParamValue TableID="140" FirstAnnualYear="1947" LastAnnualYear="2012" /> <ParamValue TableID="141" FirstAnnualYear="1947" LastAnnualYear="2012" /> <ParamValue TableID="142" FirstAnnualYear="1947" LastAnnualYear="2012" /> <ParamValue TableID="143" FirstAnnualYear="1947" LastAnnualYear="2012" /> <ParamValue TableID="144" FirstAnnualYear="1947" LastAnnualYear="2012" /> <ParamValue TableID="145" FirstAnnualYear="1947" LastAnnualYear="2012" />
Fixed Assets Dataset Result Data
The Fixed Assets dataset returns data in the standard form described in the API User documentation. In XML form, the main structure of a result is:
<BEAAPI> <Request> <Results UTCProductionTime="Apr 16 2013 2:36PM" Statistic="Fixed Assets Table"> </BEAAPI>
The Request node of the result contains the parameters supplied to the request. For purposes of this example, the parameters are:
<RequestParam ParameterName="USERID" ParameterValue="11111111-2222-3333-EEEE-FFFFFFFFFFFF" /> <RequestParam ParameterName="METHOD" ParameterValue="GetData" /> <RequestParam ParameterName="DatasetName" ParameterValue="FIXEDASSETS" /> <RequestParam ParameterName="TableID" ParameterValue="16" /> <RequestParam ParameterName="Year" ParameterValue="2012" /> <RequestParam ParameterName="ResultFormat" ParameterValue="XML" />
The result returned from this request would be:
<Dimensions Ordinal="1" Name="TableID" DataType="numeric" IsValue="0" /> <Dimensions Ordinal="2" Name="SeriesCode" DataType="string" IsValue="0" /> <Dimensions Ordinal="3" Name="LineNumber" DataType="numeric" IsValue="0" /> <Dimensions Ordinal="4" Name="LineDescription" DataType="string" IsValue="0" /> <Dimensions Ordinal="5" Name="TimePeriod" DataType="string" IsValue="0" /> <Dimensions Ordinal="6" Name="CL_UNIT" DataType="string" IsValue="0" /> <Dimensions Ordinal="7" Name="UNIT_MULT" DataType="numeric" IsValue="0" /> <Dimensions Ordinal="8" Name="DataValue" DataType="numeric" IsValue="1" /> <Data TableID="16" SeriesCode="k1wtotl1es00" LineNumber="1" LineDescription="Fixed assets and consumer durable goods" TimePeriod="2012" CL_UNIT="USD" UNIT_MULT="9" DataValue="53,571.6" NoteRef="16" /> <Data TableID="16" SeriesCode="k1ttotl1es00" LineNumber="2" LineDescription="Fixed assets" TimePeriod="2012" CL_UNIT="USD" UNIT_MULT="9" DataValue="48,723.6" NoteRef="16" /> <Data TableID="16" SeriesCode="k1ptotl1es00" LineNumber="3" LineDescription="Private" TimePeriod="2012" CL_UNIT="USD" UNIT_MULT="9" DataValue="36,215.6" NoteRef="16" /> <Data TableID="16" SeriesCode="k1ntotl1es00" LineNumber="4" LineDescription="Nonresidential" TimePeriod="2012" CL_UNIT="USD" UNIT_MULT="9" DataValue="19,903.3" NoteRef="16" /> <Data TableID="16" SeriesCode="k1ntotl1eq00" LineNumber="5" LineDescription="Equipment" TimePeriod="2012" CL_UNIT="USD" UNIT_MULT="9" DataValue="5,622.9" NoteRef="16" /> <Data TableID="16" SeriesCode="k1ntotl1st00" LineNumber="6" LineDescription="Structures" TimePeriod="2012" CL_UNIT="USD" UNIT_MULT="9" DataValue="11,944.6" NoteRef="16" /> <Data TableID="16" SeriesCode="k1ntotl1ip00" LineNumber="7" LineDescription="Intellectual property products" TimePeriod="2012" CL_UNIT="USD" UNIT_MULT="9" DataValue="2,335.8" NoteRef="16" /> <Data TableID="16" SeriesCode="k1r53101es00" LineNumber="8" LineDescription="Residential" TimePeriod="2012" CL_UNIT="USD" UNIT_MULT="9" DataValue="16,312.3" NoteRef="16" /> <Data TableID="16" SeriesCode="k1gtotl1es00" LineNumber="9" LineDescription="Government" TimePeriod="2012" CL_UNIT="USD" UNIT_MULT="9" DataValue="12,508.0" NoteRef="16" /> <Data TableID="16" SeriesCode="k1gtotl1esnr" LineNumber="10" LineDescription="Nonresidential" TimePeriod="2012" CL_UNIT="USD" UNIT_MULT="9" DataValue="12,160.1" NoteRef="16" /> <Data TableID="16" SeriesCode="k1gtotl1eq00" LineNumber="11" LineDescription="Equipment" TimePeriod="2012" CL_UNIT="USD" UNIT_MULT="9" DataValue="980.3" NoteRef="16" /> <Data TableID="16" SeriesCode="k1gtotl1stnr" LineNumber="12" LineDescription="Structures" TimePeriod="2012" CL_UNIT="USD" UNIT_MULT="9" DataValue="10,108.6" NoteRef="16" /> <Data TableID="16" SeriesCode="k1gtotl1ip00" LineNumber="13" LineDescription="Intellectual property products" TimePeriod="2012" CL_UNIT="USD" UNIT_MULT="9" DataValue="1,071.2" NoteRef="16" /> <Data TableID="16" SeriesCode="k1gtotl1sa00" LineNumber="14" LineDescription="Residential" TimePeriod="2012" CL_UNIT="USD" UNIT_MULT="9" DataValue="347.9" NoteRef="16" /> <Data TableID="16" SeriesCode="k1ctotl1cd00" LineNumber="15" LineDescription="Consumer durable goods" TimePeriod="2012" CL_UNIT="USD" UNIT_MULT="9" DataValue="4,848.0" NoteRef="16" /> <Data TableID="16" SeriesCode="k1ttotl1es00" LineNumber="16" LineDescription="Private and government fixed assets" TimePeriod="2012" CL_UNIT="USD" UNIT_MULT="9" DataValue="48,723.6" NoteRef="16" /> <Data TableID="16" SeriesCode="k1ytotl1es00" LineNumber="17" LineDescription="Nonresidential" TimePeriod="2012" CL_UNIT="USD" UNIT_MULT="9" DataValue="32,063.4" NoteRef="16" /> <Data TableID="16" SeriesCode="k1ytotl1eq00" LineNumber="18" LineDescription="Equipment" TimePeriod="2012" CL_UNIT="USD" UNIT_MULT="9" DataValue="6,603.2" NoteRef="16" /> <Data TableID="16" SeriesCode="k1ytotl1st00" LineNumber="19" LineDescription="Structures" TimePeriod="2012" CL_UNIT="USD" UNIT_MULT="9" DataValue="22,053.1" NoteRef="16" /> <Data TableID="16" SeriesCode="k1ytotl1ip00" LineNumber="20" LineDescription="Intellectual property products" TimePeriod="2012" CL_UNIT="USD" UNIT_MULT="9" DataValue="3,407.0" NoteRef="16" /> <Data TableID="16" SeriesCode="k1x53101es00" LineNumber="21" LineDescription="Residential" TimePeriod="2012" CL_UNIT="USD" UNIT_MULT="9" DataValue="16,660.2" NoteRef="16" /> <Data TableID="16" SeriesCode="k1gtotl1es00" LineNumber="22" LineDescription="Government fixed assets" TimePeriod="2012" CL_UNIT="USD" UNIT_MULT="9" DataValue="12,508.0" NoteRef="16" /> <Data TableID="16" SeriesCode="k1gfedr1es00" LineNumber="23" LineDescription="Federal" TimePeriod="2012" CL_UNIT="USD" UNIT_MULT="9" DataValue="3,121.6" NoteRef="16" /> <Data TableID="16" SeriesCode="k1gstlc1es00" LineNumber="24" LineDescription="State and local" TimePeriod="2012" CL_UNIT="USD" UNIT_MULT="9" DataValue="9,386.3" NoteRef="16" /> <Notes NoteRef="16" NoteText="Table 1.1. Current-Cost Net Stock of Fixed Assets and Consumer Durable Goods - [Billions of dollars; yearend estimates]" />
All requests for the Fixed Assets dataset will return similar results, including the elements that describe the dimensions, data, and footnotes (Dimensions, Data, and Notes).
Dimensions Elements
The dimensions included in the returned data are:Ordinal | Name | Datatype | IsValue |
---|---|---|---|
1 | TableID | numeric | No |
2 | SeriesCode | string | No |
3 | LineNumber | numeric | No |
4 | LineDescription | No | No |
5 | TimePeriod | string | No |
6 | CL_UNIT | string | No |
7 | UNIT_MULT | numeric | No |
8 | DataValue | numeric | Yes |
NoteRef6 | string | No |
Within the set of “Data” elements returned in the result, each of the dimensions is represented as an attribute (name/value pair). All the dimensions (attributes) have a single value, except the Noteref dimension, which can have multiple values represented as a comma-delimited string. The dimensions (attributes) are defined as follows:
Dimension | Description |
---|---|
TableID | The standard Fixed Assets table ID as submitted in the request (an integer). |
SeriesCode | A string containing the a unique identifier for the line item in the published Fixed Assets table. |
LineNumber | The line number of the data item as shown in published print versions of the published Fixed Assets table. |
LineDescription | The “stub” or description of the statistic in the published Fixed Assets table. |
TimePeriod | A string containing the time period for the data item in the form YYYY for annual data. |
CL_UNIT | A string containing “USD” when the reported statistic is in U.S. dollars, or “PC” when the reported statistic is a percent, index, or contribution. |
UNIT_MULT | An integer representing the base-10 exponent of the multiplier used to interpret the data value. For example "6" refers to millions (DataValue X 106) and "9" refers to billions (DataValue X 109). |
DataValue | An integer or decimal value of the statistic. Always a numeric value, but may contain embedded commas. |
NoteRef | a reference to one of the Notes elements. Noteref in a data element always corresponds to the Noteref in a Notes element. The Noteref attribute may have multiple values represented by a comma-delimited string. This attribute can appear in any data element, or in the Results element. Any Noteref attribute included in the data is guaranteed to have a corresponding Notes element. For the Fixed Assets dataset, every data element includes at least one Noteref that corresponds to a Note element containing the title of the table. Additional footnote references that apply to specific lines may be included in the comma-delimited Noteref string value. |
Appendix E – Direct Investment and Multinational Enterprises (MNEs)
The DataSetName is MNE. This dataset contains two types of statistics:
Direct Investment (DI)
Income and financial transactions in direct investment that underlie the U.S. balance of payments statistics, and direct investment positions that underlie the U.S. international investment positions.
Activities of Multinational Enterprises (AMNE)
Operations and finances of U.S. parent enterprises and their foreign affiliates and U.S. affiliates of foreign MNEs.
API requests for the two types of statistics share most of the same parameters, though the allowable values for each parameter may be different, depending on the type of statistic desired (e.g., DI or AMNE).
Type 1: Direct Investment (DI) Data Request
Statistics newly available to the API are highlighted.
Name | Type | Description | Required | Multiple Values Accepted | “All” value | Default |
---|---|---|---|---|---|---|
DirectionOfInvestment | String | Outward = US direct investment abroad Inward = Foreign investment in the US |
Yes | No | Not accepted | |
SeriesID | Integer | Data Series Identifier | No | Yes | All | All |
Classification | String | Results by country and/or industry | Yes | No | Not accepted | |
Year | String | Time Period | Yes | Yes | All | |
Country | String | Geographic Area Code | No | Yes | All | All |
Industry | String | Industry Code | No | Yes | All | All |
GetFootnotes | String | Yes = Include footnotes No = Exclude footnotes |
No | No | Not accepted | No |
Examples of Direct Investment (DI) Data Requests
U.S. direct investment position in China and Asia for 2011 and 2012
Foreign direct investment position in the U.S. from Germany in the manufacturing industry for 2011 and 2012
Type 2: Activities of Multinational Enterprises (AMNE) Data Request
Statistics newly available to the API are highlighted.
Name | Type | Description | Required | Multiple Values Accepted | “All” value | Default |
---|---|---|---|---|---|---|
DirectionOfInvestment | String | Outward, Inward, State, Parent | Yes | No | Not accepted | |
OwnershipLevel | Binary | 0 = Majority-Owned Affiliates 1 = All Affiliates |
Yes | No | Not accepted | |
NonBankAffiliatesOnly | Binary | 0 = Both Bank and NonBank Affiliates 1 = Nonbank Affiliates |
Yes | No | Not accepted | |
SeriesID | Integer | Data Series Identifier | No | Yes | All | All |
Classification | String | Results by country and/or industry | Yes | No | Not accepted | |
Year | String | Time Period | Yes | Yes | All | |
Country | String | Geographic Area Code | No | Yes | All | All |
Industry | String | Industry Code | No | Yes | All | All |
State | String | Two-digit State FIPS Code | No | No | All | All |
GetFootnotes | String | Yes = Include footnotes No = Exclude footnotes |
No | No | Not accepted | No |
Examples of Activities of Multinational Enterprises (AMNE) Data Requests
Net income and sales for Brazilian affiliates of U.S. parent enterprises, all industries, 2011 and 2012
Total employment in U.S. affiliates of foreign-owned enterprises, all countries, 2011, include footnotes
API Call [GETPARAMETERVALUES] to Obtain a List of Available Values & Descriptions for
Each Parameter
[Details of each are described in the section below.]
Parameter Details
DirectionOfInvestment Parameter – (Required, single value)
DirectionOfInvestment can take on two values for DI statistics and four for AMNE statistics. The two values shared by DI and AMNE statistics are:
- 1. ‘Outward’ – for AMNE statistics, provides data for foreign affiliates; for DI statistics, provides data on transactions and positions between foreign affiliates and their U.S. parent enterprises.
- 2. ‘Inward’ – for AMNE statistics, provides data for U. S. affiliates; for DI statistics, provides data on transactions and positions between U. S. affiliates and their foreign parent groups.
For AMNE statistics only there are two additional options:
- 3. ‘State’ – provides data on U.S. affiliates of foreign multinational enterprises at the state level. Note that only data on employment (and for 2007 and earlier years, property, plant, and equipment) are available at the state level.
- 4. ‘Parent’ – provides data on U.S. parent enterprises.
OwnershipLevel Parameter – (used with AMNE statistics only, required, single value)
- 1. 1 – Returns data for all affiliates
- 2. 0 – Returns data for majority-owned affiliates only
If DirectionOfInvestment = “Parent” then OwnershipLevel must be set to 1.
NonBankAffiliatesOnly Parameter – (used with AMNE statistics only, required, single value)
- 1. 1 – Returns data for nonbank affiliates only
- 2. 0 – Returns data for both bank and nonbank affiliates only
Select NonBankAffiliatesOnly = 0 for data from 2009 – present for ‘outward’ AMNE and from 2007 – present for ‘inward’ AMNE
Select NonBankAffiliatesOnly = 1 for data up to 2008 for ‘outward’ AMNE and up to 2006 for ‘inward’ AMNE
SeriesID Parameter – (optional, default = 0, multiple values allowed)
Refer to the GETPARAMETERVALUES API call above for the list of SeriesID values and their descriptions. Note that not all series are available for all classes of ownership and years.
A value of 0 will return data for all available series given the other parameters. Separate multiple values with a comma.
Classification Parameter – (required, single value)
Year Parameter (required, multiple values allowed)
Use the four-digit year to request data for a specific year. Use ‘all’ to return data for all available years. Separate multiple values with a comma.
Country Parameter – (optional, default = all, multiple values allowed)
Refer to the GETPARAMETERVALUES API call above for the list of three-digit country and region identification values. Use ‘000’ for the total of all countries and ‘all’ for all available countries and regions. Separate multiple values with a comma.
Industry Parameter – (optional, default = all, multiple values allowed)
Refer to the GETPARAMETERVALUES API call above for the list of four-digit industry identification values. These generally follow the North American Industry Classification System (NAICS). Use ‘0000’ for the all- industries total and ‘all’ for all available industries. Separate multiple values with a comma.
State Parameter – (optional, default = all, multiple values allowed)
At the state level data are only available on employment and (for limited years), property, plant, and equipment.
Refer to the GETPARAMETERVALUES API call above for the list of the two-digit Federal Information Processing Standards (FIPS) codes, available at:
https://www.bls.gov/cew/cewedr10.htm.
Use ‘70’ for “Other U.S. Areas”, ‘75’ for “Foreign”, ‘00’ for total U.S., and ‘all’ for all states and areas. Separate multiple values with a comma.
GetFootnotes Parameter – (optional, default=no, single value)
- 1. ‘yes’ – Include footnotes with data returned
- 2. ‘no’ – Do not include footnotes with data returned
Appendix F – Gross Domestic Product by Industry (GDPbyIndustry)
The gross domestic product by industry data are contained within a dataset called GDPbyIndustry. BEA's industry accounts are used extensively by policymakers and businesses to understand industry interactions, productivity trends, and the changing structure of the U.S. economy. The GDP-by-industry dataset includes data in both current and chained (real) dollars. The dataset contains estimates for value added, gross output, intermediate inputs, KLEMS and employment statistics.
Name | Type | Description | Is Required | Multiple Values Accepted | “All” value | Default |
---|---|---|---|---|---|---|
TableID | Integer | The unique GDP by Industry table identifier (ALL for All) | Yes | Yes | ALL | N/A |
Frequency | String | A - Annual, Q-Quarterly | Yes | Yes | A,Q | N/A |
Year | Integer | List of year(s) of data to retrieve (ALL for All) | Yes | Yes | ALL | N/A |
Industry | String | List of industries to retrieve (ALL for All) | Yes | Yes | ALL | N/A |
Examples of GDP by Industry (GDPbyIndustry) Data Requests
Annual Value Added by Industry data for all industries for years 2011 and 2012:
All annual and quarterly data in all tables for the Agriculture industry in 2010.
Parameter Details
TableID Parameter
The TableID parameter is a unique table identifier. This parameter is required to query data and does accept multiple comma separated values. If all tables are required, use the ‘ALL’ keyword. All tables are published annually, but only a subset are published quarterly. The Descr in the GetParameterValues result will contain (A) if the table is published annually and (Q) indicating that the table is also published quarterly.
Frequency Parameter
The Frequency parameter indicates whether annual or quarterly data are to be returned. This parameter is required to query data and does accept multiple comma separated values. All tables are published annually (Frequency = A) but only a subset are published quarterly (Frequency = Q). If a data request is submitted for both annual and quarterly data from a table that is only published annually then only the annual data will be returned.
If a data request is submitted for quarterly data from a table that is only published annually then the user will receive the following error:
<Error APIErrorCode="204" APIErrorDescription="Error retrieving GDP by Industry data."> <ErrorDetail Description="This TableID is not published quarterly: 25" /> </Error>
Year Parameter
The Year parameter indicates what periods of data are requested. This parameter is required to query data and does accept multiple comma separated values. Use the keyword ‘ALL’ to return all periods of data. If requesting quarterly frequency data, all available quarters for a year will be returned. Annual data publications begin in 1997 for most tables and 1998 for percent change and contributions tables. Quarterly data began publication in 2005.
If a data request is submitted for quarterly or annual data before the earliest estimate period the user will receive one of the following errors:
<Error APIErrorCode="204" APIErrorDescription="Error retrieving GDP by Industry data."> <ErrorDetail Description="Quarterly data begin in 2005. Invalid year: 1997" /> </Error>
<Error APIErrorCode="204" APIErrorDescription="Error retrieving GDP by Industry data."> <ErrorDetail Description="Annual data begin in 1997 and quarterly data begins in 2005. Invalid year: 1996" /> </Error>
Industry Parameter
The Industry parameter indicates what periods of data are requested. This parameter is required to query data and does accept multiple comma separated values. Use the keyword ‘ALL’ to return all industries. All industries are published annually, but only a subset are published quarterly. The Descr in the GetParameterValues result will contain (A) if the industry is published annually and (Q) indicating that the industry is also published quarterly.
If a data request is submitted for an industry that is not published in the requested tables the user will receive the following error:
<Error APIErrorCode="204" APIErrorDescription="Error retrieving GDP by Industry data."> <ErrorDetail Description="Invalid industry: 111CA" /> </Error>
General Use
Data will be returned for all data cells that fit the requested criteria. If the request contains parameter values requesting data for which only part of a set is available, only the data matching the criteria will be returned. For example, requesting ALL TableIDs for 1997 will return only annual data because the quarterly publications begin in estimate year 2005. Blanks will not be returned for missing data.
If no data fit the selected criteria the user will receive the following error:
<Error APIErrorCode="204" APIErrorDescription="Error retrieving GDP by Industry data."> <ErrorDetail Description="No data exist for selected criteria" /> </Error>
Appendix G – ITA (International Transactions)
The DataSetName is ITA. This dataset contains data on U.S. international transactions. BEA's international transactions (balance of payments) accounts include all transactions between U.S. and foreign residents. Four parameters are used to retrieve data from the ITA dataset, as follows:
Name | Type | Description | Is Required | Multiple Values Accepted | “All” value | Default |
---|---|---|---|---|---|---|
Indicator | String | The indicator code for the type of transaction requested | No | Yes | All | All |
AreaOrCountry | String | The area or country requested | No | Yes | All | AllCountries |
Frequency | String | A - Annual, QSA - Quarterly seasonally adjusted, QNSA - Quarterly not seasonally adjusted | No | Yes | All | All |
Year | String | Year requested | No | Yes | All | All |
Examples of ITA (International Transactions) Data Requests
Balance on goods with China for 2011 and 2012
Net U.S. acquisition of portfolio investment assets (quarterly not seasonally adjusted) for 2013
Parameter Details
Indicator Parameter – (optional, multiple values allowed)
The Indicator parameter specifies the type of transaction. The Indicator parameter values usually correspond to lines in ITA tables at /iTable/iTableHtml.cfm?reqid=62&step=2&isuri=1&6210=1.
Exactly one Indicator parameter value must be provided in all data requests unless exactly one AreaOrCountry parameter value other than “ALL” and “AllCountries” is requested. That is, multiple Indicators can only be specified if a single AreaOrCountry is specified.
AreaOrCountry Parameter – (optional, multiple values allowed)
The AreaOrCountry parameter specifies the counterparty area or country of the transactions.
The default parameter value (“AllCountries”) returns the total for all countries, while “All” returns all data available by area and country.
Exactly one AreaOrCountry parameter value must be provided in all data requests unless exactly one Indicator parameter value is requested. This single parameter value may not be either “ALL” or “AllCountries.” That is, a list of countries or the grand total for all countries can only be specified if a single Indicator is specified.
For information on geographic area definitions, see
/international/bp_web/geographic_area_definitions.cfm
Frequency Parameter –(optional, multiple values allowed)
- 3. A-Annual
- 4. QSA – Quarterly seasonally adjusted
- 5. QNSA – Quarterly not seasonally adjusted
Year Parameter – (optional, multiple values allowed)
The Year parameter specifies the year of the data requested. When quarterly data are requested, all available quarters for the specified year will be returned.
Name | Ordinal | Datatype | IsValue | Description |
---|---|---|---|---|
Indicator | 1 | String | No | The Indicator parameter value of the data item. |
AreaOrCountry | 2 | String | No | The AreaOrCountry parameter value of the data item. |
Frequency | 3 | String | No | The Frequency parameter value of the data item. |
Year | 4 | String | No | The Year parameter value of the data item. |
TimeSeriesId | 5 | String | No | A unique identifier for the time series of the data item. |
TimeSeriesDescription | 6 | String | No | A description of the transactions measured in the data item. |
TimePeriod | 7 | String | No | A string containing the time period for the data item in the form YYYY for annual data and YYYYQn for quarterly data (where n is the quarter digit) |
CL_UNIT | 8 | String | No | A string indicating the base unit of measurement of the data item. For example, “USD” is used when the reported statistic is in U.S. dollars. |
UNIT_MULT | 9 | String | No | An integer representing the base-10 exponent of the multiplier used to interpret the data value. For example “6” refers to millions (DataValue × 106). |
DataValue | 10 | Numeric | No | An integer or decimal value of the statistic. May be blank. |
A NoteRef attribute is also included in all data elements and acts as a reference to one of the Notes elements in the returned data. The NoteRef attribute may have multiple values represented by a comma-delimited string. Any NoteRef attribute included in the data is guaranteed to have a corresponding Notes element. The NoteRef attribute may be blank.
Appendix H – IIP (International Investment Position)
The DataSetName is IIP. This dataset contains data on the U.S. international investment position. BEA's international investment position accounts include the end of period value of accumulated stocks of U.S. financial assets and liabilities. Four parameters are used to retrieve data from the IIP dataset, as follows:
Name | Type | Description | Required | Multiple Values Accepted | “All” value | Default |
---|---|---|---|---|---|---|
TypeOfInvestment | String | Type of investment | No | Yes | All | All |
Component | String | Component of changes in position | No | Yes | All | All |
Frequency | String | A - Annual, QNSA - Quarterly not seasonally adjusted | No | Yes | All | All |
Year | String | Year requested | No | Yes | All | All |
Examples of IIP (International Investment Position) Data Requests
U.S. assets excluding financial derivatives; change in position attributable to price changes for all available years
U.S. liabilities to foreign official agencies (quarterly not seasonally adjusted) for 2013
Parameter Details
TypeOfInvestment Parameter – (optional, multiple values allowed)
The TypeOfInvestment parameter specifies the type of investment. The TypeOfInvestment parameter values usually correspond to lines in IIP tables at
/iTable/iTableHtml.cfm?reqid=62&step=5&isuri=1&6210=2
Exactly one TypeOfInvestment parameter value must be provided in all data requests unless exactly one Year parameter value other than “ALL” is requested. That is, more than one TypeOfInvestment can only be specified if a single Year is specified.
Component Parameter – (optional, multiple values allowed)
The Component parameter specifies either the position (“Pos”) or a component in the change of position from the previous period. For instance, the parameter value “ChgPosTrans” specifies changes due to financial-account transactions.
Frequency Parameter –(optional, multiple values allowed)
- 1. A-Annual
- 2. QNSA – Quarterly not seasonally adjusted
Year Parameter – (optional, multiple values allowed)
The Year parameter specifies the year of the data requested. When quarterly data are requested, all available quarters for the specified year will be returned.
Exactly one Year parameter value must be provided in all data requests unless exactly one TypeOfInvestment parameter value other than “ALL” is requested. That is, more than one Year can only be specified if a single TypeOfInvestment is specified.
Name | Ordinal | Datatype | IsValue | Description |
---|---|---|---|---|
TypeOfInvestment | 1 | String | No | The TypeOfInvestment parameter value of the data item. |
Component | 2 | String | No | The Component parameter value of the data item. |
Frequency | 3 | String | No | The Frequency parameter value of the data item. |
Year | 4 | String | No | The Year parameter value of the data item. |
TimeSeriesId | 5 | String | No | A unique identifier for the time series of the data item. |
TimeSeriesDescription | 6 | String | No | A description of the transactions measured in the data item. |
TimePeriod | 7 | String | No | A string containing the time period for the data item in the form YYYY for annual data and YYYYQn for quarterly data (where n is the quarter digit) |
CL_UNIT | 8 | String | No | A string indicating the base unit of measurement of the data item. For example, “USD” is used when the reported statistic is in U.S. dollars. |
UNIT_MULT | 9 | String | No | An integer representing the base-10 exponent of the multiplier used to interpret the data value. For example “6” refers to millions (DataValue × 106). |
DataValue | 10 | Numeric | No | An integer or decimal value of the statistic. May be blank. |
Appendix I – RegionalIncome (detailed regional income and employment data sets)
The RegionalIncome dataset contains income and employment estimates from the Regional Economic Accounts by state, county, and metropolitan area. All data accessible through the Regional Interactive Tables on bea.gov are also available through this data set and the RegionalProduct data set.
Name | Type | Description | Required | Multiple Values Accepted | “All” value | Default |
---|---|---|---|---|---|---|
TableName | String | Published table name | Yes | No | ||
LineCode | Integer | Line code in table | Yes | No | ||
GeoFips | String | The state, county or MSA code | Yes | Yes | STATE COUNTY MSA MIC PORT DIV CSA PO code* |
|
Year | String | Year requested | No | Yes | ALL LAST5 LAST10 |
LAST5 |
*GeoFips -- Comma-delimited list of 5-character geographic codes; COUNTY for all counties, STATE for all states, MSA for all MSAs, MIC for all Micropolitan Areas, PORT for all state metropolitan/nonmetropolitan portions, DIV for all Metropolitan Divisions, CSA for all Combined Statistical Areas, state post office abbreviation for all counties in one state (e.g. NY).
Examples of RegionalIncome Requests
Personal income for 2012 and 2013 for all counties, in JSON format
Real per capita personal income for all states, all years, in XML format
Name | Filtered Parameter Names | Parameter Value List | Explanation |
---|---|---|---|
Year | TableName | /api/data/?UserID=Your-36Character-Key&method=GetParameterValuesFiltered&datasetname=RegionalIncome&TargetParameter=Year&TableName=CA5N,CA25N&ResultFormat=xml | List Years for given TableNames |
GeoFips | TableName LineCode |
/api/data/?UserID=Your-36Character-Key&method=GetParameterValuesFiltered&datasetname=RegionalIncome&TargetParameter=GeoFips&TableName=CA4&LineCode=10&ResultFormat=xml | List of GeoFips for a given TableName and LineCode |
TableName | Year GeoFips |
/api/data/?UserID=Your-36Character-Key&method=GetParameterValuesFiltered&datasetname=RegionalIncome&TargetParameter=TableName&GeoFips=00000&Year=2014&ResultFormat=xml | List of TableNames for a given Year and GeoFips |
LineCode | TableName | /api/data/?UserID=Your-36Character-Key&method=GetParameterValuesFiltered&datasetname=RegionalIncome&TargetParameter=LineCode&TableName=SA25N&ResultFormat=json | List of LineCodes for a TableName |
Parameter Details
TableName parameter – (required, single value)
TableName specifies a published table from the regional income accounts. Exactly one TableName must be provided.
TableName | Description | YearSpan | Areas |
---|---|---|---|
CA1 | Personal Income Summary:
Personal Income, Population, Per Capita Personal Income |
1969➞ | All |
CA25 | Total Full-Time and Part-Time Employment by SIC Industry | 1969-2000 | All |
CA25N | Total Full-Time and Part-Time Employment by NAICS Industry | 2001-2014 | All |
CA30 | Economic Profile | 1969➞ | All |
CA35 | Personal Current Transfer Receipts | 1969➞ | All |
CA4 | Personal Income and Employment by Major Component | 1969➞ | All |
CA45 | Farm Income and Expenses | 1969➞ | All |
CA5 | Personal Income by Major Component and Earnings by SIC Industry | 1969-2000 | All |
CA5N | Personal Income by Major Component and Earnings by NAICS Industry | 2001➞ | All |
CA6 | Compensation of Employees by SIC Industry | 1998-2000 | All |
CA6N | Compensation of Employees by NAICS Industry | 2001➞ | All |
CA91 | Gross Flow of Earnings | 1990➞ | Counties |
IRPD1 | Implicit Regional Price Deflator by state | 2008➞ | States |
IRPD2 | Implicit Regional Price Deflator by MSA and state portion | 2008➞ | MSAs, Portions |
RPI1 | Real Personal Income by state | 2008➞ | States, US |
RPI2 | Real Personal Income by MSA and state portion | 2008➞ | MSA, Portions |
RPP1 | Regional Price Parities by state | 2008➞ | States, US |
RPP2 | Regional Price Parities by MSA and state portion | 2008➞ | MSAs, Portions |
SA1 | Personal Income Summary: Personal Income, Population, Per Capita Personal Income | 1929➞ | States, Regions, US |
SA25 | Total Full-Time and Part-Time Employment by SIC Industry | 1969-2001 | States, Regions, US |
SA25N | Total Full-Time and Part-Time Employment by NAICS Industry | 1998➞ | States, Regions, US |
SA27 | Full-Time and Part-Time Wage and Salary Employment by SIC Industry | 1969-2001 | States, Regions, US |
SA27N | Full-Time and Part-Time Wage and Salary Employment by NAICS Industry | 1998➞ | States, Regions, US |
SA30 | Economic Profile | 1958➞ | States, Regions, US |
SA35 | Personal Current Transfer Receipts | 1929➞ | States, Regions, US |
SA4 | Personal Income and Employment by Major Component | 1929➞ | States, Regions, US |
SA40 | Property Income | 1958➞ | States, Regions, US |
SA45 | Farm Income and Expenses | 1969➞ | States, Regions, US |
SA5 | Personal Income by Major Component and Earnings by SIC Industry | 1958-2001 | States, Regions, US |
SA50 | Personal Current Taxes | 1948➞ | States, Regions, US |
SA51 | Disposable Personal Income Summary: Disposable Personal Income, Population, and Per Capita Disposable Personal Income | 1948➞ | States, Regions, US |
SA5H | Personal Income by Major Component and Earnings by Industry (Historical) | 1929-1957 | States, Regions, US |
SA5N | Personal Income by Major Component and Earnings by NAICS Industry | 1998➞ | States, Regions, US |
SA6 | Compensation of Employees by SIC Industry | 1958-2001 | States, Regions, US |
SA6N | Compensation of Employees by NAICS Industry | 1998➞ | States, Regions, US |
SA7 | Wages and Salaries by SIC Industry | 1958-2001 | States, Regions, US |
SA7H | Wages and Salaries by Industry (Historical) | 1929-1957 | States, Regions, US |
SA7N | Wages and Salaries by NAICS Industry | 1998➞ | States, Regions, US |
SQ1 | Personal Income Summary: Personal Income, Population, Per Capita Personal Income | 1948➞ | States, Regions, US |
SQ35 | Personal Current Transfer Receipts | 1948➞ | States, Regions, US |
SQ4 | Personal Income by Major Component | 1948➞ | States, Regions, US |
SQ5 | Personal Income by Major Component and Earnings by SIC Industry | 1958-2001 | States, Regions, US |
SQ5H | Personal Income by Major Component and Earnings by Industry (Historical) | 1948-1957 | States, Regions, US |
SQ5N | Personal Income by Major Component and Earnings by NAICS Industry | 1998➞ | States, Regions, US |
SQ6 | Compensation of Employees by SIC Industry | 1958-2001 | States, Regions, US |
SQ6N | Compensation of Employees by NAICS Industry | 1998➞ | States, Regions, US |
SQ7 | Wages and Salaries by SIC Industry | 1958-2001 | States, Regions, US |
SQ7H | Wages and Salaries by Industry (Historical) | 1948-1957 | States, Regions, US |
SQ7N | Wages and Salaries by NAICS Industry | 1998➞ | States, Regions, US |
ACEmp | Total Employment (Arts and Culture Satellite Account) | 2001➞ | States |
ACComp | Total Compensation (Ats and Culture Satellite Account) | 2001➞ | States |
ACEmpRatio | Arts Employment Ratio | 2001➞ | States |
ACCompRatio | Arts Compensation Ratio | 2001➞ | States |
ACArtsEmp | ACPSA Employment | 2001➞ | States |
ACArtsComp | ACPSA Compensation | 2001➞ | States |
ACEmpLQ | Arts Employment Location Quotient | 2001➞ | States |
ACCompLQ | Arts Compensation Location Quotient | 2001➞ | States |
LineCode parameter – (required, multiple value)
LineCode corresponds to the statistic in a table. The available LineCodes are queried using the GetParameterValuesFiltered method. For example:
https://bea.gov/api/data/?UserID=Your-36Character-Key&method=GetParameterValuesFiltered&datasetname=RegionalIncome&TargetParameter=LineCode&TableName=SA25N&ResultFormat=json
GeoFips parameter – (required, multiple value)
GeoFips specifies geography. It can be all states (STATE), all counties (COUNTY), all Metropolitan Statistical Areas (MSA), all Micropolitan Statistical Areas (MIC), all Metropolitan Divisions (DIV), all Combined Statistical Areas (CSA), or all metropolitan/nonmetropolitan portions (PORT). It can also be a list of ANSI state-county codes or metropolitan area codes. For example, the counties in Connecticut and Delaware–
09001,09003,09005,09007,09009,09011,09013,09015,10001,10003,10005
State, county, and metropolitan statistical area FIPS codes can be obtained from Census at http://www.census.gov/geo/www/ansi/ansi.html. A comprehensive list of MSAs and their component counties can be accessed here /regional/docs/msalist.cfm.
Year Parameter –(optional, multiple values allowed)
Year is either a list of years, LAST5, LAST10, or ALL. Year will default to all available years if the parameter is not specified.
Errors
An invalid TableName or LineCode will result in an error code of 40, “The dataset requested requires parameters that were missing from the request.”
An invalid Year or GeoFips will result in an error code of 101, “No result was returned.” Other errors may occur.
Additional information
Explanation of the estimates, including a schedule of the release of new regional data, can be found in the regional section of our website: /regional/. Definitions of the estimates can be accessed at our glossary of regional definitions, at /regional/definitions/. Regional Product and Income Methodologies can be found at /regional/methods.cfm.
Appendix J – RegionalProduct (detailed state and MSA product data sets)
The RegionalProduct dataset contains Gross Domestic Product (GDP) estimates from the Regional Economic Accounts by state and metropolitan area. All data accessible through the Regional Interactive Tables on bea.gov are also available through this data set and the RegionalIncome data set.
Name | Type | Description | Required | Multiple Values Accepted | “All” value | Default |
---|---|---|---|---|---|---|
Component | String | Component name | Yes | No | ||
IndustryId | Integer | Industry code of the Component | Yes | No | ||
GeoFips | String | The state or MSA code | Yes | Yes | STATE MSA |
|
Year | String | Year requested | No | Yes | ALL LAST5 LAST10 |
LAST5 |
Examples of RegionalProduct Requests
Real GDP for all years for all MSAs, in JSON format
GDP for 2012 and 2013 for selected Southeast states, for the Retail Trade industry, in XML format
Name | Filtered Parameter Names | Parameter Value List | Explanation |
---|---|---|---|
Year | Component | /api/data/?UserID=Your-36Character-Key&method=GetParameterValuesFiltered&datasetname=RegionalProduct&TargetParameter=Year&Component=PCRGDP_SAN&ResultFormat=xml | List Years for given Component |
GeoFips | Component IndustryId |
/api/data/?UserID=Your-36Character-Key&method=GetParameterValuesFiltered&datasetname=RegionalProduct&TargetParameter=GeoFips&Component=GDP_SAN&ResultFormat=xml | List of GeoFips for a given Component |
Component | Year GeoFips |
/api/data/?UserID=Your-36Character-Key&method=GetParameterValuesFiltered&datasetname=RegionalProduct&TargetParameter=Component&GeoFips=00000&Year=2013&ResultFormat=xml | List of TableNames for a given Year and GeoFips |
IndustryId | Component | /api/data/?UserID=Your-36Character-Key&method=GetParameterValuesFiltered&datasetname=RegionalProduct&TargetParameter=IndustryId&Component=GDP_SAS&ResultFormat=xml | List of IndustryIds for a Component |
Parameter Details
Component parameter – (required, single value)
Component specifies a published table from the regional product accounts. Exactly one Component must be provided.
Component | Series | Description | Year Span |
---|---|---|---|
GDP_SQN | State Quarterly NAICS | GDP in current dollars | 2005➞ |
QI_SQN | State Quarterly NAICS | Quantity indexes for real GDP | 2005➞ |
RGDP_SQN | State Quarterly NAICS | Real GDP in chained dollars | 2005➞ |
GDP_MAN | Metro Annual NAICS | GDP in current dollars | 2001➞ |
PCRGDP_MAN | Metro Annual NAICS | Per capita real GDP | 2001➞ |
QI_MAN | Metro Annual NAICS | Quantity indexes for real GDP | 2001➞ |
RGDP_MAN | Metro Annual NAICS | Real GDP in chained dollars | 2001➞ |
COMP_SAN | State Annual NAICS | Compensation of employees | 1997➞ |
GDP_SAN | State Annual NAICS | GDP in current dollars | 1997➞ |
GOS_SAN | State Annual NAICS | Gross operating surplus | 1997➞ |
PCRGDP_SAN | State Annual NAICS | Per capita real GDP | 1997➞ |
QI_SAN | State Annual NAICS | Quantity indexes for real GDP | 1997➞ |
RGDP_SAN | State Annual NAICS | Real GDP in chained dollars | 1997➞ |
SUBS_SAN | State Annual NAICS | Subsidies | 1997➞ |
TOPI_SAN | State Annual NAICS | TOPI | 1997➞ |
TOPILS_SAN | State Annual NAICS | TOPI less subsidies | 1997➞ |
GDP_SAS | State Annual SIC | Gross domestic product (GDP) by state | 1963-1997 |
TOPILS_SAS | State Annual SIC | Taxes on production and imports less subsidies | 1963-1997 |
COMP_SAS | State Annual SIC | Compensation of employees | 1963-1997 |
SUBS_SAS | State Annual SIC | Subsidies | 1963-1997 |
TOPI_SAS | State Annual SIC | Taxes on production and imports | 1963-1997 |
GOS_SAS | State Annual SIC | Gross operating surplus | 1963-1997 |
QI_SAS | State Annual SIC | Quantity indexes for real GDP by state | 1963-1997 |
RGDP_SAS | State Annual SIC | Real GDP by state | 1963-1997 |
PCRGDP_SAS | State Annual SIC | Per capita real GDP by state | 1963-1997 |
PCRGDP_SAS | State Annual SIC | Per capita real GDP by state | 1963-1997 |
PCE_SAN | State Annual | Personal Consumption Expenditures (PCE) by state | 1997➞ |
PCPCE_SAN | State Annual | Per capita Personal Consumption Expenditures (PCE) by state | 1997➞ |
GeoFips parameter – (required, multiple value)
GeoFips specifies geography. It can be all states (STATE) or all Metropolitan Statistical Areas (MSA). It can also be a list of ANSI state-county codes or metropolitan area codes.
State and metropolitan statistical area FIPS codes can be obtained from Census at http://www.census.gov/geo/www/ansi/ansi.html. A comprehensive list of MSAs and their component counties can be accessed here /regional/docs/msalist.cfm.
Year Parameter –(optional, multiple values allowed)
Year is either a list of years, LAST5, LAST10, or ALL. Year will default to all available years if the parameter is not specified.
Errors
An invalid Component or IndustryId will result in an error code of 40, “The dataset requested requires parameters that were missing from the request.”
An invalid Year or GeoFips will result in an error code of 101, “No result was returned.” Other errors may occur. Other errors may occur.
Additional information
Explanation of the estimates, including a schedule of the release of new regional data, can be found in the regional section of our website: /regional/. Definitions of the estimates can be accessed at our glossary of regional definitions, at /regional/definitions/. Regional Product and Income Methodologies can be found at /regional/methods.cfm.
Appendix K – Input-Output Statistics (InputOutput)
The Input-Output Statistics are contained within a dataset called InputOutput. BEA's industry accounts are used extensively by policymakers and businesses to understand industry interactions, productivity trends, and the changing structure of the U.S. economy. The input-output accounts provide a detailed view of the interrelationships between U.S. producers and users. The Input-Output dataset contains Make Tables, Use Tables, and Direct and Total Requirements tables.
Name | Type | Description | Required | Multiple Values Accepted | “All” value | Default |
---|---|---|---|---|---|---|
TableID | Integer | The unique Input Output table identifier | Yes | Yes | N/A | N/A |
Year | Integer | List of year(s) of data to retrieve | Yes | Yes | ALL | N/A |
Examples of InputOutput Data Requests
Data from The Use of Commodities by Industries, Before Redefinitions (Producer’s Prices) sector level table for years 2010, 2011, and 2012:
Data for 2007 from The Make of Commodities by Industries, Before Redefinitions sector and summary level tables:
Parameter Details
TableID Parameter – (Required, multiple values accepted, no default value)
The TableID parameter is a unique table identifier. This parameter is required to query data and does accept multiple comma separated values.
Year Parameter – (Required, multiple values accepted, no default value, ’ALL‘ for all years)
The Year parameter indicates what periods of data are requested. This parameter is required to query data and does accept multiple comma separated values. Use the keyword ‘ALL’ to return all periods of data.
General Use
- Data will be returned for all data cells that fit the requested criteria. If the request contains parameter values requesting data for which only part of a set is available, only the data matching the criteria will be returned. For example, requesting ALL Years Use Tables evaluated in Purchasers Value will return data for only 2007 because these tables are only published in benchmark years. Blanks will not be returned for missing data.
- If no data fit the selected criteria the user will receive the following error:
<Error APIErrorCode="205" APIErrorDescription="Error retrieving Input-Output data."> <ErrorDetail Description="No data exist for selected criteria" /> </Error>
Appendix L – Underlying Gross Domestic Product by Industry (UnderlyingGDPbyIndustry) New
The underlying gross domestic product by industry data are contained within a dataset called UnderlyingGDPbyIndustry. BEA's industry accounts are used extensively by policymakers and businesses to understand industry interactions, productivity trends, and the changing structure of the U.S. economy. The underlying GDP-by-industry dataset includes data in both current and chained (real) dollars. The dataset contains estimates for value added, gross output, and intermediate input statistics. This dataset is structurally similar to the GDPbyIndustry dataset (Appendix F), but contains additional industry detail.
Please Note: Cautionary Note on use of underlying detail tables -- The Bureau of Economic Analysis does not include these detailed estimates in the published tables because their quality is significantly less than that of the higher level aggregates in which they are included.
Name | Type | Description | Required | Multiple Values Accepted | “All” value | Default |
---|---|---|---|---|---|---|
TableID | Integer | The unique GDP by Industry table identifier (ALL for All) | Yes | Yes | ALL | N/A |
Frequency | String | Q-Quarterly | Yes | Yes | Q | N/A |
Year | Integer | List of year(s) of data to retrieve (ALL for All) | Yes | Yes | ALL | N/A |
Industry | String | List of industries to retrieve (ALL for All) | Yes | Yes | ALL | N/A |
Examples of Underlying GDP by Industry (UnderlyingGDPbyIndustry) Data Requests
Quarterly Value Added by Industry data for all industries for years 2012 and 2013:
All quarterly data in all tables for the Agriculture industry in 2012:
Parameter Details
TableID Parameter – (Required, multiple values accepted, no default value,‘ALL’ for all tables)
- The TableID parameter is a unique table identifier. This parameter is required to query data and does accept multiple comma separated values. If all tables are required, use the ‘ALL’ keyword.
- The Descr in the GetParameterValues result will contain a (Q) indicating that the table is published quarterly. No Annual data is available in the underlying GDP by industry dataset.
Frequency Parameter – (Required, multiple values accepted, no default value)
- The Frequency parameter indicates whether annual or quarterly data are to be returned. This parameter is required to query data and does accept multiple comma separated values.
- All tables are published quarterly (Frequency = Q). No Annual data is currently available in the underlying GDP by industry dataset.
- If a data request is submitted for annual data then the user will receive the following error:
<Error APIErrorCode="206" APIErrorDescription="Error retrieving GDP by Industry data."> <ErrorDetail Description="No annual data available in Underlying GDP by Industry:A" /> </Error>
Year Parameter – (Required, multiple values accepted, no default value, ’ALL‘ for all years)
- The Year parameter indicates what periods of data are requested. This parameter is required to query data and does accept multiple comma separated values. Use the keyword ‘ALL’ to return all periods of data.
- All available quarters for a year will be returned.
- Underlying GDP by industry data publications begin in 2012 to present
- If a data request is submitted for quarterly data before the earliest estimate period the user will receive one of the following errors:
<Error APIErrorDescription="Error retrieving GDP by Industry data."
APIErrorCode="206"> <ErrorDetail Description="Invalid year: 2010" /> </Error>
Industry Parameter – (Required, multiple values accepted, no default value, ‘ALL‘ for all industries)
- The Industry parameter indicates what periods of data are requested. This parameter is required to query data and does accept multiple comma separated values. Use the keyword ‘ALL’ to return all industries.
- The Descr in the GetParameterValues result will contain (Q) if the industry is published quarterly and (A) indicating that the industry is also published annually.
- If a data request is submitted for an industry that is not published in the requested tables the user will receive the following error:
<Error APIErrorCode="206" APIErrorDescription="Error retrieving GDP by Industry data."> <ErrorDetail Description="Invalid industry: 11" /> </Error>
General Use
- Data will be returned for all data cells that fit the requested criteria. If the request contains parameter values requesting data for which only part of a set is available, only the data matching the criteria will be returned. For example, requesting 1,101 TableIDs for 2012 will return only table 1 data because the tableID 101 does not exist. Blanks will not be returned for missing data.
- If no data fit the selected criteria the user will receive the following error:
<Error APIErrorCode="206" APIErrorDescription="Error retrieving GDP by Industry data."> <ErrorDetail Description="No data exist for selected criteria" /> </Error>
Appendix M - IntlServTrade (International Services Trade)
The DataSetName is IntlServTrade. This dataset contains annual data on U.S. international trade in services. These data are updated each October to reflect the International Transactions Accounts annual update released in June. BEA's statistics on services supplied through affiliates by multinational enterprises are not included in this dataset. Five parameters are used to retrieve data from the IntlServTrade dataset, as follows:
Name | Type | Description | Required | Multiple Values Accepted | “All” value | Default |
---|---|---|---|---|---|---|
TypeOfService | String | The type of service requested | No | Yes | All | All |
TradeDirection | String | The trade direction requested | No | Yes | All | All |
Affiliation | String | The affiliation requested | No | Yes | All | All |
AreaOrCountry | String | The area or country requested | No | Yes | All | AllCountries |
Year | String | The year requested | No | Yes | All | All |
Examples of IntlServTrade (International Services Trade) Data Requests
Imports of services from Germany for 2014 and 2015
/api/data/?&UserID=Your-36Character-Key&method=GetData&DataSetName=IntlServTrade&TypeOfService=AllServiceTypes&TradeDirection=Imports&Affiliation=AllAffiliations&AreaOrCountry=Germany&Year=2014,2015&ResultFormat=xml
Exports of telecommunications services by U.S. parents to their foreign affiliates for all years
/api/data/?&UserID=Your-36Character-Key&method=GetData&DataSetName=IntlServTrade&TypeOfService=Telecom&TradeDirection=Exports&Affiliation=UsParents&AreaOrCountry=AllCountries&Year=All&ResultFormat=xml
Parameter Details
TypeOfService Parameter (optional, multiple values allowed)
The TypeOfService parameter specifies the type of service being traded (e.g. travel, transport, or insurance services).
Exactly one TypeOfService parameter value other than "All" must be provided in all data requests unless exactly one AreaOrCountry parameter value other than "All" is requested. That is, multiple Indicators can only be specified if a single AreaOrCountry parameter is specified.
TradeDirection Parameter (optional, multiple values allowed)
The TradeDirection parameter specifies the trade direction of the services transactions. There are four valid parameter values other than "All":
- Exports – Exports
- Imports – Imports
- Balance – Balance (exports less imports)
- SupplementalIns – Supplemental detail on insurance transactions
Affiliation Parameter (optional, multiple values allowed)
The Affiliation parameter specifies the trade direction for the services transactions. There are five valid parameter values other than "All":
- AllAffiliations – The total for all trade, whether affiliated or unaffiliated
- Unaffiliated – Unaffiliated trade
- Affiliated – Affiliated trade
- UsParents – U.S. parents' trade with their foreign affiliates
- UsAffiliates – U.S. affiliates' trade with their foreign parent groups
AreaOrCountry Parameter (optional, multiple values allowed)
The AreaOrCountry parameter specifies the counterparty area or country of the services transactions. The default parameter value ("AllCountries") returns the total for all countries, while "All" returns all data available by area and country.
Exactly one AreaOrCountry parameter value must be provided in all data requests unless exactly one TypeOfService parameter value other than "All" is requested. That is, a list of countries can only be specified if a single TypeOfService is specified.
Year Parameter – (optional, multiple values allowed)
The Year parameter specifies the year of the data requested.
Name | Ordinal | Datatype | IsValue | Description |
---|---|---|---|---|
TypeOfService | 1 | String | No | The TypeOfService parameter value of the data item. |
TradeDirection | 2 | String | No | The TradeDirection parameter value of the data item. |
Affiliation | 3 | String | No | The Affiliation parameter value of the data item. |
AreaOrCountry | 4 | String | No | The AreaOrCountry parameter value of the data item. |
Year | 5 | String | No | The Year parameter value of the data item. |
TimeSeriesId | 6 | String | No | A unique identifier for the time series of the data item. |
TimeSeriesDescription | 7 | String | No | A description of the transactions measured in the data item. |
TimePeriod | 8 | String | No | A string containing the time period for the data item in the form YYYY for annual data |
CL_UNIT | 9 | String | No | A string indicating the base unit of measurement of the data item. For example, "USD" is used when the reported statistic is in U.S. dollars. |
UNIT_MULT | 10 | String | No | An integer representing the base-10 exponent of the multiplier used to interpret the data value. For example "6" refers to millions (DataValue × 106). |
DataValue | 11 | Numeric | No | An integer or decimal value of the statistic. May be blank. |
A NoteRef attribute is also included in all data elements and acts as a reference to one of the Notes elements in the returned data. The NoteRef attribute may have multiple values represented by a comma-delimited string. Any NoteRef attribute included in the data is guaranteed to have a corresponding Notes element. The NoteRef attribute may be blank.