オプション

Web検索に使用します。スニペット、URL、サムネイル付きの検索結果を順位付けして返します。最新性フィルター、セーフサーチ、カスタムランキング用のGoggles、ページネーションに対応しています。主要な検索エンドポイントです。

...すべて拡張します
105
更新された時間 2026年6月29日

概要web-search

web-search スキルは、Brave検索エンジンへのプログラムによるアクセスを提供し、ユーザーがオンライン検索を実行して構造化された検索結果を取得できるようにします。このスキルは、スニペット、URL、サムネイル、メタデータを含むランク付けされた検索結果を返すように設計されており、開発者やアプリケーションがWeb検索機能をワークフローに直接統合することを支援します。 セーフサーチ、最新性フィルター、Gogglesによるカスタムランキングなどの機能をサポートすることで、自動化システムやユーザーインターフェースに適した構造化された形式で、ウェブ上から関連性の高いフィルタリング済みの情報を迅速に取得するという課題を解決します。

このスキルはGETおよびPOSTの両方のHTTPメソッドをサポートしており、単純なクエリから、カスタム検索結果のランク付けのためのGoggles設定を含む複雑で長いクエリまで、柔軟に処理できます。パラメータを使用することで、国、言語、結果数、コンテンツフィルタリング、日付範囲、およびテキスト装飾、スペルチェック、リッチコールバックなどの追加機能を含め、検索を精密に制御できます。 最新性や検索結果のフィルタリングオプションにより、ユーザーは特定の期間や、ニュース、動画、ディスカッションなどの結果タイプに検索を絞り込むことができます。認証はAPIキーによって管理され、サービスへの安全なアクセスが保証されます。

Web-search 本サービスは、検索インターフェース、データ抽出ツール、または厳選された検索結果への高速アクセスを必要とするアプリケーションを構築する開発者に最適です。対象ユーザーには、ウェブからの構造化データを必要とする検索UI、エージェント、ダッシュボードを作成する開発者や、検索を活用してAIパイプラインや研究ワークフローを強化するシステムの開発者が含まれます。 その速度、柔軟性、構造化された出力の組み合わせにより、関連性の高いウェブ情報を迅速に取得することが不可欠であり、かつ検索結果の表示や順位付けを制御できるアプリケーションに特に適しています。

よくある質問

web-search スキルへのリクエストを認証するにはどうすればよいですか?

リクエストヘッダーに `X-Subscription-Token:` を使用して、API キーを含める必要があります。キーは https://api.search.brave.com から取得できます。

検索結果を最新度やコンテンツの種類でフィルタリングできますか?

はい、このスキルでは、過去1日、1週間、1ヶ月、1年といった更新日時のフィルターや、カスタムの日付範囲に対応しています。ニュース、動画、ディスカッション、FAQなどの結果タイプは、`result_filter`パラメータを使用してフィルタリングできます。

検索にはどのHTTPメソッドがサポートされていますか?

GET メソッドと POST メソッドの両方がサポートされています。長いクエリや複雑な Goggles 設定を使用する場合は、POST メソッドの使用をお勧めします。

web-search ではセーフサーチは利用できますか?

はい、`safesearch` パラメータを `off`、`moderate`、または `strict` に設定することで、成人向けコンテンツのフィルタリングを制御できます。

Gogglesとは何ですか?また、どのように機能しますか?

Gogglesは、URLの指定またはインライン設定により、検索結果のランキングをカスタマイズできる機能です。これにより、検索結果のスコア付けや表示方法をきめ細かく制御できます。

GitHubで見る

Web Search

Requires API Key: Get one at https://api.search.brave.com

Plan: Included in the Search plan. See https://api-dashboard.search.brave.com/app/subscriptions/subscribe

Quick Start (cURL)

Basic Search

curl -s "https://api.search.brave.com/res/v1/web/search?q=python+web+frameworks" \  -H "Accept: application/json" \  -H "X-Subscription-Token: ${BRAVE_SEARCH_API_KEY}"

With Parameters

