JSON API

The ponyipsum.com API is a REST interface that returns JSON. Pass in the following parameters using an HTTP GET and we'll return a JSON string array of paragraphs.
It can also be accessed via https.

Parameters:

  • type: all-pony for pony only or pony-and-filler for pony mixed with miscellaneous 'lorem ipsum' filler.
  • paras: optional number of paragraphs, defaults to 5.
  • sentences: number of sentences (this overrides paragraphs)
  • start-with-lorem: optional pass 1 to start the first paragraph with 'Pony ipsum dolor sit amet'.

Examples:

Some sample jquery code!

$(document).ready(function() {
    $("#ponyButton").click(function() {
        $.getJSON('https://ponyipsum.com/api/?callback=?',
            { 'type':'pony-and-filler', 'start-with-lorem':'1', 'paras':'3' },
            function(ponyGoodness) {
                if (ponyGoodness && ponyGoodness.length > 0) {
                    $("#ponyIpsumOutput").html('');
                    for (var i = 0; i < ponyGoodness.length; i++)
                        $("#ponyIpsumOutput").append('<p>' + ponyGoodness[i] + '</p>');
                    $("#ponyIpsumOutput").show();
                }
            });
    });
});

Run the sample!