搜索仓库
GET/api/v5/search/repositories
Request
Query Parameters
access_token stringrequired
用户授权码
page integer
当前的页码 最大为 100
per_page integer
每页的数量,最大为 20
q stringrequired
搜索关键字
sort string
排序字段,last_push_at(更新时间)、stars_count(收藏数)、forks_count(Fork 数),默认为最佳匹配
order string
排序顺序 (默认:desc)
owner string
仓库所属空间地址(组织或个人的地址path)
fork string
是否搜索含 fork 的仓库,如果显示,受白名单限制,默认:否
language string
筛选指定语言的仓库
Responses
- 200
成功响应
Response Headers
- application/json
- Schema
- Example (auto)
- 1
- 2
Schema
- Array [
- ]
idinteger
full_namestring
human_namestring
urlstring
namespace object
idinteger
typestring
namestring
pathstring
html_urlstring
pathstring
namestring
descriptionstring
statusstring
ssh_url_to_repostring
http_url_to_repostring
web_urlstring
created_atstring
updated_atstring
homepagestring
membersstring[]
forks_countinteger
stargazers_countinteger
relationstring
permission object
pushinteger
internalinteger
open_issues_countinteger
has_issueinteger
watchers_countinteger
enterprise object
idinteger
pathstring
html_urlstring
typestring
default_branchstring
forkinteger
pushed_atstring
owner object
idstring
loginstring
namestring
typestring
issue_template_sourcestring
privateinteger
publicinteger
[
{
"id": 0,
"full_name": "string",
"human_name": "string",
"url": "string",
"namespace": {
"id": 0,
"type": "string",
"name": "string",
"path": "string",
"html_url": "string"
},
"path": "string",
"name": "string",
"description": "string",
"status": "string",
"ssh_url_to_repo": "string",
"http_url_to_repo": "string",
"web_url": "string",
"created_at": "string",
"updated_at": "string",
"homepage": "string",
"members": [
"string"
],
"forks_count": 0,
"stargazers_count": 0,
"relation": "string",
"permission": {
"push": 0
},
"internal": 0,
"open_issues_count": 0,
"has_issue": 0,
"watchers_count": 0,
"enterprise": {
"id": 0,
"path": "string",
"html_url": "string",
"type": "string"
},
"default_branch": "string",
"fork": 0,
"pushed_at": "string",
"owner": {
"id": "string",
"login": "string",
"name": "string",
"type": "string"
},
"issue_template_source": "string",
"private": 0,
"public": 0
}
]
成功示例
{
"id": 1431191,
"full_name": "gh_mirrors/al/allure2",
"human_name": "GitHub 加 速计划 / al / allure2",
"url": "https://api.gitcode.com/api/v5/repos/gh_mirrors/al/allure2",
"namespace": {
"id": 2192652,
"type": "enterprise",
"name": "al",
"path": "al",
"html_url": "https://gitcode.com/al"
},
"path": "allure2",
"name": "allure2",
"description": "Allure Report is a flexible, lightweight multi-language test reporting tool. It provides clear graphical reports and allows everyone involved in the development process to extract the maximum of information from the everyday testing process",
"status": "开始",
"ssh_url_to_repo": "git@gitcode.com:gh_mirrors/al/allure2.git",
"http_url_to_repo": "https://gitcode.com/gh_mirrors/al/allure2.git",
"web_url": "https://gitcode.com/gh_mirrors/al/allure2",
"created_at": "2023-12-18T00:42:15.557+08:00",
"updated_at": "2024-11-05T10:54:59.948+08:00",
"homepage": "https://gitcode.com/gh_mirrors/al/allure2",
"members": [
"Gitcode-Assistant",
"coco_gitcode",
"gitshumei"
],
"forks_count": 0,
"stargazers_count": 9,
"relation": "",
"permission": {
"push": false
},
"internal": false,
"open_issues_count": 0,
"has_issue": false,
"watchers_count": 4,
"enterprise": {
"id": 2192652,
"path": "al",
"html_url": "https://gitcode.com/al",
"type": "enterprise"
},
"default_branch": "main",
"fork": false,
"pushed_at": "2024-08-06T23:34:38.476+08:00",
"owner": {
"id": "69090",
"login": "coco_gitcode",
"name": "GitCode优质项目",
"type": "User"
},
"issue_template_source": "project",
"private": false,
"public": true
}
成功示例
{
"id": 1401745,
"full_name": "gh_mirrors/pr/printf",
"human_name": "GitHub 加速计划 / pr / printf",
"url": "https://api.gitcode.com/api/v5/repos/gh_mirrors/pr/printf",
"namespace": {
"id": 2192766,
"type": "enterprise",
"name": "pr",
"path": "pr",
"html_url": "https://gitcode.com/pr"
},
"path": "printf",
"name": "printf",
"description": "Tiny, fast, non-dependent and fully loaded printf implementation for embedded systems. Extensive test suite passing.",
"status": "开始",
"ssh_url_to_repo": "git@gitcode.com:gh_mirrors/pr/printf.git",
"http_url_to_repo": "https://gitcode.com/gh_mirrors/pr/printf.git",
"web_url": "https://gitcode.com/gh_mirrors/pr/printf",
"created_at": "2023-12-16T20:28:57.687+08:00",
"updated_at": "2024-09-27T21:48:26.980+08:00",
"homepage": "https://gitcode.com/gh_mirrors/pr/printf",
"members": [
"Gitcode-Assistant",
"coco_gitcode",
"gitshumei"
],
"forks_count": 0,
"stargazers_count": 8,
"relation": "",
"permission": {
"push": false
},
"internal": false,
"open_issues_count": 0,
"has_issue": false,
"watchers_count": 0,
"enterprise": {
"id": 2192766,
"path": "pr",
"html_url": "https://gitcode.com/pr",
"type": "enterprise"
},
"default_branch": "master",
"fork": false,
"pushed_at": "2024-08-10T00:28:30.350+08:00",
"owner": {
"id": "69090",
"login": "coco_gitcode",
"name": "GitCode优质项目",
"type": "User"
},
"issue_template_source": "project",
"private": false,
"public": true
}