curl -s "https://api.search.brave.com/res/v1/web/search" \  -H "Accept: application/json" \  -H "X-Subscription-Token: ${BRAVE_SEARCH_API_KEY}" \  -G \  --data-urlencode "q=rust programming tutorials" \  --data-urlencode "country=US" \  --data-urlencode "search_lang=en" \  --data-urlencode "count=10" \  --data-urlencode "safesearch=moderate" \  --data-urlencode "freshness=pm"

Endpoint

GET https://api.search.brave.com/res/v1/web/searchPOST https://api.search.brave.com/res/v1/web/search

Note: Both GET and POST methods are supported. POST is useful for long queries or complex Goggles.

Authentication: X-Subscription-Token: <API_KEY> header

Optional Headers:

  • Accept-Encoding: gzip — Enable gzip compression

When to Use Web Search

FeatureWeb Search (this)LLM Context (llm-context)Answers (answers)
OutputStructured results (links, snippets, metadata)Pre-extracted page content for LLMsEnd-to-end AI answers with citations
Result typesWeb, news, videos, discussions, FAQ, infobox, locations, richExtracted text chunks, tables, codeSynthesized answer + source list
Unique featuresGoggles, structured data (schemas), rich callbacksToken budget control, threshold modesMulti-iteration search, streaming, OpenAI SDK compatible
SpeedFast (~0.5-1s)Fast (<1s)Slower (~30-180s)
Best forSearch UIs, data extraction, custom rankingRAG pipelines, AI agents, groundingChat interfaces, thorough research

Parameters

ParameterTypeRequiredDefaultDescription
qstringYes-Search query (1-400 chars, max 50 words)
countrystringNoUSSearch country (2-letter country code or ALL)
search_langstringNoenLanguage preference (2+ char language code)
ui_langstringNoen-USUI language (e.g., "en-US")
countintNo20Max results per page (1-20)
offsetintNo0Page offset for pagination (0-9)
safesearchstringNomoderateAdult content filter (off/moderate/strict)
freshnessstringNo-Time filter (pd/pw/pm/py or date range)
text_decorationsboolNotrueInclude highlight markers
spellcheckboolNotrueAuto-correct query
result_filterstringNo-Filter result types (comma-separated)
gogglesstringNo-Custom ranking filter (URL or inline)
extra_snippetsboolNo-Get up to 5 extra snippets per result
operatorsboolNotrueApply search operators
unitsstringNo-Measurement units (metric/imperial)
enable_rich_callbackboolNofalseEnable rich 3rd party data callback
include_fetch_metadataboolNofalseInclude fetched_content_timestamp on results

Freshness Values

ValueDescription
pdPast day (24 hours)
pwPast week (7 days)
pmPast month (31 days)
pyPast year (365 days)
YYYY-MM-DDtoYYYY-MM-DDCustom date range

Result Filter Values

Filter types: discussions, faq, infobox, news, query, videos, web, locations

# Only web and video resultscurl "...&result_filter=web,videos"

Location Headers (Optional)

For location-aware results, add these headers. Lat/Long is sufficient when coordinates are known — the other headers are only needed as a fallback when coordinates are unavailable.

HeaderTypeDescription
X-Loc-LatfloatUser latitude (-90.0 to 90.0)
X-Loc-LongfloatUser longitude (-180.0 to 180.0)
X-Loc-TimezonestringIANA timezone (e.g., "America/San_Francisco")
X-Loc-CitystringCity name
X-Loc-StatestringState/region code (ISO 3166-2)
X-Loc-State-NamestringState/region full name (e.g., "California")
X-Loc-Countrystring2-letter country code
X-Loc-Postal-CodestringPostal code (e.g., "94105")

Priority: X-Loc-Lat + X-Loc-Long take precedence. When provided, downstream services resolve the location directly from coordinates and the text-based headers (City, State, Country, Postal-Code) are not used for location resolution. Provide text-based headers only when you don't have coordinates. Sending both won't break anything — lat/long simply wins.

Response Format

Response Fields

