The Cities Data API provides detailed, up-to-date information from the US Census Bureau, focusing on demographics, geographic, and statistical data across cities, states, and counties in the United States. This API is ideal for developers, analysts, and researchers who need reliable and comprehensive census data for various applications.
City Data: Access detailed information on cities, including demographics, ZIP codes, and geographic statistics.
State Data: Retrieve a list of US states with their abbreviations and names.
County Data: Get extensive county-level data with options for filtering and pagination.
To start using The Cities Data API, you need to first register on RapidAPI and subscribe to our service. Follow these steps to make your first request:
Sign up or log in to your RapidAPI account.
Subscribe to The Cities Data API.
Use the provided API key in your request headers to authenticate.
Description: Fetches a list of cities with filterable and paginated results.
Parameters:
Description: Retrieves detailed information about a specific city.
Path Variable:
Description: Provides a list of US states with abbreviations and names.
Description: Offers detailed county-level data with filtering and pagination.
Parameters:
Similar to the Get Cities endpoint.
Here are some sample requests to help you get started:
fetch("https://[RAPID_API_BASE_URL]/cities?limit=10&offset=0", {
method: "GET",
headers: {
"X-RapidAPI-Key": "YOUR_API_KEY"
}
})
.then(response => response.json())
.then(data => console.log(data))
.catch(err => console.error(err));