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

# 搜索（Beta 版）

搜索端点结合了搜索 API 和 Firecrawl 的强大功能，为任何查询提供强大的搜索体验。

它会自动在网络中搜索查询内容，并以 Markdown 格式返回来自顶级页面的最相关结果。此端点的优势在于它实际上会抓取顶级结果中的每个网站，因此您始终可以获得完整的内容。

此端点目前处于 Beta 阶段，可能会有变动。


## OpenAPI

````yaml v0-openapi POST /search
openapi: 3.0.0
info:
  title: Firecrawl API
  version: v0
  description: >-
    API for interacting with Firecrawl services to perform web scraping and
    crawling tasks.
  contact:
    name: Firecrawl Support
    url: https://firecrawl.dev/support
    email: support@firecrawl.dev
servers:
  - url: https://api.firecrawl.dev/v0
security:
  - bearerAuth: []
paths:
  /search:
    post:
      tags:
        - Search
      summary: >-
        Search for a keyword in Google, returns top page results with markdown
        content for each page
      operationId: searchGoogle
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                query:
                  type: string
                  format: uri
                  description: The query to search for
                pageOptions:
                  type: object
                  properties:
                    onlyMainContent:
                      type: boolean
                      description: >-
                        Only return the main content of the page excluding
                        headers, navs, footers, etc.
                      default: false
                    fetchPageContent:
                      type: boolean
                      description: >-
                        Fetch the content of each page. If false, defaults to a
                        basic fast serp API.
                      default: true
                    includeHtml:
                      type: boolean
                      description: >-
                        Include the HTML version of the content on page. Will
                        output a html key in the response.
                      default: false
                    includeRawHtml:
                      type: boolean
                      description: >-
                        Include the raw HTML content of the page. Will output a
                        rawHtml key in the response.
                      default: false
                searchOptions:
                  type: object
                  properties:
                    limit:
                      type: integer
                      description: Maximum number of results. Max is 20 during beta.
              required:
                - query
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SearchResponse'
        '402':
          description: Payment required
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: Payment required to access this resource.
        '429':
          description: Too many requests
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: >-
                      Request rate limit exceeded. Please wait and try again
                      later.
        '500':
          description: Server error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: An unexpected error occurred on the server.
      security:
        - bearerAuth: []
components:
  schemas:
    SearchResponse:
      type: object
      properties:
        success:
          type: boolean
        data:
          type: array
          items:
            type: object
            properties:
              url:
                type: string
              markdown:
                type: string
              content:
                type: string
              metadata:
                type: object
                properties:
                  title:
                    type: string
                  description:
                    type: string
                  language:
                    type: string
                    nullable: true
                  sourceURL:
                    type: string
                    format: uri
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````