Base URL
https://fakeapi.in/api/usersAPI Endpoints
GET
Copy All/api/usersGet all users
Parameters
page(number)limit(number)GET
Copy All/api/users/1Get user by ID
Parameters
id(number)GET
Copy All/api/users?q=JohnSearch users by name containing 'John'
Parameters
q(string)GET
Copy All/api/users?age=25Filter users by age
Parameters
age(string)GET
Copy All/api/users?gender=maleFilter users by gender
Parameters
gender(string)GET
Copy All/api/users?company=AcmeFilter users by company name
Parameters
company(string)GET
Copy All/api/users?jobTitle=DeveloperFilter users by job title
Parameters
title(string)GET
Copy All/api/users?sortField=name&sortOrder=ascGet users sorted by name ascending
Parameters
sortField(string)sortOrder(string)title(string)GET
Copy All/api/users?sortField=name&sortOrder=descGet users sorted by name descending
Parameters
sortField(string)sortOrder(string)GET
Copy All/api/users?page=2&limit=10Get users with pagination (page 2, 10 per page)
Parameters
page(number)limit(number)GET
Copy All/api/users?sortField=name&sortOrder=desc&page=2&limit=50Combined filters: search, filter, sort, and paginate users
Parameters
search(string)filter(string)sortField(string)sortOrder(string)page(number)limit(number)POST
Copy All/api/usersCreate new user
Parameters
name(string)email(string)password(string)role(string)title(string)PUT
Copy All/api/users/1Update user (replace all fields)
Parameters
id(number)name(string)email(string)password(string)role(string)title(string)PATCH
Copy All/api/users/1Partially update user (only provided fields will be updated)
Parameters
id(number)fields(object)DELETE
Copy All/api/users/1Delete user
Parameters
id(number)Example Usage
Copy All
import axios from "axios";
const API_URL = process.env.NEXT_PUBLIC_API_URL;
// Get all users
axios
.get(`${API_URL}api/users`)
.then(res => console.log("All Users:", res.data))
.catch(err => console.error(err));
// Create a new user
axios
.post(`${API_URL}api/users`, {
name: "John Doe",
email: "john@example.com"
})
.then(res => console.log("User Created:", res.data))
.catch(err => console.error(err));
Example Response
Copy All
{
"id": 1,
"name": "Vicky Oberbrunner II",
"email": "Alfonzo86@gmail.com",
"username": "Dwight91",
"phone": "565-966-0068 x388",
"website": "https://focused-tapioca.org",
"address": {
"street": "106 Cronin Ville",
"city": "Fort Ashlee",
"country": "Angola",
"postalCode": "60837"
},
"company": "Bogan - Sanford",
"jobTitle": "International Marketing Administrator",
"age": 49,
"gender": "female",
"createdAt": "2025-05-19T18:26:28.900Z"
}Quick Actions
API Status
StatusOperational
Rate Limit1000 requests/hour
Response FormatJSON
