# Yahoo Finance Scraper (for Japan)

Template for extracting stock/equity information from Yahoo! Finance Japan using URLs or keywords

- Template page: [https://www.octoparse.com/template/yahoo-finance-scraper-for-japan](https://www.octoparse.com/template/yahoo-finance-scraper-for-japan)
- Categories: Finance
- Status: `PUBLISHED`
- Run mode: `CLOUD`

## Pricing

Free.

## What is an Octoparse template?

An Octoparse template is a ready-to-use scraping workflow with predefined inputs and structured outputs. Use the exact parameter keys below; do not invent parameters.

## Overview

This ready-to-use template collects structured data from detail pages.

## Output

The current workflow extracts 20 fields, including `チャートURL`, `ニュースURL`, `ページ番号`, `一覧ページURL`, `企業情報URL`, `前日比`, `前日比（%）`, `市場`, `掲示板URL`, `時価総額`, `時系列URL`, `更新時刻`, `株主優待URL`, `検索結果件数`, `概要`, `現在値`, `販売会社URL`, `銘柄URL`, `銘柄コード`, `銘柄名`.

## Use Cases

- Use structured results for research, comparison, and monitoring.
- Collect rows without building the extraction workflow from scratch.
- Combine results with other templates for downstream enrichment.
- Review a representative result before starting a large batch.

## Why Octoparse

- **No coding required:** complete Keywords/URLs (up to 1,000) and start the template in cloud mode.
- **Flexible export:** review and export results as CSV, Excel, or JSON.

## Input

### Keywords/URLs (up to 1,000)

Required. https://finance.yahoo.co.jp/search/?query=%E5%8D%8A%E5%B0%8E%E4%BD%93&itemTypes=all%2Cstock%2Cetf%2Creit%2CusStock%2Cfund%2CforeignIndex%2Ccurrency%2Cfx&page=1 semiconductors 7203 Constraints: minItems=1; maxItems=1000; items.minLength=1; items.maxLength=1000.

## How to Use

## Usage

1. Click **Try it!**
2. Enter URLs with desired filters/keywords applied, or enter keywords or stock codes.
3. Click **Start** and select **Run in Web Browser** or **Run with Desktop App**.

## Input

- URL: `https://finance.yahoo.co.jp/search/?query=%E5%8D%8A%E5%B0%8E%E4%BD%93`
- Keyword: `半導体`
- Stock code: `7203`

## Notes

- If you encounter a CAPTCHA, pause the task and manually solve it in the built-in browser.
- Web scraping is generally legal if you scrape publicly available non-personal data. Learn more about legality in [this article](https://helpcenter.octoparse.com/en/articles/6471169-is-web-scraping-via-octoparse-legal-and-ethical).

## Limitations

Results depend on what the source site exposes at run time. Fields may be empty when a source page does not provide a value. The template enforces the input limits shown above.

## Tips

Use specific, valid inputs and review a representative result before starting a large batch. Remove duplicate inputs when repeated records are not needed.

## FAQ

### What do I need to enter?

Use the exact inputs and limits listed above.

### What data does this template return?

See Output Schema below; availability can vary by source record.

### How is usage billed?

See the Pricing section above for current pricing and billing details.

## Related Templates

- [Yahoo Finance Scraper](https://www.octoparse.com/template/yahoo-finance-scraper)
- [Yahoo Japan News Comments Scraper](https://www.octoparse.com/template/yahoo-news-comments-scraper)
- [Yahoo Japan News Scraper](https://www.octoparse.com/template/yahoo-news-scraper)
- [Google Scholar Article Scraper (for Japan)](https://www.octoparse.com/template/google-scholar-jp-article-scraper)
- [At Home Japan For-Sale Property Scraper](https://www.octoparse.com/template/at-home-japan-for-sale-property-scraper)

## Input Schema

```json
{
  "title": "Yahoo Finance Scraper (for Japan) input",
  "description": "Input parameters configured for the current published template version.",
  "type": "object",
  "schemaVersion": 1,
  "additionalProperties": false,
  "properties": {
    "keywords/URLs": {
      "title": "Keywords/URLs (up to 1,000)",
      "description": "https://finance.yahoo.co.jp/search/?query=%E5%8D%8A%E5%B0%8E%E4%BD%93&itemTypes=all%2Cstock%2Cetf%2Creit%2CusStock%2Cfund%2CforeignIndex%2Ccurrency%2Cfx&page=1\nsemiconductors\n7203",
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1,
        "maxLength": 1000
      },
      "minItems": 1,
      "maxItems": 1000,
      "x-octoparse": {
        "apiEnabled": true
      }
    }
  },
  "required": [
    "keywords/URLs"
  ]
}
```

## Input JSON Example

Example 1

```json
{
  "keywords/URLs": [
    "https://finance.yahoo.co.jp/search/?query=%E5%8D%8A%E5%B0%8E%E4%BD%93&itemTypes=all%2Cstock%2Cetf%2Creit%2CusStock%2Cfund%2CforeignIndex%2Ccurrency%2Cfx&page=1"
  ]
}
```

Example 2

```json
{
  "keywords/URLs": [
    "半導体"
  ]
}
```

Example 3

```json
{
  "keywords/URLs": [
    "SUSHI"
  ]
}
```

Example 4

```json
{
  "keywords/URLs": [
    "半導体"
  ]
}
```

Example 5

```json
{
  "keywords/URLs": [
    "https://finance.yahoo.co.jp/quote/7203.T"
  ]
}
```


## Output Schema

```json
{
  "schemaVersion": 1,
  "type": "object",
  "properties": {
    "チャートURL": {
      "type": "string",
      "description": ""
    },
    "ニュースURL": {
      "type": "string",
      "description": ""
    },
    "ページ番号": {
      "type": "string",
      "description": ""
    },
    "一覧ページURL": {
      "type": "string",
      "description": ""
    },
    "企業情報URL": {
      "type": "string",
      "description": ""
    },
    "前日比": {
      "type": "string",
      "description": ""
    },
    "前日比（%）": {
      "type": "string",
      "description": ""
    },
    "市場": {
      "type": "string",
      "description": ""
    },
    "掲示板URL": {
      "type": "string",
      "description": ""
    },
    "時価総額": {
      "type": "string",
      "description": ""
    },
    "時系列URL": {
      "type": "string",
      "description": ""
    },
    "更新時刻": {
      "type": "string",
      "description": ""
    },
    "株主優待URL": {
      "type": "string",
      "description": ""
    },
    "検索結果件数": {
      "type": "string",
      "description": ""
    },
    "概要": {
      "type": "string",
      "description": ""
    },
    "現在値": {
      "type": "string",
      "description": ""
    },
    "販売会社URL": {
      "type": "string",
      "description": ""
    },
    "銘柄URL": {
      "type": "string",
      "description": ""
    },
    "銘柄コード": {
      "type": "string",
      "description": ""
    },
    "銘柄名": {
      "type": "string",
      "description": ""
    }
  },
  "title": "Yahoo Finance Scraper (for Japan) output",
  "description": "Initial output fields derived from the current published implementation. Field descriptions are maintained by Data Center; production field names and types should be refreshed from recent successful runs.",
  "additionalProperties": false
}
```

## Output Example

Example 1

```json
{
  "チャートURL": "https://finance.yahoo.co.jp/quote/64311237/chart",
  "ニュースURL": "",
  "ページ番号": "1",
  "一覧ページURL": "https://finance.yahoo.co.jp/search/?query=%E5%8D%8A%E5%B0%8E%E4%BD%93&itemTypes=all%2Cstock%2Cetf%2Creit%2CusStock%2Cfund%2CforeignIndex%2Ccurrency%2Cfx&page=1",
  "企業情報URL": "",
  "前日比": "-2,822",
  "前日比（%）": "-8.43%",
  "市場": "投資信託",
  "掲示板URL": "https://finance.yahoo.co.jp/quote/64311237/forum",
  "時価総額": "",
  "時系列URL": "https://finance.yahoo.co.jp/quote/64311237/history",
  "更新時刻": "10/23",
  "株主優待URL": "",
  "検索結果件数": "220",
  "概要": "日本を含む世界各国の金融商品取引所等に上場している半導体関連企業(半導体及び半導体製造装置等の設計・製造を手掛ける企業や、これらの企業に製品・サービスを提供する企業等半導体産業から業績面で恩恵を受ける…",
  "現在値": "30,660",
  "販売会社URL": "https://finance.yahoo.co.jp/quote/64311237/sales",
  "銘柄URL": "https://finance.yahoo.co.jp/quote/64311237",
  "銘柄コード": "64311237",
  "銘柄名": "半導体関連 世界株式戦略ファンド"
}
```

Example 2

```json
{
  "チャートURL": "https://finance.yahoo.co.jp/quote/64311237/chart",
  "ニュースURL": "",
  "ページ番号": "1",
  "一覧ページURL": "https://finance.yahoo.co.jp/search/?query=%E5%8D%8A%E5%B0%8E%E4%BD%93",
  "企業情報URL": "",
  "前日比": "-1,345",
  "前日比（%）": "-3.66%",
  "市場": "投資信託",
  "掲示板URL": "https://finance.yahoo.co.jp/quote/64311237/forum",
  "時価総額": "",
  "時系列URL": "https://finance.yahoo.co.jp/quote/64311237/history",
  "更新時刻": "10/15",
  "株主優待URL": "",
  "検索結果件数": "221",
  "概要": "日本を含む世界各国の金融商品取引所等に上場している半導体関連企業(半導体及び半導体製造装置等の設計・製造を手掛ける企業や、これらの企業に製品・サービスを提供する企業等半導体産業から業績面で恩恵を受ける…",
  "現在値": "35,374",
  "販売会社URL": "https://finance.yahoo.co.jp/quote/64311237/sales",
  "銘柄URL": "https://finance.yahoo.co.jp/quote/64311237",
  "銘柄コード": "64311237",
  "銘柄名": "半導体関連 世界株式戦略ファンド"
}
```

Example 3

```json
{
  "チャートURL": "https://finance.yahoo.co.jp/quote/9435.T/chart",
  "ニュースURL": "https://finance.yahoo.co.jp/quote/9435.T/news",
  "ページ番号": "1",
  "一覧ページURL": "https://finance.yahoo.co.jp/search/?query=SUSHI",
  "企業情報URL": "https://finance.yahoo.co.jp/quote/9435.T/profile",
  "前日比": "+70",
  "前日比（%）": "+0.19%",
  "市場": "東証PRM",
  "掲示板URL": "https://finance.yahoo.co.jp/quote/9435.T/forum",
  "時価総額": "1,584,507百万円",
  "時系列URL": "",
  "更新時刻": "10/6",
  "株主優待URL": "https://finance.yahoo.co.jp/quote/9435.T/incentive",
  "検索結果件数": "8",
  "概要": "【特色】電力・ガス、通信回線、宅配水など継続利用商材の営業力に強み。上場株に積極投資。四半期配当",
  "現在値": "36,020",
  "販売会社URL": "",
  "銘柄URL": "https://finance.yahoo.co.jp/quote/9435.T",
  "銘柄コード": "9435",
  "銘柄名": "(株)光通信"
}
```

Example 4

```json
{
  "チャートURL": "https://finance.yahoo.co.jp/quote/64311237/chart",
  "ニュースURL": "",
  "ページ番号": "1",
  "一覧ページURL": "https://finance.yahoo.co.jp/search/?query=%E5%8D%8A%E5%B0%8E%E4%BD%93",
  "企業情報URL": "",
  "前日比": "+775",
  "前日比（%）": "+2.31%",
  "市場": "投資信託",
  "掲示板URL": "https://finance.yahoo.co.jp/quote/64311237/forum",
  "時価総額": "",
  "時系列URL": "https://finance.yahoo.co.jp/quote/64311237/history",
  "更新時刻": "9/18",
  "株主優待URL": "",
  "検索結果件数": "220",
  "概要": "日本を含む世界各国の金融商品取引所等に上場している半導体関連企業(半導体及び半導体製造装置等の設計・製造を手掛ける企業や、これらの企業に製品・サービスを提供する企業等半導体産業から業績面で恩恵を受ける…",
  "現在値": "34,375",
  "販売会社URL": "https://finance.yahoo.co.jp/quote/64311237/sales",
  "銘柄URL": "https://finance.yahoo.co.jp/quote/64311237",
  "銘柄コード": "64311237",
  "銘柄名": "半導体関連 世界株式戦略ファンド"
}
```

Example 5

```json
{
  "チャートURL": "https://finance.yahoo.co.jp/quote/7203.T/chart",
  "ニュースURL": "https://finance.yahoo.co.jp/quote/7203.T/news",
  "ページ番号": "1",
  "一覧ページURL": "https://finance.yahoo.co.jp/quote/7203.T",
  "企業情報URL": "https://finance.yahoo.co.jp/quote/7203.T/profile",
  "前日比": "+22",
  "前日比（%）": "+0.73%",
  "市場": "東証PRM",
  "掲示板URL": "https://finance.yahoo.co.jp/quote/7203.T/forum",
  "時価総額": "44,018,482百万円(11:30)",
  "時系列URL": "https://finance.yahoo.co.jp/quote/7203.T/history",
  "更新時刻": "11:30",
  "株主優待URL": "https://finance.yahoo.co.jp/quote/7203.T/incentive",
  "検索結果件数": "1",
  "概要": "トヨタ自動車(株)【7203】の株価、チャート、最新の関連ニュース、掲示板、みんなの評価などをご覧いただけます。前日終値、高値、安値はもちろんのこと年初来高値/安値もご覧いただけます。Yahoo!ファイナンスでは株価速報、チャート、ランキング、ポートフォリオ、ニュース、掲示板など投資判断に役立つ情報を掲載しています。",
  "現在値": "3,016",
  "販売会社URL": "",
  "銘柄URL": "https://finance.yahoo.co.jp/quote/7203.T",
  "銘柄コード": "7203",
  "銘柄名": "トヨタ自動車(株)"
}
```

## API

`POST https://openapi.octoparse.com/api/agentTools/executeTask`

This is the OpenAPI Agent Tools `executeTask` endpoint. Authenticate with a Bearer token.

Request body:

`templateName` is the template slug; `parameters` is a JSON object string whose keys match Input Schema; `taskName`, `idempotencyKey`, and `maxCollectedRows` are optional.

Obtain a token:

```http
POST https://openapi.octoparse.com/token
Content-Type: application/json

{
  "username": "YOUR_USERNAME",
  "password": "YOUR_PASSWORD",
  "grant_type": "password"
}
```

Use `data.access_token` as `Authorization: Bearer <token>`. After starting, poll `getTaskStatus` and export with `exportData`.

```json
{
  "templateName": "yahoo-finance-scraper-for-japan",
  "taskName": "Yahoo Finance Scraper (for Japan)",
  "parameters": "{\"keywords/URLs\":[\"https://finance.yahoo.co.jp/search/?query=%E5%8D%8A%E5%B0%8E%E4%BD%93&itemTypes=all%2Cstock%2Cetf%2Creit%2CusStock%2Cfund%2CforeignIndex%2Ccurrency%2Cfx&page=1\"]}"
}
```

## Python Example

```python
import json
import requests

OPENAPI_BASE = "https://openapi.octoparse.com"
ACCESS_TOKEN = "YOUR_ACCESS_TOKEN"

parameters = json.loads("{\"keywords/URLs\":[\"https://finance.yahoo.co.jp/search/?query=%E5%8D%8A%E5%B0%8E%E4%BD%93&itemTypes=all%2Cstock%2Cetf%2Creit%2CusStock%2Cfund%2CforeignIndex%2Ccurrency%2Cfx&page=1\"]}")

response = requests.post(
    f"{OPENAPI_BASE}/api/agentTools/executeTask",
    headers={
        "Authorization": f"Bearer {ACCESS_TOKEN}",
        "Content-Type": "application/json",
    },
    json={
        "templateName": "yahoo-finance-scraper-for-japan",
        "taskName": "Yahoo Finance Scraper (for Japan)",
        "parameters": json.dumps(parameters, ensure_ascii=False),
    },
    timeout=60,
)
print(response.status_code)
print(response.json())
```

## HTTP/cURL Example

```bash
curl -X POST "https://openapi.octoparse.com/api/agentTools/executeTask" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  --data-binary @- <<'JSON'
{
  "templateName": "yahoo-finance-scraper-for-japan",
  "taskName": "Yahoo Finance Scraper (for Japan)",
  "parameters": "{\"keywords/URLs\":[\"https://finance.yahoo.co.jp/search/?query=%E5%8D%8A%E5%B0%8E%E4%BD%93&itemTypes=all%2Cstock%2Cetf%2Creit%2CusStock%2Cfund%2CforeignIndex%2Ccurrency%2Cfx&page=1\"]}"
}
JSON
```

## MCP Setup

Connect an MCP-compatible AI client to `https://mcp.octoparse.com` using browser OAuth or an Octoparse API key. Find `yahoo-finance-scraper-for-japan`, inspect its inputs, create a cloud task with the exact Input Schema keys, and export JSON results.

## Machine-readable Resources

- [Template contract](https://www.octoparse.com/templates/yahoo-finance-scraper-for-japan.json)
- [Manifest](https://www.octoparse.com/templates/yahoo-finance-scraper-for-japan-manifest.json)
