Yahoo News Scraper avatar

Yahoo News Scraper

Pricing

from $1.99 / 1,000 results

Go to Apify Store
Yahoo News Scraper

Yahoo News Scraper

Scrapes news articles from Yahoo News Search (news.search.Yahoo.com). Extracts title, URL, source, snippet, thumbnail, publication date and more.

Pricing

from $1.99 / 1,000 results

Rating

0.0

(0)

Developer

ScrapeAI

ScrapeAI

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

2 days ago

Last modified

Share

A high-performance Apify Actor for searching and extracting live news articles from Yahoo News (news.search.yahoo.com). Extract headlines, direct/clean URLs, publishers, authors, snippets, full image thumbnails, publication dates, categories, and sponsorship status dynamically based on any search query.


⚑ Key Features

  • πŸ” Dynamic Keyword Search: Scrape news for any topic, entity, company ticker, or keyword.
  • πŸ’Ž Richest Real-Time Metadata: Extracts title, destination URL, source/publisher, author, article excerpt, high-res thumbnail, published time, category, and sponsorship tag.
  • πŸ•’ Time Recency Filtering: Filter by past 24 hours (1d), past week (7d), or past month (30d).
  • ⚑ Sorting Options: Sort by search relevance or newest first (date).
  • 🌐 International & Multilingual Support: Custom country/region locale and language support.
  • πŸ”„ Smart Pagination: Automatically traverses search result pages until your target maxItems is reached.
  • πŸ›‘οΈ Anti-Bot & Proxy Ready: Built with Playwright stealth navigation and Apify Proxy integration.

πŸ“‹ Input Configuration

The Actor accepts input in JSON format. All fields are dynamically configurable:

ParameterTypeDefaultRequiredDescription
querystring"technology"YesSearch term or phrase to search on Yahoo News.
maxItemsinteger50NoMaximum number of articles to extract (1 to 500).
timeRangestring""NoFilter by recency: "" (Any Time), "1d" (Past 24 Hours), "7d" (Past Week), "30d" (Past Month).
sortBystring""NoSort results: "" (Relevance) or "date" (Newest first).
countrystring"lang_en"NoCountry / locale identifier (e.g., lang_en, lang_de, lang_fr, us).
languagestring"en"NoLanguage code (e.g., en, de, fr, es).
proxyConfigurationobject{"useApifyProxy": true}NoProxy settings. Residential proxy is recommended for high-volume scrapes.

Example Input (INPUT.json)

{
"query": "artificial intelligence",
"maxItems": 20,
"timeRange": "7d",
"sortBy": "date",
"country": "lang_en",
"language": "en"
}

πŸ“¦ Output Dataset Schema

Each scraped news article produces a clean, structured JSON object:

{
"position": 1,
"title": "D-Wave Quantum vs. Microsoft: Which Is the Better Quantum Computing Stock to Own...",
"url": "https://finance.yahoo.com/markets/stocks/articles/d-wave-quantum-vs-microsoft-075700700.html",
"source": "Motley Fool Β· via Yahoo Finance",
"author": null,
"snippet": "Owning shares of Microsoft gives you exposure to quantum computing's potential without sacrificing...",
"thumbnail": "https://s.yimg.com/fz/api/res/1.2/voXodaoRiBh1U_dJFRm63A--~C/YXBwaWQ9c3JjaGRkO2ZpPWZpbGw7aD0xMDY7cHhvZmY9MDtweW9mZj0wO3E9ODA7c209MTt3PTE2MA--/https://media.zenfs.com/en/motleyfool.com/90b8193ea103c1408ea093ff77313a87.jpg",
"publishedAt": "1 day ago",
"category": "Markets",
"isSponsored": false,
"searchQuery": "quantum computing",
"country": "lang_en",
"language": "en",
"scrapedAt": "2026-08-20T11:57:02.548Z"
}

Output Field Descriptions

  • position (integer): Result index in the search stream.
  • title (string): Cleaned headline of the news article.
  • url (string): Full link directly to the publisher or Yahoo News article.
  • source (string): Original news organization / media provider name.
  • author (string or null): Byline author if present on the search card.
  • snippet (string): Article summary or excerpt.
  • thumbnail (string or null): Direct URL to the article preview image.
  • publishedAt (string): Publication timestamp (e.g. "2 hours ago", "1 day ago", ISO date).
  • category (string or null): News category or vertical (e.g. Markets, Technology, Politics).
  • isSponsored (boolean): Whether the article is marked as promoted / sponsored.
  • searchQuery (string): The search query used for this scrape run.
  • country (string): Country/locale code used in the search.
  • language (string): Language code used in the search.
  • scrapedAt (string): ISO 8601 timestamp of when the record was extracted.

πŸš€ How to Run

1. Locally

Ensure you have Node.js (v18+) installed:

# Clone the repository and install dependencies
npm install
# Run the scraper
npm start
# Validate generated datasets against the schema
npm test

2. Apify CLI

# Run locally with Apify CLI
apify run
# Push and deploy to your Apify account
apify push

3. Apify API (Node.js)

import { ApifyClient } from 'apify-client';
const client = new ApifyClient({
token: 'YOUR_APIFY_TOKEN',
});
const run = await client.actor('YOUR_USERNAME/yahoo-news-scraper').call({
query: 'electric vehicles',
maxItems: 30,
timeRange: '1d',
sortBy: 'date',
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);

4. Apify API (Python)

from apify_client import ApifyClient
client = ApifyClient('YOUR_APIFY_TOKEN')
run_input = {
"query": "space exploration",
"maxItems": 25,
"timeRange": "7d",
"sortBy": "date"
}
run = client.actor("YOUR_USERNAME/yahoo-news-scraper").call(run_input=run_input)
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
print(f"[{item['publishedAt']}] {item['title']} - {item['url']}")

πŸ’‘ Practical Use Cases

  • Media & PR Monitoring: Track brand mentions, PR releases, and media presence across international publishers.
  • Market & Financial Intelligence: Stream breaking news for stock tickers, commodities, cryptos, and industries.
  • AI & NLP Training: Ingest up-to-the-minute real news headlines for LLM retrieval-augmented generation (RAG) and sentiment models.
  • Content Aggregation: Power automated newsletters, Slack/Discord bots, and RSS-style newsfeeds.

πŸ“„ License

ISC