Lorem Ipsum Generator API
Generate random lorem ipsum placeholder text as paragraphs, sentences or words, returned as one string and as an array.
Call GET /v1/lorem-ipsum to get random Latin placeholder text. Choose the unit with type (paragraphs, sentences or words) and the amount with count (1-100). The default count is 3 paragraphs, 5 sentences or 50 words.
Sentences have 6 to 15 random words and paragraphs 4 to 7 sentences. By default the text starts with the classic "Lorem ipsum dolor sit amet,", which is added in front of the generated words; set start_with_lorem=false to skip it.
The response contains text (paragraphs joined by blank lines, sentences and words by spaces) and items, the same content as an array, which is handy for filling lists or multiple fields.
Parameters
| Name | In | Type | Required | Default | |
|---|---|---|---|---|---|
type | query | string | no | paragraphs | Unit to generate: paragraphs, sentences or words. |
count | query | number | no | 3 | How many units (1-100). Default 3 paragraphs, 5 sentences or 50 words. |
start_with_lorem | query | boolean | no | true | Start the text with "Lorem ipsum dolor sit amet,". |
Example
curl "https://apibox.io.vn/v1/lorem-ipsum?type=sentences&count=2" \
-H "Authorization: Bearer YOUR_API_KEY"const res = await fetch('https://apibox.io.vn/v1/lorem-ipsum?type=sentences&count=2', {
method: 'GET',
headers: {
Authorization: 'Bearer YOUR_API_KEY',
},
});
const data = await res.json();
console.log(data);import requests
res = requests.get(
"https://apibox.io.vn/v1/lorem-ipsum?type=sentences&count=2",
headers={"Authorization": "Bearer YOUR_API_KEY"},
timeout=30,
)
print(res.json())<?php
$ch = curl_init('https://apibox.io.vn/v1/lorem-ipsum?type=sentences&count=2');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ['Authorization: Bearer YOUR_API_KEY'],
]);
$response = curl_exec($ch);
print_r(json_decode($response, true));Response
{
"type": "sentences",
"count": 2,
"text": "Lorem ipsum dolor sit amet, dolor sit ea dolore qui sint voluptate. Ad exercitation id nisi do excepteur excepteur laborum voluptate.",
"items": [
"Lorem ipsum dolor sit amet, dolor sit ea dolore qui sint voluptate.",
"Ad exercitation id nisi do excepteur excepteur laborum voluptate."
]
}
Use cases
- Fill UI mockups and prototypes with realistic text
- Seed development databases with dummy content
- Test layouts, typography and text overflow
- Generate sample data for automated tests
FAQ
How do I generate a number of words instead of paragraphs?
Use type=words&count=50. Note that the leading "Lorem ipsum dolor sit amet," is added on top unless start_with_lorem=false.
Can the text start without "Lorem ipsum"?
Yes, set start_with_lorem=false to get only random words.
What is the maximum count?
100 paragraphs, sentences or words per request.
Related APIs
Text Diff
Compare two texts by lines, words, characters, sentences or JSON and get the changes, a similarity score and a unified diff patch.
a-bSlugify
Turn titles into clean URL slugs: accents removed (Vietnamese đ included), custom separator, optional case keeping and maximum length.
123Text Statistics
Count words, characters, sentences, paragraphs and lines, estimate reading and speaking time, and list the most frequent words of a text.