JSONBin.io
api.jsonbin.io · Developer Tools
Free JSON storage and hosting — store, share, and retrieve JSON documents via REST API. Great for prototyping, storing config, or sharing data without a database. Free tier available.
Authentication
API Key
Free API key at jsonbin.io. Pass as X-Master-Key or X-Access-Key header.
Sample Requests
POST
Create a bin
Store a JSON document and get back a bin ID.
https://api.jsonbin.io/v3/b
Hover any highlighted part to learn what it does
Headers — extra info sent with the request
| Content-Type | application/json |
| X-Master-Key | YOUR_KEY |
Request Body — data you're sending
{
"name": "John Doe",
"email": "[email protected]"
}
curl -X POST "https://api.jsonbin.io/v3/b" \
-H "Content-Type: application/json" \
-H "X-Master-Key: YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"name":"John Doe","email":"[email protected]"}'import requests
headers = {
"Content-Type": "application/json",
"X-Master-Key": "YOUR_KEY"
}
data = {
"name": "John Doe",
"email": "[email protected]"
}
response = requests.post(
"https://api.jsonbin.io/v3/b",
headers=headers,
json=data,
)
print(response.json())const url = 'https://api.jsonbin.io/v3/b';
const response = await fetch(url, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'X-Master-Key': 'YOUR_KEY'
},
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
"name": "John Doe",
"email": "[email protected]"
}),
});
const data = await response.json();
console.log(data);package main
import (
"fmt"
"io"
"net/http"
"bytes"
"encoding/json"
)
func main() {
targetURL := "https://api.jsonbin.io/v3/b"
jsonData, _ := json.Marshal({"name":"John Doe","email":"[email protected]"})
req, _ := http.NewRequest("POST", targetURL, bytes.NewBuffer(jsonData))
req.Header.Set("Content-Type", "application/json")
req.Header.Set("X-Master-Key", "YOUR_KEY")
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://api.jsonbin.io/v3/b")
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["X-Master-Key"] = "YOUR_KEY"
req["Content-Type"] = "application/json"
req.body = "{\"name\":\"John Doe\",\"email\":\"[email protected]\"}"
res = http.request(req)
puts JSON.parse(res.body)<?php
$url = "https://api.jsonbin.io/v3/b";
$opts = ["http" => [
"method" => "POST",
"header" => implode("\r\n", [
"Content-Type: application/json",
"X-Master-Key: YOUR_KEY",
"Content-Type: application/json"
]),
"content" => json_encode({"name":"John Doe","email":"[email protected]"}),
]];
$ctx = stream_context_create($opts);
$res = file_get_contents($url, false, $ctx);
print_r(json_decode($res, true));
GET
Read a bin
Retrieve a stored JSON document by ID.
https://api.jsonbin.io/v3/b/BIN_ID
Hover any highlighted part to learn what it does
Headers — extra info sent with the request
| X-Master-Key | YOUR_KEY |
curl -X GET "https://api.jsonbin.io/v3/b/BIN_ID" \ -H "X-Master-Key: YOUR_KEY"
import requests
headers = {
"X-Master-Key": "YOUR_KEY"
}
response = requests.get(
"https://api.jsonbin.io/v3/b/BIN_ID",
headers=headers,
)
print(response.json())const url = 'https://api.jsonbin.io/v3/b/BIN_ID';
const response = await fetch(url, {
headers: {
'X-Master-Key': 'YOUR_KEY'
},
});
const data = await response.json();
console.log(data);package main
import (
"fmt"
"io"
"net/http"
)
func main() {
targetURL := "https://api.jsonbin.io/v3/b/BIN_ID"
req, _ := http.NewRequest("GET", targetURL, nil)
req.Header.Set("X-Master-Key", "YOUR_KEY")
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://api.jsonbin.io/v3/b/BIN_ID")
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = uri.scheme == "https"
req = Net::HTTP::Get.new(uri)
req["X-Master-Key"] = "YOUR_KEY"
res = http.request(req)
puts JSON.parse(res.body)<?php
$url = "https://api.jsonbin.io/v3/b/BIN_ID";
$opts = ["http" => [
"method" => "GET",
"header" => implode("\r\n", [
"X-Master-Key: YOUR_KEY"
]),
]];
$ctx = stream_context_create($opts);
$res = file_get_contents($url, false, $ctx);
print_r(json_decode($res, true));Postman Setup Guide
- Sign up at jsonbin.io for a free API key
- Create bin: POST /v3/b with JSON body and X-Master-Key header
- Read bin: GET /v3/b/{binId}
- Update bin: PUT /v3/b/{binId} with new JSON body
- Public bins: share the bin URL — anyone can read without auth