Places and address autocomplete API
Suggest places as people type, list what's nearby by category, and keep an ID for any result. These are the 100 places nearest Portland's Pioneer Courthouse Square in five categories.
Try nearby search
Pick a category, then click anywhere on the map, in Portland or anywhere else, to list the nearest places from the live API.
Distance to the 20 nearest places
Each dot is one of the 20 places /v1/nearby returned for a category, placed by its straight-line distanceMeters from Pioneer Courthouse Square. Results come back nearest first, so the last dot is how far you'd look to find 20.
Hover a dot for its name.
Show the data as a table
| Category | Nearest | Distance | 20th nearest | Distance |
|---|---|---|---|---|
| Food | Amelia’s Food Cart | 30 ft | Capital One Café | 280 ft |
| Coffee | Starbucks | 100 ft | Tous Les Jours | 930 ft |
| Shopping | Spellbound on The Square | 10 ft | 6th & Yamhill | 250 ft |
| Transit | Trimet Customer Support Center | 30 ft | Southwest 5th & Taylor | 520 ft |
| Hotels | The Nines | 340 ft | Kimpton Hotel Vintage Portland | 730 ft |
Categories
Pass up to 10 categories to /v1/nearby, at the top level or more specific, such as food:coffee_shop, food:cuisine:italian, or transport:air:airport.
-
accommodation -
education -
entertainment -
finance -
food -
government -
health -
industry -
natural -
nightlife -
professional -
recreation -
religion -
retail -
transport
Endpoints
Autocomplete
/v1/autocomplete suggests places and addresses from a few letters. Pass focus with the user's location and nearby matches come first.
Nearby
/v1/nearby lists places of a category within up to 31 miles, nearest first, each with its distance and categories.
Saved places
Every result has a Mapricot ID. Store it, then fetch the place again any time with /v1/places/{id}.
Request and response
A few letters and a focus point near downtown Portland. Every request costs the same, so there's no session pricing to manage.
Results include a name, address, coordinates, type, categories, and source. They don't include reviews, ratings, photos, opening hours, or contact details.
Places docscurl "https://api.mapricot.com/v1/autocomplete?q=stumpt&focus=45.52,-122.68&limit=1" \
-H "Authorization: Bearer $MAPRICOT_KEY"{ "attribution": [ { "source": "openstreetmap", "text": "© OpenStreetMap contributors", "url": "https://www.openstreetmap.org/copyright" } ], "results": [ { "id": "mp_b3BlbnN0cmVldG1hcDp2ZW51ZTpub2RlLzExOTg2MjI2NjYw", "type": "venue", "name": "Stumptown Coffee Roasters", "label": "Stumptown Coffee Roasters, Portland, OR, USA", "lat": 45.521399, "lon": -122.682775, "address": { "houseNumber": "1140", "street": "SW Washington Street", "postalCode": "97205", "locality": "Portland", "region": "Oregon", "regionCode": "OR", "country": "United States", "countryCode": "US" }, "distanceMeters": 267, "source": "openstreetmap" } ]}Data sources
Businesses and landmarks come from OpenStreetMap and Overture, and addresses and areas from OpenAddresses, Who's On First, and GeoNames. The same business can appear once from each source. Show the credits each response lists.
- OpenStreetMap
- Overture Maps
- OpenAddresses
- Who's On First
- GeoNames
Other APIs
One account and one API key cover every Mapricot API, and the free allowance is shared between them.
Start with 250,000 free requests
Sign in with your email, create an API key, and make your first request in a few minutes. No credit card required.