Mock Data API
Generate realistic fake JSON data for testing and development. Free, fast, and reliable API endpoints.
Getting Started
Our Mock Data API provides realistic fake data for testing and development purposes. Perfect for prototyping, testing applications, and development workflows.
Quick Start Guide
Make a GET request to any endpoint to receive JSON data immediately. Perfect for prototyping and testing applications without setting up a backend.
API Base URL
https://easytoolhub.xyz/
Quick Example Request
curl https://easytoolhub.xyz/tools/dummy-data/users
Authentication & Access
Currently, no authentication is required for accessing the mock data endpoints. All endpoints are publicly accessible for development and testing purposes.
No API Key Required
Start using the API immediately without registration, API keys, or any setup process. Simply make HTTP requests to our endpoints and receive JSON data.
Available API Endpoints
Users Endpoint
GET /tools/dummy-data/users
Get a comprehensive list of fake user data with realistic information including names, emails, addresses, and profile details.
Posts Endpoint
GET /tools/dummy-data/posts
Get fake blog posts and articles with titles, content, metadata, author information, and engagement metrics.
Products Endpoint
GET /tools/dummy-data/products
Get fake product data perfect for e-commerce applications, including pricing, inventory, and product details.
Error Handling & Status Codes
The API uses standard HTTP status codes to indicate the success or failure of requests. All error responses include detailed information to help with debugging.
Request successful, data returned
Endpoint or resource not found
Rate limit exceeded
Internal server error
Error Response Format
{
"error": {
"code": 404,
"message": "Endpoint not found",
"details": "The requested resource could not be found on this server.",
"timestamp": "2024-01-15T10:30:00Z"
}
}
Rate Limiting & Usage Policies
To ensure fair usage and optimal performance for all users, the API implements rate limiting. Current limits are generous for development and testing purposes.
Current Rate Limits
- 1000 requests per hour per IP address
- 100 requests per minute per IP address
- No authentication required for basic usage
- Automatic reset after time window expires
Rate Limit Headers
Each API response includes headers with rate limit information:
X-RateLimit-Limit: 1000
X-RateLimit-Remaining: 999
X-RateLimit-Reset: 1640995200
X-RateLimit-Window: 3600
Code Examples & Integration
JavaScript (Fetch API)
Modern JavaScript approach using the Fetch API with error handling:
// Fetch users data with error handling
fetch('https://easytoolhub.xyz/tools/dummy-data/users')
.then(response => {
if (!response.ok) {
throw new Error(`HTTP error! status: ${response.status}`);
}
return response.json();
})
.then(data => {
console.log('Users:', data);
// Process the data
data.forEach(user => {
console.log(`${user.name} - ${user.email}`);
});
})
.catch(error => {
console.error('Error fetching users:', error);
});
// Async/await version
async function getUsers() {
try {
const response = await fetch('https://easytoolhub.xyz/tools/dummy-data/users');
if (!response.ok) {
throw new Error(`HTTP error! status: ${response.status}`);
}
const users = await response.json();
return users;
} catch (error) {
console.error('Error fetching users:', error);
return [];
}
}
Python (Requests Library)
Python implementation with comprehensive error handling:
import requests
import json
from typing import List, Dict
def get_users() -> List[Dict]:
"""Fetch users from the Mock Data API."""
url = 'https://easytoolhub.xyz/tools/dummy-data/users'
try:
response = requests.get(url, timeout=10)
response.raise_for_status()
users = response.json()
print(f"Successfully fetched {len(users)} users")
return users
except requests.exceptions.Timeout:
print("Request timed out")
return []
except requests.exceptions.ConnectionError:
print("Connection error occurred")
return []
except requests.exceptions.HTTPError as e:
print(f"HTTP error occurred: {e}")
return []
except requests.exceptions.RequestException as e:
print(f"An error occurred: {e}")
return []
# Usage example
if __name__ == "__main__":
users = get_users()
for user in users[:5]: # Display first 5 users
print(f"{user['name']} - {user['email']}")
cURL Commands
Command-line examples for testing and automation:
# Get users with headers
curl -X GET "https://easytoolhub.xyz/tools/dummy-data/users" \
-H "Accept: application/json" \
-H "User-Agent: MyApp/1.0"
# Get posts with pretty printing (requires jq)
curl -X GET "https://easytoolhub.xyz/tools/dummy-data/posts" \
-H "Accept: application/json" | jq '.'
# Save response to file
curl -X GET "https://easytoolhub.xyz/tools/dummy-data/users" \
-H "Accept: application/json" \
-o users.json
Try the API Now
Test the API endpoints directly from your browser or use these interactive examples to see the data structure.
Frequently Asked Questions
Is the Mock Data API completely free to use?
Yes, the Mock Data API is completely free for development and testing purposes. There are no hidden costs, subscription fees, or usage charges.
Can I use this API in production applications?
This API is designed for development and testing purposes. For production use, we recommend implementing your own data source or using a production-ready API service.
How often is the mock data updated?
The mock data is static and designed to be consistent for testing purposes. This ensures your tests and development work remain predictable.
Are there any CORS restrictions?
The API is configured to allow cross-origin requests from any domain, making it easy to use in web applications during development.
Comments Endpoint
Get fake comments and reviews with user information, engagement metrics, and realistic comment content.