# 搜索 GitHub 历史记录 (/zh/api-reference/endpoint/research-github-search)

<!-- agent-signals: reading_time_min: 1 · est_tokens: 983 · updated: 2026-07-30 -->
Related: [Search（搜索）](/zh/api-reference/endpoint/search.md), [搜索反馈](/zh/api-reference/endpoint/search-feedback.md), [Scrape](/zh/api-reference/endpoint/scrape.md), [批量抓取](/zh/api-reference/endpoint/batch-scrape.md), [获取批量抓取状态](/zh/api-reference/endpoint/batch-scrape-get.md), [取消批量抓取](/zh/api-reference/endpoint/batch-scrape-delete.md)

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

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

`GET /search/research/github`

搜索 GitHub 历史记录

## OpenAPI

```json
{
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "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": {
            "properties": {
              "results": {
                "items": {
                  "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": {
                      "additionalProperties": {
                        "type": "number"
                      },
                      "description": "各组件的分数，例如 semantic、lexical、fusion、rrf 或 rerank。",
                      "type": "object"
                    },
                    "segmentCount": {
                      "type": "integer"
                    },
                    "snippet": {
                      "type": "string"
                    },
                    "title": {
                      "type": "string"
                    },
                    "url": {
                      "format": "uri",
                      "type": "string"
                    }
                  },
                  "type": "object"
                },
                "type": "array"
              },
              "success": {
                "type": "boolean"
              }
            },
            "required": [
              "success",
              "results"
            ],
            "type": "object"
          }
        }
      },
      "description": "已排序的 GitHub 历史记录/README 结果。"
    },
    "400": {
      "description": "无效请求"
    },
    "401": {
      "description": "缺少 Bearer 令牌或令牌无效"
    },
    "429": {
      "description": "超出限流"
    },
    "500": {
      "description": "内部服务器错误"
    }
  }
}
```
