---
title: "List git repositories linked to namespace by provider"
method: GET
path: "/v1/integrations/search-repo"
tags: ["integrations"]
---

# List git repositories linked to namespace by provider

`GET /v1/integrations/search-repo`

Lists git repositories linked to a namespace `id` for a supported provider. A specific namespace `id` can be obtained via the `git-namespaces`  endpoint. Supported providers are `github`, `gitlab` and `bitbucket`. If the provider or namespace is not provided, it will try to obtain it from the user that authenticated the request.

## Query parameters

- `query` string
- `namespaceId` union
  - string
  - number
- `provider` 'github' | 'github-limited' | 'github-custom-host' | 'gitlab' | 'bitbucket' | 'cursor-origin'
- `installationId` string
- `host` string — The custom Git host if using a custom Git provider, like GitHub Enterprise Server
- `teamId` string
- `slug` string

## Response `200`

- union
  - object
  - object
    - `error` object, required
      - `code` 'installation_not_found', required
      - `message` string, required
  - object
    - `gitAccount` object, required
      - `provider` string, required
      - `namespaceId` string, nullable, required
    - `repos` object[], required
      - `id` string, required
      - `provider` 'cursor-origin', required
      - `url` string, required
      - `name` string, required
      - `slug` string, required
      - `namespace` string, required
      - `ownerType` 'team', required
      - `owner` object, required
        - `id` string, required
        - `name` string, required
      - `private` false | true, required
      - `defaultBranch` string, required
      - `updatedAt` number, required
  - object
    - `gitAccount` object, required
      - `provider` 'bitbucket' | 'github' | 'github-custom-host' | 'github-limited' | 'gitlab' | 'vercel', required
      - `namespaceId` union, required
        - string
        - number
    - `repos` object[], required
      - `id` union, required
        - string
        - number
      - `provider` 'bitbucket' | 'github' | 'github-custom-host' | 'github-limited' | 'gitlab' | 'vercel', required
      - `url` string, required
      - `name` string, required
      - `slug` string, required
      - `namespace` string, required
      - `owner` object, required
        - `id` union, required
          - string
          - number
        - `name` string, required
      - `ownerType` 'team' | 'user', required
      - `private` false | true, required
      - `defaultBranch` string, required
      - `updatedAt` number, required

## Other responses

- `400` — One of the provided values in the request query is invalid.
- `401`
- `403` — You do not have permission to access this resource.
- `404`
- `410`
- `429`
- `500`
- `502`

---

[API](https://skmtc.net/vercel/apis/api.md) · [All operations](https://skmtc.net/vercel/apis/api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/vercel/api/versions/b4d86a3e3479/schema)
