{"states":["West Virginia","Kentucky","Louisiana","Tennessee","Arkansas","Mississippi","Indiana","Ohio","Alaska","Alabama","Missouri","Oklahoma","Michigan","South Dakota","South Carolina","Pennsylvania","Wyoming","North Dakota","Nevada","Georgia","New Mexico","Kansas","Maine","Montana","North Carolina","Iowa","Delaware","Virginia","Florida","Oregon","Wisconsin","Vermont","New Hampshire","Texas","Arizona","Illinois","Nebraska","Rhode Island","Colorado","Minnesota","District of Columbia","Idaho","New York","Maryland","Massachusetts","New Jersey","Washington","Hawaii","Connecticut","California","Utah"]}
curl --location --request POST 'https://zylalabs.com/api/6665/us+smoking+stats+api+/9817/get+all+usa+states' --header 'Authorization: Bearer YOUR_API_KEY' --header 'Content-Type: application/json' --data-raw '{}'
{"state":"California","smoking_rate":"11.3%","current_smokers":"3,203,562"}
curl --location --request POST 'https://zylalabs.com/api/6665/us+smoking+stats+api+/9818/get+smoking+percentage+by+state' --header 'Authorization: Bearer YOUR_API_KEY' --header 'Content-Type: application/json' --data-raw '{"state":"Required"}'
{"state":"California","percentage_tried_to_quit":"58.9%","tried_to_quit":"1,870,042"}
curl --location --request POST 'https://zylalabs.com/api/6665/us+smoking+stats+api+/9819/get+percentage+tried+to+quit+by+state' --header 'Authorization: Bearer YOUR_API_KEY' --header 'Content-Type: application/json' --data-raw '{"state":"Required"}'
{"state":"California","never_smoked":18762085}
curl --location --request POST 'https://zylalabs.com/api/6665/us+smoking+stats+api+/9820/get+never+smoked+by+state' --header 'Authorization: Bearer YOUR_API_KEY' --header 'Content-Type: application/json' --data-raw '{"state":"Required"}'
After signing up, every developer is assigned a personal API access key, a unique combination of letters and digits provided to access to our API endpoint. To authenticate with the US Smoking Stats API simply include your bearer token in the Authorization header.
| Header | Description |
|---|---|
Authorization
|
Required
Should be Bearer access_key. See "Your API Access Key" above when you are subscribed.
|
No long-term commitment. Upgrade, downgrade, or cancel anytime. Free Trial includes up to 50 requests.
(Save 2 months with annual billing 🎉)
The US Smoking Stats API provides comprehensive demographic data and statistics related to smoking rates across all 50 U.S. states, including various socio-economic indicators.
You can access specific smoking rate statistics for a particular state by using the API's endpoints that represent each major column in the dataset, along with query parameters that allow you to filter by state.
Yes, the data is sourced from authoritative organizations, specifically the World Population Review, ensuring that the statistics provided are reliable and accurate.
The API can be used in various fields such as public health, policy analysis, research, and education, making data accessible and reusable for different applications.
Yes, the API supports modular access with query parameters that allow for targeted filtering based on state or value ranges, enabling users to retrieve specific data without over-fetching.
Each endpoint returns specific smoking-related statistics for U.S. states. For example, the "get smoking percentage by state" endpoint returns the smoking rate and number of current smokers, while the "get never smoked by state" endpoint provides the total number of individuals who have never smoked.
Key fields in the response data include "state," "smoking_rate," "current_smokers," "percentage_tried_to_quit," "tried_to_quit," and "never_smoked." These fields provide essential insights into smoking behaviors and demographics for each state.
The response data is structured in JSON format, with each endpoint returning an object containing relevant fields. For instance, the response for smoking rates includes the state name and corresponding statistics, making it easy to parse and utilize in applications.
Each endpoint provides distinct information: the "get all usa states" endpoint lists states, while the "get smoking percentage by state" endpoint details smoking rates. Other endpoints reveal data on attempts to quit smoking and the number of individuals who have never smoked.
Each endpoint requires a state parameter to specify which state's data to retrieve. Users can obtain the list of states from the "get all usa states" endpoint and then use that information to query smoking statistics for specific states.
Users can analyze the returned data to identify trends in smoking rates, assess public health needs, or inform policy decisions. For example, comparing smoking rates across states can highlight areas needing targeted interventions.
The data is sourced from the World Population Review, a reputable organization known for compiling demographic and health statistics. This ensures that the information provided through the API is reliable and credible.
Typical use cases include public health research, policy formulation, educational projects, and health awareness campaigns. Researchers and policymakers can leverage the data to understand smoking trends and develop effective strategies for smoking cessation.
To obtain your API key, first sign in to your account and navigate to the API you want to use. From the API's Pricing section, choose a plan and complete the subscription process. Once subscribed, return to the API page and you will see your API Access Key displayed at the top of the documentation page. You can use this key to authenticate your requests.
You can’t switch APIs during the free trial. If you subscribe to a different API, your trial will end and the new subscription will start as a paid plan.
The free trial lasts for 7 days and allows you to make up to 50 API requests.
No, the free trial is available only once, so we recommend using it on the API that interests you the most. Most of our APIs offer a free trial, but some may not include this option.
Yes. If the API offers a free trial, you will see a "Free 7-Day Trial" option in its Pricing section. The trial lasts for 7 days and allows up to 50 API requests, enabling you to evaluate the API before subscribing to a paid plan.
Zyla API Hub is like a big store for APIs, where you can find thousands of them all in one place. We also offer dedicated support and real-time monitoring of all APIs. Once you sign up, you can pick and choose which APIs you want to use. Just remember, each API needs its own subscription. But if you subscribe to multiple ones, you'll use the same key for all of them, making things easier for you.
You can monitor your API usage through the response headers included with every request:
x-zyla-api-calls-monthly-used: Shows the total number of API requests you have used during the current billing period.
x-zyla-api-calls-monthly-remaining: Shows the number of API requests you have remaining for the current billing period.
Yes, you can cancel your subscription at any time. Simply go to the Pricing section of the API you're subscribed to and click the "Unsubscribe" button.
Please note that upgrades, downgrades, and cancellations take effect immediately. Once your subscription is canceled, access to the service will end immediately, regardless of any remaining API calls in your quota.
Please have a look at our Refund Policy: https://zylalabs.com/terms#refund