API ドキュメント

公開 API を使ってアプリにアニメのスクリーンショット検索を統合できます。

無料枠

Signed-in users: 10 free credits per day (expire at midnight). After that, 1 credit per search. Upgrade for more.

認証に関する注意

セッションベースのエンドポイントには有効な better-auth セッション Cookie が必要です。サーバーサイドやブラウザ以外のクライアントから呼び出す場合、Origin ヘッダーを含め(例: Origin: https://your-domain.com)、/api/auth/sign-in/email から返された Cookie を保持してください。

POST/api/anime/search
画像ファイルをアップロードするか画像 URL を指定して、アニメのシーンを検索します。タイムスタンプと類似度スコア付きで最大 5 件の候補を返します。
認証: Session または API key

パラメータ

名前必須説明
imageFileいいえ画像ファイル (JPEG/PNG)
urlstringいいえ公開画像 URL

Guests: 5/day by IP. Signed-in users: 10 daily free credits, then 1 credit per search, 100/hour.

Example

curl -X POST https://whatanimeisthis.com/api/anime/search \
  -F "url=https://example.com/screenshot.png"
curl -X POST https://whatanimeisthis.com/api/anime/search \
  -H "Authorization: Bearer <YOUR_API_KEY>" \
  -F "url=https://example.com/screenshot.png"
GET/api/anime/rankings
期間ごとに最も検索されたアニメのランキングを取得します。
認証: なし

パラメータ

名前必須説明
periodstringいいえdaily | weekly | monthly | yearly | all (デフォルト: all)
limitnumberいいえ最大結果数 (デフォルト: 50)
includeAdultbooleanいいえNSFW エントリを含める (デフォルト: false)

認証は不要。

Example

curl "https://whatanimeisthis.com/api/anime/rankings?period=daily&limit=10"
GET/api/anime/recent-searches
最近確認された公開検索を取得します。
認証: なし

パラメータ

名前必須説明
limitnumberいいえ最大結果数
offsetnumberいいえページングオフセット

公開エンドポイント。

Example

curl "https://whatanimeisthis.com/api/anime/recent-searches?limit=5"
GET/api/user/anime-credits
現在ログインしているユーザーの残りのアニメ検索クレジットを取得します。
認証: Session

ログインユーザーのみ。

Example

curl "https://whatanimeisthis.com/api/user/anime-credits" \
  -H "Cookie: <SESSION_COOKIE>"
GET/api/apikeys
API key の一覧を取得します。
認証: Session

パラメータ

名前必須説明
pagenumberいいえページ番号
pageSizenumberいいえ1 ページあたりの件数

ログインユーザーのみ。

Example

curl "https://whatanimeisthis.com/api/apikeys" \
  -H "Cookie: <SESSION_COOKIE>"
POST/api/apikeys
新しい API key を作成します。プレーンテキストのキーは一度だけ返されます。
認証: Session

パラメータ

名前必須説明
titlestringはいkey の説明的な名前

ログインユーザーのみ。

Example

curl -X POST https://whatanimeisthis.com/api/apikeys \
  -H "Content-Type: application/json" \
  -H "Cookie: <SESSION_COOKIE>" \
  -d '{"title":"my-key"}'