Placeholder text on demand

Lorem Ipsum API

Generate placeholder text with a single GET request. Control the number of paragraphs and sentences. Output as plain text or HTML.

Parameters

ParamRequiredDescription
paragraphsOptionalNumber of paragraphs (default 3)
sentencesOptionalSentences per paragraph (default 5)
formatOptional"text" or "html" (default "text")

Code Examples

cURL

curl "https://api-snap.com/api/lorem?paragraphs=3&sentences=5" \
  -H "Authorization: Bearer snp_your_key"

JavaScript

const res = await fetch(
  "https://api-snap.com/api/lorem?paragraphs=2&format=html",
  { headers: { Authorization: "Bearer snp_your_key" } }
);
const { text } = await res.json();

Python

import requests

r = requests.get(
    "https://api-snap.com/api/lorem",
    params={"paragraphs": 5, "sentences": 4},
    headers={"Authorization": "Bearer snp_your_key"},
)
print(r.json()["text"])

Common Use Cases

UI prototyping

Fill mockups and prototypes with realistic-looking text content

Database seeding

Generate test data for development and staging environments

CMS previews

Show placeholder content in empty CMS pages and templates

Design systems

Test typography and layout with varying text lengths

Generate Placeholder Text

Paragraphs, sentences, text or HTML. One GET request.

Get Your Free API Key