Documentation
Welcome to the mockapi.run documentation. Our API provides high-quality, predictable mock data for your frontend development needs. Whether you're building a prototype, testing your application, or creating a tutorial, our endpoints are ready to use instantly.
Usage
All endpoints are available over HTTPS at https://mockapi.run/api/*. You can
use any standard HTTP client or the fetch API to interact with them.
.then(res => res.json())
.then(data => console.log(data))
Companies
Company profiles with related products, comments, locations and hiring stats.
[
{
"id": 1,
"name": "Northstar Labs",
"industry": "developer-tools",
"verified": true
}
] {
"id": 1,
"name": "Northstar Labs",
"slug": "northstar-labs",
"status": "active",
"website": "https://northstarlabs.dev"
} [
{
"id": 1,
"name": "Northstar Labs",
"legalName": "Northstar Labs Inc."
}
] {
"examples": [
"/companies?industry=developer-tools",
"/companies?verified=true",
"/companies?location.country=United States",
"/companies?headquarters.currency=USD"
]
} [
{
"id": 1,
"name": "Northstar Labs",
"industry": "developer-tools",
"website": "https://northstarlabs.dev"
}
] [
{
"id": 1,
"companyId": 1,
"title": "Keychron Studio 60% Keyboard 1"
}
] [
{
"id": 1,
"companyId": 1,
"productId": 1,
"body": "The typing experience feels great for long sessions."
}
] Users
User profiles, search, filters, roles and related resources.
[
{
"id": 1,
"name": "Leanne Graham",
"email": "sincere@april.biz"
}
] {
"id": 1,
"name": "Leanne Graham",
"username": "Bret",
"email": "sincere@april.biz",
"role": "admin"
} [
{
"id": 1,
"name": "Leanne Graham",
"email": "sincere@april.biz"
}
] {
"examples": [
"/users?role=admin",
"/users?status=active",
"/users?company.name=Romaguera-Crona",
"/users?address.city=Gwenborough"
]
} [
{
"id": 1,
"name": "Leanne Graham",
"email": "sincere@april.biz"
}
] [
{
"id": 1,
"title": "Understanding REST APIs"
}
] [
{
"id": 1,
"postId": 1,
"body": "Really useful article!"
}
] [
{
"id": 1,
"title": "Prepare API mocks 1",
"completed": false
}
] Posts
Blog posts, articles, authors, tags and publishing states.
[
{
"id": 1,
"title": "Understanding REST APIs",
"published": true
}
] {
"id": 1,
"title": "Understanding REST APIs",
"body": "REST APIs allow communication between services.",
"published": true
} [
{
"id": 12,
"title": "React Performance Tips"
}
] {
"examples": [
"/posts?userId=1",
"/posts?category=frontend",
"/posts?published=true",
"/posts?author.username=bret",
"/posts?seo.metaTitle=Understanding REST APIs"
]
} [
{
"id": 1,
"title": "Understanding REST APIs",
"slug": "understanding-rest-apis"
}
] [
{
"id": 1,
"userId": 2,
"body": "Really useful article!"
}
] Products
Catalog products with pricing, inventory, company ownership and comment relations.
[
{
"id": 1,
"companyId": 1,
"title": "Keychron Studio 60% Keyboard 1",
"price": 129.99,
"stock": 42
}
] {
"id": 1,
"companyId": 1,
"title": "Keychron Studio 60% Keyboard 1",
"slug": "keychron-studio-60-keyboard-1",
"brand": "Keychron",
"price": 129.99,
"status": "active"
} [
{
"id": 8,
"companyId": 3,
"title": "Keychron Air TKL Keyboard 8",
"brand": "Keychron"
}
] {
"examples": [
"/products?companyId=1",
"/products?brand=Keychron",
"/products?category=mechanical-keyboards",
"/products?featured=true",
"/products?seller.name=Northwind Devices",
"/products?shipping.freeShipping=true"
]
} [
{
"id": 1,
"companyId": 1,
"title": "Keychron Studio 60% Keyboard 1",
"price": 129.99,
"stock": 42
}
] {
"id": 1,
"name": "Northstar Labs"
} [
{
"id": 1,
"productId": 1,
"userId": 2,
"body": "The typing experience feels great for long sessions."
}
] Todos
Task management items assigned to users and linked with comment activity.
[
{
"id": 1,
"userId": 1,
"title": "Prepare API mocks 1",
"completed": false
}
] {
"id": 1,
"userId": 1,
"title": "Prepare API mocks 1",
"completed": false,
"priority": "high"
} [
{
"id": 12,
"title": "Document API mocks 12"
}
] {
"examples": [
"/todos?userId=1",
"/todos?completed=false",
"/todos?priority=high",
"/todos?assignedTo.username=bret",
"/todos?metadata.pinned=true"
]
} [
{
"id": 1,
"title": "Prepare API mocks 1",
"completed": false,
"userId": 1
}
] {
"id": 1,
"name": "Leanne Graham",
"username": "Bret"
} [
{
"id": 1,
"userId": 2,
"body": "Really useful article!"
}
]
Comments
Comments related to posts, todos, users, products and companies.
[ { "id": 1, "postId": 1, "productId": 1, "companyId": 1, "userId": 2, "body": "Really useful article!" } ]{ "id": 1, "postId": 1, "productId": 1, "companyId": 1, "userId": 2, "body": "Really useful article!", "status": "approved" }[ { "id": 12, "companyId": 2, "body": "Really useful article!" } ]{ "examples": [ "/comments?postId=1", "/comments?productId=1", "/comments?companyId=1", "/comments?userId=2", "/comments?status=approved", "/comments?author.username=bret", "/comments?post.slug=understanding-rest-apis" ] }[ { "id": 1, "body": "Really useful article!", "userId": 2, "postId": 1, "productId": 1, "companyId": 1 } ]{ "id": 1, "title": "Understanding REST APIs" }{ "id": 1, "title": "Keychron Studio 60% Keyboard 1" }{ "id": 2, "name": "Ervin Howell" }{ "id": 1, "name": "Northstar Labs" }