---
title: "Get account module"
method: GET
path: "/accounts/{address}/module/{module_name}"
tags: ["Accounts"]
---

# Get account module

`GET /accounts/{address}/module/{module_name}`

Retrieves an individual module from a given account and at a specific ledger version. If the
ledger version is not specified in the request, the latest ledger version is used.

The Aptos nodes prune account state history, via a configurable time window.
If the requested ledger version has been pruned, the server responds with a 410.

## Path parameters

- `address` string, hex, required — A hex encoded 32 byte Aptos account address. This is represented in a string as a 64 character hex string, sometimes shortened by stripping leading 0s, and adding a 0x. For example, address 0x0000000000000000000000000000000000000000000000000000000000000001 is represented as 0x1.
- `module_name` string, required

## Query parameters

- `ledger_version` string, uint64 — A string containing a 64-bit unsigned integer. We represent u64 values as a string to ensure compatibility with languages such as JavaScript that do not parse u64s in JSON natively.

## Response `200`

- MoveModuleBytecode — Move module bytecode along with it's ABI
  - `bytecode` string, hex, required — All bytes (Vec<u8>) data is represented as hex-encoded string prefixed with `0x` and fulfilled with two hex digits per byte. Unlike the `Address` type, HexEncodedBytes will not trim any zeros.
  - `abi` MoveModule — A Move module
    - `address` string, hex, required — A hex encoded 32 byte Aptos account address. This is represented in a string as a 64 character hex string, sometimes shortened by stripping leading 0s, and adding a 0x. For example, address 0x0000000000000000000000000000000000000000000000000000000000000001 is represented as 0x1.
    - `name` string, required
    - `friends` MoveModuleId[], required — Friends of the module
    - `exposed_functions` MoveFunction[], required — Public functions of the module
      - `name` string, required
      - `visibility` 'private' | 'public' | 'friend', required — Move function visibility
      - `is_entry` boolean, required — Whether the function can be called as an entry function directly in a transaction
      - `is_view` boolean, required — Whether the function is a view function or not
      - `generic_type_params` MoveFunctionGenericTypeParam[], required — Generic type params associated with the Move function
        - `constraints` MoveAbility[], required — Move abilities tied to the generic type param and associated with the function that uses it
      - `params` MoveType[], required — Parameters associated with the move function
      - `return` MoveType[], required — Return type of the function
    - `structs` MoveStruct[], required — Structs of the module
      - `name` string, required
      - `is_native` boolean, required — Whether the struct is a native struct of Move
      - `is_event` boolean, required — Whether the struct is marked with the #[event] annotation
      - `is_enum` boolean, required — Whether the struct is an enum (i.e. enum MyEnum vs struct MyStruct).
      - `abilities` MoveAbility[], required — Abilities associated with the struct
      - `generic_type_params` MoveStructGenericTypeParam[], required — Generic types associated with the struct
        - `constraints` MoveAbility[], required — Move abilities tied to the generic type param and associated with the type that uses it
      - `fields` MoveStructField[], required — Fields associated with the struct
        - `name` string, required
        - `type` string, required — String representation of an on-chain Move type tag that is exposed in transaction payload. Values: - bool - u8 - u16 - u32 - u64 - u128 - u256 - i8 - i16 - i32 - i64 - i128 - i256 - address - signer - vector: `vector<{non-reference MoveTypeId}>` - struct: `{address}::{module_name}::{struct_name}::<{generic types}>` 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` Note: 1. Empty chars should be ignored when comparing 2 struct tag ids. 2. When used in an URL path, should be encoded by url-encoding (AKA percent-encoding).

## Other responses

- `400`
- `403`
- `404`
- `410`
- `500`
- `503`

## Changes

- **2025-10-14** `5510dfe434b5` — 3 info
  - the `abi/exposed_functions/items/params/items/` response's property pattern was changed from `^(bool|u8|u64|u128|address|signer|vector<.+>|0x[0-9a-zA-Z:_<, >]+)$` to `^(bool|u8|u16|u32|u64|u128|u256|i8|i16|i32|i64|i128|i256|address|signer|vector<.+>|0x[0-9a-zA-Z:_<, >]+)$` for the status `200`
  - the `abi/exposed_functions/items/return/items/` response's property pattern was changed from `^(bool|u8|u64|u128|address|signer|vector<.+>|0x[0-9a-zA-Z:_<, >]+)$` to `^(bool|u8|u16|u32|u64|u128|u256|i8|i16|i32|i64|i128|i256|address|signer|vector<.+>|0x[0-9a-zA-Z:_<, >]+)$` for the status `200`
  - the `abi/structs/items/fields/items/type` response's property pattern was changed from `^(bool|u8|u64|u128|address|signer|vector<.+>|0x[0-9a-zA-Z:_<, >]+)$` to `^(bool|u8|u16|u32|u64|u128|u256|i8|i16|i32|i64|i128|i256|address|signer|vector<.+>|0x[0-9a-zA-Z:_<, >]+)$` for the status `200`
- **2025-10-10** `ede18bdaa4e0` — 1 info
  - added the required property `abi/structs/items/is_enum` to the response with the `200` status
- …earlier changes not shown

[Full history](https://skmtc.dev/aptoslabs/apis/aptos-node-api/changes/accounts/:address/module/:module_name/get.md)

---

[API](https://skmtc.dev/aptoslabs/apis/aptos-node-api.md) · [All operations](https://skmtc.dev/aptoslabs/apis/aptos-node-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/aptoslabs/aptos-node-api/revisions/5510dfe434b5/schema)
