US Bureau of Labor Statistics GraphQL Documentation

This documentation includes the GraphQL query and subscription specification for access to the US Bureau of Labor Statistics (US BLS) data on our platform.

Terms of Service

https://beamapi.com/terms

API Endpoints
# Production Server for Queries:
https://api.beamapi.com/data/fundamentals/us/us_bls/v1/
# Production Server for Subscriptions:
wss://api.beamapi.com/data/fundamentals/us/us_bls/v1/ws
Version

1

Queries

file

Description

Metadata for a file on the US BLS. Each file referencing data may contain data for several series. For series data, reference the us_bls_series_data endpoint.

Response

Returns [Usblsfile!]!

Arguments
Name Description
offset - Int
filters - FilterUSBLSFile

Example

Query
query file(
  $offset: Int,
  $filters: FilterUSBLSFile
) {
  file(
    offset: $offset,
    filters: $filters
  ) {
    last_modified_datetime
    name
    url
  }
}
Variables
{"offset": 987, "filters": FilterUSBLSFile}
Response
{
  "data": {
    "file": [
      {
        "last_modified_datetime": "2007-12-03T10:15:30Z",
        "name": "abc123",
        "url": "abc123"
      }
    ]
  }
}

file_count

Response

Returns an Int!

Arguments
Name Description
filters - FilterUSBLSFile

Example

Query
query file_count($filters: FilterUSBLSFile) {
  file_count(filters: $filters)
}
Variables
{"filters": FilterUSBLSFile}
Response
{"data": {"file_count": 987}}

series_data

Response

Returns [UsblsseriesData!]!

Arguments
Name Description
offset - Int
filters - FilterUSBLSSeriesData

Example

Query
query series_data(
  $offset: Int,
  $filters: FilterUSBLSSeriesData
) {
  series_data(
    offset: $offset,
    filters: $filters
  ) {
    footnote_codes
    period
    series_id
    value
    year
  }
}
Variables
{"offset": 123, "filters": FilterUSBLSSeriesData}
Response
{
  "data": {
    "series_data": [
      {
        "footnote_codes": "xyz789",
        "period": "xyz789",
        "series_id": "abc123",
        "value": 123.45,
        "year": 123
      }
    ]
  }
}

series_data_count

Response

Returns an Int!

Arguments
Name Description
filters - FilterUSBLSSeriesData

Example

Query
query series_data_count($filters: FilterUSBLSSeriesData) {
  series_data_count(filters: $filters)
}
Variables
{"filters": FilterUSBLSSeriesData}
Response
{"data": {"series_data_count": 123}}

Subscriptions

file

Response

Returns an Usblsfile!

Arguments
Name Description
filters - FilterUSBLSFile

Example

Query
subscription file($filters: FilterUSBLSFile) {
  file(filters: $filters) {
    last_modified_datetime
    name
    url
  }
}
Variables
{"filters": FilterUSBLSFile}
Response
{
  "data": {
    "file": {
      "last_modified_datetime": "2007-12-03T10:15:30Z",
      "name": "xyz789",
      "url": "xyz789"
    }
  }
}

series_data

Response

Returns an UsblsseriesData!

Arguments
Name Description
filters - FilterUSBLSSeriesData

Example

Query
subscription series_data($filters: FilterUSBLSSeriesData) {
  series_data(filters: $filters) {
    footnote_codes
    period
    series_id
    value
    year
  }
}
Variables
{"filters": FilterUSBLSSeriesData}
Response
{
  "data": {
    "series_data": {
      "footnote_codes": "abc123",
      "period": "xyz789",
      "series_id": "abc123",
      "value": 123.45,
      "year": 987
    }
  }
}

Types

Boolean

Description

The Boolean scalar type represents true or false.

DateTime

Description

Implement the DateTime scalar

The input/output is a string in RFC3339 format.

Example
"2007-12-03T10:15:30Z"

DateTimeHighEnd

Fields
Input Field Description
le - DateTime
lt - DateTime
Example
{
  "le": "2007-12-03T10:15:30Z",
  "lt": "2007-12-03T10:15:30Z"
}

DateTimeLowEnd

Fields
Input Field Description
ge - DateTime
gt - DateTime
Example
{
  "ge": "2007-12-03T10:15:30Z",
  "gt": "2007-12-03T10:15:30Z"
}

DateTimeRange

Fields
Input Field Description
lowEnd - DateTimeLowEnd
highEnd - DateTimeHighEnd
Example
{
  "lowEnd": DateTimeLowEnd,
  "highEnd": DateTimeHighEnd
}

F64HighEnd

Fields
Input Field Description
le - Float
lt - Float
Example
{"le": 123.45, "lt": 123.45}

F64LowEnd

Fields
Input Field Description
ge - Float
gt - Float
Example
{"ge": 987.65, "gt": 987.65}

F64Range

Fields
Input Field Description
lowEnd - F64LowEnd
highEnd - F64HighEnd
Example
{
  "lowEnd": F64LowEnd,
  "highEnd": F64HighEnd
}

FilterUSBLSFile

Fields
Input Field Description
last_modified_datetime - FilterableDateTime
name - String
url - String
Example
{
  "last_modified_datetime": FilterableDateTime,
  "name": "xyz789",
  "url": "xyz789"
}

FilterUSBLSSeriesData

Fields
Input Field Description
footnote_codes - String
period - String
series_id - String
value - FilterableF64
year - FilterableI32
Example
{
  "footnote_codes": "abc123",
  "period": "abc123",
  "series_id": "xyz789",
  "value": FilterableF64,
  "year": FilterableI32
}

FilterableDateTime

Fields
Input Field Description
equal - DateTime
range - DateTimeRange
Example
{
  "equal": "2007-12-03T10:15:30Z",
  "range": DateTimeRange
}

FilterableF64

Fields
Input Field Description
equal - Float
range - F64Range
Example
{"equal": 123.45, "range": F64Range}

FilterableI32

Fields
Input Field Description
equal - Int
range - I32Range
Example
{"equal": 987, "range": I32Range}

Float

Description

The Float scalar type represents signed double-precision fractional values as specified by IEEE 754.

Example
987.65

I32HighEnd

Fields
Input Field Description
le - Int
lt - Int
Example
{"le": 123, "lt": 123}

I32LowEnd

Fields
Input Field Description
ge - Int
gt - Int
Example
{"ge": 123, "gt": 987}

I32Range

Fields
Input Field Description
lowEnd - I32LowEnd
highEnd - I32HighEnd
Example
{
  "lowEnd": I32LowEnd,
  "highEnd": I32HighEnd
}

Int

Description

The Int scalar type represents non-fractional whole numeric values.

Example
123

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
"xyz789"

Usblsfile

Fields
Field Name Description
last_modified_datetime - DateTime
name - String
url - String
Example
{
  "last_modified_datetime": "2007-12-03T10:15:30Z",
  "name": "xyz789",
  "url": "xyz789"
}

UsblsseriesData

Fields
Field Name Description
footnote_codes - String
period - String
series_id - String
value - Float
year - Int
Example
{
  "footnote_codes": "abc123",
  "period": "abc123",
  "series_id": "xyz789",
  "value": 987.65,
  "year": 123
}