Developers

NFIB’s SBET platform offers a REST API to allow users to perform queries of available SBET data using selection parameters. Developers can make custom calls to the API and receive the results in JSON format.

Developers can access the following datasets from 1974 to the current month and year:

 

Basic API Call Structure

All results from SBET are returned using stored procedures with parameters in the backend database. Therefore, to call a stored procedure that requires parameters the following URI format should be used:

POST http://open.api.nfib-sbet.org/rest/sbetdb/_proc/<procedure_name>

Please note that a POST should always be used to call an SBET stored procedure and the required parameters should be added in the HTTP Header.

The outgoing request should consist of the following HEADER parameters:

Example

The following call returns monthly values of the Small Business Optimism Index from June 2010 to December 2010.

Sample API Request

Method: POST
Response Content Type: application/json
Parameter Content Type: application/json
URL:

http://open.api.nfib-sbet.org/rest/sbetdb/_proc/getIndicators

Request Body:

{
 "app_name": "sbet",
 "params": [
 { "name": "minYear", "param_type": "IN", "value": 2010 },
 { "name": "minMonth", "param_type": "IN", "value": 6 },
 { "name": "maxYear", "param_type": "IN", "value": 2010 },
 { "name": "maxMonth", "param_type": "IN", "value": 12 },
 { "name": "indicator", "param_type": "IN", "value": "OPT_INDEX" }
 ]
 }
Sample API Response
[
  {
  "monthyear": "2010/12/1",
  "OPT_INDEX": "92.603"
  },
  {
  "monthyear": "2010/11/1",
  "OPT_INDEX": "92.968"
  },
  {
  "monthyear": "2010/10/1",
  "OPT_INDEX": "91.598"
  },
  {
  "monthyear": "2010/9/1",
  "OPT_INDEX": "89.041"
  },
  {
  "monthyear": "2010/8/1",
  "OPT_INDEX": "88.676"
  },
  {
  "monthyear": "2010/7/1",
  "OPT_INDEX": "88.584"
  },
  {
  "monthyear": "2010/6/1",
  "OPT_INDEX": "89.589"
  }
  ]

 

Available SBET Procedures

getIndicators

The getIndicators procedure returns monthly time series of seasonal adjusted values for the Small Business Optimism Index and its components.

Request Format

POST http://open.api.nfib-sbet.org/rest/sbetdb/_proc/getIndicators

This request expects the following HEADER parameters in the following order:

Rules
Response Format

The getIndicators returns the following fields depending on what index component was requested:

Example 1

To request the Current Job Openings Index Component from January 2000 to June 2000:

POST http://open.api.nfib-sbet.org/rest/sbetdb/_proc/getIndicators
{
"app_name": "sbet",
"params": [
{ "name": "minYear", "param_type": "IN", "value": 2000 },
{ "name": "minMonth", "param_type": "IN", "value": 1 },
{ "name": "maxYear", "param_type": "IN", "value": 2000 },
{ "name": "maxMonth", "param_type": "IN", "value": 12 },
{ "name": "indicator", "param_type": "IN", "value": "job_openings" }
]

The response will be the following:

[
  {
    "monthyear": "2000/12/1",
    "job_openings": "32"
  },
  {
    "monthyear": "2000/11/1",
    "job_openings": "36"
  },
  {
    "monthyear": "2000/10/1",
    "job_openings": "32"
  },
  {
    "monthyear": "2000/9/1",
    "job_openings": "33"
  },
  {
    "monthyear": "2000/8/1",
    "job_openings": "34"
  },
  {
    "monthyear": "2000/7/1",
    "job_openings": "33"
  },
  {
    "monthyear": "2000/6/1",
    "job_openings": "34"
  },
  {
    "monthyear": "2000/5/1",
    "job_openings": "34"
  },
  {
    "monthyear": "2000/4/1",
    "job_openings": "32"
  },
  {
    "monthyear": "2000/3/1",
    "job_openings": "33"
  },
  {
    "monthyear": "2000/2/1",
    "job_openings": "31"
  },
  {
    "monthyear": "2000/1/1",
    "job_openings": "31"
  }
]
Example 2

To request all indicators for January 2015:

POST http://open.api.nfib-sbet.org/rest/sbetdb/_proc/getIndicators
{
"app_name": "sbet",
"params": [
{ "name": "minYear", "param_type": "IN", "value": 2015},
{ "name": "minMonth", "param_type": "IN", "value": 1 },
{ "name": "maxYear", "param_type": "IN", "value": 2015},
{ "name": "maxMonth", "param_type": "IN", "value": 1},
{ "name": "indicator", "param_type": "IN", "value": “OPT_INDEX,expand_employ,plan_capital,plan_invent,expected_bus_cond,expected_real_sales,invent,job_openings
,expected_cred_cond,good_time_expand,past_earn” }
]
}

The response will be the following:

[
  {
    "monthyear": "2015/1/1",
    "OPT_INDEX": "97.9",
    "expand_employ": "13",
    "plan_capital": "25",
    "plan_invent": "3",
    "expected_bus_cond": "1",
    "expected_real_sales": "14",
    "invent": "-1",
    "job_openings": "26",
    "expected_cred_cond": "-5",
    "good_time_expand": "13",
    "past_earn": "-17"
  }
]