# Get the notetype of the current selected card

**URL:** <https://forums.ankiweb.net/t/get-the-notetype-of-the-current-selected-card/19875>\
**Category:** Development\
**Created:** [May 10, 2022, 8:40am UTC](https://forums.ankiweb.net/t/get-the-notetype-of-the-current-selected-card/19875 "2022-05-10T08:40:54Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![rkosov](https://avatars.discourse-cdn.com/v4/letter/r/9dc877/32.png) [@rkosov](https://forums.ankiweb.net/u/rkosov)\
**Post date:** [May 10, 2022, 8:40am UTC](https://forums.ankiweb.net/t/get-the-notetype-of-the-current-selected-card/19875/1 "2022-05-10T08:40:54Z")

</div>

I’m adding a button that will need the string of the notetype of the current card, e.g. “French Vocabulary.” Does anyone know how to do this?

---

<div class="post-metadata">

**Author:** ![abdo](https://sea2.discourse-cdn.com/flex002/user_avatar/forums.ankiweb.net/abdo/32/654_2.png) [@abdo](https://forums.ankiweb.net/u/abdo)\
**Post date:** [May 10, 2022, 8:59am UTC](https://forums.ankiweb.net/t/get-the-notetype-of-the-current-selected-card/19875/2 "2022-05-10T08:59:56Z")

</div>

If you have a `Card` object, you can use `card.note().note_type()['name']` to get the notetype name.

E.g.

In the reviewer:

```auto
notetype_name = mw.reviewer.card.note().note_type()['name']

```

In the browser:

```auto
nid = browser.selected_notes()[0]
note = mw.col.get_note(nid)
notetype_name = note.note_type()['name']

```

In the editor:

```auto
notetype_name = editor.note.note_type()['name']

```

---

<div class="post-metadata">

**Author:** ![rkosov](https://avatars.discourse-cdn.com/v4/letter/r/9dc877/32.png) [@rkosov](https://forums.ankiweb.net/u/rkosov)\
**Post date:** [May 10, 2022, 9:21am UTC](https://forums.ankiweb.net/t/get-the-notetype-of-the-current-selected-card/19875/3 "2022-05-10T09:21:23Z")

</div>

> [@abdo](#):
>
> `.note_type()['name']`

That worked beautifully. Thank you!

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex002/uploads/anki2/original/1X/8f1279ababc5879d54e4838989f606cfe55af8c7.jpeg) [@system](https://forums.ankiweb.net/u/system)\
**Post date:** [May 1, 2023, 3:15am UTC](https://forums.ankiweb.net/t/get-the-notetype-of-the-current-selected-card/19875/4 "2023-05-01T03:15:44Z")

</div>

Closed on May 1, 2023, 3:15am UTC


