US Bureau of Economic Analysis GraphQL Documentation
This documentation includes the GraphQL query and subscription specification for access to the US Bureau of Economic Analysis (US BEA) data on our platform.
Terms of Service
API Endpoints
# Production Server for Queries:
https://api.factiq.io/data/fundamentals/us/us_bea/v1/
# Production Server for Subscriptions:
wss://api.factiq.io/data/fundamentals/us/us_bea/v1/ws
Version
1
Queries
national_series
Response
Returns a NationalSeries!
Example
Query
query national_series(
$offset: Int,
$query: String,
$sort: String,
$aggs: String
) {
national_series(
offset: $offset,
query: $query,
sort: $sort,
aggs: $aggs
) {
total {
...TotalFragment
}
took
data {
...ConsolidatedNationalSeriesFragment
}
}
}
Variables
{
"offset": 987,
"query": "xyz789",
"sort": "xyz789",
"aggs": "abc123"
}
Response
{
"data": {
"national_series": {
"total": Total,
"took": 123,
"data": [ConsolidatedNationalSeries]
}
}
}
national_series_data
Response
Returns a NationalSeriesData!
Example
Query
query national_series_data(
$offset: Int,
$query: String,
$sort: String,
$aggs: String
) {
national_series_data(
offset: $offset,
query: $query,
sort: $sort,
aggs: $aggs
) {
total {
...TotalFragment
}
took
data {
...ConsolidatedNationalSeriesDataFragment
}
}
}
Variables
{
"offset": 123,
"query": "xyz789",
"sort": "abc123",
"aggs": "abc123"
}
Response
{
"data": {
"national_series_data": {
"total": Total,
"took": 123,
"data": [ConsolidatedNationalSeriesData]
}
}
}
Subscriptions
national_series
Response
Returns a ConsolidatedNationalSeries!
Arguments
Name | Description |
---|---|
series_code - String
|
Example
Query
subscription national_series($series_code: String) {
national_series(series_code: $series_code) {
series_code
series_label
metric_name
calculation_type
default_scale
table_id_and_line_number
series_code_parents
}
}
Variables
{"series_code": "xyz789"}
Response
{
"data": {
"national_series": {
"series_code": "xyz789",
"series_label": "xyz789",
"metric_name": "xyz789",
"calculation_type": "xyz789",
"default_scale": 987.65,
"table_id_and_line_number": "xyz789",
"series_code_parents": "xyz789"
}
}
}
national_series_data
Response
Returns a ConsolidatedNationalSeriesData!
Arguments
Name | Description |
---|---|
series_code - String
|
Example
Query
subscription national_series_data($series_code: String) {
national_series_data(series_code: $series_code) {
series_code
year
period
value
}
}
Variables
{"series_code": "abc123"}
Response
{
"data": {
"national_series_data": {
"series_code": "xyz789",
"year": 123,
"period": "xyz789",
"value": 987.65
}
}
}
Types
Boolean
Description
The Boolean
scalar type represents true
or false
.
ConsolidatedNationalSeries
Example
{
"series_code": "xyz789",
"series_label": "xyz789",
"metric_name": "abc123",
"calculation_type": "xyz789",
"default_scale": 123.45,
"table_id_and_line_number": "xyz789",
"series_code_parents": "xyz789"
}
ConsolidatedNationalSeriesData
Float
Description
The Float
scalar type represents signed double-precision fractional values as specified by IEEE 754.
Example
123.45
Int
Description
The Int
scalar type represents non-fractional whole numeric values.
Example
987
NationalSeries
Fields
Field Name | Description |
---|---|
total - Total!
|
|
took - Int!
|
|
data - [ConsolidatedNationalSeries!]!
|
Example
{
"total": Total,
"took": 123,
"data": [ConsolidatedNationalSeries]
}
NationalSeriesData
Fields
Field Name | Description |
---|---|
total - Total!
|
|
took - Int!
|
|
data - [ConsolidatedNationalSeriesData!]!
|
Example
{
"total": Total,
"took": 987,
"data": [ConsolidatedNationalSeriesData]
}
String
Description
The String
scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.
Example
"abc123"