Text placeholder

This API generates placeholder text with a specified number of sentences and words.
1ms

About

The API generates placeholder (filler) text based on the provided parameters for the number of sentences and words. If the specified number of sentences or words exceeds 250, the API defaults to generating 100 sentences and 100 words. The response is returned in plain text format.
by GLOBUS.studio

Endpoint

				
					async function getPlaceholderText(sentence, word) {
    const response = await fetch(`https://api.globus.studio/v2/ph_text?sentence=${encodeURIComponent(sentence)}&word=${encodeURIComponent(word)}`);
    console.log('Response:', response);
    const text = await response.text();
    console.log(text); 
    const p = document.createElement('p');
    p.textContent = text;
    document.body.appendChild(p);
}

getPlaceholderText("5", "10");