开发者

Google API to check number of indexed pages? [closed]

开发者 https://www.devze.com 2022-12-25 02:47 出处:网络
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.

We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.

开发者_StackOverflow

Closed 4 years ago.

Improve this question

Is there a Google API similar to Yahoo and Bing's API's to check for the number of indexed pages on a specified domain?

For example, for Yahoo if I type in the following URL:

http://search.yahooapis.com/SiteExplorerService/V1/pageData?appid=MTSlade&query=http://www.dave-sellers.co.uk&domain_only=1&results=1

Then it will return some XML detailing the number of pages indexed as 'totalResultsAvailable'

Any idea?

Thanks


I'm not sure about an API but you can view the pages Google has indexed by doing a search like so:

site:http://thesitesurl.com

Here is an example. You could apply some logic to the pagination and number of items per page etc (or simply use the "Results 1 - 100 of about 9,100,000"). You could even choose to display 100 items per page by using this sort of syntax. I'm not sure if this would fit your exact requirements, but it's better than nothing.


With the still operating - but deprecated - Google search api you can do this:

http://ajax.googleapis.com/ajax/services/search/web?v=1.0&q=www.bbc.co.uk

The result returned is of type "text/javascript" which you can parse as a JSON. The field you are after is estimatedResultCount. There doesn't seem to be an option to return the results as XML, but all you need to do is convert the JSON to XML. I don't know what language you're using, but there's bound to be utilities to do this.

If you do not want to use a deprecated API, then use the new Custom Search API - but you'll need to sign up for an API key:

http://code.google.com/apis/customsearch/v1/overview.html

and here's details on how to construct your query:

http://code.google.com/apis/customsearch/v1/using_rest.html

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号