# How to query Elastic Search from my web app?

**URL:** <https://discuss.elastic.co/t/how-to-query-elastic-search-from-my-web-app/15262>\
**Category:** Elasticsearch\
**Created:** [January 16, 2014, 5:18am UTC](https://discuss.elastic.co/t/how-to-query-elastic-search-from-my-web-app/15262 "2014-01-16T05:18:14Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![IronMike](https://avatars.discourse-cdn.com/v4/letter/i/e9a140/32.png) [@IronMike](https://discuss.elastic.co/u/IronMike)\
**Post date:** [January 16, 2014, 5:18am UTC](https://discuss.elastic.co/t/how-to-query-elastic-search-from-my-web-app/15262/1 "2014-01-16T05:18:14Z")

</div>

I am not very clear on how to do this, I have the following scenario:  
My data/docs are indexed using scala native Java API.

- I would like to use the REST http API to access ES, What I would like to  
understand is how can I query ES server from my web application written in  
Java Script, are there any existing APIs that I can use with Java Script? I  
understand that I can't use curl for instance with javaScript.
- What's the best approach to this in order to make the solution/code  
maintainable and scalable?

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/a8b5a3df-9fc8-4e9d-82f1-98b4a4d1c57a%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/a8b5a3df-9fc8-4e9d-82f1-98b4a4d1c57a%40googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [January 16, 2014, 6:00am UTC](https://discuss.elastic.co/t/how-to-query-elastic-search-from-my-web-app/15262/2 "2014-01-16T06:00:44Z")

</div>

This? [http://www.elasticsearch.org/blog/client-for-node-js-and-the-browser/](http://www.elasticsearch.org/blog/client-for-node-js-and-the-browser/)

--  
David 😉  
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 16 janv. 2014 à 06:18, ZenMaster80 [sabdalla80@gmail.com](mailto:sabdalla80@gmail.com) a écrit :

I am not very clear on how to do this, I have the following scenario:  
My data/docs are indexed using scala native Java API.

- I would like to use the REST http API to access ES, What I would like to understand is how can I query ES server from my web application written in Java Script, are there any existing APIs that I can use with Java Script? I understand that I can't use curl for instance with javaScript.
- What's the best approach to this in order to make the solution/code maintainable and scalable?  
--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/a8b5a3df-9fc8-4e9d-82f1-98b4a4d1c57a%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/a8b5a3df-9fc8-4e9d-82f1-98b4a4d1c57a%40googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/4F44CCFC-FD05-410F-9A1F-C65BCFB0FE3F%40pilato.fr](https://groups.google.com/d/msgid/elasticsearch/4F44CCFC-FD05-410F-9A1F-C65BCFB0FE3F%40pilato.fr).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![IronMike](https://avatars.discourse-cdn.com/v4/letter/i/e9a140/32.png) [@IronMike](https://discuss.elastic.co/u/IronMike)\
**Post date:** [January 16, 2014, 6:14am UTC](https://discuss.elastic.co/t/how-to-query-elastic-search-from-my-web-app/15262/3 "2014-01-16T06:14:49Z")

</div>

Great, I also found this helpful, by simple making ajax calls.

> **[Elasticsearch Platform — Find real-time answers at scale](https://www.elastic.co)**
>
> Power insights and outcomes with the Elasticsearch Platform and AI. See into your data and find answers that matter with enterprise solutions designed to help you build, observe, and protect. Try Elasticsearch free today.

On Thursday, January 16, 2014 1:00:44 AM UTC-5, David Pilato wrote:

> This?  
> [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/blog/client-for-node-js-and-the-browser/)
> 
> --  
> David 😉  
> Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs
> 
> Le 16 janv. 2014 à 06:18, ZenMaster80 \<[sabda...@gmail.com](mailto:sabda...@gmail.com) \<javascript:\>\>  
> a écrit :
> 
> I am not very clear on how to do this, I have the following scenario:  
> My data/docs are indexed using scala native Java API.
> 
> - I would like to use the REST http API to access ES, What I would like to  
> understand is how can I query ES server from my web application written in  
> Java Script, are there any existing APIs that I can use with Java Script? I  
> understand that I can't use curl for instance with javaScript.
> - What's the best approach to this in order to make the solution/code  
> maintainable and scalable?
> 
> --  
> You received this message because you are subscribed to the Google Groups  
> "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an  
> email to [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com) \<javascript:\>.  
> To view this discussion on the web visit  
> [https://groups.google.com/d/msgid/elasticsearch/a8b5a3df-9fc8-4e9d-82f1-98b4a4d1c57a%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/a8b5a3df-9fc8-4e9d-82f1-98b4a4d1c57a%40googlegroups.com)  
> .  
> For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/c18d7ad5-9e11-4c92-abb7-b15c63360a95%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/c18d7ad5-9e11-4c92-abb7-b15c63360a95%40googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<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 6, 2017, 1:56am UTC](https://discuss.elastic.co/t/how-to-query-elastic-search-from-my-web-app/15262/4 "2017-07-06T01:56:29Z")

</div>


