API Help
Please be kind.
Requesting article text in various formats
http://viewtext.org/api/text?url={url}&format={format}&callback={callback}
- {url}: REQUIRED. The url of the text to fetch
- {format}: OPTIONAL. The return type. Valid values are: html, json, xml. Default is html
- {callback}: OPTIONAL, only required for JSONP. The JSONP callback method
Other optional parameters- &rl={true/false}: Redirect links in text through viewtext.org. Default true.
- &mld={decimal}: Remove HTML nodes with a link density greater than or equal to {decimal}. Default .8
Example with jQuery
$("#button").click(function () { $.getJSON("http://viewtext.org/api/text?url=" + $("#url").val() + "&callback=?", function (data) { $("#article-text-demo").html(data.content); }); });
Demo