API Basics:
• What is an API?
An application programming interface (API) specifies how some software components should interact with each other. Simply put, for DHS it is a set of web service commands that users can include in their programs to access DHS indicator data directly. For example, http://api.dhsprogram.com/rest/dhs/data/20171000,ke?f=html will provide the total fertility rate for each of the DHS surveys in Kenya. Try it in your web browser.

• What can I get from the API?
The DHS Program indicator data are statistics for key population, health, HIV and nutrition indicators. You can get national, subnational or disaggregated data for almost 1500 indicators collected in more than 90 low and middle income countries.

• What can I do with the data from the API?
The API can be used to create various applications to help analyze, visualize, explore and disseminate data on population, health, HIV, and nutrition from more than 90 countries.
For ideas and inspiration, check out our sample applications at http://api.dhsprogram.com/#/sample-apps.html.

• How does the data in the API compare to the data that can be accessed via STATcompiler?
The data returned from the API is exactly the same data that is available from the STATcompiler - in fact the STATcompiler uses the API to get access to the data.

• Do I need a key to access the API?
The DHS Program API provides open access to DHS indicator data for all users. You are free to begin using the API to develop applications to support your activities, however:
* You can register at this link (http://api.dhsprogram.com/#/introdevelop.html) to be an official DHS API partner.
* When you register with The DHS Program as an API user:
-- You will receive an API key, allowing you a larger number of entries per page returned;
-- The DHS Program may be available to assist you in the development of your application and adapt the API to better fit the needs of your project;
-- Your applications may be featured and promoted as good examples of DHS data use, on the API and DHS Program websites and social media channels;
-- Your feedback will influence further API developments, making it a richer tool for all.

The information provided on this Web site is not official U.S. Government information and
does not represent the views or positions of the U.S. Agency for International Development or the U.S. Government.