> ## Documentation Index
> Fetch the complete documentation index at: https://docs.keyapi.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# 搜索地点页面

<div className="inline-flex items-center gap-2 px-4 py-2 bg-yellow-50 dark:bg-yellow-900/20 border border-yellow-200 dark:border-yellow-800 rounded-lg">
  <span className="text-base">🪙</span>
  <span className="text-sm font-medium text-yellow-900 dark:text-yellow-100"><span className="font-semibold">4 credits</span><span className="text-yellow-700 dark:text-yellow-300 ml-1">每次请求</span></span>
</div>

## 复制给 AI

<div className="my-6 rounded-xl border border-gray-200 bg-gray-50 p-5 dark:border-gray-800 dark:bg-gray-900/40">
  <div className="min-w-0">
    <p className="text-base font-semibold text-gray-900 dark:text-gray-100">🤖 为什么还要自己写代码？</p>
    <p className="mt-1 text-sm text-gray-700 dark:text-gray-300">让 AI 来处理重复工作。点击按钮即可复制一段整理好的提示词，用于 ChatGPT、Claude 或你常用的 AI 助手。</p>
  </div>

  <div className="mt-4">
    <button
      type="button"
      className="inline-flex items-center gap-2 rounded-md border border-emerald-300 bg-emerald-50 px-3 py-2 text-sm font-medium text-emerald-800 hover:bg-emerald-100 dark:border-emerald-700 dark:bg-emerald-900/30 dark:text-emerald-100 dark:hover:bg-emerald-900/50"
      onClick={() => navigator.clipboard.writeText(`我需要调用下面的 KeyAPI 接口，请根据提供的接口信息生成一份完整、可直接运行的 Python 示例代码。

## 接口信息

Endpoint: GET https://api.keyapi.ai/v1/facebook/search_places
摘要: 搜索地点页面

必需请求头:
- Authorization: Bearer <YOUR_API_KEY>

参数:
- query (必填): 搜索关键词. 示例: pizza
- cursor (可选): 分页游标，用于获取下一页数据.
- location_uid (可选): 地点 UID.

## 代码要求

- 使用 Python \`requests\` 库
- 提供完整、可直接运行的示例
- 处理 HTTP 请求异常、超时以及非 2xx 响应
- 处理 JSON 解析异常
- 示例参数优先使用接口信息中提供的 Example
- 保持代码简单，避免不必要的封装和复杂设计`)}
    >
      <span>✨</span>
      <span>复制给 AI</span>
    </button>
  </div>
</div>


## OpenAPI

````yaml /zh/facebook.zh.openapi.json get /v1/facebook/search_places
openapi: 3.0.1
info:
  title: KeyAPI Facebook API 中文文档
  description: KeyAPI Facebook API 的中文参考文档，包含接口用途、参数说明、响应状态和示例结构。
  version: 1.0.0
servers:
  - url: https://api.keyapi.ai
    description: Production-KeyAPI
security:
  - JWT Bearer: []
tags:
  - name: 公共主页
  - name: 个人主页
  - name: 群组
  - name: 帖子与评论
  - name: 广告库
  - name: 活动
  - name: 搜索
  - name: Marketplace
  - name: 游戏
