Get a single record from a repository. Does not require auth.
GET
/xrpc/com.atproto.repo.getRecord
const url = 'https://example.com/xrpc/com.atproto.repo.getRecord?repo=example&rkey=example&collection=example';const options = {method: 'GET'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://example.com/xrpc/com.atproto.repo.getRecord?repo=example&rkey=example&collection=example'Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”cid
The CID of the version of the record. If not specified, then return the most recent version.
string format: cid
The CID of the version of the record. If not specified, then return the most recent version.
repo
required
The handle or DID of the repo.
string format: at-identifier
The handle or DID of the repo.
rkey
required
The Record Key.
string format: record-key
The Record Key.
collection
required
The NSID of the record collection.
string format: nsid
The NSID of the record collection.
Responses
Section titled “Responses”Success
Media typeapplication/json
object
cid
string format: cid
uri
required
string format: uri
value
required
Example generated
{ "cid": "example", "uri": "https://example.com", "value": "example"}Bad Request
Media typeapplication/json
object
error
required
One of:
string
message
required
string
Example
{ "error": "RecordNotFound"}