🏠

ToyDevs API

Your Home for Mock Data

Live & Ready to Use

Welcome to Your Mock Data Home

The most comprehensive free dummy JSON API designed for developers who need realistic test data. Unlike basic alternatives, we provide advanced features that make development a joy.

Perfect For Development

  • Frontend development & prototyping
  • API testing & integration testing
  • Learning REST API concepts
  • Demo applications & tutorials
🚀

Advanced Features

  • 4 resource types with 50+ items each
  • Advanced query parameters
  • Custom schema generation
  • Deterministic seeding
💝

Developer Friendly

  • CORS enabled, no auth required
  • Interactive playground
  • Comprehensive documentation
  • Free forever

See It In Action

Try this example right now in your browser console!

fetch('https://api.toydevs.com/products?limit=3')
  .then(response => response.json())
  .then(data => console.log(data));

Quick Start

Basic Usage

curl https://api.toydevs.com/products

JavaScript Fetch

fetch('https://api.toydevs.com/products')
  .then(response => response.json())
  .then(data => console.log(data));

Node.js with Axios

const axios = require('axios');

axios.get('https://api.toydevs.com/products')
  .then(response => console.log(response.data))
  .catch(error => console.error(error));

API Endpoints

Products

GET /products

Get a list of products with pagination, search, and filtering.

Query Parameters
  • limit - Number of items to return (max 100, default 10)
  • skip - Number of items to skip (default 0)
  • q - Search in title, description, category, brand
  • category - Filter by category
  • brand - Filter by brand
  • sort - Sort by field (title, price, rating, etc.)
  • order - Sort order (asc, desc)
  • select - Select specific fields (comma-separated)
  • seed - Deterministic seed for consistent results
Example Response
{
  "total": 100,
  "limit": 10,
  "skip": 0,
  "data": [
    {
      "id": 1,
      "title": "Premium Apple Product 1",
      "description": "lorem ipsum dolor sit amet...",
      "price": 599,
      "discountPercentage": 12,
      "rating": 4.5,
      "stock": 94,
      "brand": "Apple",
      "category": "Electronics",
      "thumbnail": "https://picsum.photos/200/200?random=1",
      "images": ["https://picsum.photos/400/400?random=11"],
      "createdAt": "2024-01-15T10:30:00.000Z",
      "updatedAt": "2024-02-01T14:20:00.000Z"
    }
  ]
}
GET /products/:id

Get a single product by ID.

Users

GET /users

Get a list of users with detailed profiles including address and contact information.

Example Response
{
  "total": 100,
  "limit": 10,
  "skip": 0,
  "data": [
    {
      "id": 1,
      "firstName": "John",
      "lastName": "Smith",
      "username": "johnsmith123",
      "email": "john.smith@gmail.com",
      "phone": "+1-555-123-4567",
      "gender": "male",
      "age": 32,
      "country": "USA",
      "avatar": "https://picsum.photos/150/150?random=101",
      "birthDate": "1992-03-15",
      "address": {
        "street": "1234 Main St",
        "city": "New York",
        "zipcode": "10001",
        "coordinates": {
          "lat": "40.712776",
          "lng": "-74.005974"
        }
      }
    }
  ]
}
GET /users/:id

Get a single user by ID.

Posts

GET /posts

Get blog posts with reactions, tags, and view counts.

GET /posts/:id

Get a single post by ID.

Todos

GET /todos

Get todo items with priority, category, and due dates.

GET /todos/:id

Get a single todo by ID.

Custom Schema Generation

Generate custom data structures by defining your own JSON schema. Perfect for testing specific data formats or creating mock data for your unique use cases.

POST /generate

Supported Field Types

Basic Types
  • string - Random text
  • number - Random number
  • boolean - True/false
  • uuid - UUID v4
  • email - Email address
  • url - Web URL
Advanced Types
  • date - Date (YYYY-MM-DD)
  • datetime - ISO datetime
  • paragraph - Lorem paragraph
  • sentence - Lorem sentence
  • word - Single word
  • array - Array of items

Query Parameters

  • count - Number of objects to generate (1-100, default 1)
  • locale - Locale for generated data (en, de, fr, es)
  • seed - Deterministic seed for consistent results
Example: Simple Schema
POST /generate?count=3

{
  "name": "string",
  "age": "number",
  "email": "email",
  "isActive": "boolean"
}
Example: Complex Schema with Arrays
POST /generate?count=2

{
  "user": {
    "type": "object",
    "properties": {
      "id": "uuid",
      "profile": {
        "type": "object", 
        "properties": {
          "name": "string",
          "bio": "paragraph"
        }
      }
    }
  },
  "tags": {
    "type": "array",
    "count": 3,
    "items": "string"
  },
  "metadata": {
    "type": "object",
    "properties": {
      "createdAt": "datetime",
      "views": "number"
    }
  }
}
Example Response
{
  "count": 2,
  "data": [
    {
      "user": {
        "id": "550e8400-e29b-41d4-a716-446655440000",
        "profile": {
          "name": "lorem ipsum dolor",
          "bio": "Lorem ipsum dolor sit amet consectetur..."
        }
      },
      "tags": ["lorem", "ipsum", "dolor"],
      "metadata": {
        "createdAt": "2024-01-15T10:30:00.000Z",
        "views": 1247
      }
    }
  ]
}

🚀 Interactive Playground

Test our API endpoints in real-time. Build requests, see responses, and generate code examples instantly.

1 Build Your Request

2 Response

👋 Click "Send Request" to see the magic happen...

3 Generated Code Examples

$ cURL

curl https://api.toydevs.com/products

JS JavaScript

fetch('https://api.toydevs.com/products')

📦 Axios

axios.get('https://api.toydevs.com/products')

Frequently Asked Questions

Is there a rate limit?

Currently, there are no strict rate limits, but we encourage caching responses and reasonable usage. Heavy abuse may result in temporary throttling.

How does seeding work?

Use the ?seed=42 parameter to get deterministic, reproducible results. The same seed will always return the same data, perfect for consistent testing and demos.

Is CORS enabled?

Yes! All endpoints include proper CORS headers, so you can use the API directly from your frontend applications without any proxy.

Can I simulate errors?

Yes! Add ?fail=true to any endpoint to simulate a 503 error response. Great for testing error handling in your applications.

What about latency testing?

Use ?delay=1000 to add artificial delay (in milliseconds, max 2000ms) to responses. Perfect for testing loading states and timeouts.

Is this free forever?

Yes! ToyDevs API is completely free to use. We may introduce premium features in the future, but the core API will always remain free.

Changelog

v1.0.0

Latest

Released January 15, 2025

  • 🎉 Initial release of ToyDevs API
  • ✅ 4 resource endpoints (products, users, posts, todos)
  • 🔍 Advanced query parameters (pagination, search, filtering, sorting)
  • 🎨 Custom schema generation with POST /generate
  • 🌱 Deterministic seeding for consistent results
  • ⚡ Error simulation and artificial delay features
  • 📚 Comprehensive documentation with interactive playground
  • 🌙 Dark mode support in documentation