The .q filter accepts a second parameter containing an ISO country code. Results matching the first parameter that are in that country will have their probabilities adjusted upward, making them more likely to be returned at or near the top of the the results list. Here is how you use the focus parameter:
CODE
http://where.yahooapis.com/v1/places.q(Cordoba,MX);count=0?format=json&appid=XXX
This returns 16 results, with the ones in Mexico at the top.
Note that this is different than including the country code in the first parameter, which will not return places in other countries if any places are found in the country:
CODE
http://where.yahooapis.com/v1/places.q('Cordoba,MX');count=0?format=json&appid=XXX
This returns 2 results. Note the quotes around the query string.
CODE
http://where.yahooapis.com/v1/places.q('Cordoba,JP');count=0?format=json&appid=XXX
This returns 16 results because there is no place named Cordoba in Japan.
In order to distinguish between places having the same name, you may need to provide additional information in the query string. For example, if you want the Cordoba in Durango State, Mexico, you would need to include the state name the query string:
CODE
http://where.yahooapis.com/v1/places.q('Cordoba,Durango,MX');count=0?format=json&appid=XXX
This returns 1 result.
Eddie Babcock
Yahoo! Geo Technologies