Vegan Ipsum JSON API
Fetch vegan-inspired placeholder text for your apps and projects. This API provides paragraphs, sentences, or words in plain or HTML format.
Introduction
The Vegan Ipsum JSON API is a powerful and easy-to-use web service designed to help developers seamlessly integrate vegan-themed placeholder text into their applications, websites, and digital projects. This API generates meaningful, plant-based lorem ipsum text that supports ethical and eco-conscious design practices.
Whether you need multiple paragraphs for blog mockups, a few sentences for UI prototypes, or even single words to fill form inputs, this API offers flexible options to customize the generated content to your exact needs.
The API returns content in both plain
text and HTML
formats, making it easy to insert directly into web pages, emails, or apps without additional formatting.
Built with developer convenience in mind, Vegan Ipsum API supports both simple GET requests with query parameters and more complex POST requests with JSON payloads, allowing integration in various development environments and workflows.
Base URL
To start using the Vegan Ipsum API, make requests to the following base URL. All endpoints are relative to this root:
https://veganipsum.vercel.app/api
This base URL supports both HTTP and HTTPS protocols, but HTTPS is strongly recommended for security and data integrity.
Request Methods
The Vegan Ipsum API supports the following HTTP request methods to fetch your vegan-themed placeholder text:
- GET — Send your parameters as query strings appended to the URL. This method is ideal for quick or simple requests and easy testing via browser or command line.
- POST — Send your parameters as JSON in the request body. Use this method for more complex queries or when integrating the API in client-server applications.
Both methods return the same JSON response structure and support all available parameters.
Parameters
You can customize the output of the Vegan Ipsum API by using the following parameters. These give you full control over the amount, type, and format of placeholder text:
Name | Type | Required | Description |
---|---|---|---|
count | number | No (default: 3) | Specifies how many units of text to generate. Valid range is 1 to 100. Units depend on the units parameter. |
units | string | No (default: paragraphs) | The type of text unit to generate. Acceptable values are paragraphs , sentences , or words . |
format | string | No (default: plain) | Determines the output format. Use plain for raw text or html for formatted HTML paragraphs or sentences. If omitted or invalid, defaults to plain . |
Tip: Use format=html
when injecting content directly into web pages to preserve paragraph and sentence structure without extra processing.
GET Request Example
Here is an example GET request that retrieves two paragraphs of plain text vegan ipsum:
GET https://veganipsum.vercel.app/api?count=2&units=paragraphs&format=plain
You can also use curl
to test from the command line:
curl "https://veganipsum.vercel.app/api?count=3&units=sentences&format=html"
POST Request Example
Use the POST method to send parameters in the JSON request body, which is especially useful for programmatic API calls from backend services or frontend applications:
curl -X POST "https://veganipsum.vercel.app/api" \
-H "Content-Type: application/json" \
-d '{"count": 5, "units": "sentences", "format": "plain"}'
Response Format
A successful API call returns a JSON object containing a text
property with the generated vegan ipsum content:
{
"text": "Cucumber asparagus lentils smoothie harmony kind eggplant pancake laborum non brussels beetroot pepper plant sustain. Nostrud lettuce cillum cucumber celery positivity reprehenderit turmeric laboris chard voluptate eu comfort. Minim vegan-burger nutrients shallot ad humility okra."
}
The text string respects your requested unit count, unit type, and format, ready for immediate use in your projects.
Error Handling
If your request contains invalid parameters or values outside the allowed ranges, the API returns a 400 Bad Request
status with a helpful error message to guide you in fixing the issue.
{
"error": "Invalid count. Please provide a number between 1 and 100."
}
Make sure to validate your input parameters before sending requests to ensure smooth and predictable API usage.
HTTP Status Codes
- 200 OK – Request was successful, and the response contains the requested vegan ipsum text.
- 400 Bad Request – Your request had invalid or missing parameters. Review the error message and try again.
- 404 Not Found – The endpoint you tried to access does not exist. Check the URL and method.
- 500 Internal Server Error – Something went wrong on the server side. Try again later or contact support if the problem persists.