# Elasticsearch - get list if field\_names for a given index

**URL:** <https://discuss.elastic.co/t/elasticsearch-get-list-if-field-names-for-a-given-index/221499>\
**Category:** Kibana\
**Created:** [February 28, 2020, 11:49pm UTC](https://discuss.elastic.co/t/elasticsearch-get-list-if-field-names-for-a-given-index/221499 "2020-02-28T23:49:52Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Deepthi\_Khader](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/deepthi_khader/32/62890_2.png) [@Deepthi\_Khader](https://discuss.elastic.co/u/Deepthi_Khader)\
**Post date:** [February 28, 2020, 11:49pm UTC](https://discuss.elastic.co/t/elasticsearch-get-list-if-field-names-for-a-given-index/221499/1 "2020-02-28T23:49:53Z")

</div>

Hi,

I am trying to get the list of field names of any index using node.js. Is there any API I can use to access the list?

In general is there a way to get list of field names using any elasticsearch API?

Thanks in advance!

---

<div class="post-metadata">

**Author:** ![rashmi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rashmi/32/16391_2.png) [@rashmi](https://discuss.elastic.co/u/rashmi)\
**Post date:** [March 13, 2020, 11:56pm UTC](https://discuss.elastic.co/t/elasticsearch-get-list-if-field-names-for-a-given-index/221499/2 "2020-03-13T23:56:09Z")

</div>

Hey,

you can use the [Get Mapping API](https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-get-mapping.html) to get all your fields.

Hope it helps  
Rashmi

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [April 10, 2020, 11:56pm UTC](https://discuss.elastic.co/t/elasticsearch-get-list-if-field-names-for-a-given-index/221499/3 "2020-04-10T23:56:11Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
