無料で使えるAPI(2025年版)

windows JavaScript
スポンサーリンク

開発・学習用 無料API 一覧(2025年版)

API名主な用途エンドポイント例無料でできる範囲特徴・使い方
JSONPlaceholderREST APIの練習(GET/POSTなど)https://jsonplaceholder.typicode.com/posts完全無料・認証不要ダミーデータを返す有名API。CRUD操作(GET/POST/PUT/DELETE)の練習に最適。
ReqRes.inフロントエンドのリクエスト練習https://reqres.in/api/users完全無料・認証不要fetch()axiosの練習に最適。POSTの結果をモックで返す。
DummyJSONフェイク商品/ユーザー/Todoデータhttps://dummyjson.com/products無料・認証不要JSONPlaceholderより実践的。検索・ページング・フィルタ対応。
Fake Store APIEコマースサイト用ダミーデータhttps://fakestoreapi.com/products無料・認証不要商品名・価格・カテゴリなど。ECサイト模擬開発に最適。
Public APIs.dev公開API検索https://api.publicapis.dev/entries無料世界中の無料APIを一覧取得可能。API探索用API。
Mocki.io自作モックAPI生成任意URL(例:https://mocki.io/v1/xxxx無料(制限あり)自分でJSONレスポンスを設定できる。バックエンドなしでフロントテスト可能。
BeeceptorAPIモック+リクエスト監視https://<your-endpoint>.free.beeceptor.com無料枠あり実際のAPI呼び出しをログで確認可能。Webhookテストにも便利。
Glitch JSON API自分でAPIをホスト任意無料(アカウント要)JSコードで好きなレスポンスを作れる。Node.jsでAPI学習に最適。
MockAPI.ioフルCRUD対応の自作APIhttps://<your-app>.mockapi.io/api/v1/users無料枠ありGUIでデータ構造を定義して、実際にGET/POSTなどを試せる。

各APIの詳しい説明

1. JSONPlaceholder

  • URL: https://jsonplaceholder.typicode.com/
  • 特徴:
    • 最も有名な「モックAPI」
    • すぐ使えるダミーデータ(posts, comments, users, todosなど)
    • GET, POST, PUT, DELETE の挙動を再現してくれる
  • 例:
fetch('https://jsonplaceholder.typicode.com/posts/1')
  .then(res => res.json())
  .then(data => console.log(data));
JavaScript

2. ReqRes.in

  • URL: https://reqres.in/
  • 特徴:
    • UIが見やすく、APIの入門教材として有名
    • ユーザーデータを取得・作成するリクエストの模擬練習ができる
  • 例:
fetch('https://reqres.in/api/users?page=2')
  .then(res => res.json())
  .then(data => console.log(data));
JavaScript

3. DummyJSON

  • URL: https://dummyjson.com/
  • 特徴:
    • JSONPlaceholderの発展版
    • limit, skip, search など実践的なクエリ対応
    • 商品、ユーザー、ToDo、コメントなど多数のカテゴリあり
  • 例:
fetch('https://dummyjson.com/products/search?q=phone')
  .then(res => res.json())
  .then(console.log);
JavaScript

4. Fake Store API

  • URL: https://fakestoreapi.com/
  • 特徴:
    • ECサイト開発の練習用
    • 商品データ(画像・価格・カテゴリ)を返す
  • 例:
fetch('https://fakestoreapi.com/products')
  .then(res => res.json())
  .then(console.log);
JavaScript

5. Public APIs.dev

  • URL: https://api.publicapis.dev/entries
  • 特徴:
    • 「無料で使えるAPIを探すAPI」
    • カテゴリ(Weather, News, Financeなど)で絞り込み可能
  • 例:
fetch('https://api.publicapis.dev/entries?category=Animals')
  .then(res => res.json())
  .then(console.log);
JavaScript

6. MockAPI.io

  • URL: https://mockapi.io
  • 特徴:
    • GUIで「リソース(users, postsなど)」を定義
    • 自動的にREST APIを生成してくれる
    • CRUD操作・ページング・ソート・フィルタも可
  • 用途: SPAやReact/Vueアプリのモックバックエンドとして最強。

学習用途まとめ

学びたいことおすすめAPI理由
fetch / axios の練習JSONPlaceholder / ReqRes認証不要・即動作
REST構造理解DummyJSON / Fake Store実データに近い構造
API設計・モック作成MockAPI.io / Mocki.ioGUIで自作APIを生成
API探索Public APIs.dev世界中のAPIを発見できる
HTTPリクエスト監視Beeceptorログ可視化・Webhook確認

使い方の例(HTML+JSデモ)

<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="UTF-8">
<title>API練習デモ</title>
</head>
<body>
<h2>JSONPlaceholder デモ</h2>
<button id="load">データ取得</button>
<pre id="result"></pre>

<script>
document.getElementById("load").addEventListener("click", async () => {
  const res = await fetch("https://jsonplaceholder.typicode.com/posts/1");
  const data = await res.json();
  document.getElementById("result").textContent = JSON.stringify(data, null, 2);
});
</script>
</body>
</html>
HTML
タイトルとURLをコピーしました