# Java API vs REST

**URL:** <https://discuss.elastic.co/t/java-api-vs-rest/147936>\
**Category:** Elasticsearch\
**Created:** [September 10, 2018, 10:29am UTC](https://discuss.elastic.co/t/java-api-vs-rest/147936 "2018-09-10T10:29:20Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![xodn0812](https://avatars.discourse-cdn.com/v4/letter/x/c5a1d2/32.png) [@xodn0812](https://discuss.elastic.co/u/xodn0812)\
**Post date:** [September 10, 2018, 10:29am UTC](https://discuss.elastic.co/t/java-api-vs-rest/147936/1 "2018-09-10T10:29:20Z")

</div>

I want to create a web page that search data.  
Should I use JAVA API to request data with elasticsearch? Or is it better to do it with REST?

The JAVA API has the advantage of better performance, but it does not matter so much, and it is a non-performance project.

how do you think about it??

---

<div class="post-metadata">

**Author:** ![fkelbert](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/fkelbert/32/35762_2.png) [@fkelbert](https://discuss.elastic.co/u/fkelbert)\
**Post date:** [September 24, 2018, 1:20pm UTC](https://discuss.elastic.co/t/java-api-vs-rest/147936/2 "2018-09-24T13:20:12Z")

</div>

Use the language specific APIs whenever they are available.

---

<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:** [October 22, 2018, 1:20pm UTC](https://discuss.elastic.co/t/java-api-vs-rest/147936/3 "2018-10-22T13:20:14Z")

</div>

Closed on October 22, 2018, 1:20pm UTC

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