https://github.com/jesterjunk/dummyjson
https://github.com/jesterjunk/dummyjson
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/jesterjunk/dummyjson
- Owner: jesterjunk
- License: other
- Created: 2023-09-16T20:53:43.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2023-09-16T21:08:14.000Z (over 2 years ago)
- Last Synced: 2025-02-10T10:36:41.528Z (over 1 year ago)
- Language: EJS
- Size: 31.3 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
Awesome Lists containing this project
README
Cloned from https://github.com/Ovi/DummyJSON
[](https://dummyjson.com/test) [](https://i.dummyjson.com/300x100/282828/?text=SERVER%20IS%20UP&fontFamily=ubuntu&fontSize=28)
# DummyJSON
[DummyJSON](https://dummyjson.com) is a free online REST API that you can use whenever you need some placeholder data for your front-end website or single-page application without running any server-side code.
It's awesome for teaching purposes, sample codes, testing, prototyping.
Checkout the detailed docs at [DummyJSON/Docs](https://dummyjson.com/docs/) for samples.
## Why?
Most of the time when we create a front-end application or website for learning or for client, we have to rely on the backend to implement the front-end or if we want to create a simple learning application we have to use hard-coded data, recently I found myself in need of some data.
I didn't like the idea of using some public API because I had the feeling that I was spending more time registering a client and understanding a complex API than focusing on my task.
So I decided to code a simple backend server that solved my problem, and here's DummyJSON.
You can find it running here and are free to use it in your developments and prototypes: https://dummyjson.com.
I hope you will find it useful.
## Features
- No Sign-up/Registration
- Zero-configuration
- Basic and Advanced API
- Resources relationships
- Filters and nested resources
- Supports GET, POST, PUT, PATCH, and DELETE http methods
- HTTP and HTTPS both works just fine
- Compatible with React, Angular, Vue, Ember, and vanilla JavaScript
## Resources
There are 8 resources available for you:
- 100 products https://dummyjson.com/products/
- 20 carts https://dummyjson.com/carts/
- 100 users https://dummyjson.com/users/
- 150 posts https://dummyjson.com/posts/
- 340 comments https://dummyjson.com/comments/
- 100 quotes https://dummyjson.com/quotes/
- 150 todos https://dummyjson.com/todos/
- auth https://dummyjson.com/auth/
## How to
you can fetch data with any kind of methods you know(fetch API, Axios, jquery ajax,...)
### Get all products
```js
fetch('https://dummyjson.com/products')
.then(res => res.json())
.then(json => console.log(json));
```
OR
```js
const res = await fetch('https://dummyjson.com/products');
const json = await res.json();
console.log(json);
```
Note: Pagination is also supported
See all the routes: https://dummyjson.com/docs/