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 https://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:

https://api.nfib-sbet.org:443/rest/sbetdb/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"
  }
  ]

 

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

Request Format

POST https://api.nfib-sbet.org:443/rest/sbetdb/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:

Indicator to Question Mapping

  • Small Business Optimism Index: "OPT_INDEX": 'Q14,Q15,Q18B,Q5,Q8,Q7,Q17,Q17A,Q4,Q22'
  • Uncertainty Index: "un_index": 'Q4,Q5,Q8,Q14,Q18B,Q22'
  • Plans to Increase Employment: "expand_employ": 'Q14'
  • Plans to Make Capital Outlays: "plan_capital": 'Q22'
  • Plans to Increase Inventories: "plan_invent": 'Q17A'
  • Expect Economy to Improve: "expected_bus_cond": 'Q5'
  • Expect Real Sales Higher: "expected_real_sales": 'Q8'
  • Current Inventory: "invent": 'Q17'
  • Current Job Openings: "job_openings": 'Q15'
  • Expected Credit Conditions: "expected_cred_cond": 'Q18B'
  • Now a Good Time to Expand: "good_time_expand": 'Q4'
  • Earnings Trends: "past_earn": 'Q7'
  • Actual Sales Changes: "past_sales_higher": 'Q6A'
  • Actual Price Changes: "past_selling_prices": 'Q9'
  • Price Plans: "plan_selling_prices": 'Q10'
  • Actual Employment Changes: "actual_employ": 'Q12'
  • Actual Compensation Changes: "actual_comp": 'Q23'
  • Compensation Plans: "plan_comp": 'Q24'
  • Relative Interest Rate Paid by Regular Borrowers: "int_paid": 'Q18'
  • Actual Inventory Changes: "actual_inv": 'Q16'
  • Qualified Applicants for Job Openings: "applicants": 'Q13'
  • Regular Borrowers: "borrowers": 'Q18'
  • Availability of Loans: "loans_av": 'Q18A'
  • Actual Capital Expenditures: "actual_cap": 'Q21A'
  • Single Most Important Problem: "problem": 'Q3'
  • Most Important Reason for Outlook Expansion: "expansion": 'Q4A'
  • Most Important Reason for Lower Earnings: "lower_earnings": 'FQ7AL'
  • Most Important Reason for Higher Earnings: "higher_earnings": 'FQ7AH'
  • Amount of Capital Expenditures Made: "cap_expense": 'Q21A'
  • For additional stored procedures and input formats, please email swaroop.bhagavatula@NFIB.ORG