# List issue comments for a repository

From **GitHub v3 REST API**.

`GET /repos/{owner}/{repo}/issues/comments`

By default, Issue Comments are ordered by ascending ID.

## Parameters

### `owner`

- Location: path
- Required: true
- Type: `string`

### `repo`

- Location: path
- Required: true
- Type: `string`

### `sort`

- Location: query
- Required: false
- Type: `string`
- Default: `created`
- Allowed values: `"created"`, `"updated"`

One of `created` (when the repository was starred) or `updated` (when it was last pushed to).

### `direction`

- Location: query
- Required: false
- Type: `string`
- Allowed values: `"asc"`, `"desc"`

Either `asc` or `desc`. Ignored without the `sort` parameter.

### `since`

- Location: query
- Required: false
- Type: `string`
- Format: `date-time`

Only show notifications updated after the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`.

### `per_page`

- Location: query
- Required: false
- Type: `integer`
- Default: `30`

Results per page (max 100)

### `page`

- Location: query
- Required: false
- Type: `integer`
- Default: `1`

Page number of the results to fetch.

## Responses

### `200`

Response

#### Headers

##### `Link`

- Type: `string`

- Example: `<https://api.github.com/resource?page=2>; rel="next", <https://api.github.com/resource?page=5>; rel="last"`

### `application/json`

- Type: `array`

```json
[
  {
    "author_association": "COLLABORATOR",
    "body": "Me too",
    "created_at": "2011-04-14T16:00:49Z",
    "html_url": "https://github.com/octocat/Hello-World/issues/1347#issuecomment-1",
    "id": 1,
    "issue_url": "https://api.github.com/repos/octocat/Hello-World/issues/1347",
    "node_id": "MDEyOklzc3VlQ29tbWVudDE=",
    "updated_at": "2011-04-14T16:00:49Z",
    "url": "https://api.github.com/repos/octocat/Hello-World/issues/comments/1",
    "user": {
      "avatar_url": "https://github.com/images/error/octocat_happy.gif",
      "events_url": "https://api.github.com/users/octocat/events{/privacy}",
      "followers_url": "https://api.github.com/users/octocat/followers",
      "following_url": "https://api.github.com/users/octocat/following{/other_user}",
      "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}",
      "gravatar_id": "",
      "html_url": "https://github.com/octocat",
      "id": 1,
      "login": "octocat",
      "node_id": "MDQ6VXNlcjE=",
      "organizations_url": "https://api.github.com/users/octocat/orgs",
      "received_events_url": "https://api.github.com/users/octocat/received_events",
      "repos_url": "https://api.github.com/users/octocat/repos",
      "site_admin": false,
      "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}",
      "subscriptions_url": "https://api.github.com/users/octocat/subscriptions",
      "type": "User",
      "url": "https://api.github.com/users/octocat"
    }
  }
]
```

```json
{"items":{"$ref":"#/components/schemas/issue-comment"},"type":"array"}
```

### `404`

Resource not found

### `application/json`

- Type: `object`

Basic Error

```json
{"description":"Basic Error","properties":{"documentation_url":{"type":"string"},"message":{"type":"string"},"status":{"type":"string"},"url":{"type":"string"}},"title":"Basic Error","type":"object"}
```

### `422`

Validation failed

### `application/json`

- Type: `object`

Validation Error

```json
{"description":"Validation Error","properties":{"documentation_url":{"type":"string"},"errors":{"items":{"properties":{"code":{"type":"string"},"field":{"type":"string"},"index":{"type":"integer"},"message":{"type":"string"},"resource":{"type":"string"},"value":{"oneOf":[{"nullable":true,"type":"string"},{"nullable":true,"type":"integer"},{"items":{"type":"string"},"nullable":true,"type":"array"}]}},"required":["code"],"type":"object"},"type":"array"},"message":{"type":"string"}},"required":["message","documentation_url"],"title":"Validation Error","type":"object"}
```

## Request examples

### cURL

```shell
curl --request GET \
  --url {protocol}://{hostname}/api/v3/repos/{owner}/{repo}/issues/comments
```
