# Beginner: How to index json file into Elasticsearch

**URL:** <https://discuss.elastic.co/t/beginner-how-to-index-json-file-into-elasticsearch/160917>\
**Category:** Elasticsearch\
**Created:** [December 14, 2018, 2:28pm UTC](https://discuss.elastic.co/t/beginner-how-to-index-json-file-into-elasticsearch/160917 "2018-12-14T14:28:11Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ESBeginner](https://avatars.discourse-cdn.com/v4/letter/e/dc4da7/32.png) [@ESBeginner](https://discuss.elastic.co/u/ESBeginner)\
**Post date:** [December 14, 2018, 2:28pm UTC](https://discuss.elastic.co/t/beginner-how-to-index-json-file-into-elasticsearch/160917/1 "2018-12-14T14:28:11Z")

</div>

Hello,

I have a json file with about 1000 documents and I want to index this file, but I really do not understand how I should do it. I already googled and saw things about the Bulk API but it does not work out for me on Windows. Has anybody tips how I can easily index the whole file with several documents in it on a Windows computer?

Thanks in advance!

---

<div class="post-metadata">

**Author:** ![A\_B](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/a_b/32/17104_2.png) [@A\_B](https://discuss.elastic.co/u/A_B)\
**Post date:** [December 14, 2018, 4:21pm UTC](https://discuss.elastic.co/t/beginner-how-to-index-json-file-into-elasticsearch/160917/2 "2018-12-14T16:21:17Z")

</div>

If you would like to do it directly in Elasticsearch through one of the APIs you will first have to [create the index](https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-create-index.html) and then use e.g. the [Index API](https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-index_.html) or possibly the Bulk API. I have not done that so can really help there.

Another possibility is to feed the JSON to e.g. Logstash which would create the Elasticsearch index for you based on the output settings you specify. The same can be done with many other tools, like [Filebeat](https://www.elastic.co/downloads/beats/filebeat).

There are many other tools to load data into Elasticsearch as well but these are the ones I have used.

---

<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:** [January 11, 2019, 4:21pm UTC](https://discuss.elastic.co/t/beginner-how-to-index-json-file-into-elasticsearch/160917/3 "2019-01-11T16:21:26Z")

</div>

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