# Yahoo Finance News Search Scraper (`myagizm/yahoo-finance-news-scraper`) Actor

Search finance headlines by ticker, company, or keyword and return structured news metadata.

- **URL**: https://apify.com/myagizm/yahoo-finance-news-scraper.md
- **Developed by:** [MYM](https://apify.com/myagizm) (community)
- **Categories:** News
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$0.70 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Yahoo Finance News Search Scraper

Search finance headlines by ticker, company name, or keyword. Each unique result is one structured dataset row; this Actor returns headline metadata, not full article text.

### Input

- `query`: ticker, company, or topic (for example `AAPL`, `NVDA`, or `Tesla`)
- `maxItems`: maximum number of results requested (1–100; the source may return fewer)
- `timeoutSeconds`: request timeout (1–45 seconds)

### Output fields

| Field | Meaning |
|---|---|
| `id` | Stable news item ID |
| `query` | Search term used |
| `title`, `publisher` | Headline and publisher label |
| `url` | Article link |
| `publishedAt`, `providerPublishTime` | Publication time when available |
| `relatedTickers` | Related symbols when supplied |
| `articleType` | Item type when supplied |

### Pricing

PAY_PER_EVENT: **$0.0007 per stored result**. No Actor-start event is charged. Failed runs and zero-result runs store no rows and incur no result charge.

### 中文

按股票代码、公司名称或关键词搜索财经新闻。每条去重后的结果保存为一行结构化数据；本 Actor 提供标题和元数据，不提取全文。

#### 输入

- `query`：股票代码、公司或主题，例如 `AAPL`、`NVDA`、`Tesla`
- `maxItems`：请求的最大结果数（1–100；实际返回数量可能更少）
- `timeoutSeconds`：请求超时（1–45 秒）

#### 输出

包含稳定新闻 ID、查询词、标题、发布者、文章链接、可用的发布时间、相关股票代码和内容类型。

#### 价格

按事件付费：每条已保存结果 **$0.0007**。不收取运行启动费。失败或无结果的运行不会保存数据，也不会产生结果费用。

### Errors & billing

Input errors finish with status SUCCEEDED, no results and no charge; see the OUTPUT record for the reason.

### 错误与计费

输入错误会以 SUCCEEDED 状态结束，不返回结果且不收费；原因请查看 OUTPUT 记录。

# Actor input Schema

## `query` (type: `string`):

Ticker, company name, or finance-news keyword. Examples: AAPL, NVDA, Tesla.

## `maxItems` (type: `integer`):

Maximum number of unique headlines to return (the upstream may return fewer).

## `timeoutSeconds` (type: `integer`):

Maximum wait for the single news search request.

## Actor input object example

```json
{
  "query": "AAPL",
  "maxItems": 10,
  "timeoutSeconds": 20
}
```

# Actor output Schema

## `results` (type: `string`):

News headlines and metadata.

## `fullJson` (type: `string`):

All returned news fields.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "query": "AAPL",
    "maxItems": 10,
    "timeoutSeconds": 20
};

// Run the Actor and wait for it to finish
const run = await client.actor("myagizm/yahoo-finance-news-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "query": "AAPL",
    "maxItems": 10,
    "timeoutSeconds": 20,
}

# Run the Actor and wait for it to finish
run = client.actor("myagizm/yahoo-finance-news-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "query": "AAPL",
  "maxItems": 10,
  "timeoutSeconds": 20
}' |
apify call myagizm/yahoo-finance-news-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,myagizm/yahoo-finance-news-scraper"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/RBYZghOloyfvh9CqQ/builds/IgUCYDTM3NVRuRnXk/openapi.json
