Welcome to the comprehensive API documentation for WebSim.ai. This guide covers both standard and special endpoints, as well as utility functions to enhance your WebSim experience.
Retrieves the most recently created website.
[
{
"id": "string",
"title": "string",
"url": "string",
"username": "string",
"avatar_url": "string"
}
]
Retrieves websites liked by a user.
{
"userid": "string"
}
{
"data": [
{
"site_id": "string",
"title": "string",
"simulated_url": "string",
"username": "string",
"avatar_url": "string",
"liked_at": "string (ISO 8601 date)"
}
]
}
Retrieves new bookmarks.
{
"data": [
{
"site_id": "string",
"title": "string",
"simulated_url": "string",
"username": "string",
"avatar_url": "string"
}
]
}
Retrieves trending websites.
max_age_hours: number
{
"data": [
{
"site_id": "string",
"title": "string",
"simulated_url": "string",
"username": "string",
"avatar_url": "string",
"likes": number,
"views": number
}
]
}
Generates and returns a raw SVG element based on a given concept.
{
"concept": "string",
"width": number,
"height": number
}
{
"svg": "string (raw SVG content)"
}
Generates and returns JavaScript code for a described function that can be used directly in an eval statement.
{
"description": "string",
"parameters": ["string"],
"returnType": "string"
}
{
"function": "string (JavaScript function code)"
}
Creates a new simulated website.
{
"title": "string",
"url": "string",
"content": "string (HTML content)"
}
{
"site_id": "string",
"url": "string"
}
Retrieves a random simulated website.
{
"site_id": "string",
"title": "string",
"url": "string",
"content": "string (HTML content)"
}
Generates a cohesive color scheme based on a given base color.
base_color: string (hex color code)
{
"primary": "string (hex color code)",
"secondary": "string (hex color code)",
"accent": "string (hex color code)",
"background": "string (hex color code)",
"text": "string (hex color code)"
}
Converts plain text to formatted HTML.
{
"text": "string",
"format": "string (optional: 'markdown' or 'basic')"
}
{
"html": "string (formatted HTML)"
}
Generates lorem ipsum placeholder text.
paragraphs: number
words_per_paragraph: number (optional)
{
"text": "string (lorem ipsum text)"
}
Minifies HTML, CSS, or JavaScript code.
{
"code": "string",
"type": "string ('html', 'css', or 'js')"
}
{
"minified": "string (minified code)"
}
This concludes the comprehensive API documentation for WebSim.ai. These endpoints and utility functions should provide you with powerful tools to create, manipulate, and enhance your simulated websites. Happy coding!