# Find the organisation's repositories by name

> Page: https://docs.plotwork.dev/api/get-orgs-org-github-repositories. Index of every page: https://docs.plotwork.dev/llms.txt

The linked installations' repositories whose owner/name holds q, by name, 50 a page: ids, names and the default branch, from the stored rows.

`GET /orgs/{org}/github/repositories`

## TL;DR

| Question | Answer |
|---|---|
| What does it do? | Find the organisation's repositories by name. |
| What does it take? | `org` in the path, and `q`, `cursor` in the query string. |
| What does it return? | Status 200 with a body of type [`GithubRepositorySearch`](https://docs.plotwork.dev/api/schemas.md#githubrepositorysearch). |
| What can go wrong? | `400` the query is not valid, or the cursor is not one this API wrote; `401` not signed in; `403` a member may not (orgs.forbidden), or the plan has no GitHub App (plan.github_app_not_included); `404` no such organisation, or the caller is not a member of it; `429` too many requests; `503` organisations are not set up on this server. Every failure uses the one error envelope. |

## What it does

The linked installations' repositories whose owner/name holds q, by name, 50 a page: ids, names and the default branch, from the stored rows. The owner and an admin, on Pro and Enterprise.

## Path parameters

| Field | Type | Required | Description |
|---|---|---|---|
| `org` | `string` | yes | The organisation's id or its slug. |

## Query parameters

| Field | Type | Required | Description |
|---|---|---|---|
| `q` | `string` | no | A part of `owner/name`, in any case. Leave it out for every repository. |
| `cursor` | `string` | no | The page's `nextCursor` from the page before, for the next page. |

## Responses

| Status | Meaning | Body |
|---|---|---|
| 200 | A page of repositories. | [`GithubRepositorySearch`](https://docs.plotwork.dev/api/schemas.md#githubrepositorysearch) |
| 400 | The query is not valid, or the cursor is not one this API wrote. | [`ErrorResponse`](https://docs.plotwork.dev/api/schemas.md#errorresponse) |
| 401 | Not signed in. | [`ErrorResponse`](https://docs.plotwork.dev/api/schemas.md#errorresponse) |
| 403 | A member may not (orgs.forbidden), or the plan has no GitHub App (plan.github_app_not_included). | [`ErrorResponse`](https://docs.plotwork.dev/api/schemas.md#errorresponse) |
| 404 | No such organisation, or the caller is not a member of it. | [`ErrorResponse`](https://docs.plotwork.dev/api/schemas.md#errorresponse) |
| 429 | Too many requests. | [`ErrorResponse`](https://docs.plotwork.dev/api/schemas.md#errorresponse) |
| 503 | Organisations are not set up on this server. | [`ErrorResponse`](https://docs.plotwork.dev/api/schemas.md#errorresponse) |

## Response body

A 200 answer has the type [`GithubRepositorySearch`](https://docs.plotwork.dev/api/schemas.md#githubrepositorysearch).

| Field | Type | Required | Description |
|---|---|---|---|
| `items` | `GithubPickerRepository[]` | yes | By name, at most 50 a page. |
| `items[].id` | `string` | yes | GitHub's repository id. |
| `items[].fullName` | `string` | yes |  |
| `items[].defaultBranch` | `string` | yes |  |
| `nextCursor` | `string \| null` | yes | Send as `cursor` for the next page; null on the last. |

## See also

| Doc | Why |
|---|---|
| [API reference](https://docs.plotwork.dev/api/reference.md) | Every endpoint, and the error envelope |
| [Schemas](https://docs.plotwork.dev/api/schemas.md) | Every request and response type |
| [Tool reference](https://docs.plotwork.dev/mcp/tools.md) | The operations as callable tools |
