Web Api to retrieve information from a website

I need a service that retrieves the title from a webpage and returns from json. I would not like to analyze a web page or waste extra CPU cycles. those. the call should be something like this:

curl http://api.someservice.com/fetch?url=google.com&element=title&out=json

Reply from api:

{
    response: {
        title: "Google"
        source: "google.com"
    }
    status: "success"

}

Any hints would be much appreciated

+3
source share
2 answers

You should take a look at YQL - a general service from Yahoo! which can make this kind of scraping very easy. Try the following:

select * from html where url="google.com" and xpath='//title'

Check it out here.

+5
source

I suspect Yahoo! YQL is probably very close to what you are looking for.

( , , YQL, "-API -": -)

+1

All Articles