Skip to content

Users

The Users resource provides realistic fake user data with names, emails, and timestamps.

Available Endpoints

MethodEndpointDescription
GET/v1/usersList all users
GET/v1/users/:idGet a specific user
GET/v1/users/:id/postsGet user's posts
GET/v1/users/:id/todosGet user's todos
GET/v1/users/:id/albumsGet user's albums
{
"id": 1,
"firstName": "John",
"lastName": "Doe",
"email": "john@example.com",
"createdAt": "2026-01-15T10:30:00.000Z",
"updatedAt": "2026-01-15T10:30:00.000Z"
}
Field Type Description
id number Unique identifier
firstName string User’s first name
lastName string User’s last name
email string User’s email address
createdAt string ISO 8601 timestamp
updatedAt string ISO 8601 timestamp
Terminal window
curl https://api.phantomjson.app/v1/users
Parameter Type Default Description
page number 1 Page number
limit number 20 Items per page (max: 100)
sort string Sort field and direction
q string Search query
fields string Fields to return
firstName string Filter by first name
lastName string Filter by last name
email string Filter by email
{
"data": [
{
"id": 1,
"firstName": "John",
"lastName": "Doe",
"email": "john@example.com",
"createdAt": "2026-01-15T10:30:00.000Z",
"updatedAt": "2026-01-15T10:30:00.000Z"
}
],
"meta": {
"total": 100,
"page": 1,
"limit": 20,
"totalPages": 5
}
}
Terminal window
curl https://api.phantomjson.app/v1/users/1
{
"data": {
"id": 1,
"firstName": "John",
"lastName": "Doe",
"email": "john@example.com",
"createdAt": "2026-01-15T10:30:00.000Z",
"updatedAt": "2026-01-15T10:30:00.000Z"
}
}
Terminal window
curl https://api.phantomjson.app/v1/users/1/posts
{
"data": [
{
"id": 1,
"userId": 1,
"title": "First Post",
"body": "This is the body of the first post."
}
],
"meta": {
"total": 5,
"page": 1,
"limit": 20,
"totalPages": 1
}
}
Terminal window
curl https://api.phantomjson.app/v1/users/1/todos
{
"data": [
{
"id": 1,
"userId": 1,
"title": "Buy groceries",
"completed": false
}
],
"meta": {
"total": 3,
"page": 1,
"limit": 20,
"totalPages": 1
}
}
Terminal window
curl https://api.phantomjson.app/v1/users/1/albums
{
"data": [
{
"id": 1,
"userId": 1,
"title": "Vacation Photos"
}
],
"meta": {
"total": 2,
"page": 1,
"limit": 20,
"totalPages": 1
}
}
Terminal window
curl "https://api.phantomjson.app/v1/users?q=john"
Terminal window
curl "https://api.phantomjson.app/v1/users?firstName=John"
Terminal window
curl "https://api.phantomjson.app/v1/users?sort=firstName:asc"
Terminal window
curl "https://api.phantomjson.app/v1/users?fields=id,firstName,email"
Terminal window
curl "https://api.phantomjson.app/v1/users?q=john&sort=firstName:asc&fields=id,firstName,email&limit=10"