Quick Start
Make Your First Request
Section titled “Make Your First Request”curl https://api.phantomjson.app/v1/usersThat’s it. You get 100 fake users with realistic names, emails, and timestamps.
Try Different Resources
Section titled “Try Different Resources”# Get postscurl https://api.phantomjson.app/v1/posts
# Get todoscurl https://api.phantomjson.app/v1/todos
# Get productscurl https://api.phantomjson.app/v1/productsAdd Pagination
Section titled “Add Pagination”# Get page 2 with 10 itemscurl "https://api.phantomjson.app/v1/users?page=2&limit=10"Search
Section titled “Search”# Search for userscurl "https://api.phantomjson.app/v1/users?q=john"Filter
Section titled “Filter”# Filter by fieldcurl "https://api.phantomjson.app/v1/todos?completed=true"
# Advanced filteringcurl "https://api.phantomjson.app/v1/products?price[gte]=50&price[lte]=200"# Sort by name ascendingcurl "https://api.phantomjson.app/v1/users?sort=firstName:asc"Field Selection
Section titled “Field Selection”# Get only specific fieldscurl "https://api.phantomjson.app/v1/users?fields=id,firstName,email"Navigate Relations
Section titled “Navigate Relations”# Get posts by a specific usercurl "https://api.phantomjson.app/v1/users/1/posts"
# Get comments on a postcurl "https://api.phantomjson.app/v1/posts/1/comments"
# Get photos in an albumcurl "https://api.phantomjson.app/v1/photos/album/1"Response Format
Section titled “Response Format”All responses follow a consistent format:
{ "data": [...], "meta": { "total": 100, "page": 1, "limit": 20, "totalPages": 5 }}Single resources return:
{ "data": { ... }}Next Steps
Section titled “Next Steps”- Read the API Conventions to understand pagination, filtering, sorting, and search
- Browse Resources for detailed endpoint documentation
