---
title: "Get table item by handle and key."
method: POST
path: "/tables/{table_handle}/item"
tags: ["state", "table"]
---

# Get table item by handle and key.

`POST /tables/{table_handle}/item`

Gets a table item for a table identified by the handle and the key for the item.
Key and value types need to be passed in to help with key serialization and value deserialization.

## Path parameters

- `table_handle` string, uint128, required — the table handle

## Request body

- TableItemRequest
  - `key_type` string, required — String representation of an on-chain Move type identifier defined by the Move language. Values: - bool - u8 - u64 - u128 - address - signer - vector: `vector<{non-reference MoveTypeId}>` - struct: `{address}::{module_name}::{struct_name}::<{generic types}>` - reference: immutable `&` and mutable `&mut` references. - generic_type_parameter: it is always start with `T` and following an index number, which is the position of the generic type parameter in the `struct` or `function` generic type parameters definition. Vector type value examples: * `vector<u8>` * `vector<vector<u64>>` * `vector<0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>>` Struct type value examples: * `0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>` * `0x1::account::Account` Reference type value examples: * `&signer` * `&mut address` * `&mut vector<u8>`
  - `value_type` string, required — String representation of an on-chain Move type identifier defined by the Move language. Values: - bool - u8 - u64 - u128 - address - signer - vector: `vector<{non-reference MoveTypeId}>` - struct: `{address}::{module_name}::{struct_name}::<{generic types}>` - reference: immutable `&` and mutable `&mut` references. - generic_type_parameter: it is always start with `T` and following an index number, which is the position of the generic type parameter in the `struct` or `function` generic type parameters definition. Vector type value examples: * `vector<u8>` * `vector<vector<u64>>` * `vector<0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>>` Struct type value examples: * `0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>` * `0x1::account::Account` Reference type value examples: * `&signer` * `&mut address` * `&mut vector<u8>`
  - `key` string, required — Move `bool` type value is serialized into `boolean`. Move `u8` type value is serialized into `integer`. Move `u64` and `u128` type value is serialized into `string`. Move `address` type value(16 bytes Aptos account address) is serialized into hex-encoded string, which is prefixed with `0x` and leading zeros are trimmed. For example: * `0x1` * `0x1668f6be25668c1a17cd8caf6b8d2f25` Move `vector` type value is serialized into `array`, except `vector<u8>` which is serialized into hex-encoded string with `0x` prefix. For example: * `vector<u64>{255, 255}` => `["255", "255"]` * `vector<u8>{255, 255}` => `0xffff` Move `struct` type value is serialized into `object` that looks like this (except some Move stdlib types, see the following section): ```json { field1_name: field1_value, field2_name: field2_value, ...... } ``` For example: `{ "created": "0xa550c18", "role_id": "0" }` **Special serialization for Move stdlib types:** * [0x1::string::String](https://github.com/aptos-labs/aptos-core/blob/main/language/move-stdlib/docs/ascii.md) is serialized into `string`. For example, struct value `0x1::string::String{bytes: b"hello world"}` is serialized as `"hello world"` in JSON.

## Response `200`

Returns the table item value rendered in JSON.

- object

## Other responses

- `400` — Bad request due to a client error: invalid request headers, parameters or body. Client should not retry the request without modification.
- `404` — Resource or data not found. Client may retry the request if it is waiting for transaction execution or ledger synchronization.
- `413` — The request payload is too large.
- `415` — The request's content-type is not supported.
- `500` — Server internal error, caused by unexpected issues.

---

[API](https://skmtc.dev/apscan/apis/aptos-dev-api-specification.md) · [All operations](https://skmtc.dev/apscan/apis/aptos-dev-api-specification/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/apscan/aptos-dev-api-specification/revisions/45caa72817c2/schema)
