Cities API

FREEMIUM
By MundaneMaker | Updated a month ago | Mapping
Popularity

7.2 / 10

Latency

533ms

Service Level

100%

Health Check

100%

README

Cities Data - US Census Bureau Data API

Introduction

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.

Features

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.

Getting Started

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.

Endpoints

1. Get Cities (GET /cities)

Description: Fetches a list of cities with filterable and paginated results.

Parameters:

  • limit : Number of cities to return per page.
  • offset: Offset the list of returned cities.
  • Additional filters like name, countyName, etc.

2. Get City by ID (GET /cities/:cityId)

Description: Retrieves detailed information about a specific city.

Path Variable:

  • cityId: Unique identifier for the city.

3. Get States (GET /states)

Description: Provides a list of US states with abbreviations and names.

4. Get Counties (GET /counties)

Description: Offers detailed county-level data with filtering and pagination.

Parameters:
Similar to the Get Cities endpoint.

Usage Examples

Here are some sample requests to help you get started:

Get Cities Example

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));
Followers: 0
API Creator:
Rapid account: Mundane Maker
MundaneMaker
v-EMXJ_pzPF
Log In to Rate API
Rating: 5 - Votes: 1