> ## Documentation Index
> Fetch the complete documentation index at: https://docs.herodotus.cloud/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Module

> Retrieve detailed information about a specific HDP module by its ID

# Get Module

Retrieves detailed information about a specific HDP module, including metadata, source code, ABI, and version information. This endpoint does not require authentication.

## Endpoint

```
GET /modules/{id}
```

## Path Parameters

| Parameter | Type   | Description                 |
| --------- | ------ | --------------------------- |
| id        | string | The unique module ID (ULID) |

## Example Request

```bash theme={null}
curl -X GET https://staging.hdp.api.herodotus.cloud/modules/01JPJ03YJT1A93D6NF56G4GVEQ \
  -H "Content-Type: application/json"
```

## Response

### Success Response (200 OK)

```json theme={null}
{
  "id": "01JPJ03YJT1A93D6NF56G4GVEQ",
  "latestModuleVersionProgramHash": "0x34a16478e83f69c4f0bcdb7549d32f92c9b7776bb3f71da06de334f1871eba0",
  "compilerVersion": "2.7.0",
  "name": "my_module",
  "description": "My awesome HDP module",
  "usageCount": 42,
  "tags": ["example", "tutorial"],
  "downloadsCount": 100,
  "usersCount": 25,
  "isVerified": false,
  "publishedOnMarketplace": true,
  "creatorUser": "user@example.com",
  "license": "MIT",
  "abi": {
    "type": "interface",
    "items": []
  },
  "sourceCode": {
    "src/lib.cairo": "fn main() {}"
  },
  "scarbToml": "[package]\nname = \"my_module\"\n...",
  "createdAt": "2024-03-17T10:24:00Z",
  "updatedAt": "2024-03-17T10:25:00Z"
}
```

### Not Found Response (404)

```json theme={null}
{
  "error": "Module not found"
}
```

### Response Fields

| Field                          | Type           | Description                                               |
| ------------------------------ | -------------- | --------------------------------------------------------- |
| id                             | string         | The unique module ID (ULID)                               |
| latestModuleVersionProgramHash | string \| null | Program hash of the latest version                        |
| compilerVersion                | string         | Compiler version used                                     |
| name                           | string         | Module name                                               |
| description                    | string \| null | Module description                                        |
| usageCount                     | integer        | Number of times this module has been used                 |
| tags                           | array \| null  | Array of tags                                             |
| downloadsCount                 | integer        | Number of downloads                                       |
| usersCount                     | integer        | Number of unique users                                    |
| isVerified                     | boolean        | Whether the module is verified                            |
| publishedOnMarketplace         | boolean        | Whether the module is published on the marketplace        |
| creatorUser                    | string \| null | Creator user identifier                                   |
| license                        | string \| null | License identifier                                        |
| abi                            | object \| null | Module ABI as JSON                                        |
| sourceCode                     | object \| null | Source code files as JSON object mapping paths to content |
| scarbToml                      | string \| null | Scarb.toml file content                                   |
| createdAt                      | string         | ISO 8601 timestamp of module creation                     |
| updatedAt                      | string         | ISO 8601 timestamp of last update                         |

## Notes

* No authentication is required for this endpoint
* Returns all module metadata including source code and ABI
* The `sourceCode` field contains a JSON object mapping file paths to file contents
* The `latestModuleVersionProgramHash` points to the most recent version of the module
