You are correct, the web frontend search is implemented differently
from the API search. This is very annoying and it's on my todo list.
The web frontend is "place aware". It will expand zip code to a
reasonable town, like 94089 --> Sunnyvale, and then shows you only
events within the borders of that town, almost exactly. (But in the
future, we may expand even further if the town doesn't have enough
events).
The event.search REST API is only latlong/radius based, so it first
reduces 94089 to a latitude and longitude, and by then looks for
events within a radius, which is 50 miles by default. As far as I can
tell it's always been like that, so I believe you are mistaken when
you refer to some formerly more exact behavior.
One day soon we'll have a shiny new API with place-aware methods. But
for now I don't see an easy way to solve your problem. You could try
limiting your query to a small radius parameter, like 5 miles.
Otherwise I regret to say you'll have to filter them on your end.
What sort of API would you folks like? My guess is that most people
want location to be a very loose notion. So I think the default
behaviour will be to expand outwards until a reasonable number of
events are found. If you want the location to be exact, maybe add a
'location_exact=1' parameter?
--- In yws-events%40yahoogroups.com">yws-events
yahoogroups.com, "reemasardana_nsit" <reema
...> wrote:
>
> I need to implement the search by location feature. It should be the
> same as the search on upcoming.org which lets us enter a location as
> (zip or city or state or a combination of these) and get events from
> that location. I am using the event.search API for this purpose.
>
> I need some clarifications here.
>
> When I search for events in the location '94089', I get the results
>
http://upcoming.yahoo.com/search/?search_placeid=UJeFoJ6YA5nlWXcWRQ--&q=&loc=94089&Search=GO
>
> which are all in Sunnyvale, California. Makes sense.
>
> When I use the event.search API, the same query using the location
> parameter:
>
>
http://upcoming.yahooapis.com/services/rest/?api_key=bc73a4cf5e&method=event.search&location=94089
>
> fetches results for zip code other than 94089 as well. Maybe because
> this is a proximity search.
>
> I want to implement the former functionality(exact search) and I want
> to know if the event search API lets me do that directly without me
> filtering the results.
>
> Thanks,
> Reema
>
.