24

I'd like to display some custom search results.

I've looked at the JSON APIs of both Google and Microsoft (Bing). Unfortunately, Google has a limit on the amount of queries a day ($50 for a maximum of ten thousand queries). However, Bing allows an "unlimited" amount of queries a day, for free.

Are there other services, like Bing's JSON API, that do not have a query limit like Google's API?

A related question might be how services like Metacrawler can combine search results from several search engines, while the terms of services of these engines clearly state that these results may only be obtained through such (paid) API, and not through crawling.

Kara
  • 5,650
  • 15
  • 48
  • 55
Tom
  • 8,437
  • 26
  • 122
  • 217

3 Answers3

15

Usually services and APIs have usage threshold, so as to enable experimentation and small-scale use without any hurdles and up-front obstacles, but open up possibility of offering better SLA and additional options with paid usage for apps that need that level of support.

That said looking on programmableweb.com for search APIs is probably an interesting option - see http://www.programmableweb.com/apis/directory/1?apicat=Search.

I am also curious, what you're specifically looking for in terms of capabilities, what you'd like to see in the Bing API etc. Any feedback and I can relay to the team (since I am on the Bing team).

Nikhil Kothari
  • 5,193
  • 2
  • 20
  • 27
  • 1
    NikhilK, thanks for your response. The biggest issue I have been struggling with using the Bing API is that the results seem to be way less relevant than those returned by the normal bing search site. For example, if I search for "nu.nl papandreou" I expect it to return many results related to papandreou on the site nu.nl. Instead, I get a rarely visited investors site which happens to link to nu.nl and where someone else happens to talk about Papandreou. – Tom Nov 19 '11 at 13:39
  • 1
    Agreed. The API results are horrible compared to the web results. There's no reason that the results should differ. Also, some of the terms of use are a bit restrictive. – Ben McCann Mar 29 '12 at 23:19
5

i think http://www.faroo.com/ may help you out. It have limit of 1million searches per month limitation.

raghu
  • 53
  • 1
  • 4
  • 2
    _FAROO_ looks good but doesn't have much level of control over results, with the only [supported operator](http://www.faroo.com/hp/api/api.html#parameter) for queries being `AND` (keywords). – Alastair Jul 31 '13 at 14:28
  • Might be a deal breaker for some, but Faroo requires registration for an API key as well. – lsh Dec 15 '13 at 23:14
  • 3
    Another deal breaker for Faroo is that your API key is restricted to the IP address you specify during registration. – lsh Dec 15 '13 at 23:16
1

I have the same problem with bing, so i'm trying an another solution. I'm trying to parse their HTML content like a human. Their website's HTML had some limitations, so i scraped their mobile version.

If any, that's the code i used(using Jsoup and apache http components) in java:

    DefaultHttpClient client = new DefaultHttpClient();
    client.getParams().setParameter(CoreProtocolPNames.USER_AGENT, "Mozilla/5.0 (Windows NT 6.2; rv:9.0.1) Gecko/20100101 Firefox/9.0.1");
    client.getParams().setParameter(ClientPNames.COOKIE_POLICY, CookiePolicy.IGNORE_COOKIES);

    int page = 0;
    String surl = "http://m.bing.com/search/search.aspx?A=webresults&Q=" + URLEncoder.encode("site:www.facebook.com/ +\"?sk=info\"+\"new york\"+\"Bar\"", "UTF-8") + "&D=Web&SI=" + (page * 10) + "&PN=" + (page);
    HttpGet get = new HttpGet(surl);
    InputStream content = client.execute(get).getEntity().getContent();
    Document doc = Jsoup.parse(content, "UTF-8", "http://www.bing.com/");
    Elements elements = doc.select(".s15 a");
    for (Element e : elements) {
        String url = e.attr("href");
        int v = url.indexOf("REDIRURL=");
        if (v > 0) {
            url = url.substring(v + 9);
            url = url.substring(0, url.indexOf("&"));
            url = URLDecoder.decode(url, "UTF-8");
        } else {
            break;
        }
        System.out.println(url + " : " + e.text());
    }
user584397
  • 347
  • 2
  • 12
  • 2
    Do you known whether Microsoft detects if the same IP address requests a very high number of search jobs within a specific range of time? For instance, Google does and emits a captcha code. – PAX Sep 01 '14 at 15:19