# Access elastic search from remote api

**URL:** <https://discuss.elastic.co/t/access-elastic-search-from-remote-api/189049>\
**Category:** Elasticsearch\
**Created:** [July 5, 2019, 8:58am UTC](https://discuss.elastic.co/t/access-elastic-search-from-remote-api/189049 "2019-07-05T08:58:58Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![ram\_manoj](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ram_manoj/32/49493_2.png) [@ram\_manoj](https://discuss.elastic.co/u/ram_manoj)\
**Post date:** [July 5, 2019, 8:58am UTC](https://discuss.elastic.co/t/access-elastic-search-from-remote-api/189049/1 "2019-07-05T08:58:58Z")

</div>

I looked into many examples and documentation of elastic search. Most of the places, I find accessing elastic search from localhost. Some examples like: `http://localhost:9200/_msearch`. But isn't it possible to access the elastic search from the remote server?. If so how to perform it? I read something alike here: [https://www.elastic.co/guide/en/cloud/current/ec-getting-started-connect.html#ec-getting-started-api](https://www.elastic.co/guide/en/cloud/current/ec-getting-started-connect.html#ec-getting-started-api). Is it possible to do ?

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [July 5, 2019, 9:01am UTC](https://discuss.elastic.co/t/access-elastic-search-from-remote-api/189049/2 "2019-07-05T09:01:21Z")

</div>

Welcome! 😃

[https://www.elastic.co/guide/en/elasticsearch/reference/current/network.host.html](https://www.elastic.co/guide/en/elasticsearch/reference/current/network.host.html) should be what you want.

---

<div class="post-metadata">

**Author:** ![ram\_manoj](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ram_manoj/32/49493_2.png) [@ram\_manoj](https://discuss.elastic.co/u/ram_manoj)\
**Post date:** [July 5, 2019, 9:06am UTC](https://discuss.elastic.co/t/access-elastic-search-from-remote-api/189049/3 "2019-07-05T09:06:13Z")

</div>

Is it possible to perform this in python? I am working with a project and I need to get the information from the elastic search. I have read about [this](https://elasticsearch-py.readthedocs.io/en/master/). How to change the network host there or else will there be any more options?

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [July 5, 2019, 9:07am UTC](https://discuss.elastic.co/t/access-elastic-search-from-remote-api/189049/4 "2019-07-05T09:07:49Z")

</div>

You cannot do it via the client, you need to configure Elasticsearch directly.

---

<div class="post-metadata">

**Author:** ![ram\_manoj](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ram_manoj/32/49493_2.png) [@ram\_manoj](https://discuss.elastic.co/u/ram_manoj)\
**Post date:** [July 5, 2019, 9:09am UTC](https://discuss.elastic.co/t/access-elastic-search-from-remote-api/189049/5 "2019-07-05T09:09:23Z")

</div>

if so, how can I access it form a client (i.e the rest api and stuff)? and is it possible to configure it for multiple clients?

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [July 5, 2019, 9:40am UTC](https://discuss.elastic.co/t/access-elastic-search-from-remote-api/189049/6 "2019-07-05T09:40:16Z")

</div>

Once you change that setting you can access Elasticsearch from an external IP.

---

<div class="post-metadata">

**Author:** ![ram\_manoj](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ram_manoj/32/49493_2.png) [@ram\_manoj](https://discuss.elastic.co/u/ram_manoj)\
**Post date:** [July 5, 2019, 12:04pm UTC](https://discuss.elastic.co/t/access-elastic-search-from-remote-api/189049/7 "2019-07-05T12:04:29Z")

</div>

Thanks! But what about this link: [https://www.elastic.co/guide/en/cloud/current/ec-getting-started-connect.html#ec-getting-started-api](https://www.elastic.co/guide/en/cloud/current/ec-getting-started-connect.html#ec-getting-started-api). Here it specified that we can access elastic search and run the Lucene queries with the following URI: https://CLUSTER\_ID.REGION.CLOUD\_PLATFORM.DOMAIN:PORT

and an example from the curl is also given. So, how is it different from the present scenario?

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [July 5, 2019, 10:13pm UTC](https://discuss.elastic.co/t/access-elastic-search-from-remote-api/189049/8 "2019-07-05T22:13:23Z")

</div>

Are you using Elastic Cloud?

---

<div class="post-metadata">

**Author:** ![ram\_manoj](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ram_manoj/32/49493_2.png) [@ram\_manoj](https://discuss.elastic.co/u/ram_manoj)\
**Post date:** [July 6, 2019, 3:45am UTC](https://discuss.elastic.co/t/access-elastic-search-from-remote-api/189049/9 "2019-07-06T03:45:22Z")

</div>

Thanks! for the reply, let me explain you my complete issue I want to access the data of [https://wikimedia.biterg.io](https://wikimedia.biterg.io)(it is using elastic search) from an external Django based tool. I went to the console over bitergia project and tried running some Lucene queries and all of them worked. I want to run the queries now from the external tool. So I thought of performing an API request to the same URL like [https://wikimedia.biterg.io/elasticsearch/\_search](https://wikimedia.biterg.io/elasticsearch/_msearch) But I could not access API. So I am asking if there is any way to perform an API request and get the data? If so can you tell me the detailed procedure of how to perform it?

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [July 6, 2019, 4:55am UTC](https://discuss.elastic.co/t/access-elastic-search-from-remote-api/189049/10 "2019-07-06T04:55:04Z")

</div>

That depends if Bitergia provide the Elasticsearch APIs as open for you to query in this manner. You'd need to ask them about that, as if they do, they can also provide the URL.

---

<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:** [August 3, 2019, 4:55am UTC](https://discuss.elastic.co/t/access-elastic-search-from-remote-api/189049/11 "2019-08-03T04:55:08Z")

</div>

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