Fetch Ethical placeholder text via the Vegan Ipsum API
Build dynamic, cruelty-free mockups with our lightweight REST API. Integrate plant-based placeholder text directly into your frontend or backend applications via simple JSON endpoints. This API provides paragraphs, sentences, or words in plain or HTML format.
Introduction
Vegan Ipsum JSON API
The Vegan Ipsum JSON API is a high-performance web service designed to help developers seamlessly integrate vegan-themed placeholder text into their applications, websites, and digital projects.
Whether you need multiple paragraphs for blog mockups, a few sentences for UI prototypes, or single words to fill form inputs, this API offers flexible parameters to customize the generated content to your exact requirements.
The API returns content in both plain text and HTML formats, making it ready for immediate insertion into web pages or templates. It supports standard GET requests for simple retrieval and POST requests for more complex payloads via JSON.
Root Endpoint
API Base URL
All API endpoints are relative to the following base URL. We strongly recommend using HTTPS for all requests to ensure security and data integrity.
HTTP Protocol
Request Methods
The Vegan Ipsum API supports standard HTTP request methods to fetch vegan-themed placeholder text. Both GET and POST requests return the same JSON response structure and accept identical parameters.
Query Parameters
Send parameters as query strings appended to the URL. This method is ideal for quick requests and can be easily tested via a browser address bar or command-line tools like cURL.
JSON Body
Send parameters as a JSON object in the request body. Use this method for complex queries or when integrating securely within client-server applications.
Customization
Query Parameters
Customize the API output using the following request parameters. These options provide full control over the volume, unit type, and format of the generated placeholder text to perfectly fit your UI layout.
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
count | number | No | 3 | The number of units to generate. Accepts an integer between 1 and 100. |
units | string | No | paragraphs | The type of text unit. Accepted values are paragraphs, sentences, or words. |
format | string | No | plain | The output format. Use plain for raw text strings or html to wrap paragraphs in <p> tags. |
Use the format=html parameter when injecting content directly into web pages. This preserves the intended paragraph structure without requiring additional processing on the client side.
Query Strings
GET Request Example
When using GET requests, parameters are appended to the URL as query strings. The following examples demonstrate how to fetch specific amounts and formats of plant-based placeholder text using standard tools and libraries.
JSON Body
POST Request Example
For POST requests, send parameters as a JSON object in the request body. This method is ideal for programmatic API calls from backend services or frontend applications where query strings might become cluttered or exceed URL length limits.
JSON Output
Response Format
A successful API request returns a JSON object containing a single text property. This string holds your generated vegan ipsum content, formatted exactly as requested and ready for immediate integration.
The response strictly adheres to the parameters defined in your request, including thecount, units, and format, ensuring the output fits seamlessly into your application's layout.
Bad Request
Error Handling
If a request contains invalid parameters or values outside the allowed ranges, the API returns a 400 Bad Request status code. The response body includes a descriptive error message to help you debug the issue efficiently.
Implement client-side validation for your input parameters before sending requests to ensure smooth API usage and prevent unnecessary errors.
Status Codes
HTTP Status Codes
The API utilizes standard HTTP status codes to indicate the result of a request. Below are the most common codes you may encounter when interacting with the endpoint:
- 200
OK
Request was successful. 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 request method.
- 500
Internal Server Error
Something went wrong on the server side. Try again later or contact support if the problem persists.