Followers
Ce contenu n’est pas encore disponible dans votre langue.
Overview
Section titled “Overview”The Followers resource provides fake follower data, tracking user follow relationships.
Endpoints
Section titled “Endpoints”| Method | Endpoint | Description |
|---|---|---|
| GET | /v1/followers | List all followers |
| GET | /v1/followers/:id | Get a specific follower relationship |
Follower Object
Section titled “Follower Object”{ "id": 1, "followerId": 1, "followingId": 2, "createdAt": "2026-01-15T10:30:00.000Z"}| Field | Type | Description |
|---|---|---|
id |
number |
Unique identifier |
followerId |
number |
ID of the user who is following |
followingId |
number |
ID of the user being followed |
createdAt |
string |
ISO 8601 timestamp |
List Followers
Section titled “List Followers”curl https://api.phantomjson.app/v1/followersQuery Parameters
Section titled “Query Parameters”| Parameter | Type | Default | Description |
|---|---|---|---|
page |
number |
1 |
Page number |
limit |
number |
20 |
Items per page (max: 100) |
sort |
string |
— | Sort field and direction |
fields |
string |
— | Fields to return |
followerId |
number |
— | Filter by follower ID |
followingId |
number |
— | Filter by following ID |
Response
Section titled “Response”{ "data": [ { "id": 1, "followerId": 1, "followingId": 2, "createdAt": "2026-01-15T10:30:00.000Z" } ], "meta": { "total": 150, "page": 1, "limit": 20, "totalPages": 8 }}Get Follower by ID
Section titled “Get Follower by ID”curl https://api.phantomjson.app/v1/followers/1Response
Section titled “Response”{ "data": { "id": 1, "followerId": 1, "followingId": 2, "createdAt": "2026-01-15T10:30:00.000Z" }}Examples
Section titled “Examples”Filter by Follower
Section titled “Filter by Follower”curl "https://api.phantomjson.app/v1/followers?followerId=1"Filter by Following
Section titled “Filter by Following”curl "https://api.phantomjson.app/v1/followers?followingId=2"Sort by Creation Date
Section titled “Sort by Creation Date”# Newest firstcurl "https://api.phantomjson.app/v1/followers?sort=createdAt:desc"
# Oldest firstcurl "https://api.phantomjson.app/v1/followers?sort=createdAt:asc"Field Selection
Section titled “Field Selection”curl "https://api.phantomjson.app/v1/followers?fields=id,followerId,followingId"Combined Query
Section titled “Combined Query”# Follow relationships where user 1 follows user 2curl "https://api.phantomjson.app/v1/followers?followerId=1&followingId=2"Relations
Section titled “Relations”- Follower — Each relationship has a follower user (
followerId) - Following — Each relationship has a following user (
followingId)
