Overview
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:
- Small Business Optimism Index values
- Index Components values
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:443/rest/sbetdb/_proc/<procedure_name>
Header Parameters
app_name– API Key. Required value is"sbet".params– Array of parameter definitions for the stored procedure.name– String. Parameter name as defined in the stored procedure.param_type– String. Allowed value:"IN".value– String or Integer.
Sample API Request and Input Formats
GetIndicators
Getting Indicators without groupings by Industry, Employee size, etc.
https://api.nfib-sbet.org:443/rest/sbetdb/_proc/getIndicators
Request Body:
{"app_name": "sbet", "params": [
{ "name": "minYear", "param_type": "IN", "value": minYear },
{ "name": "minMonth", "param_type": "IN", "value": minMonth },
{ "name": "maxYear", "param_type": "IN", "value": maxYear },
{ "name": "maxMonth", "param_type": "IN", "value": maxMonth },
{ "name": "indicator", "param_type": "IN", "value": indicator }
]}
GetTotals2 and GetQtrMonthTrends2
Same input structure. GetTotals2 is used for pulling Indicator data. GetQtrMonthTrends2 is for Microdata questions.
https://api.nfib-sbet.org:443/rest/sbetdb/_proc/getTotals2
https://api.nfib-sbet.org:443/rest/sbetdb/_proc/getQtrMonthTrends2
Request Body:
{"app_name": "sbet", "params": [
{ "name": "minYear", "param_type": "IN", "value": minYear },
{ "name": "minMonth", "param_type": "IN", "value": minMonth },
{ "name": "maxYear", "param_type": "IN", "value": maxYear },
{ "name": "maxMonth", "param_type": "IN", "value": maxMonth },
{ "name": "questions", "param_type": "IN", "value": questions },
{ "name": "industry", "param_type": "IN", "value": industry },
{ "name": "employee", "param_type": "IN", "value": employee },
{ "name": "statev", "param_type": "IN", "value": statev }
]}
Input Formats
Multiple values are allowed using a comma: NO SPACES.
minMonth and maxMonth are always 1 and 12 respectively. Only adjust the year.
Industry
| 0 | No Reply or Invalid |
| 1 | Construction |
| 2 | Manufacturing |
| 3 | Transportation |
| 4 | Wholesale |
| 5 | Retail |
| 6 | Agriculture |
| 7 | Finance |
| 8 | Services |
| 9 | Professions |
| 10 | Other |
Employee
| 1 | No Employees |
| 2,3 | 1–4 Employees |
| 4 | 5–8 Employees |
| 5,6 | 9–18 Employees |
| 7 | 19–38 Employees |
| 8 | 39 or more |
Regions
| Northeast | CT,MA,ME,NH,NJ,NY,PA,RI,VT |
| E. South Central | AL,KY,MS,TN |
| South Atlantic | DC,DE,FL,GA,MD,NC,SC,VA,WV |
| Great Lakes | IL,IN,MI,OH,WI |
| Plains | IA,KS,MN,MO,ND,NE,SD |
| W. South Central | AR,LA,OK,TX |
| Mountains | AZ,CO,ID,MT,NM,NV,UT,WY |
| Pacific | AK,CA,HI,OR,WA |
Questions / Indicators
Questions and Indicators use the same variables. For example, expand_employ is a question and indicator.
Only exception: rate_change_2 and cap_ex_total_2 use the same question for two indicators but different parts.
For additional stored procedures and input formats, please email swaroop.bhagavatula@NFIB.ORG