Store Search
In this guide, we'll demonstrate searching for stores, both those that are existent and non-existent within MealMe.
Store Search
MealMe currently supports ordering from over 1M+ restaurants, grocery stores, electronic stores, etc. in the US and Canada. The only required query parameters are latitude
and longitude
. All other query parameters can be used to further narrow your search request. In the sections below, we'll demonstrate searching for only restaurants, searching for only grocery stores, and performing a browse search request.
Restaurant
Here's an example Store Search API request that demonstrates searching for McDonald's
store locations near the address 188 King Street, San Francisco, US 94107
. Note that this store is a restaurant, so we'll set the input query parameter store_type
to restaurant
. We'll also search specifically for stores that offer delivery by setting the input query parameter pickup
to false
.
Example Request
curl --request GET \
--url 'https://api.mealme.ai/search/store/v3?query=mcdonald&latitude=37.7786357&longitude=-122.3918135&store_type=restaurant&user_street_num=188&user_street_name=King%2520Street&user_city=San%2520Francisco&user_state=CA&user_zipcode=94107&user_country=US&pickup=false&sort=relevance&open=true&maximum_miles=3&search_focus=store&autocomplete=false' \
--header 'Id-Token: <API KEY>' \
--header 'accept: application/json'
{
"stores": [
{
"_id": "3aee32bf-581a-47ea-a810-8c0ed90073c0",
"name": "Mcdonald's®",
"phone_number": 14153621082,
"address": {
"street_addr": "441 Sutter St",
"city": "San Francisco",
"state": "CA",
"zipcode": "94108",
"country": "US",
"street_addr_2": "",
"latitude": 37.789059,
"longitude": -122.407637
},
"type": "restaurant",
"description": "",
"local_hours": {
"operational": {
"Monday": "06:00AM - 11:30PM",
"Tuesday": "06:00AM - 11:30PM",
"Wednesday": "06:00AM - 11:30PM",
"Thursday": "06:00AM - 11:30PM",
"Friday": "06:00AM - 10:15PM",
"Saturday": "06:00AM - 10:15PM",
"Sunday": "06:00AM - 10:15PM"
},
"delivery": {
"Monday": "06:00AM - 11:30PM",
"Tuesday": "06:00AM - 11:30PM",
"Wednesday": "06:00AM - 11:30PM",
"Thursday": "06:00AM - 11:30PM",
"Friday": "06:00AM - 10:15PM",
"Saturday": "06:00AM - 10:15PM",
"Sunday": "06:00AM - 10:15PM"
},
"pickup": {
"Monday": "Closed",
"Tuesday": "Closed",
"Wednesday": "Closed",
"Thursday": "Closed",
"Friday": "Closed",
"Saturday": "Closed",
"Sunday": "Closed"
},
"dine_in": {
"Monday": "06:00AM - 11:30PM",
"Tuesday": "06:00AM - 11:30PM",
"Wednesday": "06:00AM - 11:30PM",
"Thursday": "06:00AM - 11:30PM",
"Friday": "06:00AM - 10:15PM",
"Saturday": "06:00AM - 10:15PM",
"Sunday": "06:00AM - 10:15PM"
}
},
"cuisines": [
"American",
"Burgers",
"Fast Food",
"Group Friendly"
],
"food_photos": [
"https://cdn-img.mealme.ai/7c7db4891a70d7dff577da5af8afa690f089d645/68747470733a2f2f636e2d67656f312e756265722e636f6d2f696d6167652d70726f632f726573697a652f656174732f666f726d61743d776562702f77696474683d3234302f6865696768743d3139322f7175616c6974793d37302f7372636236343d6148523063484d364c79396b4d584a6862484e765a323571626d637a4e79356a624739315a475a79623235304c6d356c6443387a597a51774d6d5a6d4e4330304d57466b4c5452684e7a55744f5467324f53316c4d4749354e444d334e47457a4f546775616e426c5a773d3d"
],
"logo_photos": [
"https://cdn-img.mealme.ai/cad54177dcd2edde250e0d80ff28fa4e76ec46b2/68747470733a2f2f74622d7374617469632e756265722e636f6d2f70726f642f696d6167652d70726f632f70726f6365737365645f696d616765732f64353336396531353936666266326238393537333161666536616564396564642f38323038383361343835363736373061636264373230626337363339313239312e6a706567"
],
"store_photos": [],
"dollar_signs": 1,
"pickup_enabled": false,
"delivery_enabled": true,
"is_open": true,
"offers_first_party_delivery": false,
"offers_third_party_delivery": true,
"miles": 1.1251933570428825,
"weighted_rating_value": 4.7,
"aggregated_rating_count": 400,
"supports_upc_codes": false
},
.
.
.
],
"next_page": 1
}
- When the input query parameter
query
is non-empty, each page of will have at most 20 stores. To get the next page of 20 stores, set the query parameterpage
in your next request to the value of thenext_page
property found in the response.- Note that
pickup_enabled
is false anddelivery_enabled
is true for the store in the response above, since we set the input query parameterpickup
tofalse
.
Visual Response
Grocery Store
Here's an example Store Search API request that demonstrates searching for Safeway
store locations near the address 188 King Street, San Francisco, US 94107
. Note that this store is a grocery store, so we'll set the input query parameter store_type
to grocery
. We'll also search specifically for stores that offer delivery by setting the input query parameter pickup
to false
.
Example Request & Response
curl --request GET \
--url 'https://api.mealme.ai/search/store/v3?query=safeway&latitude=37.7786357&longitude=-122.3918135&store_type=grocery&user_street_num=188&user_street_name=King%20Street&user_city=San%20Francisco&user_state=CA&user_zipcode=94107&user_country=US&pickup=false&sort=relevance&open=true&maximum_miles=3&search_focus=store&autocomplete=false' \
--header 'Id-Token: <API KEY>' \
--header 'accept: application/json'
{
"stores": [
{
"_id": "3c7fdf9f-9547-4fb8-bac0-8ec670c67622",
"name": "Safeway",
"phone_number": 14156331001,
"address": {
"street_addr": "298 King St",
"city": "San Francisco",
"state": "CA",
"zipcode": "94107",
"country": "US",
"street_addr_2": "",
"latitude": 37.7767382,
"longitude": -122.3942265
},
"type": "grocery",
"description": "Get what you love from Safeway - delivered to you.",
"local_hours": {
"operational": {
"Monday": "Open 24 hours",
"Tuesday": "Open 24 hours",
"Wednesday": "Open 24 hours",
"Thursday": "Open 24 hours",
"Friday": "Open 24 hours",
"Saturday": "Open 24 hours",
"Sunday": "Open 24 hours"
},
"delivery": {
"Monday": "Open 24 hours",
"Tuesday": "Open 24 hours",
"Wednesday": "Open 24 hours",
"Thursday": "Open 24 hours",
"Friday": "Open 24 hours",
"Saturday": "Open 24 hours",
"Sunday": "Open 24 hours"
},
"pickup": {
"Monday": "Closed",
"Tuesday": "Closed",
"Wednesday": "Closed",
"Thursday": "Closed",
"Friday": "Closed",
"Saturday": "Closed",
"Sunday": "Closed"
},
"dine_in": {
"Monday": "09:00AM - 10:00PM",
"Tuesday": "09:00AM - 10:00PM",
"Wednesday": "09:00AM - 10:00PM",
"Thursday": "09:00AM - 10:00PM",
"Friday": "09:00AM - 10:00PM",
"Saturday": "09:00AM - 10:00PM",
"Sunday": "09:00AM - 10:00PM"
}
},
"cuisines": [
"Adult Care",
"Air Fresheners & Candles",
"Alcohol",
.
.
.
],
"food_photos": [
"https://d2lnr5mha7bycj.cloudfront.net/product-image/file/large_e1dfe8a3-80cc-4218-9c46-af75228904a5.png"
],
"logo_photos": [
"https://cdn-img.mealme.ai/fc64f16916fb1be1819cf821c94df47e21df0e36/68747470733a2f2f73686f70706572732e696e737461636172742e636f6d2f68616c766f722f77617265686f7573652f6c6f676f2f312f31666530303635652d613934372d346235642d623237342d3339303036393435333664352e706e67"
],
"store_photos": [],
"dollar_signs": null,
"pickup_enabled": false,
"delivery_enabled": true,
"is_open": true,
"offers_first_party_delivery": false,
"offers_third_party_delivery": true,
"miles": 0.18594365807682367,
"supports_upc_codes": true
},
.
.
.
],
"next_page": 1
}
- Note that the store in the example response above has the value
grocery
for itstype
property since we set the input query parameterstore_type
togrocery
.
Visual Response
Browse
Here's an example Store Search API request that demonstrates browsing for both restaurants and grocery stores near the address 188 King Street, San Francisco, US 94107
. Since we want to browse both restaurants and grocery stores, we'll avoid passing the query parameter store_type
. We'll also search specifically for stores that offer pickup by setting the input query parameter pickup
to true
.
Example Request & Response
curl --request GET \
--url 'https://api.mealme.ai/search/store/v3?latitude=37.7786357&longitude=-122.3918135&user_street_num=188&user_street_name=King%20Street&user_city=San%20Francisco&user_state=CA&user_zipcode=94107&user_country=US&pickup=true&sort=relevance&open=true&maximum_miles=3&search_focus=store&autocomplete=false' \
--header 'Id-Token: <API KEY>' \
--header 'accept: application/json'
{
"stores": [
{
"_id": "41c65c6a-71aa-465f-9261-58e900ef11dd",
"name": "EA Cafe",
"phone_number": 14158729328,
"address": {
"street_addr": "735 3rd Street",
"city": "San Francisco",
"state": "CA",
"zipcode": "94107",
"country": "US",
"street_addr_2": "",
"latitude": 37.77864456,
"longitude": -122.39209748
},
"type": "restaurant",
"description": "Cafe",
"local_hours": {
"operational": {
"Monday": "01:00PM - 01:00AM",
"Tuesday": "01:00PM - 01:00AM",
"Wednesday": "01:00PM - 01:00AM",
"Thursday": "01:00PM - 01:00AM",
"Friday": "01:00PM - 01:00AM",
"Saturday": "01:00PM - 01:00AM",
"Sunday": "Closed"
},
"delivery": {
"Monday": "02:00PM - 01:00AM",
"Tuesday": "02:00PM - 01:00AM",
"Wednesday": "02:00PM - 01:00AM",
"Thursday": "02:00PM - 01:00AM",
"Friday": "02:00PM - 01:00AM",
"Saturday": "02:00PM - 01:00AM",
"Sunday": "Closed"
},
"pickup": {
"Monday": "01:00PM - 01:00AM",
"Tuesday": "01:00PM - 01:00AM",
"Wednesday": "01:00PM - 01:00AM",
"Thursday": "01:00PM - 01:00AM",
"Friday": "01:00PM - 01:00AM",
"Saturday": "01:00PM - 01:00AM",
"Sunday": "Closed"
},
"dine_in": {
"Monday": "01:00PM - 01:00AM",
"Tuesday": "01:00PM - 01:00AM",
"Wednesday": "01:00PM - 01:00AM",
"Thursday": "01:00PM - 01:00AM",
"Friday": "01:00PM - 01:00AM",
"Saturday": "01:00PM - 01:00AM",
"Sunday": "Closed"
}
},
"cuisines": [
"Asian",
"Bowls",
"Cafe",
"Coffee And Tea",
"Dessert",
"Japanese",
"Poke",
"Salads",
"Shakes",
"Sushi"
],
"food_photos": [
"https://d1ralsognjng37.cloudfront.net/b5c5db91-80d7-45b9-9d05-b68d23860c85.jpeg"
],
"logo_photos": [
"https://d1ralsognjng37.cloudfront.net/d43e201b-953f-46e6-b5aa-e68c320608ed.jpeg"
],
"store_photos": [],
"dollar_signs": 2,
"pickup_enabled": true,
"delivery_enabled": true,
"is_open": true,
"offers_first_party_delivery": false,
"offers_third_party_delivery": true,
"miles": 0.015525155149220649,
"weighted_rating_value": 4.6553571428571425,
"aggregated_rating_count": 224,
"supports_upc_codes": false
}
.
.
.
],
"next_page": 1
}
- When the input query parameter
query
is empty, each page of will have at most 100 stores. To get the next page of 100 stores, set the query parameterpage
in your next request to the value of thenext_page
property found in the response.- Note that the
type
property for stores returned from the example request above can take on the valuerestaurant
orgrocery
, since we didn't provide the input query parameterstore_type
in the request.
Visual Response
Search For a Place
If you cannot find the store you are looking for, you can try searching for it using the Search For A Place API, which uses the Google Places API.
curl --request GET \
--url 'https://api.mealme.ai/places/search?search=Denny%2527s&location_bias_latitude=37.7786357&location_bias_longitude=-122.3918135&location_bias_radius=10000&search_type=place&open_filter=false' \
--header 'Id-Token: <API-KEY>' \
--header 'accept: application/json'
{
"places": [
{
"google_place_id": "ChIJlanQUIaAhYARfCTRw_DJ2Ss",
"place_link": "https://locations.dennys.com/CA/SAN-FRANCISCO/246873",
"place_name": "Denny's",
"place_address": "816 Mission St, San Francisco, CA 94103, US",
"place_address_components": {
"street_addr": "816 Mission St",
"city": "San Francisco",
"state": "CA",
"zipcode": "94103",
"country": "US"
},
"place_location": [
37.7842287,
-122.4049526
],
"place_phone": 14152438800,
"place_hours": [
"Monday: Open 24 hours",
"Tuesday: Open 24 hours",
"Wednesday: Open 24 hours",
"Thursday: Open 24 hours",
"Friday: Open 24 hours",
"Saturday: Open 24 hours",
"Sunday: Open 24 hours"
],
"status": "OPERATIONAL",
"type": "restaurant"
},
{
"mealme_store_id": "299c95d2-46f2-4fbd-9541-f7486595669c",
"mealme_place_id": "85739a79-c57e-4fee-ba22-0e6ebe6667fc",
"google_place_id": "ChIJ4bfu0UR-hYARwPTI58Y_OE8",
"place_link": "https://locations.dennys.com/CA/EMERYVILLE/249520",
"place_name": "Denny's",
"place_address": "1776 Powell St, Emeryville, CA 94608, US",
"place_address_components": {
"street_addr": "1776 Powell St",
"city": "Emeryville",
"state": "CA",
"zipcode": "94608",
"country": "US"
},
"place_location": [
37.83853,
-122.2958751
],
"place_phone": 15106587950,
"place_hours": [
"Monday: Open 24 hours",
"Tuesday: Open 24 hours",
"Wednesday: Open 24 hours",
"Thursday: Open 24 hours",
"Friday: Open 24 hours",
"Saturday: Open 24 hours",
"Sunday: Open 24 hours"
],
"status": "OPERATIONAL",
"type": "restaurant"
}
]
}
- Each place returned in the response will include a
google_place_id
.
Add Google Place to MealMe API
Pass the google_place_id
to the Add Google Place to MealMe API to add the store.
curl --request GET \
--url 'https://api.mealme.ai/utils/add_store?google_place_id=ChIJlanQUIaAhYARfCTRw_DJ2Ss' \
--header 'Id-Token: <API-KEY>' \
--header 'accept: application/json'
{
"mealme_store_id": "b6613a4b-f38d-416e-aa54-d8a2fbb4bfb2",
"mealme_place_id": "ed23c9c7-6e3e-46f6-b7d4-54aee08c9708",
"mealme_store_type": "restaurant"
}
- If the property
mealme_store_id
in the response has a non-empty value, then the store has successfully been added to MealMe.
Updated over 1 year ago