Using the ipsum generator API

Use Curl or HTTPie to generate ipsum copy right from the command-line using the free Flipsum Ipsum REST API.

Use the ever-faithful Curl, or the trendy upstart HTTPie, to generate ipsum copy straight from the command-line. If you want to use these Ipsums in your WordPress project, there’s a tutorial on how to consume a REST API in WordPress.

Example API Calls

#! /bin/sh

# If you're using a Mac, just use curl to fetch and "python -m json.tool"
# to format the response. If you get an error about "python" being missing,
# try using "python2" or "python3" instead.
curl -s "" | python -m json.tool
curl -s "" | python -m json.tool

# Using Ubuntu/Debian, grab HTTPie and jq first, unless you want to use curl.
sudo apt install httpie jq
# ...then grab some ipsum...
http GET "" | jq .
http GET "" ipsum=fairy-tale | jq .

# More examples...

# Use HTTPie to fetch a specific ipsum, and jq to format the response.
http GET "" ipsum=groovy paragraphs=9 | jq .

# jq can also format a HTML response.
http GET "" ipsum=corporate format_html=1 | jq .

# Use curl to fetch a specific ipsum, and jq to format it.
curl -s "" | jq . 

# Fetch 10 paragraphs without the fixed/suggested opening sentence.
curl -s "" | jq .

# These two calls are equivalent.
http GET "" ipsum=coffee-shop paragraphs=10 start_with_fixed=0 | jq .
http GET "" | jq .


Endpoint: /ipsums

List all the available ipsum generators, with short names and descriptions. The /ipsums endpoint doesn’t accept any parameters.

Endpoint: /generate

ipsumType: string
The short name of the ipsum generator you want to use. If not specified, then a random ipsum generator is used.
paragraphsType: int
How many paragraphs of gobbledygook do you want? This value is sanity checked against the server’s configuration, so if you pass it some text, or specify a silly-big (or negative) number, you’ll either get an error, or a capped number or paragraphs.
start_with_fixedType: bool (1 or 0)
If the ipsum dictionary comes with an optional suggested opening sentence, then you can choose to use it here by specifying a value of 1 (one). If you don’t specify one or zero then the server may or may not include the suggested opening sentence, depending on how the ipsum generator has been configured.
format_htmlType: bool (1 or 0)
Return the gobbledygook as a pre-formatted HTML string instead of an array of JSON strings.
HTTP GET parameters for the /generate endpoint.

Fair Use & Throttling

We monitor and occasionally throttle API requests. So if you batter API with 100 requests per second, don’t be surprised if you start seeing funny error messages.

We might even block your IP address completely, or send you to the naughty step to think about what you’ve done.