23 апреля 2008

Google Search API: now supports REST calls

"Using the APIs from your Flash or Server Side framework couldn't be simpler. If you know how to make an http request, and how to process a JSON response, you are in business," says Mark Lucovsky. Here's a simple example for web search:
http://ajax.googleapis.com/ajax/services/search/web?v=1.0&q=Earth%20Day

There are some differences between the old SOAP API and the REST one.

PROs:
- the new API doesn't require a key
- there's no limitation for the number of queries
- it's much easier to use
- you can use the REST API for web search, but also for image search, news search, video search, local search, blog search and book search.

CONs:
- you need to send "a valid and accurate http referer header"
- you can only get up to 8 results in a single call and you can't go beyond the first 32 results
- the terms of use are pretty restrictive: for example, you need to attribute the results to Google and you are not allowed to change the order of search results.

It's interesting to notice that Yahoo's search APIs are more developer-friendly and, although they require an application ID and have some usage limitations (5,000 queries per IP per day), they offer more features and they are more flexible, by also including XML output. Another important difference is that Yahoo doesn't require "a valid and accurate http referer header".

Source

Комментариев нет:

Архив блога

What to do?

Problem:
you have site designed in a dark theme, saying dark background, white font.
By default google toolbar autocomplete cracks html for inputs or selects containg "email" "name" "address" and other buzzwords and changes background to yellow. As a result when visitor fills form, he enters text as white on yellow and can not easy validate his input
What to do?

Таги

Followers

item http://www.voronenko.com/2008/04/google-search-api-now-supports-rest.html