> ## 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 ja/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の安全キャップを超えた場合にtrueになります。trueの場合、それらのフィールドはレスポンスでnullになり、S3から完全なペイロードをダウンロードするためにjson_hosted_urlを取得します。
                      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 <token>形式のBearer認証ヘッダー。<token>はあなたの認証トークンです。

````