paths:
  /v1/facebook/search_places:
    get:
      tags:
        - 搜索
      summary: 搜索地点页面
      parameters:
        - name: query
          in: query
          description: 搜索关键词。
          required: true
          example: pizza
          schema:
            type: string
            example: pizza
        - name: cursor
          in: query
          description: 分页游标，用于获取下一页数据。
          required: false
          schema:
            type: string
        - name: location_uid
          in: query
          description: 地点 UID。
          required: false
          schema:
            type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties: {}
              example:
                code: 0
                message: success
                data:
                  results:
                    - type: place
                      profile_url: https://www.facebook.com/pizzaAcademy.net
                      url: https://www.facebook.com/pizzaAcademy.net
                      image:
                        uri: >-
                          https://scontent.frai1-1.fna.fbcdn.net/v/t39.30808-1/348233448_1635673970229219_4398182853057450765_n.jpg?stp=dst-jpg_s120x120_tt6&_nc_cat=106&_nc_map=urlgen_bucketless&ccb=1-7&_nc_sid=2d3e12&_nc_ohc=jSrakqicyzEQ7kNvwES-CJp&_nc_oc=Ado-5RxvjqjB368GjvRrvb0KmoeintKyj-torPXyx2mMhKLsiLQA4CEiIDElt4sZeH0&_nc_zt=24&_nc_ht=scontent.frai1-1.fna&_nc_gid=3_VE2TDtLzaSCzhUNPwWQw&_nc_ss=73289&oh=00_AQIfRvtQFG5G5-xMoTCWSAQ6Kl4Ne6PA1P5dS_3R2ZQtzQ&oe=6AB81F75
                        width: 120
                        height: 120
                        scale: 2
                      name: Pizza Academy
                      facebook_id: '100068373080814'
                      is_verified: true
                    - type: place
                      profile_url: https://www.facebook.com/PizzaPlanet.restaurant
                      url: https://www.facebook.com/PizzaPlanet.restaurant
                      image:
                        uri: >-
                          https://scontent.frai1-1.fna.fbcdn.net/v/t39.30808-1/629260538_882975841030291_3702975956348062184_n.jpg?stp=c187.187.586.586a_dst-jpg_s120x120_tt6&_nc_cat=109&_nc_map=urlgen_bucketless&ccb=1-7&_nc_sid=2d3e12&_nc_ohc=dwS95RcO1dMQ7kNvwFjqINN&_nc_oc=Adp7uVoOmrqEAWX2jTeWKTgLUopjXRQDoqal9lDYxayVfhj3cuJSox0auY-sdC15syg&_nc_zt=24&_nc_ht=scontent.frai1-1.fna&_nc_gid=3_VE2TDtLzaSCzhUNPwWQw&_nc_ss=73289&oh=00_AQLOfOVdgxGzzG3i2GeZkqeOmE2AtKLRAAqGlVUz34Bauw&oe=6AB82F72
                        width: 120
                        height: 120
                        scale: 2
                      name: Pizza Planet
                      facebook_id: '100079536489283'
                      is_verified: false
                    - type: place
                      profile_url: https://www.facebook.com/pizzaburgbd
                      url: https://www.facebook.com/pizzaburgbd
                      image:
                        uri: >-
                          https://scontent.frai1-1.fna.fbcdn.net/v/t39.30808-1/576588104_1254257990078864_3646046927298438942_n.jpg?stp=dst-jpg_s120x120_tt6&_nc_cat=1&ccb=1-7&_nc_sid=2d3e12&_nc_ohc=fXv3s_Py8OMQ7kNvwHoAUux&_nc_oc=Adr0hL5YrbX85jQLiAMKldDFIgS4F9c1EB8s4Ftdg9q8KDMvn5cDPycfaIC1RmW-iSA&_nc_zt=24&_nc_ht=scontent.frai1-1.fna&_nc_gid=3_VE2TDtLzaSCzhUNPwWQw&_nc_ss=73289&oh=00_AQK3-Bm92xdljb13efwAenAShy2WGLAzQECVy1ha3wEnng&oe=6AB811B9
                        width: 120
                        height: 120
                        scale: 2
                      name: PizzaBurg
                      facebook_id: '100064840234816'
                      is_verified: true
                    - type: place
                      profile_url: https://www.facebook.com/romapizza2go
                      url: https://www.facebook.com/romapizza2go
                      image:
                        uri: >-
                          https://scontent.frai1-1.fna.fbcdn.net/v/t39.30808-1/616125627_1201402562117508_3515754617843201214_n.jpg?stp=c85.85.910.910a_dst-jpg_s120x120_tt6&_nc_cat=109&_nc_map=urlgen_bucketless&ccb=1-7&_nc_sid=2d3e12&_nc_ohc=fC8XiciPpnEQ7kNvwFsc9Ig&_nc_oc=Adr2aDQToo7ieqYhXU-5LhmuosSKRitzM_tIdcRosv8K2_gjz5jazwmiILzDBDkoiW8&_nc_zt=24&_nc_ht=scontent.frai1-1.fna&_nc_gid=3_VE2TDtLzaSCzhUNPwWQw&_nc_ss=73289&oh=00_AQKhRY84yabdLPsS6Fxbmx6BhaMHcrfnaEhH5BcTqo1_uw&oe=6AB82C4F
                        width: 120
                        height: 120
                        scale: 2
                      name: ROMA Pizza to Go
                      facebook_id: '100067433273947'
                      is_verified: false
                    - type: place
                      profile_url: https://www.facebook.com/pizza.master.Official
                      url: https://www.facebook.com/pizza.master.Official
                      image:
                        uri: >-
                          https://scontent.frai1-1.fna.fbcdn.net/v/t39.30808-1/391712181_724862136335391_4506881731306425521_n.jpg?stp=dst-jpg_s120x120_tt6&_nc_cat=103&_nc_map=urlgen_bucketless&ccb=1-7&_nc_sid=2d3e12&_nc_ohc=kTgru97XYGAQ7kNvwH7i2XN&_nc_oc=AdqE-Nr69JLtIJQR7ZWvfSO_IgspUVq3mDXwiITcAxL-T3utrKnxAwLPIRefVs9DmHQ&_nc_zt=24&_nc_ht=scontent.frai1-1.fna&_nc_gid=3_VE2TDtLzaSCzhUNPwWQw&_nc_ss=73289&oh=00_AQJcoP1BLWJ6Y_Nlb1BKa9pFm7Spd7GvRskvBlcYCAjGPg&oe=6AB81127
                        width: 120
                        height: 120
                        scale: 2
                      name: Pizza Master
                      facebook_id: '100064348338857'
                      is_verified: false
                    - type: place
                      profile_url: https://www.facebook.com/Paradise.Zag
                      url: https://www.facebook.com/Paradise.Zag
                      image:
                        uri: >-
                          https://scontent.frai1-1.fna.fbcdn.net/v/t39.30808-1/744871646_1331391072535011_2385982191136158597_n.jpg?stp=dst-jpg_s120x120_tt6&_nc_cat=105&_nc_map=urlgen_bucketless&ccb=1-7&_nc_sid=2d3e12&_nc_ohc=gWEt7If_RNAQ7kNvwEqnNQy&_nc_oc=Ado5XFuK3o4R0WQpUXkiZWtSsowU7A246D9-FDOfBiQnCKbL7uWGOtF6k46jBD03HRo&_nc_zt=24&_nc_ht=scontent.frai1-1.fna&_nc_gid=3_VE2TDtLzaSCzhUNPwWQw&_nc_ss=73289&oh=00_AQKy_kKwEdF6KexNn_xJJJgyyQXvFwJNJaJev6s0VlrP9g&oe=6AB81AA6
                        width: 120
                        height: 120
                        scale: 2
                      name: Paradise Pizza & Restaurant
                      facebook_id: '100069923930699'
                      is_verified: false
                    - type: place
                      profile_url: https://www.facebook.com/SlicePizza.eg
                      url: https://www.facebook.com/SlicePizza.eg
                      image:
                        uri: >-
                          https://scontent.frai1-1.fna.fbcdn.net/v/t39.30808-1/597564486_857314600004477_8274981758753719764_n.jpg?stp=dst-jpg_s120x120_tt6&_nc_cat=104&_nc_map=urlgen_bucketless&ccb=1-7&_nc_sid=2d3e12&_nc_ohc=zMoSUw1axnMQ7kNvwFetuJD&_nc_oc=AdrbrNXBAi7SKCfrvGjEma6f8yLZV2El3KeEr1jxRu2-xCHmXbVq8i-zvfdijAuU8Yc&_nc_zt=24&_nc_ht=scontent.frai1-1.fna&_nc_gid=3_VE2TDtLzaSCzhUNPwWQw&_nc_ss=73289&oh=00_AQJxQ8Z5pIdQRuuCHyK-eUNnr_OJ6mv56BAgXcWYjTbpqw&oe=6AB80DF1
                        width: 120
                        height: 120
                        scale: 2
                      name: SLICE Pizza
                      facebook_id: '100071778343024'
                      is_verified: false
                  cursor: >-
                    {"page_number": 0, "flow_cursors_serialized":
                    {"SEARCH_CONTROLS_INTERCEPT": "{}", "INTEGRITY":
                    "{\"has_more_results\":false,\"processed_unicorn_ids\":[],\"is_end_of_serp\":false}",
                    "SPELLER": "{}", "SIMPLE_BROWSE":
                    "{\"has_more_results\":true,\"browse_cursor_serialized\":\"AbpJjdqegeBLM-76vb_AkoVcHhcbE3SrmOIcxRKqTSO98bZ82kwZM4QJ9eqtQ1lDczOUOy9iXWVDvAdFQq61Elpil5bmkvW17be6LWC-K34MgeDxOHramBUtrNKfUxpcZgU0wA4_OauX1c9VpaAkc_GkHQ1MW3SIV4UeNcBPxIfb9ncA7o532zHv5303L4Iysp_gaiPBJtimDtZE3-b6OTAskU09YqQfpvv0ilsQVaUXwDAq-Ukzu38qiq4mbK98VPmrmMLsKi2kOyaVsNKiqQmqRCdW4NUgiktEGFkAYJQ64KR9EGwsIrvwtjmJ5I0HsB3FCcYWIN0sSU1eGWZKrNtRRoltTJ1cXBd2oBUo0PBUmebBs9zbNDE6slczsjweWZf7De1vXZd8ou_rj4FmwsWz8bbIEpzhzbzl-4uzHTXtv9HKyP4G_Nsf07cK40SUihMRXXXYprjSStEdz9o-5_9AiTMtH0Qbvkci2gUHvr4JDtnSxEXEIZgOMA3ljoZSBsWO5wYGBvS_NGmJfzEf7YABGVP-r-5SVh-Dnd6bKKMklnKNvpOT8HHQfBpY8lTE9U4\",\"processed_unicorn_ids\":[107226590759905,100735065886793,1156899667774877,111968185553435,206482639408005,461286317386685,741792062610332,251879664927170,814260415340017,281968778846865,356884581436282,104393845363376,100367459055543,448568155011190,139660746120618,140144436618457,399334046896361,100272568498593,205115775954,187695259576,422999134901187,155406973555,102801404403732,971417079657320,198286253572995,110963557885841,174170839296983,186464131210214,193204204034240,106118228623001,76178448215,1823068074586802,703810593026520,104061395611505,100460969441829,284783992766,107047911363860,102928802125877,53530265234,101412585257896,105676595195202,101453042874854,113812304084425,1635861603093355,265360901009753,112108207934568,433522863685160,1827289870829059,543884072466142,485949595116393,264724220360783,113211088362300,106778292264724,104735924594314,320904491114597,382556855855236,594115834112865,109055010540714,291579101375097,101119504718989,150317132061745,410915996431760,110197771655346,1777912999004695,532031540600670,102631441210148,100248265761192,103424738007142,100394415594983,101400532752812,105149558716486,101409279006886,1240823989342370,110900871705025,108614022111199,197505500103899,501331029984573,106723099085516,343709339126758,208182756297552,577811802733583,103209131990761,105714258694254,1444462319015468,109839615210249,182979485713089,425971624155792,1838828636175366,108990220647211,1254476254712289,1923920031229411,101978211711602,374406103120265,100313179615402,441988679271880,218201302309894,487789848019552,696342503800438,521963261294129,103666935320687],\"is_end_of_serp\":false}",
                    "PLACES_TAB": "{\"processed_unicorn_ids\": []}"},
                    "result_ids_shown": [], "unit_id_logging_fields":
                    {"num_total_modules": 1, "num_total_results": 7,
                    "num_total_vertical_results": 7},
                    "entity_ids_shown_by_type": {}, "processed_unicorn_ids": [],
                    "completed_flows": ["SEARCH_CONTROLS_INTERCEPT",
                    "INTEGRITY", "SPELLER"]}
                requestId: 9edd2077-2bba-43ba-bc8f-827219be2486
          headers: {}
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '402':
          $ref: '#/components/responses/402'
        '429':
          $ref: '#/components/responses/429'
        '500':
          $ref: '#/components/responses/500'
      deprecated: false
      security:
        - JWT Bearer: []
components:
  responses:
    '400':
      description: Bad Request
      content:
        application/json:
          schema:
            type: object
            example:
              code: 400
              data: null
              message: 'Missing required parameter: handle'
    '401':
      description: Unauthorized
      content:
        application/json:
          schema:
            type: object
            example:
              code: 401
              data: null
              message: apiKey is null
    '402':
      description: Payment Required
      content:
        application/json:
          schema:
            type: object
            example:
              code: 402
              data: null
              message: apiKey quota is not enough
    '429':
      description: Too Many Requests
      content:
        application/json:
          schema:
            type: object
            example:
              code: 429
              data: null
              message: qps limit exceeded
    '500':
      description: Internal Server Error
      content:
        application/json:
          schema:
            type: object
            example:
              code: 500
              data: null
              message: Internal server error
  securitySchemes:
    JWT Bearer:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: |-
        接口鉴权凭证。请在请求 Header 中传入 `Authorization: Bearer <YOUR_API_KEY>`。
        可在 [Dashboard](https://keyapi.ai/app/dashboard) 获取你的 API Key。

````