geocoder-united-states-census-bureau
3.5
The Geocoder - United States Census Bureau MCP Server provides geocoding services for addresses within the United States, converting them into geographical coordinates.
The Geocoder - United States Census Bureau MCP Server offers a reliable service for geocoding addresses in the United States, converting them into latitude and longitude coordinates. Utilizing the geocoding engine of the United States Census Bureau, it provides precise location data based on structured address inputs. This service is ideal for users needing to match addresses to geographic locations, whether for integration into larger applications, data analysis, or geographic exploration. The server's robust features ensure accurate geocoding results.
Features
- Geocoding for an Address: Returns latitude and longitude for a specified address.
- Geocoding and Geolookup for an Address: Provides geographical coordinates and performs a geolookup for comprehensive location data.
MCP Tools
- geocoding_for_an_address: Returns a geocode for a specified address.
- geocoding_and_geolookup_for_an_address: Returns a geocode and a geolookup for a specified address.
Usage with Different Platforms
python
python
import requests
url = 'https://geocoding.geo.census.gov/geocoder/locations/onelineaddress'
params = {
'benchmark': 'Public_AR_Current',
'address': '1600 Pennsylvania Ave NW, Washington, DC 20500',
'format': 'json'
}
response = requests.get(url, params=params)
data = response.json()
print(data)
javascript
javascript
const fetch = require('node-fetch');
const url = 'https://geocoding.geo.census.gov/geocoder/locations/onelineaddress';
const params = new URLSearchParams({
benchmark: 'Public_AR_Current',
address: '1600 Pennsylvania Ave NW, Washington, DC 20500',
format: 'json'
});
fetch(`${url}?${params}`)
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));