> For the complete documentation index, see [llms.txt](/llms.txt).

# `getLedgerEntries`

Returns the current value of one or more ledger entries. This method uses [160 credits](/get-started/pricing/) from your daily balance.

Use this method to read accounts, trustlines, offers, claimable balances, liquidity pools, and contract data or code. Each key is a base64-encoded `LedgerKey`.

## Parameters[​](#parameters "Direct link to Parameters")

- `keys`: (array) _[required]_ - Ledger keys to retrieve, as base64-encoded strings. The maximum is 200 keys.
- `xdrFormat`: (string) _[optional]_ - Format for XDR fields in the response. `base64` is the default. `json` returns unpacked JSON. Do not rely on a stable schema for the JSON form, because it changes when the underlying XDR changes.

## Returns[​](#returns "Direct link to Returns")

`result`: (object) - Matching ledger entries.

- `latestLedger`: (integer) - Sequence number of the latest ledger known to the node when it handled the request.
- `entries`: (array) - Ledger entries that were found. Each entry contains:  
  - `key`: (string) - Base64-encoded `LedgerKey` for the entry.
  - `xdr`: (string) - Base64-encoded `LedgerEntryData` value.
  - `lastModifiedLedgerSeq`: (integer) - Sequence number of the ledger that last updated the entry.
  - `extXdr`: (string) - Base64-encoded extension for the entry.
  - `liveUntilLedgerSeq`: (integer) _[optional]_ - Ledger sequence until which the entry stays live. May be `0` when the entry is no longer live.

### Request[​](#request "Direct link to Request")

- curl

```
curl https://stellar-mainnet.infura.io/v3/<YOUR-API-KEY> \
  -X POST \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc": "2.0", "id": 1, "method": "getLedgerEntries", "params": {"keys": ["AAAAAAAAAAA7mRE4Dv6Yi6CokA6xz+RPNm99vpRr7QdyQPf2JN8VxQ=="]}}'

```

### Response[​](#response "Direct link to Response")

- JSON

```
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "entries": [
      {
        "key": "AAAAAAAAAAA7mRE4Dv6Yi6CokA6xz+RPNm99vpRr7QdyQPf2JN8VxQ==",
        "xdr": "AAAAAAAAAAA7mRE4Dv6Yi6CokA6xz+RPNm99vpRr7QdyQPf2JN8VxQAAADz09GKDAgDqmAAAAA0AAAAGAAAAAAAAAAIAAAAKY2lyY2xlLmNvbQAAAAICAgAAAAQAAAAAKKK7TUYIV3/7UnKlvk/DYeZ9DXkAiCEiQf5CVfpUqwsAAAABAAAAAC5Yu4w/iyCljSCrlPo7zcDUfEUTKt59A2xgM6EbT083AAAAAQAAAAB/vD2X7Hvv7NvpzgvijYy5HkMkocUZ7dQDJH02jPKnxgAAAAEAAAAAvAafI2CeqnehpBCVI3V2CMJMv888e8Iia5sLvJeBxVQAAAABAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAACAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAA7bTkAAAAABp753d",
        "lastModifiedLedgerSeq": 64922391,
        "extXdr": "AAAAAA=="
      }
    ],
    "latestLedger": 64923230
  }
}

```
