---
title: "search"
method: GET
path: "/api/v1/repos/{user_id}/{repo}/master_tokens/search"
tags: ["master_tokens"]
---

# search

`GET /api/v1/repos/{user_id}/{repo}/master_tokens/search`

## Request

- Base URL: `https://packagecloud.io`
- URL: `https://packagecloud.io/api/v1/repos/{user_id}/{repo}/master_tokens/search`
- Auth: HTTP basic
- TypeScript: <https://skmtc.dev/cstrahan/apis/packagecloud-api/docs/api/v1/repos/:user_id/:repo/master_tokens/search/get.ts> (a function with typed inputs; its response is checked against the schema)

Search for master tokens

Default is 30 per page, see response headers for [pagination](#pagination) information.

**Example request:**

```
curl https://packagecloud.io/api/v1/repos/username/reponame/master_tokens/search?q=prod
```

## Path parameters

- `user_id` string, required
- `repo` string, required

## Query parameters

- `page` integer
- `per_page` integer
- `q` string

## Response `200`

Array<MasterTokensResult> An array of {MasterTokensResult} objects for this search query.

- MasterTokensResult[]
  - `name` string: The name of the master token.
  - `value` string: The value of the master token, for use in the read token API.
  - `self_url` string: A URI for this master token. Can be used to destroy one.
  - `read_tokens_url` string: a URI to get all of the read tokens for this master token.

---

[API](https://skmtc.dev/cstrahan/apis/packagecloud-api.md) - [All operations](https://skmtc.dev/cstrahan/apis/packagecloud-api/llms.txt) - [OpenAPI document](https://skmtc.dev/cstrahan/apis/packagecloud-api/revisions/9744ac4cffc2?raw)
