pub.chive.metrics.getTrending

chive.pub View official

Documentation

Get trending eprints based on view counts within a time window

main query

Get trending eprints based on view counts within a time window

Parameters

cursor string Optional

Pagination cursor

fieldUris array of string Optional

Optional field URIs to flag matching eprints as in-field

limit integer Optional

Maximum number of results to return

window string Optional

Time window for trending calculation

Output

Encodingapplication/json
cursor string Optional

Cursor for next page

hasMore boolean Required

Whether more results are available

trending array Required

No description available.

window string Required

Time window used

Try It

Requests are sent directly from your browser. Some servers may block requests due to CORS.

Base URL for XRPC calls (e.g., https://api.bsky.social)
Parameters
Pagination cursor
Optional field URIs to flag matching eprints as in-field
Maximum number of results to return
Time window for trending calculation
View raw schema
{
  "description": "Get trending eprints based on view counts within a time window",
  "errors": [],
  "output": {
    "encoding": "application/json",
    "schema": {
      "properties": {
        "cursor": {
          "description": "Cursor for next page",
          "type": "string"
        },
        "hasMore": {
          "description": "Whether more results are available",
          "type": "boolean"
        },
        "trending": {
          "items": {
            "ref": "#trendingEntry",
            "type": "ref"
          },
          "type": "array"
        },
        "window": {
          "description": "Time window used",
          "enum": [
            "24h",
            "7d",
            "30d"
          ],
          "type": "string"
        }
      },
      "required": [
        "trending",
        "window",
        "hasMore"
      ],
      "type": "object"
    }
  },
  "parameters": {
    "properties": {
      "cursor": {
        "description": "Pagination cursor",
        "type": "string"
      },
      "fieldUris": {
        "description": "Optional field URIs to flag matching eprints as in-field",
        "items": {
          "format": "at-uri",
          "type": "string"
        },
        "maxLength": 50,
        "type": "array"
      },
      "limit": {
        "default": 20,
        "description": "Maximum number of results to return",
        "maximum": 100,
        "minimum": 1,
        "type": "integer"
      },
      "window": {
        "default": "7d",
        "description": "Time window for trending calculation",
        "enum": [
          "24h",
          "7d",
          "30d"
        ],
        "type": "string"
      }
    },
    "type": "params"
  },
  "type": "query"
}
authorRef object

Reference to an author with optional ATProto identity

Properties

avatarUrl string Optional

Avatar URL (if available)

contributions array of ref#contribution Required

No description available.

did string did Optional

Author DID (if linked to ATProto identity)

email string Optional

Contact email

handle string Optional

ATProto handle (if resolved)

isCorrespondingAuthor boolean Optional

Whether this is the corresponding author

isHighlighted boolean Optional

Whether to highlight this author

name string Required

Display name

orcid string Optional

ORCID identifier

order integer Required

Author order position

minimum: 1
View raw schema
{
  "description": "Reference to an author with optional ATProto identity",
  "properties": {
    "affiliations": {
      "items": {
        "ref": "pub.chive.defs#affiliation",
        "type": "ref"
      },
      "type": "array"
    },
    "avatarUrl": {
      "description": "Avatar URL (if available)",
      "type": "string"
    },
    "contributions": {
      "items": {
        "ref": "#contribution",
        "type": "ref"
      },
      "type": "array"
    },
    "did": {
      "description": "Author DID (if linked to ATProto identity)",
      "format": "did",
      "type": "string"
    },
    "email": {
      "description": "Contact email",
      "type": "string"
    },
    "handle": {
      "description": "ATProto handle (if resolved)",
      "type": "string"
    },
    "isCorrespondingAuthor": {
      "description": "Whether this is the corresponding author",
      "type": "boolean"
    },
    "isHighlighted": {
      "description": "Whether to highlight this author",
      "type": "boolean"
    },
    "name": {
      "description": "Display name",
      "type": "string"
    },
    "orcid": {
      "description": "ORCID identifier",
      "type": "string"
    },
    "order": {
      "description": "Author order position",
      "minimum": 1,
      "type": "integer"
    }
  },
  "required": [
    "name",
    "order",
    "affiliations",
    "contributions"
  ],
  "type": "object"
}
contribution object

CRediT contribution role

Properties

degree string Optional

Degree of contribution (lead, supporting, equal)

typeId string Required

Contribution type slug

typeLabel string Required

Human-readable contribution label

typeUri string at-uri Required

AT-URI of the contribution type node

View raw schema
{
  "description": "CRediT contribution role",
  "properties": {
    "degree": {
      "description": "Degree of contribution (lead, supporting, equal)",
      "type": "string"
    },
    "typeId": {
      "description": "Contribution type slug",
      "type": "string"
    },
    "typeLabel": {
      "description": "Human-readable contribution label",
      "type": "string"
    },
    "typeUri": {
      "description": "AT-URI of the contribution type node",
      "format": "at-uri",
      "type": "string"
    }
  },
  "required": [
    "typeUri",
    "typeId",
    "typeLabel"
  ],
  "type": "object"
}
eprintMetrics object

Current metrics for the eprint

Properties

downloads integer Required

Total download count

minimum: 0
endorsements integer Optional

Endorsement count

minimum: 0
views integer Required

Total view count

minimum: 0
View raw schema
{
  "description": "Current metrics for the eprint",
  "properties": {
    "downloads": {
      "description": "Total download count",
      "minimum": 0,
      "type": "integer"
    },
    "endorsements": {
      "description": "Endorsement count",
      "minimum": 0,
      "type": "integer"
    },
    "views": {
      "description": "Total view count",
      "minimum": 0,
      "type": "integer"
    }
  },
  "required": [
    "views",
    "downloads"
  ],
  "type": "object"
}
fieldRef object

Reference to a knowledge graph field node

Properties

id string Optional

Field ID

label string Required

Display label

parentUri string at-uri Optional

Parent field URI

uri string at-uri Required

AT-URI of the field node

View raw schema
{
  "description": "Reference to a knowledge graph field node",
  "properties": {
    "id": {
      "description": "Field ID",
      "type": "string"
    },
    "label": {
      "description": "Display label",
      "type": "string"
    },
    "parentUri": {
      "description": "Parent field URI",
      "format": "at-uri",
      "type": "string"
    },
    "uri": {
      "description": "AT-URI of the field node",
      "format": "at-uri",
      "type": "string"
    }
  },
  "required": [
    "uri",
    "label"
  ],
  "type": "object"
}
sourceInfo object

PDS source information for data transparency

Properties

blobUrl string Optional

URL to fetch associated blob

lastVerifiedAt string datetime Required

When the record was last verified

pdsEndpoint string Required

URL of the source PDS

recordUrl string Required

Direct URL to fetch the record

stale boolean Required

Whether the indexed data may be stale

View raw schema
{
  "description": "PDS source information for data transparency",
  "properties": {
    "blobUrl": {
      "description": "URL to fetch associated blob",
      "type": "string"
    },
    "lastVerifiedAt": {
      "description": "When the record was last verified",
      "format": "datetime",
      "type": "string"
    },
    "pdsEndpoint": {
      "description": "URL of the source PDS",
      "type": "string"
    },
    "recordUrl": {
      "description": "Direct URL to fetch the record",
      "type": "string"
    },
    "stale": {
      "description": "Whether the indexed data may be stale",
      "type": "boolean"
    }
  },
  "required": [
    "pdsEndpoint",
    "recordUrl",
    "lastVerifiedAt",
    "stale"
  ],
  "type": "object"
}
trendingEntry object

A trending eprint entry with full metadata

Properties

abstract array of union Required
authors array of ref#authorRef Required

No description available.

cid string cid Required

CID of the eprint record

createdAt string datetime Required

Original creation timestamp

fields array of ref#fieldRef Optional

Knowledge graph field classifications

inUserFields boolean Optional

Whether this eprint matches the requested fieldUris

indexedAt string datetime Required

When Chive indexed this record

license string Required

License identifier

paperDid string did Optional

DID of the paper identity (if using paper-centric model)

rank integer Required

Position in trending list

minimum: 1
source ref #sourceInfo Required

PDS source information for transparency

submittedBy string did Required

DID of the submitter

title string Required

Eprint title

uri string at-uri Required

AT-URI of the eprint

velocity integer Optional

Rate of view increase (optional)

viewsInWindow integer Required

Views within the trending window

minimum: 0
View raw schema
{
  "description": "A trending eprint entry with full metadata",
  "properties": {
    "abstract": {
      "description": "Rich abstract with text, formatting, and entity references",
      "items": {
        "refs": [
          "pub.chive.richtext.defs#textItem",
          "pub.chive.richtext.defs#nodeRefItem",
          "pub.chive.richtext.defs#wikidataRefItem",
          "pub.chive.richtext.defs#fieldRefItem",
          "pub.chive.richtext.defs#facetRefItem",
          "pub.chive.richtext.defs#eprintRefItem",
          "pub.chive.richtext.defs#annotationRefItem",
          "pub.chive.richtext.defs#authorRefItem",
          "pub.chive.richtext.defs#mentionItem",
          "pub.chive.richtext.defs#linkItem",
          "pub.chive.richtext.defs#tagItem",
          "pub.chive.richtext.defs#latexItem",
          "pub.chive.richtext.defs#codeBlockItem",
          "pub.chive.richtext.defs#headingItem",
          "pub.chive.richtext.defs#listItem",
          "pub.chive.richtext.defs#blockquoteItem"
        ],
        "type": "union"
      },
      "maxLength": 500,
      "type": "array"
    },
    "authors": {
      "items": {
        "ref": "#authorRef",
        "type": "ref"
      },
      "type": "array"
    },
    "cid": {
      "description": "CID of the eprint record",
      "format": "cid",
      "type": "string"
    },
    "createdAt": {
      "description": "Original creation timestamp",
      "format": "datetime",
      "type": "string"
    },
    "fields": {
      "description": "Knowledge graph field classifications",
      "items": {
        "ref": "#fieldRef",
        "type": "ref"
      },
      "type": "array"
    },
    "inUserFields": {
      "description": "Whether this eprint matches the requested fieldUris",
      "type": "boolean"
    },
    "indexedAt": {
      "description": "When Chive indexed this record",
      "format": "datetime",
      "type": "string"
    },
    "license": {
      "description": "License identifier",
      "type": "string"
    },
    "metrics": {
      "description": "Current metrics snapshot",
      "ref": "#eprintMetrics",
      "type": "ref"
    },
    "paperDid": {
      "description": "DID of the paper identity (if using paper-centric model)",
      "format": "did",
      "type": "string"
    },
    "rank": {
      "description": "Position in trending list",
      "minimum": 1,
      "type": "integer"
    },
    "source": {
      "description": "PDS source information for transparency",
      "ref": "#sourceInfo",
      "type": "ref"
    },
    "submittedBy": {
      "description": "DID of the submitter",
      "format": "did",
      "type": "string"
    },
    "title": {
      "description": "Eprint title",
      "type": "string"
    },
    "uri": {
      "description": "AT-URI of the eprint",
      "format": "at-uri",
      "type": "string"
    },
    "velocity": {
      "description": "Rate of view increase (optional)",
      "type": "integer"
    },
    "viewsInWindow": {
      "description": "Views within the trending window",
      "minimum": 0,
      "type": "integer"
    }
  },
  "required": [
    "uri",
    "cid",
    "title",
    "abstract",
    "authors",
    "submittedBy",
    "license",
    "createdAt",
    "indexedAt",
    "source",
    "viewsInWindow",
    "rank"
  ],
  "type": "object"
}

Lexicon Garden

@