> ## 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.

# List Modules

> Retrieve a list of HDP modules with optional filtering by marketplace or creator

# List Modules

Retrieves a list of HDP modules. Can be filtered to show only marketplace-published modules or modules by a specific creator. This endpoint does not require authentication.

## Endpoint

```
GET /modules
```

## Query Parameters

| Parameter     | Type    | Required | Description                                                  |
| ------------- | ------- | -------- | ------------------------------------------------------------ |
| marketplace   | boolean | No       | If `true`, returns only modules published on the marketplace |
| creator\_user | string  | No       | Filter modules by creator user identifier                    |

## Example Requests

### List all modules

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

### List only marketplace modules

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

### List modules by creator

```bash theme={null}
curl -X GET "https://staging.hdp.api.herodotus.cloud/modules?creator_user=user@example.com" \
  -H "Content-Type: application/json"
```

## Response

### Success Response (200 OK)

```json theme={null}
{
  "modules": [
    {
      "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"
    }
  ]
}
```

### Response Fields

| Field   | Type  | Description             |
| ------- | ----- | ----------------------- |
| modules | array | Array of module objects |

Each module object has the same structure as described in the [Get Module](./get-module) endpoint.

## Notes

* No authentication is required for this endpoint
* If `marketplace=true` is specified, only published modules are returned
* If `creator_user` is specified, only modules created by that user are returned
* If neither parameter is specified, all modules are returned
* The response includes full module details including source code and ABI
