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.

Click the map to search there.

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.

Distance to the 20 nearest places, by category
Food · 20 within 280 ft
20 within 280 ft
Coffee · 20 within 930 ft
20 within 930 ft
Shopping · 20 within 250 ft
20 within 250 ft
Transit · 20 within 520 ft
20 within 520 ft
Hotels · 20 within 730 ft
20 within 730 ft
Show the data as a table
CategoryNearestDistance20th nearestDistance
FoodAmelia’s Food Cart30 ftCapital One Café280 ft
CoffeeStarbucks100 ftTous Les Jours930 ft
ShoppingSpellbound on The Square10 ft6th & Yamhill250 ft
TransitTrimet Customer Support Center30 ftSouthwest 5th & Taylor520 ft
HotelsThe Nines340 ftKimpton Hotel Vintage Portland730 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.

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 docs
Request
curl "https://api.mapricot.com/v1/autocomplete?q=stumpt&focus=45.52,-122.68&limit=1" \
  -H "Authorization: Bearer $MAPRICOT_KEY"
Response
{  "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.

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.