How do I access the text string returned by a YQL request?

Using the YQL console, I entered:

select * from htmlstring where url='finance.yahoo.com/q/op?s=PG'

And the display panel showed the raw html of the entire page as XML, which is what I wanted.

It gave me the REST Query at the bottom of the page as follows:


How can I put that url in a script (with or without jQuery) so that I get the same output in a string I can then parse?

I find nothing on the YQL pages that tells me how to do that, and all my attempts (with or without jQuery) have been unsuccessful.

The text I want is apparently somewhere in a returned object. How do I get at it?

1 Reply
  • You have to use $.getJSON if using jQuery,

    and the URL to query would be what you provided but with &format=json. So:


Recent Posts

in YQL