Don't Get Lost into The World of totally dummy APIs...

todo.js
fetch('https://simplecrudapi.com/api/todos/1')
	.then(response => response.json())
	.then(json => console.log(json))
	.catch(error => console.error(error));
{
    "data": {
        "id": 1,
        "title": "Sample Todo",
        "description": "This is a sample todo item",
        "completed": true,
        "user": {
            "id": 1,
            "name": "Jhon Doe",
            "email": "jhondoe@example.com",
            "email_verified_at": "2019-08-24T14:15:22Z",
            "created_at": "2019-08-24T14:15:22Z",
            "updated_at": "2019-08-24T14:15:22Z"
        },
        "created_at": "2019-08-24T14:15:22Z",
        "updated_at": "2019-08-24T14:15:22Z"
    }
}

Introduction

Getting started

Welcome to Simple CRUD API – your go-to solution for a fast and free RESTful API!

Build and manage your projects effortlessly with our easy-to-use platform. Whether you’re creating, reading, updating, or deleting data, our API is designed to save you time and simplify your workflow. Perfect for developers who need a reliable, scalable, and hassle-free API solution. Get started in minutes and power up your projects today!

All Resources

Sample Todo API  

Name Endpoint Method Copy
Todo List /api/todos GET
Todo Detail /api/todos/1 GET
Todo Create /api/todos POST
Todo Update /api/todos/1 PUT
Todo Delete /api/todos/1 DELETE

How to Use

Todo List API
Details

fetch('https://simplecrudapi.com/api/todos')
	.then(response => response.json())
	.then(json => console.log(json))
	.catch(error => console.error(error));

Todo Detail API
Details

fetch('https://simplecrudapi.com/api/todos/1')
	.then(response => response.json())
	.then(json => console.log(json))
	.catch(error => console.error(error));

Todo Create API
Details

fetch('https://simplecrudapi.com/api/todos', {
	method: 'POST', 
	headers: {
		'Content-Type': 'application/json'
	},
	body: JSON.stringify({
		title: 'Sample Todo',
		description: 'This is a sample todo item',
		user_id: '',
		completed: ''
	})
})
	.then(response => response.json())
	.then(json => console.log(json))
	.catch(error => console.error('Error posting data:', error));

Todo Update API
Details

fetch('https://simplecrudapi.com/api/todos/1', {
	method: 'PUT', 
	headers: {
		'Content-Type': 'application/json'
	},
	body: JSON.stringify({
		title: '',
		description: '',
		completed: '',
		user_id: ''
	})
})
	.then(response => response.json())
	.then(json => console.log(json))
	.catch(error => console.error('Error updating data:', error));

Todo Delete API
Details

fetch('https://simplecrudapi.com/api/todos/1', {
	method: 'DELETE', 
	headers: {
		'Content-Type': 'application/json'
	}
})
	.then(response => response.json())
	.then(json => console.log(json))
	.catch(error => console.error('Error deleting data:', error));

Available API's

Todos API

List of all the available API endpoints for the Todos.

Resource path - /api/todos

Base Endpoint - https://simplecrudapi.com/api/todos

Users API

List of all the available API endpoints for the Users.

Resource path - /api/users

Base Endpoint - https://simplecrudapi.com/api/users

Posts API

List of all the available API endpoints for the Posts.

Resource path - /api/posts

Base Endpoint - https://simplecrudapi.com/api/posts

Comments API

List of all the available API endpoints for the Comments.

Resource path - /api/comments

Base Endpoint - https://simplecrudapi.com/api/comments

Albums API

List of all the available API endpoints for the Albums.

Resource path - /api/albums

Base Endpoint - https://simplecrudapi.com/api/albums

Photos API

List of all the available API endpoints for the Photos.

Resource path - /api/photos

Base Endpoint - https://simplecrudapi.com/api/photos

Categories API

List of all the available API endpoints for the Categories.

Resource path - /api/categories

Base Endpoint - https://simplecrudapi.com/api/categories

Tags API

List of all the available API endpoints for the Tags.

Resource path - /api/tags

Base Endpoint - https://simplecrudapi.com/api/tags

Products API

List of all the available API endpoints for the Products.

Resource path - /api/products

Base Endpoint - https://simplecrudapi.com/api/products

Our Proudly Sponsors 🎉

© 2024 Simple CRUD API. All rights reserved.