---
title: "Get a repository variable"
method: GET
path: "/repos/{owner}/{repo}/actions/variables/{name}"
tags: ["actions"]
---

# Get a repository variable

`GET /repos/{owner}/{repo}/actions/variables/{name}`

Gets a specific variable in a repository.

The authenticated user must have collaborator access to the repository to use this endpoint.

OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint.

## Path parameters

- `owner` string, required
- `repo` string, required
- `name` string, required

## Response `200`

Response

- ActionsVariable
  - `name` string, required — The name of the variable.
  - `value` string, required — The value of the variable.
  - `created_at` string, date-time, required — The date and time at which the variable was created, in ISO 8601 format':' YYYY-MM-DDTHH:MM:SSZ.
  - `updated_at` string, date-time, required — The date and time at which the variable was last updated, in ISO 8601 format':' YYYY-MM-DDTHH:MM:SSZ.

---

[API](https://skmtc.net/github/apis/github-v3-rest-api-2.md) · [All operations](https://skmtc.net/github/apis/github-v3-rest-api-2/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/github/github-v3-rest-api-2/versions/8ae6d0c8716e/schema)
