# Possible to query a canister for a list of its available public methods?

**URL:** <https://forum.dfinity.org/t/possible-to-query-a-canister-for-a-list-of-its-available-public-methods/6266>\
**Category:** Developers\
**Created:** [August 2, 2021, 6:17pm UTC](https://forum.dfinity.org/t/possible-to-query-a-canister-for-a-list-of-its-available-public-methods/6266 "2021-08-02T18:17:03Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![bgibson](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/bgibson/32/972_2.png) [@bgibson](https://forum.dfinity.org/u/bgibson)\
**Post date:** [August 2, 2021, 6:17pm UTC](https://forum.dfinity.org/t/possible-to-query-a-canister-for-a-list-of-its-available-public-methods/6266/1 "2021-08-02T18:17:03Z")

</div>

Use case: I want to see the list of all available public methods on any arbitrary deployed canister, and ideally any flags or other information needed to call them, like expected inputs and input format.

Basically something like `dfx canister call canister_name --list-public-methods`.

The [DFINITY SDK docs](https://sdk.dfinity.org/docs/developers-guide/cli-reference/dfx-canister.html#_dfx_canister_call) show that `dfx canister call` with the `--query` flag can return info about the canister, but I’m not seeing any further details on it.

Is this possible?

---

<div class="post-metadata">

**Author:** ![anon74414410](https://avatars.discourse-cdn.com/v4/letter/a/85f322/32.png) [@anon74414410](https://forum.dfinity.org/u/anon74414410)\
**Post date:** [August 2, 2021, 6:48pm UTC](https://forum.dfinity.org/t/possible-to-query-a-canister-for-a-list-of-its-available-public-methods/6266/2 "2021-08-02T18:48:58Z")

</div>

The easiest way to check is to visit `https://ic.rocks/principal/<canister-id>` and then look at the candid declarations

---

<div class="post-metadata">

**Author:** ![bgibson](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/bgibson/32/972_2.png) [@bgibson](https://forum.dfinity.org/u/bgibson)\
**Post date:** [August 2, 2021, 8:13pm UTC](https://forum.dfinity.org/t/possible-to-query-a-canister-for-a-list-of-its-available-public-methods/6266/3 "2021-08-02T20:13:24Z")

</div>

Good enough, thanks!

---

<div class="post-metadata">

**Author:** ![Ori](https://avatars.discourse-cdn.com/v4/letter/o/ecae2f/32.png) [@Ori](https://forum.dfinity.org/u/Ori)\
**Post date:** [August 2, 2021, 11:44pm UTC](https://forum.dfinity.org/t/possible-to-query-a-canister-for-a-list-of-its-available-public-methods/6266/4 "2021-08-02T23:44:57Z")

</div>

A couple more options:

From dfx you can call Canlista for any listed canisters ([see getCandid here](https://k7gat-daaaa-aaaae-qaahq-cai.ic0.app/docs/)):

```auto
dfx canister --network ic call kyhgh-oyaaa-aaaae-qaaha-cai getCandid '(principal "<canister_id>")'

```

For any arbitrary canister you can also search Canlista:

```auto
https://k7gat-daaaa-aaaae-qaahq-cai.ic0.app/search?s=<canister_id>

```

This will include Rust and C++ canisters if they’re listed, or any Motoko canister on the network.

---

<div class="post-metadata">

**Author:** ![Ori](https://avatars.discourse-cdn.com/v4/letter/o/ecae2f/32.png) [@Ori](https://forum.dfinity.org/u/Ori)\
**Post date:** [August 2, 2021, 11:50pm UTC](https://forum.dfinity.org/t/possible-to-query-a-canister-for-a-list-of-its-available-public-methods/6266/5 "2021-08-02T23:50:03Z")

</div>

You could also use the Candid interface (for Motoko canisters):

```auto
https://a4gq6-oaaaa-aaaab-qaa4q-cai.raw.ic0.app/?id=<canister_id>

```
