API Ninja Hub is a REST API that provides fake data for testing and prototyping. It is a free to use service that provides a REST API to generate random and mock data without any restrictions. It provides endpoints for generating random user data, random data for posts, todos, comments, and much more.
As a front-end developer, it can be challenging to source data when creating applications or websites. Traditional methods often involve relying on the backend or using hard-coded data, which can limit possibilities. Recently, I encountered similar difficulties and desired a more efficient solution.
My API NINJA HUB get response without server restrication so, developer can easily access any kind to data without hesistation.
- Zero-configuration
- Basic and Advanced API
- Resources relationships
- 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, PHP, etc.
This is an API so you should directly fetch any type of data.
fetch('https://api.mandorakannu.xyz/api/users')
.then(res => res.json())
.then(json => console.log(json));
OR
Use of async await function
const getUsers = async ()=> {
const response = await fetch("https://api.mandorakannu.xyz/api/users");
const data = await response.json();
return data;
}
OR
Use of async await function by Axios
const getUsers = async ()=> {
const response = await axios.get("https://api.mandorakannu.xyz/api/users");
return response.data;
}
GET /api/users ====> https://api.mandorakannu.xyz/api/users/
GET /api/posts ====> https://api.mandorakannu.xyz/api/posts/
GET /api/todos ====> https://api.mandorakannu.xyz/api/todos/
GET /api/comments ====> https://api.mandorakannu.xyz/api/comments/
GET /api/albums ====> https://api.mandorakannu.xyz/api/albums/
GET /api/photos ====> https://api.mandorakannu.xyz/api/photos/
GET /api/products ====> https://api.mandorakannu.xyz/api/products/
GET /api/users
Parameter | Type | Description |
---|---|---|
null |
JSON |
Fetch all users |
GET /api/users/${id}
Parameter | Type | Description |
---|---|---|
id |
string |
Required. Id of user to fetch |
GET /api/posts/
Parameter | Type | Description |
---|---|---|
null |
string |
Fetch all posts |
GET /api/posts/${id}
Parameter | Type | Description |
---|---|---|
id |
string |
Required. Id of post to fetch |
GET /api/todos/
Parameter | Type | Description |
---|---|---|
null |
string |
Fetch all todos |
GET /api/todos/${id}
Parameter | Type | Description |
---|---|---|
id |
string |
Required. Id of todo to fetch |
GET /api/comments/
Parameter | Type | Description |
---|---|---|
null |
string |
Fetch all comments |
GET /api/comments/${id}
Parameter | Type | Description |
---|---|---|
id |
string |
Required. Id of comment to fetch |
GET /api/albums/
Parameter | Type | Description |
---|---|---|
null |
string |
Fetch all albums |
GET /api/albums/${id}
Parameter | Type | Description |
---|---|---|
id |
string |
Required. Id of album to fetch |
GET /api/photos/
Parameter | Type | Description |
---|---|---|
null |
string |
Fetch all photos |
GET /api/photos/${id}
Parameter | Type | Description |
---|---|---|
id |
string |
Required. Id of photos to fetch |
GET /api/products/
Parameter | Type | Description |
---|---|---|
null |
string |
Fetch all products |
GET /api/products/${id}
Parameter | Type | Description |
---|---|---|
id |
string |
Required. Id of product to fetch |
Client: Tailwindcss, React.Js & Next.Js
Server: Node, Serverless Next.Js Server
For support, email mandorakannu@gmail.com or join follow me on GitHub.
To run this project, You don't need to add any API_KEY or other stuffs.
API_KEY
❌
ANOTHER_API_KEY
❌
Contributions are always welcome!
See contributing.md
for ways to get started.
Please adhere to this project's code of conduct
.
If you have any feedback, please reach out to us at mandorakannu@gmail.com