# Yahoo Finance 热榜 API (yahoo_finance.trending)

- Canonical page: https://everyinfra.com/yahoo-finance-api/trending
- Endpoint: POST https://api.everyinfra.com/api/v1/social with {"platform": "yahoo_finance", "action": "trending", "params": {...}}
- Price: $0.001389 per call ($1.39 per 1,000 requests); failed calls and empty results are not charged
- Returns: list, default 10, max 200 per call
- Mode: sync; add "mode": "async" for slow tasks

## Health

- Live health (24h percent, hourly and daily trends): https://api.everyinfra.com/api/v1/social/availability?platform=yahoo_finance&action=trending

## Parameters

| name | type | required | default | description |
|---|---|---|---|---|
| screener | not declared | no | not declared | 预设榜单，必须大写。DAY_GAINERS 当日涨幅（默认）、DAY_LOSERS 跌幅、MOST_ACTIVES 活跃、MOST_SHORTED_STOCKS 高做空、UNDERVALUED_GROWTH_STOCKS 低估成长、GROWTH_TECHNOLOGY_STOCKS 成长科技、AGGRESSIVE_SMALL_CAPS 激进小盘、SMALL_CAP_GAINERS 小盘涨幅；加密类别为 ALL_CRYPTOCURRENCIES_US、DAY_GAINERS_CRYPTOCURRENCIES、DAY_LOSERS_CRYPTOCURRENCIES、MOST_ACTIVES_CRYPTOCURRENCIES；私营公司类别为 HIGHEST_VALUATION_PRIVATE_COMPANY、WEEK_GAINERS_PRIVATE_COMPANY、RECENTLY_FUNDED_PRIVATE_COMPANY、MOST_FUNDED_PRIVATE_COMPANY；基金类别为 TOP_MUTUAL_FUNDS、DAY_GAINERS_MUTUAL_FUNDS、PORTFOLIO_ANCHORS、SOLID_LARGE_GROWTH_FUNDS、SOLID_MIDCAP_GROWTH_FUNDS、CONSERVATIVE_FOREIGN_FUNDS、HIGH_YIELD_BOND。分类存在不表示每类都有最新数据，不构成投资建议。 |
| limit | integer (1–200) | no | 10 | 这次调用最多返回的条数，整数，1–200；不传按默认值，实际返回可能少于这个数。超过上限会在扣费前返回 422。 |

## Response fields (items in `results`)

| field | meaning |
|---|---|
| id | 该记录在原平台上的唯一标识。仅在同一平台内唯一，跨平台可能重复。 |
| symbol | 股票代码。 |
| name | 名称。用于账号/商品/商家类能力，指该对象本身的名字。 |
| price | 价格数值，不含货币符号；币种见 currency。 |
| change | 涨跌额。 |
| change_percent | 涨跌幅，百分数。 |
| volume | 成交量。 |
| market_cap | 市值。 |
| currency | 价格币种代码（如 CNY、USD）。price 存在但 currency 为 null 时不要假定币种。 |
| exchange | 所属交易所。 |
| pe_ratio | 市盈率。 |
| fifty_two_week_range | 52 周价格区间。 |
| platform | 数据来源平台标识，与请求里的 platform 一致（如 xiaohongshu、tiktok）。 |

## Example

```bash
curl -X POST 'https://api.everyinfra.com/api/v1/social' \
  -H "Authorization: Bearer $EVERYINFRA_API_KEY" \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "platform": "yahoo_finance",
  "action": "trending",
  "params": {}
}'
```

```python
import os
import requests

response = requests.post(
    "https://api.everyinfra.com/api/v1/social",
    headers={"Authorization": f"Bearer {os.environ['EVERYINFRA_API_KEY']}"},
    json={
        "platform": "yahoo_finance",
        "action": "trending",
        "params": {},
    },
    timeout=120,
)
print(response.status_code)
print(response.json())
```

## Response example

Real response to the example request above, captured 2026-09-26T08:56:04Z. `results` and `count` are real with personal information (names, handles, avatars, profile links, contact details) removed; the list keeps the first 2 of 10. `id`, `billing` and `quota` differ on every call, so only their shape is shown.

```text
{
  "id": "req_…",
  "platform": "yahoo_finance",
  "action": "trending",
  "results": [
    {
      "id": "PPLI",
      "symbol": "PPLI",
      "name": "People Incorporated",
      "price": 40,
      "change": 4.07,
      "change_percent": 11.3276,
      "volume": 3093055,
      "market_cap": 2978557184,
      "currency": "USD",
      "exchange": "NasdaqGS",
      "pe_ratio": 6.76819,
      "fifty_two_week_range": "29.56 - 48.32",
      "platform": "yahoo_finance"
    },
    {
      "id": "ALM",
      "symbol": "ALM",
      "name": "Almonty Industries Inc.",
      "price": 13.72,
      "change": 1.32,
      "change_percent": 10.6452,
      "volume": 11512843,
      "market_cap": 3957955840,
      "currency": "USD",
      "exchange": "NasdaqCM",
      "pe_ratio": 62.363636,
      "fifty_two_week_range": "5.435 - 24.41",
      "platform": "yahoo_finance"
    }
  ],
  "count": 10,
  "billing": {
    "charged": …,
    "charged_usd": …,
    "balance_after_usd": …,
    …
  },
  "quota": { … }
}
```

## Also

- Capability catalog (no key): https://api.everyinfra.com/api/v1/social/catalog?platform=yahoo_finance
- OpenAPI: https://everyinfra.com/openapi.json · Agents guide: https://everyinfra.com/agents.md
