DevMock API is a free, hosted fake API for testing & prototyping.
Instant responses. Real JSON. Zero setup.
Click any endpoint to try it live in your browser.
Build and fire your own requests directly from the browser.
Everything you need to start making requests in seconds.
All endpoints are available under the base URL:
Six RESTful resource collections are available:
POST, PUT, PATCH, DELETE are fully simulated — responses mirror real mutations, but data is not persisted.
All endpoints include CORS headers so you can call them from any browser-based application without a proxy.
# GET a single post
curl http://localhost:3000/posts/1
# POST a new item
curl -X POST http://localhost:3000/posts \
-H "Content-Type: application/json" \
-d '{"title":"foo","body":"bar","userId":1}'
// GET request
const res = await fetch('http://localhost:3000/posts/1');
const data = await res.json();
console.log(data);
// POST request
const res = await fetch('http://localhost:3000/posts', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ title: 'foo', body: 'bar', userId: 1 })
});
const data = await res.json();
import requests
# GET request
r = requests.get('http://localhost:3000/posts/1')
print(r.json())
# POST request
payload = { 'title': 'foo', 'body': 'bar', 'userId': 1 }
r = requests.post(
'http://localhost:3000/posts',
json=payload
)
print(r.json())
import axios from 'axios';
// GET request
const { data } = await axios.get(
'http://localhost:3000/posts/1'
);
// POST request
const { data } = await axios.post('http://localhost:3000/posts', {
title: 'foo', body: 'bar', userId: 1
});