Developer interface

The placeholder-text API

Sometimes the browser generator is one detour too many: if you need placeholder text in seeds, fixtures, automated tests or right in your build process, you want to fetch it with a call – not copy it. That is exactly what this endpoint is for: a single GET request, no sign-up, no API key, no cost.

The API uses exactly the same word lists as the generator on the start page. What you see there is what you get here – as JSON or plain text.

Typographic specimen with lorem ipsum text, umlauts, digits and special characters

Endpoint

GET https://loremipsum-generator.org/api

Parameters

typeText type: lorem (default), german or numbers
paragraphsNumber of paragraphs, 1–20 (default: 3)
wordsalternatively: total number of words, 1–2000 (takes precedence over paragraphs)
formatjson (default) or text
start1 = start with "Lorem ipsum dolor sit amet …" (type=lorem only)
kindtype=numbers only: int (default), dec or price
counttype=numbers only: number of values, 1–100 (default: 10)
min / maxtype=numbers only: value range (default: 0 to 1000)
localetype=numbers only: de (1.234,56 €) or en ($1,234.56)

Examples

curl

curl "https://loremipsum-generator.org/api?type=german&paragraphs=2&format=text"

JavaScript (fetch)

const res  = await fetch("https://loremipsum-generator.org/api?type=lorem&words=120&start=1");
const data = await res.json();
console.log(data.text);

PHP

$json = file_get_contents("https://loremipsum-generator.org/api?type=numbers&kind=price&count=5&locale=de");
$data = json_decode($json, true);
print_r($data["paragraphs"]);

Response format

{
  "source": "https://loremipsum-generator.org",
  "attribution": "Generated by loremipsum-generator.org – free to use.",
  "meta": { "type": "lorem", "paragraphs": 3 },
  "paragraphs": ["Lorem ipsum dolor …", "…", "…"],
  "text": "Lorem ipsum dolor …"
}

Every JSON response contains the fields source and attribution as automatic credit. With format=text, the source appears as the last line below the text.

Fair-use limit & CORS

Each IP address may make 120 requests per hour and 1,500 requests per day – more than enough for tests and build runs. When a limit is reached, the API responds with status 429 and a Retry-After header. The X-RateLimit-Limit and X-RateLimit-Remaining headers always show the state of the hourly limit. IPv6 requests are counted per /64 network, not per individual address.

The endpoint is CORS-enabled for all origins (Access-Control-Allow-Origin: *), so you can call it directly from any page’s browser JavaScript. And if you need really large amounts of text: the whole generator runs client-side anyway – for bulk generation the start page is the faster choice.

Back to the generator