Tanebi APIトップに戻る

Tanebi API Reference

Tanebi(種火)は企画をブラッシュアップするためのSNSです。API Key を使って外部ツールから企画の取得・作成ができます。

Base URLhttps://tanebi.app/api/v1
🤖

AI ツールから直接企画を作成

Tanebi は MCP (Model Context Protocol) に対応しています。 Claude Code などの AI ツールから、会話の中でそのまま企画を投稿できます。 ブレストの結果を手作業でコピペする必要はありません。

Authentication

API Key 認証を使用します。iOS アプリの設定画面から API Key を発行し、リクエストヘッダーに含めてください。

!
API Key で許可される操作は企画の一覧取得・詳細取得・新規作成のみです。企画の更新・削除にはアプリ経由の Firebase 認証が必要です。

Header

X-API-Key: your_api_key_here

curl Example

curl https://tanebi.app/api/v1/ideas \
  -H "X-API-Key: your_api_key_here"

API Key が無効または未指定の場合、401 Unauthorized が返却されます。

Error Handling

エラー時は JSON でエラーメッセージが返却されます。

{
  "error": "Missing or invalid authentication"
}

Status Codes

  • 200Success
  • 201Created
  • 401Unauthorized - API Key が無効または未指定
  • 403Forbidden - API Key では許可されていない操作
  • 404Not Found - 指定したリソースが存在しない
  • 422Unprocessable Content - バリデーションエラー

Pagination

一覧 API はページネーション付きで返却されます。meta オブジェクトに情報が含まれます。

{
  "ideas": [...],
  "meta": {
    "current_page": 1,
    "total_pages": 5,
    "total_count": 92
  }
}
NameTypeDescription
pageoptionalintegerページ番号(デフォルト: 1)
per_pageoptionalinteger1ページあたりの件数(デフォルト: 20)

Ideas

GET/ideas企画一覧取得

公開されている企画の一覧をページネーション付きで取得します。新しい企画が先頭に表示されます。

Query Parameters

NameTypeDescription
pageoptionalintegerページ番号。デフォルト: 1
per_pageoptionalinteger1ページあたりの件数。デフォルト: 20

Request

curl https://tanebi.app/api/v1/ideas?page=1&per_page=10 \
  -H "X-API-Key: your_api_key_here"

Response 200

{
  "ideas": [
    {
      "id": 42,
      "title": "AIを活用した料理レシピ提案アプリ",
      "visibility": "public",
      "current_stage": "hidane",
      "reactions_count": 5,
      "comments_count": 3,
      "is_bookmarked": false,
      "created_at": "2026-02-10T12:00:00.000Z",
      "updated_at": "2026-02-11T08:30:00.000Z",
      "user": {
        "id": 7,
        "display_name": "Yuki",
        "avatar_path": "avatars/7/profile.jpg"
      }
    }
  ],
  "meta": {
    "current_page": 1,
    "total_pages": 3,
    "total_count": 42
  }
}
GET/ideas/{'{id}'}企画詳細取得

指定した企画の詳細情報を取得します。本文のライン情報とリアクションを含みます。

Path Parameters

NameTypeDescription
idrequiredinteger企画のID

Request

curl https://tanebi.app/api/v1/ideas/42 \
  -H "X-API-Key: your_api_key_here"

Response 200

{
  "id": 42,
  "title": "AIを活用した料理レシピ提案アプリ",
  "visibility": "public",
  "current_stage": "honoo",
  "reactions_count": 5,
  "is_bookmarked": false,
  "created_at": "2026-02-10T12:00:00.000Z",
  "updated_at": "2026-02-11T08:30:00.000Z",
  "user": {
    "id": 7,
    "display_name": "Yuki",
    "avatar_path": "avatars/7/profile.jpg"
  },
  "lines": [
    {
      "id": 101,
      "line_type": "heading",
      "content": "# 概要",
      "position": 0,
      "comments_count": 0
    },
    {
      "id": 102,
      "line_type": "text",
      "content": "冷蔵庫の中身を撮影するだけで、AIが最適なレシピを提案するアプリ。",
      "position": 1,
      "comments_count": 2
    }
  ],
  "reactions": [
    {
      "id": 201,
      "reaction_type": "fire",
      "created_at": "2026-02-10T15:00:00.000Z",
      "user": {
        "id": 12,
        "display_name": "Taro",
        "avatar_path": null
      }
    }
  ]
}

