The US Presidents Data API provides structured access to information about the Presidents of the United States. It allows users to retrieve a list of presidents' names and detailed information about each president through individual endpoints, ensuring efficient and focused data retrieval.
{"presidents":[{"name":"George Washington"},{"name":"John Adams"},{"name":"Thomas Jefferson"},{"name":"James Madison"},{"name":"James Monroe"},{"name":"John Quincy Adams"},{"name":"Andrew Jackson"},{"name":"Martin Van Buren"},{"name":"William Henry Harrison"},{"name":"John Tyler"},{"name":"James K. Polk"},{"name":"Zachary Taylor"},{"name":"Millard Fillmore"},{"name":"Franklin Pierce"},{"name":"James Buchanan"},{"name":"Abraham Lincoln"},{"name":"Andrew Johnson"},{"name":"Ulysses S. Grant"},{"name":"Rutherford B. Hayes"},{"name":"James A. Garfield"},{"name":"Chester A. Arthur"},{"name":"Grover Cleveland"},{"name":"Benjamin Harrison"},{"name":"William McKinley"},{"name":"Theodore Roosevelt"},{"name":"William Howard Taft"},{"name":"Woodrow Wilson"},{"name":"Warren G. Harding"},{"name":"Calvin Coolidge"},{"name":"Herbert Hoover"},{"name":"Franklin D. Roosevelt"},{"name":"Harry S. Truman"},{"name":"Dwight D. Eisenhower"},{"name":"John F. Kennedy"},{"name":"Lyndon B. Johnson"},{"name":"Richard Nixon"},{"name":"Gerald Ford"},{"name":"Jimmy Carter"},{"name":"Ronald Reagan"},{"name":"George H. W. Bush"},{"name":"Bill Clinton"},{"name":"George W. Bush"},{"name":"Barack Obama"},{"name":"Donald Trump"},{"name":"Joe Biden"},{"name":"Donald Trump"}]}
curl --location --request POST 'https://zylalabs.com/api/6172/us+presidents+data+api/8556/get+us+presidents' --header 'Authorization: Bearer YOUR_API_KEY' --header 'Content-Type: application/json' --data-raw '{}'
{"name":"John F. Kennedy","birth":"29 de mayo de 1917","death":"22 de noviembre de 1963","birthplace":"Massachusetts"}
curl --location --request POST 'https://zylalabs.com/api/6172/us+presidents+data+api/8557/get+presidents+info' --header 'Authorization: Bearer YOUR_API_KEY' --header 'Content-Type: application/json' --data-raw '{"president":"Required"}'
{"president":"Abraham Lincoln","party":"Republican","term":"March 4, 1861 \u2013 April 15, 1865","election":"1860"}
curl --location --request POST 'https://zylalabs.com/api/6172/us+presidents+data+api/8558/get+election+data' --header 'Authorization: Bearer YOUR_API_KEY' --header 'Content-Type: application/json' --data-raw '{"president":"Required"}'
{"president_name":"Abraham Lincoln","vice_presidents":[{"name":"Hannibal Hamlin","term_dates":"1861\u20131865"},{"name":"Andrew Johnson","term_dates":"1865"}]}
curl --location --request POST 'https://zylalabs.com/api/6172/us+presidents+data+api/8559/get+vice+presidents+of+specific+president' --header 'Authorization: Bearer YOUR_API_KEY' --header 'Content-Type: application/json' --data-raw '{"president":"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 Presidents Data 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 Presidents Data API allows you to retrieve structured information about U.S. Presidents, including their names, term dates, political party affiliations, vice presidents, and other specific details.
The API provides individual endpoints for specific details about each president, allowing users to request only the necessary information rather than receiving all data in a single response. This segmented approach optimizes response times and data usage.
Yes, the US Presidents Data API allows users to filter data by president names or specific criteria, enabling focused data retrieval tailored to your research or analysis needs.
Yes, the US Presidents Data API is designed to offer access to historical data about U.S. Presidents based on publicly available information.
The API can be used for various purposes, including academic research, historical analysis, educational projects, and applications that require detailed information about U.S. Presidents.
Each endpoint returns specific data about U.S. Presidents. The "get US presidents" endpoint provides a list of names, while "get presidents info" returns detailed biographical data. The "get election data" endpoint offers political party affiliation and term details, and "get vice presidents" lists vice presidents along with their term dates.
Key fields include "name," "birth," "death," "birthplace," "party," "term," "election," and "vice_presidents." Each endpoint's response is structured to provide relevant information based on the queried data.
The response data is organized in JSON format, with each endpoint returning a structured object. For example, the "get presidents info" endpoint returns an object with fields like "name," "birth," and "birthplace," making it easy to parse and utilize.
Users can specify a U.S. president's name as a parameter for the "get presidents info," "get election data," and "get vice presidents" endpoints. This allows for targeted queries to retrieve specific information about individual presidents.
The "get US presidents" endpoint provides a list of all presidents. The "get presidents info" endpoint offers biographical details, while "get election data" includes political party and election dates. The "get vice presidents" endpoint details vice presidents associated with a specific president.
Users can customize requests by selecting specific endpoints and providing the name of a president as a parameter. This allows for tailored responses that focus on the desired information, such as election data or vice presidential details.
The US Presidents Data API relies on publicly available historical data, ensuring that the information is sourced from reputable historical records. Regular updates and checks help maintain the accuracy and reliability of the data provided.
Typical use cases include academic research, historical analysis, educational projects, and applications that require detailed information about U.S. Presidents, such as creating timelines or comparative studies of presidential terms and policies.
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