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

# 获取搜索

> 通过其 ID 检索先前完成的搜索。返回在搜索时保存的内容，包括任何抓取的每个链接的内容。纯幂等读取——无重新抓取，无重新计费。



## OpenAPI

````yaml zh/openapi/search.json GET /v1/searches/{search_id}
openapi: 3.0.3
info:
  title: 搜索 API
  version: 1.1.0
servers:
  - url: https://api.olostep.com
security: []
paths:
  /v1/searches/{search_id}:
    get:
      summary: 获取搜索
      description: 通过其 ID 检索先前完成的搜索。返回在搜索时保存的内容，包括任何抓取的每个链接的内容。纯幂等读取——无重新抓取，无重新计费。
      parameters:
        - name: search_id
          in: path
          required: true
          description: 要检索的搜索的唯一标识符。
          schema:
            type: string
      responses:
        '200':
          description: 包含搜索对象的成功响应。
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                  object:
                    type: string
                  created:
                    type: integer
                  metadata:
                    type: object
                  query:
                    type: string
                  credits_consumed:
                    type: integer
                    description: 原始搜索请求消耗的总积分（5 个基本积分 + 每页抓取积分之和，如果使用了 scrape_options）。
                  result:
                    type: object
                    properties:
                      json_content:
                        type: string
                      json_hosted_url:
                        type: string
                        nullable: true
                      links:
                        type: array
                        items:
                          $ref: '#/components/schemas/SearchLink'
                      size_exceeded:
                        type: boolean
                        description: >-
                          当内联的每个链接的 markdown_content / html_content 负载超过 9MB
                          安全上限时为真。当为真时，这些字段在响应中为 null——获取 json_hosted_url 从 S3
                          下载完整负载。
                      credits_consumed:
                        type: integer
                        description: 与顶级 credits_consumed 相同的值，在结果中重复，以与 /v1/scrapes 保持对称。
        '401':
          description: 无效的 API 密钥
        '404':
          description: 未找到搜索
        '500':
          description: 内部服务器错误
      security:
        - Authorization: []
components:
  schemas:
    SearchLink:
      type: object
      properties:
        url:
          type: string
          description: 结果的 URL。
        title:
          type: string
          nullable: true
          description: 结果页面的标题。
        description:
          type: string
          nullable: true
          description: 结果的简短片段或描述。
        markdown_content:
          type: string
          nullable: true
          description: >-
            页面的 Markdown 内容。仅当 scrape_options.formats 包含 'markdown'
            时存在。如果抓取失败、为空或达到全局超时，则为 null。对于 Reddit 评论 URL，这是由
            @olostep/reddit-post 解析器的结构化 JSON 生成的，以提高质量。
        html_content:
          type: string
          nullable: true
          description: >-
            页面的 HTML 内容。仅当 scrape_options.formats 包含 'html'
            时存在。如果抓取失败、为空或达到全局超时，则为 null。
  securitySchemes:
    Authorization:
      type: http
      scheme: bearer
      description: Bearer认证头格式为Bearer <token>，其中<token>是你的认证令牌。

````