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>
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:
- app_name – This is the API Key that should always be passed in the call. Required value is “sbet”
- params – An array of parameters definitions and settings for each parameter required by the stored procedure. Each parameter consists of the following elements:
- name – String. Name of the parameter as defined in the stored procedure
- param_type – String. Allowed value of “IN” (input only)
- value – String or Integer. The value to pass into the stored procedure for the parameter
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 Employees
Regions (No Individual States)
- Northeast - CT,MA,ME,NH,NJ,NY,PA,RI,VT
- East South Central - AL,KY,MS,TN
- South Atlantic - DC,DE,FL,GA,MD,NC,SC,VA,WV
- Great Lakes - IL,IN,MI,OH,WI
- Plaines - IA,KS,MN,MO,ND,NE,SD
- West 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. i.e. expand_employ is a question and indicator
**Only exception is rate_change_2 and cap_ex_total_2 where they use the same question for 2 indicators but different parts**
- "OPT_INDEX" - Small Business Optimism Index
- "un_index" - Uncertainty Index
- "emp_count_change_expect" - Plans to Increase Employment
- "cap_ex_expect" - Plans to Make Capital Outlays
- "inventory_expect" - Plans to Increase Inventories
- "bus_cond_expect" - Expect Economy to Improve
- "sales_expect" - Expect Real Sales Higher
- "inventory_current" - Current Inventory
- "job_opening_unfilled" - Current Job Openings
- "credit_access_expect" - Expected Credit Conditions
- "expand_good" - Now a Good Time to Expand
- "earn_change" - Earnings Trends
- "sales_change" - Actual Sales Changes
- "price_change" - Actual Price Changes
- "price_change_plan" - Price Plans
- "emp_count_change" - Actual Employment Changes
- "emp_comp_change" - Actual Compensation Changes
- "emp_comp_change_expect" - Compensation Plans
- "rate_change" - Relative Interest Rate Paid by Regular Borrowers
- "inventory_change" - Actual Inventory Changes
- "qualified_appl" - Qualified Applicants for Job Openings
- "rate_change_2" - Regular Borrowers
- "credit_access" - Availability of Loans
- "cap_ex_total" - Actual Capital Expenditures
- "top_issue" - Single Most Important Problem
- "expand_good_why" - Most Important Reason for Outlook Expansion
- "earn_change_reason_down" - Most Important Reason for Lower Earnings
- "earn_change_reason_up" - Most Important Reason for Higher Earnings
- "cap_ex_total_2" - Amount of Capital Expenditures Made
