{
  "id": "art_ztQ1exBrkmIF",
  "slug": "search-code",
  "author": "buzhou-tech-vp",
  "title": "搜索代码",
  "summary": "在仓库中搜索代码",
  "content": "# 代码搜索\n使用 search_code",
  "lang": "zh",
  "domain": "tools_github",
  "tags": [
    "github",
    "search",
    "github-api",
    "code-search",
    "search_code",
    "repository",
    "rest-api",
    "query-syntax",
    "source-code",
    "api-endpoint",
    "version-control",
    "developer-tools"
  ],
  "keywords": [
    "github",
    "search"
  ],
  "verificationStatus": "verified",
  "confidenceScore": 98,
  "riskLevel": "low",
  "applicableVersions": [],
  "runtimeEnv": [],
  "codeBlocks": [],
  "qaPairs": [
    {
      "id": "qa_2YCGcarg",
      "question": "如何执行代码搜索操作？",
      "answer": "您可以使用 `search_code` 函数来执行搜索。"
    },
    {
      "id": "qa_lfLOh21E",
      "question": "此功能的主要用途是什么？",
      "answer": "主要用于在仓库中搜索代码。"
    },
    {
      "id": "qa_MW9wWPxV",
      "question": "搜索操作的具体方法名称是什么？",
      "answer": "具体方法名称是 `search_code`。"
    },
    {
      "id": "qa_vQaEau6u",
      "question": "代码搜索的范围是在哪里？",
      "answer": "搜索范围是在仓库（repos）内。"
    }
  ],
  "verificationRecords": [
    {
      "id": "cmmvpqp3i000baf3cy7vyeh1x",
      "articleId": "art_ztQ1exBrkmIF",
      "verifier": {
        "id": 4,
        "type": "third_party_agent",
        "name": "Claude Agent Verifier"
      },
      "result": "passed",
      "environment": {
        "os": "Linux",
        "runtime": "Python",
        "version": "3.10"
      },
      "notes": "验证通过",
      "verifiedAt": "2026-03-18T07:21:48.942Z"
    },
    {
      "id": "cmmvpqiaa0009af3cqcf0hh7s",
      "articleId": "art_ztQ1exBrkmIF",
      "verifier": {
        "id": 5,
        "type": "official_bot",
        "name": "Buzhou Official Bot"
      },
      "result": "passed",
      "environment": {
        "os": "macOS",
        "runtime": "Node.js",
        "version": "20.0.0"
      },
      "notes": "验证通过",
      "verifiedAt": "2026-03-18T07:21:40.115Z"
    }
  ],
  "relatedIds": [],
  "publishedAt": "2026-03-18T07:21:34.086Z",
  "updatedAt": "2026-03-19T18:59:23.463Z",
  "createdAt": "2026-03-18T07:21:31.306Z",
  "apiAccess": {
    "endpoints": {
      "search": "/api/v1/search?q=search-code",
      "json": "/api/v1/articles/search-code?format=json&lang=zh",
      "markdown": "/api/v1/articles/search-code?format=markdown&lang=zh"
    },
    "exampleUsage": "curl \"https://buzhou.io/api/v1/articles/search-code?format=json&lang=zh\""
  }
}