API Documentation

Complete reference for all available mock APIs

Base URL: https://mockapi-hub.vercel.app

Why Use MockAPI Hub?

This project solves a common pain point for frontend developers, testers, and students — they often need real-looking data and APIs to test UI components or simulate app flows. MockAPI Hub provides a centralized, easy-to-use platform where anyone can access a variety of fake REST APIs across multiple categories, try them live, and even create their own custom endpoints without writing backend code. It saves time, improves development speed, and reduces dependencies on backend teams during early development phases.

Quick Start
Get started with MockAPI Hub in seconds
JavaScript (Fetch)
fetch('https://mockapi-hub.vercel.app/api/users')
  .then(response => response.json())
  .then(data => console.log(data));
Users API
3 endpoints available
GET
https://mockapi-hub.vercel.app/api/users

Get all users

Response:

[
  {
    "id": 1,
    "name": "John Doe",
    "email": "john@example.com",
    "avatar": "https://i.pravatar.cc/150?img=1"
  }
]
GET
https://mockapi-hub.vercel.app/api/users/{id}

Get user by ID

Parameters:

id (integer) - User ID

Response:

{
  "id": 1,
  "name": "John Doe",
  "email": "john@example.com",
  "avatar": "https://i.pravatar.cc/150?img=1"
}
POST
https://mockapi-hub.vercel.app/api/users

Create new user

Request Body:

{
  "name": "string",
  "email": "string"
}

Response:

{
  "id": 3,
  "name": "New User",
  "email": "new@example.com",
  "created": true
}
Products API
2 endpoints available
GET
https://mockapi-hub.vercel.app/api/products

Get all products

Response:

[
  {
    "id": 1,
    "name": "Laptop",
    "price": 999.99,
    "category": "Electronics",
    "inStock": true
  }
]
GET
https://mockapi-hub.vercel.app/api/products/{id}

Get product by ID

Parameters:

id (integer) - Product ID

Response:

{
  "id": 1,
  "name": "Laptop",
  "price": 999.99,
  "category": "Electronics",
  "inStock": true
}
Posts API
1 endpoints available
GET
https://mockapi-hub.vercel.app/api/posts

Get all posts

Response:

[
  {
    "id": 1,
    "title": "Hello World",
    "content": "This is my first post",
    "author": "John Doe",
    "createdAt": "2024-01-15"
  }
]
Authentication
Most endpoints are public, but some require authentication

Public Endpoints

All GET endpoints are publicly accessible without authentication.

Protected Endpoints

POST, PUT, and DELETE endpoints require a valid JWT token in the Authorization header:

Authorization: Bearer your-jwt-token
Rate Limiting
Fair usage limits to ensure service availability

Free Tier

  • • 1,000 requests per hour
  • • 10,000 requests per day
  • • No authentication required

Registered Users

  • • 5,000 requests per hour
  • • 50,000 requests per day
  • • Custom API creation

Need Help?

Join our community or reach out for support