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

# 搜索 GitHub 历史记录

搜索 GitHub 的 issue/PR 历史记录、讨论以及仓库 README。结果包括仓库元数据、URL、片段，以及在可用时返回的匹配 Markdown 内容。

有关工作流概览，请参见 [Research Index 指南](/zh/features/research)。


## OpenAPI

````yaml zh/api-reference/v2-openapi.json GET /search/research/github
openapi: 3.0.0
info:
  contact:
    email: support@firecrawl.dev
    name: Firecrawl Support
    url: https://firecrawl.dev/support
  description: 用于与 Firecrawl 服务交互，执行网页抓取和爬取任务的 API。
  title: Firecrawl API
  version: v2
servers:
  - url: https://api.firecrawl.dev/v2
security:
  - bearerAuth: []
paths:
  /search/research/github:
    get:
      tags:
        - Research
      summary: 搜索 GitHub 历史记录
      operationId: researchSearchGitHub
      parameters:
        - description: 针对 GitHub issues、pull requests、discussions 和仓库 README 的自然语言查询。
          in: query
          name: query
          required: true
          schema:
            minLength: 1
            type: string
        - description: 返回的 GitHub 结果的最大数量。
          in: query
          name: k
          required: false
          schema:
            default: 20
            maximum: 100
            minimum: 1
            type: integer
      responses:
        '200':
          content:
            application/json:
              example:
                results:
                  - contentMd: Full matched markdown content when available.
                    number: 123
                    pageType: issue
                    repo: firecrawl/firecrawl
                    resultType: issue
                    scores:
                      semantic: 0.82
                    segmentCount: 2
                    snippet: Queue worker shutdown can lose completion signals...
                    title: Worker shutdown race
                    url: https://github.com/firecrawl/firecrawl/issues/123
                success: true
              schema:
                $ref: '#/components/schemas/ResearchGitHubSearchResponse'
          description: 已排序的 GitHub 历史记录/README 结果。
        '400':
          description: 无效请求
        '401':
          description: 缺少 Bearer 令牌或令牌无效
        '429':
          description: 超出限流
        '500':
          description: 内部服务器错误
      security:
        - bearerAuth: []
components:
  schemas:
    ResearchGitHubSearchResponse:
      properties:
        results:
          items:
            $ref: '#/components/schemas/ResearchGitHubItem'
          type: array
        success:
          type: boolean
      required:
        - success
        - results
      type: object
    ResearchGitHubItem:
      properties:
        contentMd:
          description: 如可用，提供完整匹配的 Markdown 内容。
          type: string
        number:
          type: integer
        pageType:
          description: issue/PR/discussion 结果对应的历史页面类型。
          type: string
        readmeUrl:
          format: uri
          type: string
        repo:
          description: owner/name 形式的仓库。
          type: string
        resultType:
          description: 结果类别，例如 issue、pull、discussion 或 repo_readme。
          type: string
        scores:
          $ref: '#/components/schemas/ResearchGitHubScoreBreakdown'
        segmentCount:
          type: integer
        snippet:
          type: string
        title:
          type: string
        url:
          format: uri
          type: string
      type: object
    ResearchGitHubScoreBreakdown:
      additionalProperties:
        type: number
      description: 各组件的分数，例如 semantic、lexical、fusion、rrf 或 rerank。
      type: object
  securitySchemes:
    bearerAuth:
      scheme: bearer
      type: http

````