Re: [twitter-dev] Advanced search capability in API?
On Tue, Jan 26, 2010 at 1:34 PM, mapgeek mj.hu...@gmail.com wrote: Hi, I've scanned some previous posts, along with the API documentation, but have come up empty handed. So apologies if I ask a question that has already been asked. Is there functionality in the API that equates to the Twitter advanced search web site? Specifically: - choice of language to search in, and restrict results to - a geographic parameter (location name, lat and lon etc.) - geographic radius As far as I know, there's no language filtering built in to Streaming - you'd have to do that in your own processing. However, there is filtering by user, by keyword and by location. The location filtering does not look at the location information provided in user profiles. It only looks at tweets that have been geotagged. So If you have location filtering enabled, you won't get any non-geotagged tweets. Location specification is by latitude-longitude boxes in Streaming rather than by circles as it is in Search. -- M. Edward (Ed) Borasky http://borasky-research.net I've always regarded nature as the clothing of God. ~Alan Hovhaness
Re: [twitter-dev] Advanced search capability in API?
For the Search REST API any of these operators should work. Just include them in the with your search terms in q=. http://search.twitter.com/operators Abraham On Tue, Jan 26, 2010 at 13:44, M. Edward (Ed) Borasky zzn...@gmail.comwrote: On Tue, Jan 26, 2010 at 1:34 PM, mapgeek mj.hu...@gmail.com wrote: Hi, I've scanned some previous posts, along with the API documentation, but have come up empty handed. So apologies if I ask a question that has already been asked. Is there functionality in the API that equates to the Twitter advanced search web site? Specifically: - choice of language to search in, and restrict results to - a geographic parameter (location name, lat and lon etc.) - geographic radius As far as I know, there's no language filtering built in to Streaming - you'd have to do that in your own processing. However, there is filtering by user, by keyword and by location. The location filtering does not look at the location information provided in user profiles. It only looks at tweets that have been geotagged. So If you have location filtering enabled, you won't get any non-geotagged tweets. Location specification is by latitude-longitude boxes in Streaming rather than by circles as it is in Search. -- M. Edward (Ed) Borasky http://borasky-research.net I've always regarded nature as the clothing of God. ~Alan Hovhaness -- Abraham Williams | Moved to Seattle | May cause email delays Project | Out Loud | http://outloud.labs.poseurtech.com Hacker | http://abrah.am | http://twitter.com/abraham This email is: [ ] shareable [x] ask first [ ] private. Sent from Seattle, WA, United States
Re: [twitter-dev] Advanced search capability in API?
I believe all of the params from advanced search can be used with the search api as well...as an example, using the search.twitter.com advanced search form produces a url like: http://search.twitter.com/search?q=ands=friendstatusphrase=ors=nots=tag=lang=enfrom=to=ref=near=within=15units=misince=until=rpp=15 Add the same parameters to your search api call and I believe you'll get the same results. Hope it helps. - Kevin http://wow.ly On Tue, Jan 26, 2010 at 4:34 PM, mapgeek mj.hu...@gmail.com wrote: Hi, I've scanned some previous posts, along with the API documentation, but have come up empty handed. So apologies if I ask a question that has already been asked. Is there functionality in the API that equates to the Twitter advanced search web site? Specifically: - choice of language to search in, and restrict results to - a geographic parameter (location name, lat and lon etc.) - geographic radius Cheers, MH
Re: [twitter-dev] Advanced search capability in API?
For the Search *API*, the geocode (lat,long,radius) is a separate parameter on the call, *not* part of the q= string. If you go to Advanced Search and type near:97201 within:25mi, it will work, but if you supply that as a query to the API it won't. You have to look up the latitude and longitude of the 97201 zip code and create a geocode parameter. Just on the off chance someone else cares about happenings within a 25 mile radius of Portland, Oregon, here's the string I use: my $pdx_geocode = 45.511795,-122.675629,25mi; # PDX geocode On Tue, Jan 26, 2010 at 1:48 PM, Abraham Williams 4bra...@gmail.com wrote: For the Search REST API any of these operators should work. Just include them in the with your search terms in q=. http://search.twitter.com/operators Abraham On Tue, Jan 26, 2010 at 13:44, M. Edward (Ed) Borasky zzn...@gmail.comwrote: On Tue, Jan 26, 2010 at 1:34 PM, mapgeek mj.hu...@gmail.com wrote: Hi, I've scanned some previous posts, along with the API documentation, but have come up empty handed. So apologies if I ask a question that has already been asked. Is there functionality in the API that equates to the Twitter advanced search web site? Specifically: - choice of language to search in, and restrict results to - a geographic parameter (location name, lat and lon etc.) - geographic radius As far as I know, there's no language filtering built in to Streaming - you'd have to do that in your own processing. However, there is filtering by user, by keyword and by location. The location filtering does not look at the location information provided in user profiles. It only looks at tweets that have been geotagged. So If you have location filtering enabled, you won't get any non-geotagged tweets. Location specification is by latitude-longitude boxes in Streaming rather than by circles as it is in Search. -- M. Edward (Ed) Borasky http://borasky-research.net I've always regarded nature as the clothing of God. ~Alan Hovhaness -- Abraham Williams | Moved to Seattle | May cause email delays Project | Out Loud | http://outloud.labs.poseurtech.com Hacker | http://abrah.am | http://twitter.com/abraham This email is: [ ] shareable [x] ask first [ ] private. Sent from Seattle, WA, United States -- M. Edward (Ed) Borasky http://borasky-research.net I've always regarded nature as the clothing of God. ~Alan Hovhaness
Re: [twitter-dev] Advanced search capability in API?
The location filtering does not look at the location information provided in user profiles. It only looks at tweets that have been geotagged. So If you have location filtering enabled, you won't get any non-geotagged tweets. Location specification is by latitude-longitude boxes in Streaming rather than by circles as it is in Search. here are the differences between search and streaming APIs: - for the search API, the location filtering -does- look in the user profiles. in the streaming API, if you are using the geohose, that does -not- look in the user profiles; - in the search API, location filtering is a radius. in the streaming API, location filtering is a bounding box. -- Raffi Krikorian Twitter Platform Team http://twitter.com/raffi