> ## Documentation Index
> Fetch the complete documentation index at: https://alphacastio.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# GET /repositories/{id} — Get a Repository

> Retrieve a single repository by its numeric ID. Returns the repository object including name, description, privacy, and your permission level.

Use this endpoint to fetch the details of a specific repository by its numeric ID. The response includes your effective permission level for that repository, which determines what operations you can perform on it.

## Request

```bash theme={null}
GET https://api.alphacast.io/repositories/{repository_id}
```

## Authentication

<Note>
  This endpoint requires HTTP Basic Auth. Pass your API key as the username and leave the password empty.
</Note>

## Path parameters

<ParamField path="repository_id" type="integer" required>
  The numeric ID of the repository to retrieve.
</ParamField>

## Response

Returns a single repository object on success.

<ResponseField name="id" type="integer">
  Unique numeric identifier for the repository.
</ResponseField>

<ResponseField name="name" type="string">
  Display name of the repository.
</ResponseField>

<ResponseField name="description" type="string">
  Optional description of the repository's contents or purpose.
</ResponseField>

<ResponseField name="privacy" type="string">
  Visibility setting. Either `"Public"` or `"Private"`.
</ResponseField>

<ResponseField name="team" type="string">
  The team this repository belongs to, if applicable.
</ResponseField>

<ResponseField name="permission" type="string">
  Your access level for this repository. One of `"Owner"`, `"Admin"`, `"Write"`, `"Clone"`, or `"Read"`. This field is determined by the server based on your API key and cannot be set directly.
</ResponseField>

## Errors

| Status | Meaning                                                                  |
| ------ | ------------------------------------------------------------------------ |
| `404`  | No repository with the given ID exists, or you do not have access to it. |

## Example

<RequestExample>
  ```bash cURL theme={null}
  curl -u YOUR_API_KEY: \
    https://api.alphacast.io/repositories/101
  ```

  ```python Python theme={null}
  import requests

  response = requests.get(
      "https://api.alphacast.io/repositories/101",
      auth=("YOUR_API_KEY", ""),
  )
  repository = response.json()
  ```

  ```javascript Node.js theme={null}
  const response = await fetch("https://api.alphacast.io/repositories/101", {
    headers: { Authorization: "Basic " + btoa("YOUR_API_KEY:") },
  });
  const repository = await response.json();
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "id": 101,
    "name": "Emerging Markets Macro",
    "description": "GDP, inflation, and rates for EM economies",
    "privacy": "Private",
    "team": "research",
    "permission": "Owner"
  }
  ```

  ```json 404 theme={null}
  {
    "message": "Repository 101 doesn't exist"
  }
  ```
</ResponseExample>
