Find an API

Search public APIs with auth details & Postman guides

← All APIs

JSONPlaceholder

jsonplaceholder.typicode.com · Developer Tools

Developer Tools No Auth Free & Open Mock Data Testing Developer Tools

Free fake REST API for testing and prototyping. Posts, comments, albums, photos, todos, and users. No API key required — great for learning and demos.

Authentication

No authentication requiredFree to use with no key needed.

Sample Requests

GET Get posts

Get all 100 fake posts.

https://jsonplaceholder.typicode.com/posts

Hover any highlighted part to learn what it does

curl -X GET "https://jsonplaceholder.typicode.com/posts"
import requests
response = requests.get(
    "https://jsonplaceholder.typicode.com/posts",
)
print(response.json())
const url = 'https://jsonplaceholder.typicode.com/posts';

const response = await fetch(url); 
const data = await response.json();
console.log(data);
package main

import (
	"fmt"
	"io"
	"net/http"
)

func main() {
	targetURL := "https://jsonplaceholder.typicode.com/posts"
	req, _ := http.NewRequest("GET", targetURL, nil)

	client := &http.Client{}
	resp, _ := client.Do(req)
	defer resp.Body.Close()
	body, _ := io.ReadAll(resp.Body)
	fmt.Println(string(body))
}
require "net/http"
require "json"

uri = URI("https://jsonplaceholder.typicode.com/posts")

http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = uri.scheme == "https"

req = Net::HTTP::Get.new(uri)

res = http.request(req)
puts JSON.parse(res.body)
<?php
$url = "https://jsonplaceholder.typicode.com/posts";
$opts = ["http" => [
    "method" => "GET",
]];
$ctx = stream_context_create($opts);
$res = file_get_contents($url, false, $ctx);
print_r(json_decode($res, true));
POST Create a post

Create a fake post (returns the new post — nothing is persisted).

https://jsonplaceholder.typicode.com/posts

Hover any highlighted part to learn what it does

Headers — extra info sent with the request
Content-Type application/json
Request Body — data you're sending
{
  "body": "Hello World",
  "title": "My Post",
  "userId": 1
}
curl -X POST "https://jsonplaceholder.typicode.com/posts" \
  -H "Content-Type: application/json" \
  -H "Content-Type: application/json" \
  -d '{"body":"Hello World","title":"My Post","userId":1}'
import requests
headers = {
    "Content-Type": "application/json"
}
data = {
    "body": "Hello World",
    "title": "My Post",
    "userId": 1
}
response = requests.post(
    "https://jsonplaceholder.typicode.com/posts",
    headers=headers,
    json=data,
)
print(response.json())
const url = 'https://jsonplaceholder.typicode.com/posts';

const response = await fetch(url, {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json'
  },
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({
  "body": "Hello World",
  "title": "My Post",
  "userId": 1
}),
}); 
const data = await response.json();
console.log(data);
package main

import (
	"fmt"
	"io"
	"net/http"
	"bytes"
	"encoding/json"
)

func main() {
	targetURL := "https://jsonplaceholder.typicode.com/posts"
	jsonData, _ := json.Marshal({"body":"Hello World","title":"My Post","userId":1})
	req, _ := http.NewRequest("POST", targetURL, bytes.NewBuffer(jsonData))
	req.Header.Set("Content-Type", "application/json")
	req.Header.Set("Content-Type", "application/json")

	client := &http.Client{}
	resp, _ := client.Do(req)
	defer resp.Body.Close()
	body, _ := io.ReadAll(resp.Body)
	fmt.Println(string(body))
}
require "net/http"
require "json"

uri = URI("https://jsonplaceholder.typicode.com/posts")

http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = uri.scheme == "https"

req = Net::HTTP::Post.new(uri)
req["Content-Type"] = "application/json"
req["Content-Type"] = "application/json"
req.body = "{\"body\":\"Hello World\",\"title\":\"My Post\",\"userId\":1}"

res = http.request(req)
puts JSON.parse(res.body)
<?php
$url = "https://jsonplaceholder.typicode.com/posts";
$opts = ["http" => [
    "method" => "POST",
    "header" => implode("\r\n", [
        "Content-Type: application/json",
        "Content-Type: application/json"
    ]),
    "content" => json_encode({"body":"Hello World","title":"My Post","userId":1}),
]];
$ctx = stream_context_create($opts);
$res = file_get_contents($url, false, $ctx);
print_r(json_decode($res, true));

Postman Setup Guide

Get Postman ↗
  1. No API key needed
  2. GET /posts — all posts
  3. GET /posts/1 — single post
  4. GET /posts?userId=1 — posts by user
  5. POST, PUT, PATCH, DELETE all work but changes are not persisted

Open documentation ↗