Skip to content
Content Generation & Placeholders

Text placeholder

The text placeholder API generates filler text with a chosen number of sentences and words. JSON or text output, a safe limit and random results on every call.

GET https://api2.globus.studio/v2/ph_text

Reference

Name Type Required Description
sentences integer no Number of sentences. sentence is an alias. Values over 250 fall back to 100. Default: 100.
words integer no Words per sentence. word is an alias. Values over 250 fall back to 100. Default: 100.
format string no text (HTML content type) or json. Default: text.

Example request

curl -s "https://api2.globus.studio/v2/ph_text?sentences=3&words=10"
Open documentation

text placeholder

The text placeholder endpoint returns filler text with a chosen number of sentences and words. It fills a card, a paragraph or a test fixture while the real copy is in review. The output is random on every call, so it also shows how a layout behaves with different word lengths.

What the text placeholder returns

Without a format the endpoint returns HTML text. With format=json it returns the text with the actual sentence and word counts. The JSON shape is easier to assert in a test.

{"text":"Sample filler text for a layout test.","sentences":2,"words":4}

Parameters

sentences sets the number of sentences and words sets the words per sentence. The old names sentence and word still work. Values above 250 fall back to 100 to keep the response bounded.

Why the output changes

Each call returns a new combination of words. That is useful when you want to see a layout with different lengths. If you need the same text for a screenshot test, save the response and use the saved file. Do not build a snapshot test on a random call.

Keep it out of production

The text placeholder belongs in fixtures and prototypes. A live page with filler copy looks unfinished and gives search engines nothing useful. Replace it before launch, even on a page that is not in the navigation. A placeholder paragraph in an indexed page can stay in search results for weeks.

Testing overflow

Generate a short paragraph and a long one, then check the card at both lengths. A title that wraps to three lines can push a button out of the card. A paragraph with a long word can overflow a narrow column. Random text exposes those cases faster than a repeated sentence.

Localization

German words are longer than English words. A layout tested only with English can break when a translation arrives. If the site will support more languages, test with a longer locale or with a string that has long words. The text placeholder does not translate, so generate the long string yourself.

A minimal fixture page

Build one page with three cards, a long heading and a paragraph. Fill each slot with a different length. Check the layout at 320, 768 and 1440 pixels. The page is small, but it catches the overflow and wrapping problems that a single repeated sentence hides.

Keep the page in the repository as a fixture and run it after a CSS change. It is faster than clicking through the catalog and it does not depend on production content. Three lengths catch most defects: one short sentence, a paragraph of about 60 words and a block of 200 words.

Repeat the test with a long word, such as a URL or a German compound noun. A layout that only sees English prose can break when a translation arrives. The text placeholder does not translate, so paste a long string into the fixture yourself.

Limits

A fixture with placeholder text should never be the only test. Add one screen with real copy from the content plan. Real words have a rhythm that random words do not, and a heading that looks fine with filler can break with a real product name.

The text placeholder is fast and rate limited. It does not follow a topic and does not produce meaningful copy. Read the text placeholder guide for a minimal test page and a fixture pattern.

Use the image placeholder for the media slot and the QR generator for a link block. A page with both placeholders looks close to the final layout at every breakpoint.

Further reading: W3C Web Accessibility Initiative.

Custom work

Need an API that does not exist yet?

Describe the task and the response format. We will estimate the endpoint, the integration and the maintenance.

Start a conversation