foursquare website venue search not matching up to api search - foursquare

The answer just might be alluding me, but this bugs me
I've been doing a simple search trying to find all the outdoor picnic spots near me. So I search for picnic in my zip code, and I get a list of results.
https://foursquare.com/search?tab=tipResults&q=picnic&lat=&lng=&near=10001
I then try to do the same search using the api (the venues/explore endpoint) to see if my app works well, and I get a completely different list of places. The api url that I've been using is
https://api.foursquare.com/v2/venues/explore?near=10001&section=outdoors&query=picnic&radius=5000&client_id=XXXX&client_secret=YYYY
BTW, If I dont include a radius, it only returns 1 entry.

The web address you provided: https://foursquare.com/search?tab=tipResults&q=picnic&lat=&lng=&near=10001
Is tip results around 10001.
The API call you provided: https://api.foursquare.com/v2/venues/explore?near=10001&section=outdoors&query=picnic&radius=5000&client_id=XXXX&client_secret=YYYY
Is a single explore search api call.
These two are very different, and will yield different results
Try running a tip search via the API as such (API docs at this place):
https://api.foursquare.com/v2/tips/search?near=10001&query=picnic
(direct link for testing it)
Let us know if this this clears it up.

Related

Bing search API: specify filetype and site/domain?

Having had the luxury of having my fun and earning my bread well away from MS products for years, I am today trying to programmatically search with Bing Azure (wearing gloves) basically because I thought getting a google api was complex. So I headed down Data Market and issued this (let's say with perl's LWP which has been used to pass credentials):
https://api.datamarket.azure.com/Bing/Search/v1/Composite?%24skip=0&%24top=10&%24format=json&Sources=%27web%27&Query=%27abc%27
which works.
What I am now trying to find out is
1) how to tell the Bing search api to restrict results to a specific domain (e.g. ".org" or even a single website "www.wikipedia.org").
2) how to tell the search engine to restrict results to a specific filetype, e.g. 'PDF', 'XML' (or PDF and XML if that's possible)
3) if there is a simple list of the features/keywords in the GET request of the latest bing search API. Please no MS links if you please - i am really tired.
I have seen "site:.org" working on the bing search website when doing a manual search. And read about "filetype:pdf" working too.
Any hints?
bliako
cracked it:
... Query=%27abc site:.com filetype:pdf%27
at the point when m$ realises it costs to be clumsy
bliako

Instagram - Obtaining data in realtime

I am trying to get the recent post from a particular location. using this url.
https://api.instagram.com/v1/media/search?lat=34.0500&lng=-118.2500&distance=50&MAX_ID=max_id&access_token=XXXX
So when I use this URL for the first time, I get 20 results. I obtain the max ID from the list of 20 results and modify my url .
But when I use the modified URL, I obtain the same result as the first one.
How do I go about solving this?
Contrary to what I thought, the media search endpoint doesn't return a pagination object. Sorry. It also doesn't support the min_id/max_id parameters, which is why you are having problems..
If you want to get different data you are going to have to use the time based request parameter MIN_TIMESTAMP. However it looks like that parameter doesn't work for that endpoint either (though the documentation says it is supported). Indeed, a quick search on the internet reveals it might be a long standing bug with the api.

Filter Search and Free text search using Foursquare api

We are currently developing a food/restaurant search on our website using Foursquare API.
We have hit an issue which is the free text search. If I would like to search for a specific restaurant/food venue eg. "Lucilda Pizzeria" will it allow me to do so?
Can we use the Food Category in the Category tree https://developer.foursquare.com/categorytree to allow people to filter the venues? Eg. "Minnesota" - "Bagel Shop"
Hope anyone can please clear up these questions for me.
Thanks to anyone who will get back to me with an answer.
Take a look at the getting started guide to search: https://developer.foursquare.com/start, then read about the search and explore endpoints. In your use case, I would recommend making an explore API request with the intent=food parameter passed in.

Get Google Discussion search results

I would like go get the results retrieved by Google Discussion Search, like this. Notice the Discussion tab on the bottom left side.
I prefer to use Python, and the Google Custom Search API, but I am not sure if they support the Discussion search, so any option is welcome.
Does not appear to be any way the API results can be tailored to fetch 'discussion' results but the API can filter by filetype, so why not try a q query looking for the RSS feeds produced by forums?
https://www.googleapis.com/customsearch/v1?key= your key &cx= your_id &q=diablo 3 forum RSS&fileType=rss&alt=json
Many tend to have a latest/ last post feed and monitoring these for changes should produce a good stream of data.

Google Search by Image API?

for my job, I'm looking into an idea in which people would use Google Search by Image and use any celebrity photo they find. Google would return the results and then on our end, a there'd be a database of professionals showing how to get that specific look.
I'm assuming this is extremely unlikely to do, based on that users could use ANY photo.
So, is there a way that I could have about 100 or so celebrity photos that Google Image results could compare to and then choose the one that is closest.
Basically:
Drag drop photo of Britney Spears
Google searches with that image
Google's results compare the top images with our 100, and selects the closest match.
User gets to see video of how to get Britney Spears look.
I'm not a programmer, but looking for some API or Search by Image extension that could make this remotely possible for the programmers here at my job. Does something like that (a search by image api) exist? The best I could find was just the support page, which is hardly of any help: http://support.google.com/images/bin/answer.py?hl=en&p=searchbyimagepage&answer=1325808
You can easily search by an existing image by inserting this into your address bar:
https://www.google.com/searchbyimage?site=search&sa=X&image_url=YOUR_IMAGE_URL
Example:
https://www.google.com/searchbyimage?site=search&sa=X&image_url=http://cdn.sstatic.net/Sites/stackoverflow/company/img/logos/so/so-icon.png
Sorry to say, but the Google image API is deprecated:
Important: The Google Image Search API has been officially deprecated as of May 26, 2011. It will continue to work as per our deprecation policy, but the number of requests you may make per day may be limited.
Quite sure there are some alternatives (http://www.tineye.com/ and http://mrisa.mage.me.uk)
Update (2013): There is now Google Custom Search which allows image searches.
These answers are quite obsolete, but the question comes up in searches. So, the Google Vision API has the "web detection" feature that does a reverse image search. First 1000 requests per month are free, $3.50/1000 afterwards.
I think Google Web Detection could be a solution for you. Google moved it permanently from Image search
You can do it via www.images.google.com but only from a browser (lets you upload your own image and compares it to similar).
I'm working on doing it from code (not from browser).
I had the same problem and came up with two solutions:
There are a number of APIs that give reverse image search results nowadays. The ones I used are https://reverseimageapi.com and TinEye.com.
As the selected answer mentions, you can easily scrape this information but will almost certainly need rotating proxies to prevent being banned by the search engine. There are plenty of proxy rotation services (Zyte, Oxylabs, ScrapingBee, etc.) to make you life easier.
I ended up going with option 1 due to the upkeep of scraping search engines and elements changing / breaking.

Resources