Skip to content
jsonforge.app

JSON Placeholder API

A free, live fake REST API with 20 related resources (users, posts, orders, and more) you can fetch() from your own code.

GET api.jsonforge.app/placeholder/users/1

Request

Loading editor…

Endpoints

ResourceRelationExample
users— (root)api.jsonforge.app/placeholder/users
postsuserId → usersapi.jsonforge.app/placeholder/posts
commentspostId → postsapi.jsonforge.app/placeholder/comments
todosuserId → usersapi.jsonforge.app/placeholder/todos
albumsuserId → usersapi.jsonforge.app/placeholder/albums
photosalbumId → albumsapi.jsonforge.app/placeholder/photos
categories— (root)api.jsonforge.app/placeholder/categories
productscategoryId → categoriesapi.jsonforge.app/placeholder/products
cartsuserId → usersapi.jsonforge.app/placeholder/carts
orderscustomerId → customersapi.jsonforge.app/placeholder/orders
customers— (root)api.jsonforge.app/placeholder/customers
reviewsproductId → products, userId → usersapi.jsonforge.app/placeholder/reviews
roles— (root)api.jsonforge.app/placeholder/roles
permissions— (root)api.jsonforge.app/placeholder/permissions
notificationsuserId → usersapi.jsonforge.app/placeholder/notifications
conversations— (root)api.jsonforge.app/placeholder/conversations
messagesconversationId → conversations, senderId → usersapi.jsonforge.app/placeholder/messages
filesownerId → usersapi.jsonforge.app/placeholder/files
invoicescustomerId → customersapi.jsonforge.app/placeholder/invoices
transactionsinvoiceId → invoicesapi.jsonforge.app/placeholder/transactions

Apa itu JSON Placeholder API?

JSON Placeholder API is a free, live fake REST API — modeled directly on jsonplaceholder.typicode.com — that you can fetch() from your own code without writing a backend. It's reachable at the short api.jsonforge.app URL (or under /api/placeholder on the main domain — both work identically) and serves 20 realistic, related resources (users, posts, comments, todos, albums, photos, products, categories, carts, orders, customers, reviews, roles, permissions, notifications, conversations, messages, files, invoices, and transactions), each with dozens to hundreds of deterministic records and cross-references between them (a post has a userId, a comment has a postId, and so on), so you get genuinely nested, relational-feeling sample data instead of a handful of flat rows. Every endpoint supports GET, POST, PUT, PATCH, and DELETE, and responses always include permissive CORS headers so you can call it straight from a browser-based project, a CodeSandbox, or a course exercise. Like the original it's inspired by, write operations are simulated: they validate your request and return a realistic response, but nothing is ever actually saved.

Cara menggunakan JSON Placeholder API

  1. Open the explorer below, pick a resource (e.g. users or posts) and, optionally, an id.
  2. Pick an HTTP method — GET works with or without an id; POST/PUT/PATCH/DELETE need one where the API expects it (PUT/PATCH/DELETE need an id, POST doesn't).
  3. For POST/PUT/PATCH, edit the JSON request body, then click "Try it" to send a real request to this API and see the live response.
  4. Copy the generated curl or fetch() snippet and drop it straight into your own project — the URL and method are already filled in for whatever you just tried.

Contoh

List every post by user 1

Masukan

GET https://api.jsonforge.app/placeholder/posts?userId=1

Keluaran

[ { "id": 3, "userId": 1, "title": "...", "body": "..." }, { "id": 17, "userId": 1, "title": "...", "body": "..." } ]

Nested route: comments on a specific post

Masukan

GET https://api.jsonforge.app/placeholder/posts/1/comments

Keluaran

[ { "id": 5, "postId": 1, "name": "...", "email": "...", "body": "..." } ]

Simulated create (not persisted)

Masukan

POST https://api.jsonforge.app/placeholder/posts Body: {"title": "Hello", "userId": 1}

Keluaran

{ "id": 151, "title": "Hello", "userId": 1 }

Kesalahan umum

  • Assuming a POST/PUT/PATCH/DELETE persists — checking with a follow-up GET and being confused when it doesn't reflect the change. Nothing here is stored; see the FAQ.
  • Trying /orders/1/items or /carts/1/items expecting a nested-route response — items on carts and orders are embedded fields on the record itself, not separate resources, so there's no such endpoint (it 404s).
  • Assuming users and customers are the same identity — they're intentionally separate: users is the identity behind posts/comments/todos/messages/notifications/files, while customers is the commerce-side identity behind orders/invoices.

Mengapa menggunakan alat ini

  • 20 realistic, cross-referenced resources with real foreign keys and nested routes — not just a handful of flat, disconnected arrays.
  • Fully deterministic: the same id always returns the same record, so you can build a demo around specific ids and it'll keep working.
  • No sign-up, no API key, no rate-limit headaches to configure — CORS is open by default so it works from any browser-based project immediately.

Pertanyaan yang sering diajukan