---
title: "Search"
description: "获取一页 Yahoo! JAPAN 搜索结果，所有区块按页面顺序返回。"
---

> Every apinoa docs page as markdown: https://apinoa.com/llms.txt (all in one file: https://apinoa.com/llms-full.txt; this API family in one file: https://apinoa.com/docs/serp/llms.txt)

```http
GET | POST /v1/yahoo-japan/search
```

参数可以用 `GET` 的查询字符串发送，也可以用 `POST` 的 JSON 请求体发送，两者等价。

## 请求

```bash tab="cURL"
curl -G "https://gateway.apinoa.com/v1/yahoo-japan/search" \
  --data-urlencode "q=東京 ラーメン" \
  -H "x-api-key: $APINOA_API_KEY"
```

```js tab="JavaScript"
const params = new URLSearchParams({ q: "東京 ラーメン" });
const res = await fetch(`https://gateway.apinoa.com/v1/yahoo-japan/search?${params}`, {
  headers: { "x-api-key": process.env.APINOA_API_KEY },
});
const { success, data, error } = await res.json();
```

```python tab="Python"
import os

import requests

res = requests.get(
    "https://gateway.apinoa.com/v1/yahoo-japan/search",
    params={"q": "東京 ラーメン"},
    headers={"x-api-key": os.environ["APINOA_API_KEY"]},
)
body = res.json()
```

## 参数

| Parameter | Type | Required | Notes |
|---|---|---|---|
| `country` | enum |  | The market, as an ISO 3166 country code. `JP` |
| `cursor` | string |  | The previous page's `cursor`. Pass it alone for the next page. |
| `device` | enum |  | Which page to read: the desktop (default) or the mobile one. `desktop` `mobile` |
| `limit` | integer 1–100 |  | Results wanted (default 10, at most 100). More than one page is charged per page. |
| `q` | string |  | The query, search operators included. |
| `timeRange` | enum |  | Only results from this past period. `hour` `day` `week` `month` `year` |
| `type` | enum |  | What to search: web results (default), news, images or videos. `web` `news` `images` `videos` |

The same parameters, and every response type, are in the OpenAPI document: https://apinoa.com/openapi.json

## 响应

在 `data` 中返回 [`ResultsPage`](/docs/api-reference/serp/response-schema#resultspage)。 真实响应的节选：数组只保留前几项，长文本已截断。

```json
{
  "success": true,
  "data": {
    "engine": "yahoo-japan",
    "query": "東京 ラーメン",
    "type": "web",
    "outcome": "results",
    "country": "JP",
    "device": "desktop",
    "totalResults": 95100000,
    "page": 1,
    "items": [
      {
        "type": "relatedSearches",
        "queries": ["東京 ラーメン ランキング"],
        "ext": {"shown": 3, "placement": "top"},
        "rank": 1
      },
      {
        "type": "localPack",
        "places": [
          {
            "id": "oVCz0MkZEOo",
            "name": "銀座 八五",
            "url": "https://map.yahoo.co.jp/place?gid=oVCz0MkZEOo&fr=sydd_p-grmlist-gourmet-list_gl-ttl&from_s…",
            "categories": ["ラーメン店"],
            "rating": 4.24,
            "reviewCount": 362,
            "website": "https://katsumoto-japan.com/",
            "photos": ["https://searchgourmetlist-pctr.c.yimg.jp/KD3zi0uFROIrUpGBKHZNKT29WYmZtb8_P4Hu0p54ztvnRNdPK…"],
            "ext": {
              "hoursText": "営業状況変更の可能性",
              "access": "東銀座駅[A7]徒歩2分",
              "reviewKeywords": {"items": [{"count": 55, "name": "おひとりさま向き"}], "totalCount": 215},
              "menu": [
                {
                  "imageType": "menu",
                  "imageUrl": "https://searchgourmetlist-pctr.c.yimg.jp/KD3zi0uFROIrUpGBKHZNKT29WYmZtb8_P4Hu0p54ztsiks7dD…",
                  "title": "八五ラーメン",
                  "price": "1,000円〜",
                  "poiUrl": "https://map.yahoo.co.jp/v3/place/oVCz0MkZEOo/menu/624982ffe99e5a203f9edd7f?fr=sydd_p-grmli…",
                  "isQueryMatch": true
                }
              ],
              "photoTypes": ["menu"],
              "menuUrl": "https://map.yahoo.co.jp/v3/place/oVCz0MkZEOo/menu?filter=menu&fr=sydd_p-grmlist-gourmet-li…",
              "routeUrl": "https://map.yahoo.co.jp/route/train?from=%E7%8F%BE%E5%9C%A8%E5%9C%B0&to=%E9%8A%80%E5%BA%A7…"
            },
            "reviewsUrl": "https://map.yahoo.co.jp/place?gid=oVCz0MkZEOo&tab=review&fr=sydd_p-grmlist-gourmet-list_gl…"
          }
        ],
        "ext": {
          "title": "東京周辺のラーメン（12346件）",
          "mapUrl": "https://map.yahoo.co.jp/search?q=%E6%9D%B1%E4%BA%AC%20%E3%83%A9%E3%83%BC%E3%83%A1%E3%83%B3…",
          "source": "Yahoo!マップ"
        },
        "rank": 2,
        "moreUrl": "https://map.yahoo.co.jp/search?q=%E6%9D%B1%E4%BA%AC%20%E3%83%A9%E3%83%BC%E3%83%A1%E3%83%B3…",
        "total": 12346
      },
      {
        "type": "organic",
        "position": 1,
        "url": "https://s.tabelog.com/ramen/tokyo/rank",
        "title": "東京で人気のラーメン・つけ麺 ランキングTOP20 - 食べログ",
        "snippet": "東京 ラーメン・つけ麺 人気ランキングTOP20 · 1らぁ麺や 嶋 · 2中華そば しば田 · 3ジャパニーズ ラーメン 五感 · 4Homemade Ramen 麦苗 · 5銀…",
        "site": "食べログ",
        "displayUrl": "s.tabelog.com/ramen/tokyo/rank",
        "favicon": "data:image/png;base64,iVBORw0KGgoAAAANSU…",
        "ext": {"breadcrumbs": ["https://s.tabelog.com"], "exploreQueries": ["東京 ラーメン ランキング"]},
        "rank": 3,
        "images": ["https://searchysnippet-pctr.c.yimg.jp/uUzvQ3lML_bkIqyakc1vFi9yrQXh6avYqqVdgqvBtiCaArZ038dg…"],
        "lang": "ja"
      },
      {
        "type": "peopleAlsoAsk",
        "questions": [
          {
            "question": "東京のラーメンランキングで1位はどこですか？",
            "answer": "東京で最新の人気ラーメンを探すなら、まずは食べログの「東京都 ラーメンランキング（2026年9月1日更新）」を基準に見るのが実用的です。",
            "url": "https://tabelog.com/ramen/tokyo/rank/?msockid=10082d06807e60ee165c3bf781a7613d&utm_source=…",
            "title": "東京で人気のラーメン・つけ麺 ランキングTOP20 | 食べログ"
          }
        ],
        "ext": {
          "details": [
            {
              "sources": [
                {
                  "url": "https://tabelog.com/ramen/tokyo/rank/?msockid=10082d06807e60ee165c3bf781a7613d&utm_source=…",
                  "title": "東京で人気のラーメン・つけ麺 ランキングTOP20 | 食べログ",
                  "site": "食べログ"
                }
              ],
              "followUps": ["東京のラーメン順位は何で決まる？"]
            }
          ],
          "moreQuestions": ["東京ラーメンとはどんなラーメンですか？"]
        },
        "rank": 7,
        "title": "他の人はこちらも質問"
      }
    ],
    "cursor": "CABpuP0yN8tjQqKCzFn5exfj121ZsQYsv46xRhhTKOWs01L9ZDnrAd2NTfUfRlU1c-_chn5CvdDdp8q6QdU6P2K9GS…",
    "fetchedAt": "2026-10-30T00:58:04.163Z"
  }
}
```

## 错误

| 状态 | 代码 | 含义 |
|---|---|---|
| 400 | `INVALID_CURSOR` | 该 `cursor` 不是本操作返回的。请不带它重新开始。 |
| 400 | `INVALID_PARAMS` | 参数缺失、未知、超出范围，或该引擎不接受。消息中会指出是哪一个。 |
| 401 | `UNAUTHORIZED` | 缺少 `x-api-key` 请求头，或密钥已吊销或未知。 |
| 402 | `INSUFFICIENT_BALANCE` | 余额不足以支付本次调用。请在控制台充值。 |
| 429 | `MARKETPLACE_SATURATED` | 并发调用过多。请等待 `Retry-After` 秒后重试。 |
| 502 | `UPSTREAM_ERROR` | 引擎返回了无法使用的内容。请退避后重试。 |
| 503 | `SERVICE_UNAVAILABLE` | 临时故障。请退避后重试。 |

全部错误代码见 [Errors](/docs/errors)。失败的调用不计费。

## 价格

**Price** $0.0012 per call, plus $0.0012 for each extra call it makes — at most 9 more, so $0.012 in total. [List price](https://apinoa.com/en/pricing); the rate steps down above 1,000 calls a day.