Error Responses

  • 404指定した企画が存在しない、または削除済み
  • 403非公開の企画でアクセス権がない
POST/ideas企画新規作成

新しい企画を作成します。content は空行(\n\n)で段落に分割され、# で始まる段落は見出し(heading)として扱われます。 ステージは自動的に hidane で開始されます。

Request Body (JSON)

NameTypeDescription
titlerequiredstring企画タイトル
contentoptionalstring企画の本文。空行で段落に分割される
visibilityoptionalstring公開範囲。デフォルト: "public"("public" | "private")

Request

curl -X POST https://tanebi.app/api/v1/ideas \
  -H "X-API-Key: your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "ペット向けヘルスケアIoTデバイス",
    "content": "# 概要\n\nペットの健康状態をリアルタイムで監視するウェアラブルデバイス。\n\n# ターゲット\n\n犬・猫を飼っている30-40代の共働き世帯。",
    "visibility": "public"
  }'

Response 201

{
  "id": 43,
  "title": "ペット向けヘルスケアIoTデバイス",
  "visibility": "public",
  "current_stage": "hidane",
  "reactions_count": 0,
  "is_bookmarked": false,
  "user": { ... },
  "lines": [
    { "id": 201, "line_type": "heading", "content": "# 概要", "position": 0 },
    { "id": 202, "line_type": "text", "content": "ペットの健康状態を...", "position": 1 },
    { "id": 203, "line_type": "heading", "content": "# ターゲット", "position": 2 },
    { "id": 204, "line_type": "text", "content": "犬・猫を飼っている...", "position": 3 }
  ],
  "reactions": []
}

Error Responses

  • 422バリデーションエラー(例: title が空)

Object Reference

Idea (Summary)

一覧 API で返却される企画のサマリー情報。

NameTypeDescription
idinteger企画ID
titlestring企画タイトル
visibilitystring"public" or "private"
current_stagestring"hidane" / "honoo" / "noroshi"
reactions_countintegerリアクション数
comments_countintegerライン指定コメント数
is_bookmarkedbooleanブックマーク済みかどうか
userUser投稿者
created_atdatetime作成日時 (ISO 8601)
updated_atdatetime更新日時 (ISO 8601)

Idea (Detail)

詳細 API で返却される企画情報。サマリーに加えて linesreactions を含む。comments_count は含まれない。

Line

企画の本文を構成する行(段落)。

NameTypeDescription
idintegerラインID
line_typestring"heading" or "text"
contentstring本文テキスト
positioninteger表示順(0始まり)
comments_countintegerこのラインに対するコメント数
created_atdatetime作成日時
updated_atdatetime更新日時

Reaction

NameTypeDescription
idintegerリアクションID
reaction_typestringリアクション種別(例: "fire", "like")
userUserリアクションしたユーザー
created_atdatetime作成日時

User (Simplified)

NameTypeDescription
idintegerユーザーID
display_namestring表示名
avatar_pathstring|nullアバター画像のパス(未設定時は null)

Rate Limits

API Key 認証のリクエストにはレート制限が適用されます。制限を超えた場合は 429 Too Many Requests が返却されます。

i
具体的なレート制限値はサーバー設定に依存します。大量のリクエストを送信する場合は適切な間隔を空けてください。

MCP Server

Tanebi は MCP (Model Context Protocol) に対応しています。 Claude Code や Cursor などの AI ツールに MCP サーバーを接続すると、AI との会話の中で直接企画を作成できます。

例えば、AIとブレストした結果をそのまま Tanebi に投稿し、友達からのフィードバックを受けるといった使い方が可能です。 アプリからの投稿はもちろん、AIツールからの投稿を起点にするワークフローを想定しています。

Setup

インストール不要。npx で直接実行できます。

ソースコード: github.com/ruby-inc/tanebi-mcp-server

Claude Code Configuration

{
  "mcpServers": {
    "tanebi": {
      "command": "npx",
      "args": ["-y", "@rubyjobs-jp/tanebi-mcp-server"],
      "env": {
        "TANEBI_API_KEY": "your_api_key"
      }
    }
  }
}

Available Tools

ToolDescription
list_ideas企画一覧を取得
get_idea企画の詳細を取得
create_idea新しい企画を作成

Usage Example

Claude Code での会話例:

You: ペット向けヘルスケアIoTデバイスの企画を Tanebi に投稿して。

Claude: MCP の create_idea ツールで企画を作成しました。Tanebi アプリで確認できます。