FieldTypeDescription
typestringAlways "search"
query.originalstringThe original search query
query.alteredstring?Spellcheck-corrected query (if changed)
query.cleanedstring?Cleaned/normalized query
query.spellcheck_offbool?Whether spellcheck was disabled
query.more_results_availableboolWhether more pages exist
query.show_strict_warningbool?True if strict safesearch blocked adult results
query.search_operatorsobject?Applied search operators (applied, cleaned_query, sites)
web.typestringAlways "search"
web.results[].titlestringPage title
web.results[].urlstringPage URL
web.results[].descriptionstring?Snippet/description text
web.results[].agestring?Human-readable age (e.g., "2 days ago")
web.results[].languagestring?Content language code
web.results[].meta_urlobjectURL components (scheme, netloc, hostname, path)
web.results[].thumbnailobject?Thumbnail (src, original)
web.results[].thumbnail.originalstring?Original full-size image URL
web.results[].thumbnail.logobool?Whether the thumbnail is a logo
web.results[].profileobject?Publisher identity (name, url, long_name, img)
web.results[].page_agestring?ISO datetime of publication (e.g., "2025-04-12T14:22:41")
web.results[].extra_snippetslist[str]?Up to 5 additional excerpts
web.results[].deep_resultsobject?Additional links (buttons, links) from the page
web.results[].schemaslist?Raw schema.org structured data
web.results[].productobject?Product info and reviews
web.results[].recipeobject?Recipe details (ingredients, time, ratings)
web.results[].articleobject?Article metadata (author, publisher, date)
web.results[].bookobject?Book info (author, ISBN, rating)
web.results[].softwareobject?Software product info
web.results[].ratingobject?Aggregate ratings
web.results[].faqobject?FAQ found on the page
web.results[].movieobject?Movie info (directors, actors, genre)
web.results[].videoobject?Video metadata (duration, views, creator)
web.results[].locationobject?Location/restaurant details
web.results[].qaobject?Question/answer info
web.results[].creative_workobject?Creative work data
web.results[].music_recordingobject?Music/song data
web.results[].organizationobject?Organization info
web.results[].reviewobject?Review data
web.results[].content_typestring?Content type classification
web.results[].fetched_content_timestampint?Fetch timestamp (with include_fetch_metadata=true)
web.mutated_by_gogglesboolWhether results were re-ranked by Goggles
web.family_friendlyboolWhether results are family-friendly
mixedobject?Preferred display order (see Mixed Response below)
discussions.results[]array?Forum discussion clusters
discussions.results[].data.forum_namestring?Forum/community name
discussions.results[].data.num_answersint?Number of answers/replies
discussions.results[].data.questionstring?Discussion question
discussions.results[].data.top_commentstring?Top-voted comment excerpt
faq.results[]array?FAQ entries
news.results[]array?News articles
videos.results[]array?Video results
infobox.results[]array?Knowledge graph entries
locations.results[]array?Local POI results
rich.hint.verticalstring?Rich result type
rich.hint.callback_keystring?Callback key for rich data

JSON Example

{  "type": "search",  "query": {    "original": "python frameworks",    "altered": "python web frameworks",    "spellcheck_off": false,    "more_results_available": true  },  "web": {    "type": "search",    "results": [      {        "title": "Top Python Web Frameworks",        "url": "https://example.com/python-frameworks",        "description": "A comprehensive guide to Python web frameworks...",        "age": "2 days ago",        "language": "en",        "meta_url": {          "scheme": "https",          "netloc": "example.com",          "hostname": "example.com",          "path": "/python-frameworks"        },        "thumbnail": {          "src": "https://...",          "original": "https://original-image-url.com/img.jpg"        },        "extra_snippets": ["Additional excerpt 1...", "Additional excerpt 2..."]      }    ],    "family_friendly": true  },  "mixed": {    "type": "mixed",    "main": [      {"type": "web", "index": 0, "all": false},      {"type": "web", "index": 1, "all": false},      {"type": "videos", "all": true}    ],    "top": [],    "side": []  },  "videos": { "...": "..." },  "news": { "...": "..." },  "rich": {    "type": "rich",    "hint": {      "vertical": "weather",      "callback_key": "<callback_key_hex>"    }  }}

Mixed Response

The mixed object defines the preferred display order of results across types. It contains three arrays:

ArrayPurpose
mainPrimary result list (ordered sequence of results to display)
topResults to display above main results
sideResults to display alongside main results (e.g., infobox)

Each entry is a ResultReference with type (e.g., "web", "videos"), index (into the corresponding result array), and all (true to include all results of that type at this position).

