# Optional parameters in Location API

**URL:** <https://developer.squareup.com/forums/t/optional-parameters-in-location-api/9421>\
**Category:** Questions\
**Tags:** locations-api\
**Created:** [May 11, 2023, 4:17am UTC](https://developer.squareup.com/forums/t/optional-parameters-in-location-api/9421 "2023-05-11T04:17:27Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![TinWin](https://avatars.discourse-cdn.com/v4/letter/t/ccd318/32.png) [@TinWin](https://developer.squareup.com/forums/u/TinWin)\
**Post date:** [May 11, 2023, 4:17am UTC](https://developer.squareup.com/forums/t/optional-parameters-in-location-api/9421/1 "2023-05-11T04:17:27Z")

</div>

Is there a way to request a list of locations based on MCC or city?

---

<div class="post-metadata">

**Author:** ![Bryan-Square](https://sea1.discourse-cdn.com/square/forums/user_avatar/developer.squareup.com/bryan-square/32/38_2.png) [@Bryan-Square](https://developer.squareup.com/forums/u/Bryan-Square)\
**Post date:** [May 11, 2023, 2:24pm UTC](https://developer.squareup.com/forums/t/optional-parameters-in-location-api/9421/2 "2023-05-11T14:24:08Z")

</div>

Currently there isn’t a way to query based on MCC or city with the Locations API. 🙂

---

<div class="post-metadata">

**Author:** ![TinWin](https://avatars.discourse-cdn.com/v4/letter/t/ccd318/32.png) [@TinWin](https://developer.squareup.com/forums/u/TinWin)\
**Post date:** [May 15, 2023, 6:31pm UTC](https://developer.squareup.com/forums/t/optional-parameters-in-location-api/9421/3 "2023-05-15T18:31:24Z")

</div>

Looking at the locations API, it can be searched based on a LocationID, is this something universal for other businesses? I’m trying to get a least a catalog of businesses that are powered by Square if possible.

---

<div class="post-metadata">

**Author:** ![Bryan-Square](https://sea1.discourse-cdn.com/square/forums/user_avatar/developer.squareup.com/bryan-square/32/38_2.png) [@Bryan-Square](https://developer.squareup.com/forums/u/Bryan-Square)\
**Post date:** [May 15, 2023, 6:42pm UTC](https://developer.squareup.com/forums/t/optional-parameters-in-location-api/9421/4 "2023-05-15T18:42:05Z")

</div>

At this time the Locations API only lists or retrieves locations. Searching locations isn’t available. 🙂

---

<div class="post-metadata">

**Author:** ![TinWin](https://avatars.discourse-cdn.com/v4/letter/t/ccd318/32.png) [@TinWin](https://developer.squareup.com/forums/u/TinWin)\
**Post date:** [May 15, 2023, 7:00pm UTC](https://developer.squareup.com/forums/t/optional-parameters-in-location-api/9421/5 "2023-05-15T19:00:00Z")

</div>

Okay, thank you! Do you think there are other APIs that can achieve ‘searching locations’. Square did a project that achieves this type of thing [https://giveandgetlocal.com/](https://giveandgetlocal.com/)

---

<div class="post-metadata">

**Author:** ![Bryan-Square](https://sea1.discourse-cdn.com/square/forums/user_avatar/developer.squareup.com/bryan-square/32/38_2.png) [@Bryan-Square](https://developer.squareup.com/forums/u/Bryan-Square)\
**Post date:** [May 15, 2023, 7:10pm UTC](https://developer.squareup.com/forums/t/optional-parameters-in-location-api/9421/6 "2023-05-15T19:10:48Z")

</div>

Each business has to opt in for the give and get local listing. An endpoint that will return all businesses for a given area isn’t currently available. Plus each business has to authorize your ability to get information from their account with [OAuth](https://developer.squareup.com/docs/oauth-api/overview). 🙂
