mcpField
I
images-search

images-search

github.com/braveクリエイティブ・メディア1921.7k 回インストール11 週間前に更新
リポジトリ

images-search について

Brave Search API で画像を検索するスキルです。画像のメタデータ、サムネイル、掲載元リンクを返し、地域、件数、スペルチェック、SafeSearchを設定できます。

主な機能

  1. 01Brave API による画像検索
  2. 02国と言語による絞り込み
  3. 03最大 200 件の結果指定
  4. 04Strict または Off の SafeSearch
  5. 05サムネイルと画像メタデータの取得

活用シーン

  1. 01ギャラリーやムードボード用の画像検索
  2. 02記事への関連画像の追加
  3. 03ビジュアル分析用の画像結果取得

インストール

コマンドをコピーしてターミナルで実行します。

$npx skills add https://github.com/brave/brave-search-skills --skill images-search

インストール後、Claude Code で/images-searchを入力して読み込まれたか確認します。

詳細

画像検索

API キーが必要です:https://api.search.brave.com で取得してください

プラン:Search プランに含まれています。https://api-dashboard.search.brave.com/app/subscriptions/subscribe をご覧ください。

クイックスタート(cURL)

基本的な検索
curl -s "https://api.search.brave.com/res/v1/images/search?q=mountain+landscape" \
  -H "Accept: application/json" \
  -H "X-Subscription-Token: ${BRAVE_SEARCH_API_KEY}"
パラメーターを指定した検索
curl -s "https://api.search.brave.com/res/v1/images/search" \
  -H "Accept: application/json" \
  -H "X-Subscription-Token: ${BRAVE_SEARCH_API_KEY}" \
  -G \
  --data-urlencode "q=northern lights photography" \
  --data-urlencode "country=US" \
  --data-urlencode "search_lang=en" \
  --data-urlencode "count=20" \
  --data-urlencode "safesearch=strict"

エンドポイント

GET https://api.search.brave.com/res/v1/images/search

認証:X-Subscription-Token: <API_KEY> ヘッダー

パラメーター

パラメーター型必須デフォルト説明
qstringはい-検索クエリ(1~400 文字、最大 50 語)
countrystringいいえUS検索対象の国(2 文字の国コードまたは ALL)
search_langstringいいえen2 文字以上の言語コード
countintいいえ50返す結果の数(1~200)
safesearchstringいいえstrictoff または strict(画像では moderate は指定できません)
spellcheckboolいいえtrueクエリを自動修正します。修正後のクエリは query.altered に含まれます

レスポンス形式

{
  "type": "images",
  "query": {
    "original": "mountain landscape",
    "altered": null,
    "spellcheck_off": false,
    "show_strict_warning": false
  },
  "results": [
    {
      "type": "image_result",
      "title": "Beautiful Mountain Landscape",
      "url": "https://example.com/mountain-photo",
      "source": "example.com",
      "page_fetched": "2025-09-15T10:30:00Z",
      "thumbnail": {
        "src": "https://imgs.search.brave.com/...",
        "width": 200,
        "height": 150
      },
      "properties": {
        "url": "https://example.com/images/mountain.jpg",
        "placeholder": "https://imgs.search.brave.com/placeholder/...",
        "width": 1920,
        "height": 1080
      },
      "meta_url": {
        "scheme": "https",
        "netloc": "example.com",
        "hostname": "example.com",
        "favicon": "https://imgs.search.brave.com/favicon/...",
        "path": "/mountain-photo"
      },
      "confidence": "high"
    }
  ],
  "extra": {
    "might_be_offensive": false
  }
}

レスポンスフィールド

フィールド型説明
typestring常に "images" です
query.originalstring元のクエリ
query.alteredstring?スペルチェック後のクエリ(修正がない場合は null)
query.spellcheck_offbool?スペルチェックが無効になっていたかどうか
query.show_strict_warningbool?strict のセーフサーチによって関連する結果が非表示になった場合は true
results[]array画像検索結果のリスト
results[].typestring常に "image_result" です
results[].titlestring?画像のタイトル
results[].urlstring?画像が見つかったページの URL
results[].sourcestring?ソースのドメイン
results[].page_fetchedstring?最後にページをクロールした日時(ISO 形式)
results[].thumbnail.srcstring?Brave プロキシ経由のサムネイル URL(幅約 500px)
results[].thumbnail.widthint?サムネイルの幅
results[].thumbnail.heightint?サムネイルの高さ
results[].properties.urlstring?元のフルサイズ画像の URL
results[].properties.placeholderstring?低解像度のプレースホルダー URL(Brave プロキシ経由)
results[].properties.widthint?元画像の幅(null の場合があります)
results[].properties.heightint?元画像の高さ(null の場合があります)
results[].meta_url.schemestring?URL のプロトコルスキーム
results[].meta_url.netlocstring?ネットワーク上の場所
results[].meta_url.hostnamestring?小文字に変換されたドメイン
results[].meta_url.faviconstring?ファビコンの URL
results[].meta_url.pathstring?URL のパス
results[].confidencestring?関連性:low、medium、high のいずれか
extra.might_be_offensivebool結果に不快なコンテンツが含まれる可能性があるかどうか

使用例

  • ビジュアルコンテンツの発見:画像ギャラリー、ムードボード、ビジュアル調査ツールを作成できます。幅広く結果を取得するには count=200 を使用してください。画像固有のメタデータ(サイズ、サムネイル)が必要な場合は、web-search よりもこちらが適しています。
  • コンテンツの充実:記事や生成コンテンツに関連する画像を追加できます。country と search_lang を使って、対象読者の地域に合わせてください。
  • 安全な画像取得:デフォルトの safesearch=strict により、すぐにファミリー向けの結果を取得できます。モードは off と strict の 2 種類のみで、web/video/news 検索とは異なり、moderate オプションはありません。
  • 大量の一括取得:1 リクエストあたり最大 200 件の画像を取得できます(web は 20 件、videos/news は 50 件)。画像の一括取得やビジュアル分析パイプラインに最適です。

補足

  • SafeSearch:画像検索ではデフォルトで strict です(web 検索より厳格です)。
  • 大量取得:1 リクエストあたり最大 200 件の結果を返せます。
  • サムネイル:ユーザーのプライバシー保護のため、Brave プロキシ経由で配信されます(幅 500px)。元のフル解像度画像には properties.url を使用してください。
  • サイズ:画像によっては properties.width/height が欠けている場合があります。
  • プレースホルダー:properties.placeholder は低解像度の URL で、インラインの base64 ではありません。プログレッシブ読み込みの UX に役立ちます。

コメント