Index of every page on this site: llms.txt
All skills
brave avatar

/news-search

@62793e0 official
Run it yourself

USE FOR news search. Returns news articles with title, URL, description, age, thumbnail, profile. Supports freshness and date range filtering, SafeSearch filter and Goggles for custom ranking.

Use this Skill: https://skilld.dev/gh/brave/brave-search-skills/news-search

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

SKILL.md

≈51 tokens for metadata: the name and description. ≈2k when used: this file.

Description uses 2.6% of example budget

Before choosing a Skill, your Agent reads its name and description. All available Skills share that space.

  • A shorter description leaves more room for other Skills. This entry exceeds our 1% size suggestion.

In our Claude Code example, all Skill names and descriptions share 8,000 characters. This Skill uses ≈206 characters, or 2.6%.

The 1% threshold is a size suggestion. Longer descriptions can still fit.

Your model, settings, and other Skills decide how much text your Agent can read.

Example settings and source

The example uses a 200k-token context and default Claude Code settings. The count includes the name, description, separators, and when_to_use when present. Codex also counts local file paths.

Skit's source and limits: Codex 0.160.1, Claude Code 2.1.292.

News 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/news/search?q=space+exploration" \
  -H "Accept: application/json" \
  -H "X-Subscription-Token: ${BRAVE_SEARCH_API_KEY}"

Recent News (Past 24 Hours)

curl -s "https://api.search.brave.com/res/v1/news/search" \
  -H "Accept: application/json" \
  -H "X-Subscription-Token: ${BRAVE_SEARCH_API_KEY}" \
  -G \
  --data-urlencode "q=cybersecurity" \
  --data-urlencode "country=US" \
  --data-urlencode "freshness=pd" \
  --data-urlencode "count=20"

Date Range Filter

curl -s "https://api.search.brave.com/res/v1/news/search" \
  -H "Accept: application/json" \
  -H "X-Subscription-Token: ${BRAVE_SEARCH_API_KEY}" \
  -G \
  --data-urlencode "q=climate summit" \
  --data-urlencode "freshness=2026-01-01to2026-01-31"

Endpoint

GET https://api.search.brave.com/res/v1/news/search
POST https://api.search.brave.com/res/v1/news/search

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

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

Parameters

Parameter Type Required Default Description
q string Yes - Search query (1-400 chars, max 50 words)
country string No US Search country (2-letter country code or ALL)
search_lang string No en Language preference (2+ char language code)
ui_lang string No en-US UI language (e.g., "en-US")
count int No 20 Number of results (1-50)
offset int No 0 Page offset (0-9)
safesearch string No strict Adult content filter (off/moderate/strict)
freshness string No - Time filter (pd/pw/pm/py or date range)
spellcheck bool No true Auto-correct query
extra_snippets bool No - Up to 5 additional excerpts per result
goggles string or array No - Custom ranking filter (URL or inline; repeat param for multiple)
operators bool No true Apply search operators
include_fetch_metadata bool No false Include fetch timestamps in results

Freshness Values

Value Description
pd Past day (24 hours) - ideal for breaking news
pw Past week (7 days)
pm Past month (31 days)
py Past year (365 days)
YYYY-MM-DDtoYYYY-MM-DD Custom date range

Response Format

{
  "type": "news",
  "query": {
    "original": "space exploration"
  },
  "results": [
    {
      "type": "news_result",
      "title": "New Developments in Space Exploration",
      "url": "https://news.example.com/space-exploration",
      "description": "Recent missions have advanced our understanding of...",
      "age": "2 hours ago",
      "page_age": "2026-01-15T14:30:00",
      "page_fetched": "2026-01-15T15:00:00Z",
      "meta_url": {
        "scheme": "https",
        "netloc": "news.example.com",
        "hostname": "news.example.com",
        "favicon": "https://imgs.search.brave.com/favicon/news.example.com",
        "path": "/space-exploration"
      },
      "profile": {
        "name": "Example Outlet",
        "url": "https://news.example.com/space-exploration"
      },
      "thumbnail": {
        "src": "https://imgs.search.brave.com/..."
      }
    }
  ]
}

Response Fields

