
Dummy API
DevelopmentSimple API that includes a common data for most of the applications. Like user info, some posts, comments, etc. This data is free to use for presentations, demos, learning tutorials. It is created especially for your education. Designed and deployed especially for your experiments API service ready to respond to your Client Application with close to real data.
π Documentation & Examples
Everything you need to integrate with Dummy API
π Quick Start Examples
// Dummy API API Example
const response = await fetch('https://n161.tech/t/dummyapi/', {
method: 'GET',
headers: {
'Content-Type': 'application/json'
}
});
const data = await response.json();
console.log(data);
Public API Docs for https://n161.tech/t/dummyapi/
DummyAPI is a public RESTful API developed for educational purposes by N161. It provides mock data for testing and learning API consumption. Here are some examples of how to use the API with JavaScript.
Retrieving all users
To retrieve all users, send a GET request to the '/users' endpoint.
fetch('https://dummyapi.io/data/api/user',{
headers: {
'app-id': 'YOUR_APP_ID'
}
})
.then(response => response.json())
.then(data => console.log(data))
Retrieving a single user
To retrieve a single user, send a GET request to the '/user/:userId' endpoint and replace :userId with the desired user ID.
fetch('https://dummyapi.io/data/api/user/123456',{
headers: {
'app-id': 'YOUR_APP_ID'
}
})
.then(response => response.json())
.then(data => console.log(data))
Retrieving all posts
To retrieve all posts, send a GET request to the '/posts' endpoint.
fetch('https://dummyapi.io/data/api/post',{
headers: {
'app-id': 'YOUR_APP_ID'
}
})
.then(response => response.json())
.then(data => console.log(data))
Retrieving all posts by a user
To retrieve all posts made by a user, send a GET request to the '/user/:userId/post' endpoint and replace :userId with the desired user ID.
fetch('https://dummyapi.io/data/api/user/123456/post',{
headers: {
'app-id': 'YOUR_APP_ID'
}
})
.then(response => response.json())
.then(data => console.log(data))
Retrieving all tags
To retrieve all available tags, send a GET request to the '/tag' endpoint.
fetch('https://dummyapi.io/data/api/tag',{
headers: {
'app-id': 'YOUR_APP_ID'
}
})
.then(response => response.json())
.then(data => console.log(data))
Retrieving all post with tags
To retrieve all posts with a specific tag, send a GET request to the '/tag/:tagName/post' endpoint and replace :tagName with the desired tag name.
fetch('https://dummyapi.io/data/api/tag/sports/post',{
headers: {
'app-id': 'YOUR_APP_ID'
}
})
.then(response => response.json())
.then(data => console.log(data))
That's it! You can use these examples to start interacting with the DummyAPI and learn how to use APIs with JavaScript. Remember to replace YOUR_APP_ID with your own API key.
π 30-Day Uptime History
Daily uptime tracking showing online vs offline minutes