Github · GitHub Repository Radar
typicode json-server
Get a full fake REST API with zero coding in less than 30 seconds (seriously)
Stars
75,698
Forks
7,267
Watchers: 75,698
Language
License: MIT License
Repository Radar Score
53 / 100
Growth
- 7d
- +0
- 30d
- +0
- %
- 0.0%
Not enough metric snapshots yet to chart growth for this repository.
Score breakdown
- popularity 90
- growth 0
- activity 35
- freshness 100
- community 87
Need help integrating this stack?
Our team builds with modern open-source stacks. Tell us what you are shipping.
Get a quote →Important
Viewing beta v1 documentation – usable but expect breaking changes. For stable version, see here
Note
Using React ⚛️ and tired of CSS-in-JS? See MistCSS 👀
npm install json-serverCreate a db.json or db.json5 file
{
"$schema": "./node_modules/json-server/schema.json",
"posts": [
{ "id": "1", "title": "a title", "views": 100 },
{ "id": "2", "title": "another title", "views": 200 }
],
"comments": [
{ "id": "1", "text": "a comment about post 1", "postId": "1" },
{ "id": "2", "text": "another comment about post 1", "postId": "1" }
],
"profile": {
"name": "typicode"
}
}View db.json5 example
{
posts: [
{ id: "1", title: "a title", views: 100 },
{ id: "2", title: "another title", views: 200 },
],
comments: [
{ id: "1", text: "a comment about post 1", postId: "1" },
{ id: "2", text: "another comment about post 1", postId: "1" },
],
profile: {
name: "typicode",
},
}You can read more about JSON5 format here.
Start JSON Server
npx json-server db.jsonThis starts the server at http://localhost:3000. You should see:
JSON Server started on PORT :3000
http://localhost:3000
Access your REST API:
curl http://localhost:3000/posts/1Response:
{
"id": "1",
"title": "a title",
"views": 100
}Run json-server --help for a list of options
![]() |
![]() |
![]() |
Become a sponsor and have your company logo here
JSON Server supports advanced querying out of the box:
GET /posts?views:gt=100 # Filter by condition
GET /posts?_sort=-views # Sort by field (descending)
GET /posts?_page=1&_per_page=10 # Pagination
GET /posts?_embed=comments # Include relations
GET /posts?_where={"or":[...]} # Complex queriesSee detailed documentation below for each feature.
For array resources like posts and comments:
GET /posts
GET /posts/:id
POST /posts
PUT /posts/:id
PATCH /posts/:id
DELETE /posts/:idFor singular object resources like profile:
GET /profile
PUT /profile
PATCH /profileUse field:operator=value.
Operators:
- no operator ->
eq(equal) ltless than,lteless than or equalgtgreater than,gtegreater than or equaleqequal,nenot equalinincluded in comma-separated listcontainsstring contains (case-insensitive)startsWithstring starts with (case-insensitive)endsWithstring ends with (case-insensitive)
Examples:
GET /posts?views:gt=100
GET /posts?title:eq=Hello
GET /posts?id:in=1,2,3
GET /posts?author.name:eq=typicode
GET /posts?title:contains=hello
GET /posts?title:startsWith=Hello
GET /posts?title:endsWith=worldGET /posts?_sort=title
GET /posts?_sort=-views
GET /posts?_sort=author.name,-viewsGET /posts?_page=1&_per_page=25Response:
{
"first": 1,
"prev": null,
"next": 2,
"last": 4,
"pages": 4,
"items": 100,
"data": [
{ "id": "1", "title": "...", "views": 100 },
{ "id": "2", "title": "...", "views": 200 }
]
}Notes:
_per_pagedefaults to10if not specified- Invalid
_pageor_per_pagevalues are automatically normalized to valid ranges
GET /posts?_embed=comments
GET /comments?_embed=post_where accepts a JSON object and overrides normal query params when valid.
GET /posts?_where={"or":[{"views":{"gt":100}},{"author":{"name":{"lt":"m"}}}]}DELETE /posts/1?_dependent=commentsJSON Server automatically serves files from the ./public directory.
To serve additional static directories:
json-server db.json -s ./static
json-server db.json -s ./static -s ./node_modulesStatic files are served with standard MIME types and can include HTML, CSS, JavaScript, images, and other assets.
If you are upgrading from json-server v0.x, note these behavioral changes:
- ID handling:
idis always a string and will be auto-generated if not provided - Pagination: Use
_per_pagewith_pageinstead of the deprecated_limitparameter - Relationships: Use
_embedinstead of_expandfor including related resources - Request delays: Use browser DevTools (Network tab > throttling) instead of the removed
--delayCLI option
New to json-server? These notes are for users migrating from v0. If this is your first time using json-server, you can ignore this section.
Repository Radar analysis
Deterministic insights derived from public metadata and our observations — not personal testing or reviews.
Why this repository is interesting
- High absolute popularity (75,698 stars) signals broad adoption.
Who should use it
- Developers working primarily with JavaScript
- Frontend engineers comparing UI frameworks and tools
- Backend engineers shipping APIs and product backends
Potential use cases
- Reference or evaluate JavaScript open-source approaches in this domain
Strengths
- README present in our index
- Declared license: MIT License
- Substantial fork count (7,267) suggests reuse and contribution interest
Limitations / considerations
- Insights are derived from public metadata and our observations — not a substitute for code review
What to watch
- Re-check last push, issues, and releases on GitHub before production adoption
Strong signals: Strong community interest
Source: GitHub (public metadata) + Repository Radar analysis. We do not claim ownership of third-party repositories.
Similar repositories
react/react
★ 249,074 · JavaScript · radar 67
prettier/prettier
★ 52,233 · JavaScript · radar 65
bigskysoftware/htmx
★ 49,335 · JavaScript · radar 64
Asabeneh/30-Days-Of-JavaScript
★ 46,761 · JavaScript · radar 61
chinese-poetry/chinese-poetry
★ 53,335 · JavaScript · radar 54
LeCoupa/awesome-cheatsheets
★ 46,425 · JavaScript · radar 50