Field Type Description
type string Always "news"
query.original string The original search query
query.altered string? Spellcheck-corrected query (if changed)
query.cleaned string? Cleaned/normalized query from spellchecker
query.spellcheck_off bool? Whether spellcheck was disabled
query.show_strict_warning bool? True if strict safesearch blocked results
query.search_operators object? Applied search operators
query.search_operators.applied bool Whether operators were applied
query.search_operators.cleaned_query string? Query after operator processing
query.search_operators.sites list[str]? Domains from site: operators
results[].type string Always "news_result"
results[].title string Article title
results[].url string Source URL of the article
results[].description string? Article description/summary
results[].age string? Human-readable age (e.g. "2 hours ago")
results[].page_age string? Publication date from source (ISO datetime)
results[].page_fetched string? When page was last fetched (ISO datetime)
results[].fetched_content_timestamp int? Fetch timestamp (only with include_fetch_metadata=true)
results[].meta_url.scheme string? URL protocol scheme
results[].meta_url.netloc string? Network location
results[].meta_url.hostname string? Lowercased domain name
results[].meta_url.favicon string? Favicon URL
results[].meta_url.path string? URL path
results[].thumbnail.src string Served thumbnail URL
results[].thumbnail.original string? Original thumbnail URL
results[].extra_snippets list[str]? Up to 5 additional excerpts per result
results[].profile.name string? Name of the site
results[].profile.url string? The original URL where the profile is available
results[].profile.long_name string? The long name of the site
results[].profile.img string? The served image URL representing the profile

Goggles (Custom Ranking) — Unique to Brave

Goggles let you re-rank news results — boost trusted outlets or suppress unwanted sources.

Method Example
Hosted --data-urlencode "goggles=https://raw.githubusercontent.com/brave/goggles-quickstart/main/goggles/hacker_news.goggle"
Inline --data-urlencode 'goggles=$discard\n$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: Rules start with $ + comma-separated options. Actions (pick one): discard, boost[=N], downrank[=N] — N is an integer 1–10. Site filter: site=DOMAIN. Example: $site=example.com,boost=3. Separate rules with \n (%0A).

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

Resources: Discover · Syntax · Quickstart

Search Operators

Use search operators to refine results:

  • site:local-paper.com - Limit to specific news site
  • "exact phrase" - Match exact phrase
  • -exclude - Exclude term

Set operators=false to disable operator parsing.

Use Cases

  • Breaking news monitoring: Use freshness=pd for the most recent articles on a topic.
  • Custom news feeds with Goggles: Boost trusted sources and discard other sources — unique to Brave.
  • Historical news research: Use freshness=YYYY-MM-DDtoYYYY-MM-DD to find articles from specific time periods.
  • Multilingual news: Combine country, search_lang, and ui_lang for cross-locale results.
  • Data pipelines: Set include_fetch_metadata=true for fetched_content_timestamp on each result.

Notes

  • SafeSearch: Defaults to strict
  • Pagination: Use offset (0-9) with count
  • Extra snippets: Up to 5 additional excerpts when extra_snippets=true

Source: SKILL.md on GitHub

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

2 warnings2mo5 checks · Risk SAFE
  • Gen Agent Trust Hub2mo

    This skill provides standard documentation for the Brave News Search API, describing parameters, headers, and authentication setup via an API key. It contains no malicious logic, unauthorized commands, or exfiltration routes.

  • Socket2mo

    No alerts

  • Snyk2mo

    Risk: MEDIUM · 1 issue

  • Runlayer9mo

    1/1 file flagged

  • ZeroLeaks7mo

    Score: 93/100 · 2 sections analyzed

Signed by skilld at 62793e0. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 2 months ago.

Activeupdated 3 months ago
  • API
  • brave-search
  • news
  • search
  • freshness-filter
  • goggles
  • safesearch

README badge

README badge for brave/brave-search-skills/news-search

Queries Brave's news search API and returns article results with title, URL, description, age, and thumbnail. Supports freshness filters (past day/week/month/year or custom date range), SafeSearch settings, and Goggles for custom result ranking by source.

Generated from the current SKILL.md.

Does this require authentication?
Yes. You need a Brave Search API key passed via the X-Subscription-Token header. Keys are available on the Search plan at https://api-dashboard.search.brave.com/app/subscriptions/subscribe.
Can I filter results by date range?
Yes. Use the freshness parameter with preset values (pd for past day, pw for past week, pm for past month, py for past year) or a custom range in YYYY-MM-DDtoYYYY-MM-DD format.
What is Goggles and how does it work?
Goggles is Brave's custom ranking system that lets you boost, downrank, or discard news sources. You can use hosted goggles from GitHub/GitLab or inline rules without registration.
Can I search for news in languages other than English?
Yes. Use the search_lang parameter for the language of results and ui_lang for the UI language, and optionally specify a country code to narrow by region.
What does the response include?
Each result includes title, URL, description, publication age, thumbnail image, and optional metadata like fetch timestamps and extra snippets.

Generated from the current SKILL.md. These answers refresh after source changes.