# REST Call to Return just \_source

**URL:** <https://discuss.elastic.co/t/rest-call-to-return-just--source/47034>\
**Category:** Elasticsearch\
**Created:** [April 11, 2016, 7:26pm UTC](https://discuss.elastic.co/t/rest-call-to-return-just--source/47034 "2016-04-11T19:26:28Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mithel](https://avatars.discourse-cdn.com/v4/letter/m/53a042/32.png) [@Mithel](https://discuss.elastic.co/u/Mithel)\
**Post date:** [April 11, 2016, 7:26pm UTC](https://discuss.elastic.co/t/rest-call-to-return-just--source/47034/1 "2016-04-11T19:26:29Z")

</div>

In the Java API, I can make a query, obtain the hits and easily build a JSON formatted array with just the source.

But using a REST call I get back a ton of metadata and it's basically a mess that I don't know how to easily parse in Javascript to get an array of the results.

I did an Internet search and found several other people wanting to do the same thing but with no solution. On GitHub there is a plugin "arrayformat" (\_search\_arrayformat) which does this, but I need a solution that doesn't force me to have the Elastic server admins add a plugin.

Any thoughts, ideas or solutions?

---

<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:** [July 5, 2017, 11:00pm UTC](https://discuss.elastic.co/t/rest-call-to-return-just--source/47034/2 "2017-07-05T23:00:37Z")

</div>


