API Instructions

Base URL

https://textsamples.com/api/generate/

Method

GET

Parameters

Parameter Description Default Value Example
type The type of text to generate. paragraphs small_paragraphs, medium_paragraphs, large_paragraphs, random_paragraphs, sentences, words
count The number of paragraphs, sentences, or words to generate. 3 1, 5, 10
theme The theme of the text. standard standard, tech, food, adventure, football, hipster, dungeons & dragons

Example API Requests


GET https://textsamples.com/api/generate/?type=large_paragraphs&count=7&theme=standard
GET https://textsamples.com/api/generate/?type=sentences&count=2&theme=tech
GET https://textsamples.com/api/generate/?type=words&count=250&theme=dnd
            

Response Format


{
    "text": "Your generated placeholder text goes here."
}
            

FAQs

  • Q: What is the maximum number of text elements I can generate? A: You can generate up to 100 paragraphs, sentences, or words in a single request.
  • Q: Can I use the API for commercial projects? A: Yes, the API is free to use, but please provide attribution if possible.
  • Q: Is there a limit to API usage? A: The free tier allows up to 1,000 requests per day. Contact us for extended usage.