In the simplest search, all you provide is the text you'd like to match in any part of the location details. So to accomplish this, you just set the `text` parameter to whatever you want to find. Let's see a few examples.
#### Find a venue
#### Example time
Let's search for **YMCA**. Here's what you'd need to append to the base URL of the service, **search.mapzen.com**.
@ -36,26 +39,17 @@ If you clicked on the query link above, you probably saw some cool **GeoJSON**,
Note that the results are spread out throughout the world. Since we haven't told the service anything about our current location or any other geographic context.
## Narrowing your Search
All this time you've been searching the entire world...
Sometimes it's necessary to limit the search to a portion of the world. This can be useful if you're looking for places in a particular region, or country, or only want to look in the immediate viscinity of a user with a known location. Different usecases call for different specifications of this bounding region. We currently support three types: **rectangle**, **circle**, and **country**.
Sometimes your usecase might require that all the search results are from a particular country. Well, we've got that covered! You just need to set the `boundary.country` parameter value to the **alpha-2** or **alpha-3** [ISO-3166 country code](https://en.wikipedia.org/wiki/ISO_3166-1).
#### Find **YMCA** only within **Great Britain**
We'll need to know that the **alpha-3** code for **Great Britain** is ***GBR*** and set the parameters like this:
#### Example time
Let's search for **YMCA** again, but this time only in **Great Britain**. We'll need to know that the **alpha-3** code for **Great Britain** is ***GBR*** and set the parameters like this:
In the case where you need to specify the boundary using a rectangle, all we need is a pair of coordinates on earth. Here are a few examples:
##### Let's say you wanted to find museums in *London*
You'd need to set the `boundary.rect.*` parameter grouping to indicate the extent of the boundary.
#### Example time
Let's say you wanted to find museums in the state of **Texas**. You'd need to set the `boundary.rect.*` parameter grouping to values representing the bounding box around **Texas**: min_lon=-106.65 min_lat=25.84 max_lon=-93.51 max_lat=36.5
***PRO TIP:*** *You can lookup a bounding box for a known region [here](http://boundingbox.klokantech.com/)
Below is the region that will be searched. Museums located outside of this highlighted region will **NOT** be included in the results. The museums returned will be sorted based on how well they matched the `text` parameter, in this case **museum**.
Below is the region that will be searched. YMCA located outside of this highlighted region will **NOT** be included in the results. The museums returned will be sorted based on how well they matched the `text` parameter, in this case **museum**.