Live data from Hacker News

Google Deactivates Web Search API

ajax.googleapis.com

11–20 of 132 posts

Re: Google Deactivates Web Search API

#11

Why do API developers add a HTTP status code in their JSON response, when the HTTP status code is already in the header?

Say you're making an ajax request to this API, you don't necessarily know the status, especially if you're in an "always" handler or something.

Re: Google Deactivates Web Search API

#12

Why do API developers add a HTTP status code in their JSON response, when the HTTP status code is already in the header?

Say you're making an ajax request to this API, you don't necessarily know the status, especially if you're in an "always" handler or something.

This but with jsonp might make sense; with xhr you can always get the http response code

Re: Google Deactivates Web Search API

#14

Why do API developers add a HTTP status code in their JSON response, when the HTTP status code is already in the header?

Probably because HTTP status codes are perceived to be at a different layer of the response than the body. A lot of developers (myself included, for trivial things) treat HTTP bodies as strings with no associated metadata.

Re: Google Deactivates Web Search API

#15

Why do API developers add a HTTP status code in their JSON response, when the HTTP status code is already in the header?

Depending on the technology you're using to access the API, the HTTP status code may not be exposed from the underlying stack.

For example, Microsoft Silverlight only returned 200 or 404 status codes: https://msdn.microsoft.com/en-us/library/system.net.httpstat...

Re: Google Deactivates Web Search API

#16
What are the alternatives for a full web search API? Yahoo BOSS closed down a few weeks ago. Bing seems the last man standing. And, unfortunately, none of the ones I've tried are very good; one project I'm working on needs to prioritize newer results over older ones, and only Google had a sort by date option (which I think was also removed in the past).

Re: Google Deactivates Web Search API

#17
Does anyone know of an API that returns pages related to any given URL? I'm looking for an alternative to Google's "related:..." search, which was only reliably accessible through Google Web Search (Google Custom Search is very expensive and has a limit of 10K queries per day).

For example: https://www.google.com/#q=related:http:%2F%2Fagiliq.com%2Fbl...

It returns pages related to any given page, and works at the specific page level (not just at the domain level, like SimilarWeb's API).

I've migrated to Bing for all other web search needs (way cheaper and without volume limits like Google Custom Search), but Bing does not offer a "related:..." equivalent as far as I can tell.

Re: Google Deactivates Web Search API

#18
post #15

Why do API developers add a HTTP status code in their JSON response, when the HTTP status code is already in the header?

Depending on the technology you're using to access the API, the HTTP status code may not be exposed from the underlying stack. For example, Microsoft Silverlight only returned 200 or 404 status codes: https://msdn.microsoft.com/en-us/library/system.net.httpstat...

That would be called a "bug," and a perplexing one, at that.

Re: Google Deactivates Web Search API

#19

Why do API developers add a HTTP status code in their JSON response, when the HTTP status code is already in the header?

Because client coders don't always have access to the headers. Don't think of how you would write a client; think about how someone in the most messed-up programming environment that you can imagine is forced to write clients.

Re: Google Deactivates Web Search API

#20

What are the alternatives for a full web search API? Yahoo BOSS closed down a few weeks ago. Bing seems the last man standing. And, unfortunately, none of the ones I've tried are very good; one project I'm working on needs to prioritize newer results over older ones, and only Google had a sort by date option (which I think was also removed in the past).

Google Custom Search is one option, but it has a limit of 10,000 queries per day and is very expensive compared to Bing ($5 per 1,000 queries).

I've migrated to Bing, myself -- no volume limits, generous free tier, and much cheaper than Google.

Post reply on HN