Search Operators

OperatorSyntaxDescription
Sitesite:example.comLimit results to a specific domain
File extensionext:pdfResults with a specific file extension
File typefiletype:pdfResults created in a specific file type
In titleintitle:pythonPages with term in the title
In bodyinbody:tutorialPages with term in the body
In pageinpage:guidePages with term in title or body
Languagelang:esPages in a specific language (ISO 639-1)
Locationloc:usPages from a specific country (ISO 3166-1 alpha-2)
Include+termForce inclusion of a term
Exclude-termExclude pages containing the term
Exact match"exact phrase"Match the exact phrase in order
ANDterm1 AND term2Both terms required (uppercase)
OR / NOTterm1 OR term2, NOT termLogical operators (uppercase)

Set operators=false to disable operator parsing.

Goggles (Custom Ranking) — Unique to Brave

Goggles let you re-rank search results — boost trusted sources, suppress SEO spam, or build focused search scopes.

MethodExample
Hosted--data-urlencode "goggles=https://raw.githubusercontent.com/brave/goggles-quickstart/main/goggles/rust_programming.goggle"
Inline--data-urlencode 'goggles=$discard$site=example.com'

Hosted goggles must be on GitHub/GitLab, include ! name:, ! description:, ! author: headers, and be registered at https://search.brave.com/goggles/create. Inline rules need no registration.

Syntax: $boost=N / $downrank=N (1–10), $discard, $site=example.com. Combine with commas: $site=example.com,boost=3. Separate rules with (%0A).

Allow list: $discard$site=docs.python.org$site=developer.mozilla.org — Block list: $discard,site=pinterest.com$discard,site=quora.com

Resources: Discover · Syntax · Quickstart

Rich Data Enrichments

For queries about weather, stocks, sports, currency, etc., use the rich callback workflow:

# 1. Search with rich callback enabledcurl -s "https://api.search.brave.com/res/v1/web/search?q=weather+san+francisco&enable_rich_callback=true" \  -H "X-Subscription-Token: ${BRAVE_SEARCH_API_KEY}"# Response includes: "rich": {"hint": {"callback_key": "abc123...", "vertical": "weather"}}# 2. Get rich data with the callback keycurl -s "https://api.search.brave.com/res/v1/web/rich?callback_key=abc123..." \  -H "X-Subscription-Token: ${BRAVE_SEARCH_API_KEY}"

Supported Rich Types: Calculator, Definitions, Unit Conversion, Unix Timestamp, Package Tracker, Stock, Currency, Cryptocurrency, Weather, American Football, Baseball, Basketball, Cricket, Football/Soccer, Ice Hockey, Web3, Translator

Rich Callback Endpoint

GET https://api.search.brave.com/res/v1/web/rich
ParameterTypeRequiredDescription
callback_keystringYesCallback key from the web search rich.hint.callback_key field

Use Cases

  • General-purpose search integration: Richest result set (web, news, videos, discussions, FAQ, infobox, locations) in one call. For RAG/LLM grounding, prefer llm-context.
  • Structured data extraction: Products, recipes, ratings, articles via schemas and typed fields on results.
  • Custom search with Goggles: Unique to Brave. Boost/discard sites with inline rules or hosted Goggles for fully customized ranking.

Notes

  • Pagination: Use offset (0-9) with count to page through results
  • Count: Max 20 for web search; actual results may be less than requested

すべてのファイル

1件のファイル

web-searchをインストール

スキルファイルをダウンロードし、.claude/skills/ ディレクトリに解凍してください。

ZIPをダウンロード

リポジトリをクローンし、スキルファイルをプロジェクトにコピーしてください。

git clone https://github.com/brave/brave-search-skills/blob/main/skills/web-search/SKILL.md # Copy SKILL.md to your .claude/skills/ directory

コピー コピー
クイックセットアップ: skill フォルダを .claude/skills/ にコピーしてください。Claude が自動的にスキルを検出して使用します。
リポジトリ brave/brave-search-skills

関連スキル

webapp-testing
更新された時間 2026年6月29日
lark-base
更新された時間 2026年7月5日
agentmail
更新された時間 2026年6月29日
computer-use
更新された時間 2026年7月29日
OR