# pub.chive.discovery.getCitations

> Published by [chive.pub](https://lexicon.garden/identity/did:plc:7natp5xae72bddaqlkef2t4e)

✓ This is the authoritative definition for this NSID.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:7natp5xae72bddaqlkef2t4e/pub.chive.discovery.getCitations)
- [Documentation](https://lexicon.garden/lexicon/did:plc:7natp5xae72bddaqlkef2t4e/pub.chive.discovery.getCitations/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:7natp5xae72bddaqlkef2t4e/pub.chive.discovery.getCitations/examples)

## Definitions

### `pub.chive.discovery.getCitations`

**Type**: `query`

Get citation network data for an eprint, including papers that cite it and papers it references (within the Chive index)

#### Parameters

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `uri` | `string` (at-uri) | Yes | AT-URI of the eprint |
| `limit` | `integer` | No | Maximum number of citations to return |
| `cursor` | `string` | No | Pagination cursor |
| `direction` | `string` | No | Citation direction: citing (papers this cites), cited-by (papers citing this), or both |
| `onlyInfluential` | `boolean` | No | Only return influential citations |

#### Output

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `counts` | `ref` → `#citationCounts` | Yes |  |
| `cursor` | `string` | No | Pagination cursor for next page |
| `eprint` | `ref` → `#eprintRef` | Yes |  |
| `hasMore` | `boolean` | Yes | Whether more results are available |
| `citations` | `array` | Yes |  |

#### Errors

- **NotFound**
- **ServiceUnavailable**

### `pub.chive.discovery.getCitations#citation`

**Type**: `object`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `source` | `string` | Yes | Source of citation data (e.g., semantic-scholar, openalex) |
| `citedUri` | `string` (at-uri) | Yes | AT-URI of the cited paper |
| `citingUri` | `string` (at-uri) | Yes | AT-URI of the citing paper |
| `discoveredAt` | `string` (datetime) | No | When this citation was discovered |
| `isInfluential` | `boolean` | No | Whether this is an influential citation |

### `pub.chive.discovery.getCitations#eprintRef`

**Type**: `object`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `uri` | `string` (at-uri) | Yes |  |
| `title` | `string` | Yes |  |

### `pub.chive.discovery.getCitations#citationCounts`

**Type**: `object`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `citedByCount` | `integer` | Yes | Number of papers citing this eprint |
| `referencesCount` | `integer` | Yes | Number of papers this eprint references |
| `influentialCitedByCount` | `integer` | Yes | Number of influential citations |

## Raw Schema

```json
{
  "id": "pub.chive.discovery.getCitations",
  "defs": {
    "main": {
      "type": "query",
      "errors": [
        {
          "name": "NotFound"
        },
        {
          "name": "ServiceUnavailable"
        }
      ],
      "output": {
        "schema": {
          "type": "object",
          "required": [
            "eprint",
            "counts",
            "citations",
            "hasMore"
          ],
          "properties": {
            "counts": {
              "ref": "#citationCounts",
              "type": "ref"
            },
            "cursor": {
              "type": "string",
              "description": "Pagination cursor for next page"
            },
            "eprint": {
              "ref": "#eprintRef",
              "type": "ref"
            },
            "hasMore": {
              "type": "boolean",
              "description": "Whether more results are available"
            },
            "citations": {
              "type": "array",
              "items": {
                "ref": "#citation",
                "type": "ref"
              }
            }
          }
        },
        "encoding": "application/json"
      },
      "parameters": {
        "type": "params",
        "required": [
          "uri"
        ],
        "properties": {
          "uri": {
            "type": "string",
            "format": "at-uri",
            "description": "AT-URI of the eprint"
          },
          "limit": {
            "type": "integer",
            "default": 20,
            "maximum": 100,
            "minimum": 1,
            "description": "Maximum number of citations to return"
          },
          "cursor": {
            "type": "string",
            "description": "Pagination cursor"
          },
          "direction": {
            "type": "string",
            "default": "both",
            "description": "Citation direction: citing (papers this cites), cited-by (papers citing this), or both",
            "knownValues": [
              "citing",
              "cited-by",
              "both"
            ]
          },
          "onlyInfluential": {
            "type": "boolean",
            "default": false,
            "description": "Only return influential citations"
          }
        }
      },
      "description": "Get citation network data for an eprint, including papers that cite it and papers it references (within the Chive index)"
    },
    "citation": {
      "type": "object",
      "required": [
        "citingUri",
        "citedUri",
        "source"
      ],
      "properties": {
        "source": {
          "type": "string",
          "description": "Source of citation data (e.g., semantic-scholar, openalex)"
        },
        "citedUri": {
          "type": "string",
          "format": "at-uri",
          "description": "AT-URI of the cited paper"
        },
        "citingUri": {
          "type": "string",
          "format": "at-uri",
          "description": "AT-URI of the citing paper"
        },
        "discoveredAt": {
          "type": "string",
          "format": "datetime",
          "description": "When this citation was discovered"
        },
        "isInfluential": {
          "type": "boolean",
          "description": "Whether this is an influential citation"
        }
      }
    },
    "eprintRef": {
      "type": "object",
      "required": [
        "uri",
        "title"
      ],
      "properties": {
        "uri": {
          "type": "string",
          "format": "at-uri"
        },
        "title": {
          "type": "string"
        }
      }
    },
    "citationCounts": {
      "type": "object",
      "required": [
        "citedByCount",
        "referencesCount",
        "influentialCitedByCount"
      ],
      "properties": {
        "citedByCount": {
          "type": "integer",
          "minimum": 0,
          "description": "Number of papers citing this eprint"
        },
        "referencesCount": {
          "type": "integer",
          "minimum": 0,
          "description": "Number of papers this eprint references"
        },
        "influentialCitedByCount": {
          "type": "integer",
          "minimum": 0,
          "description": "Number of influential citations"
        }
      }
    }
  },
  "$type": "com.atproto.lexicon.schema",
  "lexicon": 1,
  "revision": 1
}
```
