# How to connect API with Search UI

**URL:** <https://discuss.elastic.co/t/how-to-connect-api-with-search-ui/237970>\
**Category:** Elasticsearch\
**Created:** [June 21, 2020, 4:17pm UTC](https://discuss.elastic.co/t/how-to-connect-api-with-search-ui/237970 "2020-06-21T16:17:30Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![spadel](https://avatars.discourse-cdn.com/v4/letter/s/8797f3/32.png) [@spadel](https://discuss.elastic.co/u/spadel)\
**Post date:** [June 21, 2020, 4:17pm UTC](https://discuss.elastic.co/t/how-to-connect-api-with-search-ui/237970/1 "2020-06-21T16:17:31Z")

</div>

I have an API with Flask, that runs on my localhost. Basically, I have a search box, where I can enter any sentence. Furthermore I have a database with sentences (in my case an excel sheet). Through some neural network, I can find the most similar sentences to the query sentences. On my website, I can then print out the top n most similar sentences.

For this very simple website, I want to implement a pretty userface. I was told, that I can do this with elastic search-ui. Unfortunately, I have no experience with that at all and moreover, I have never done anything similar. So right now I feel a bit lost.

From my understanding, the solution should be simple. I assume, that elastic search-ui has some functionality, that I can for example create a search box, where I can write a sentence. This sentence will then have a specific format (maybe json), which I can then transfer to my API, transform it in a way that I can use it and receive the most similar sentences. Afterwards, I guess I have to transform the results into a specific format again (probably json again) and pass it to the search-ui.

So first of all, is my idea of what I practically have to do correct?  
If so, does anyone have help how to do that? I can't believe that this should be so hard, but I get lost in the documentation ([https://github.com/elastic/search-ui#about-search-ui-rocket](https://github.com/elastic/search-ui#about-search-ui-rocket)) quite quickly.

Thank you for your help!

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [June 24, 2020, 5:07am UTC](https://discuss.elastic.co/t/how-to-connect-api-with-search-ui/237970/2 "2020-06-24T05:07:50Z")

</div>

As far as I know the Search Ui is designed to work with Elasticsearch and not custom APIs. If you are not using Elasticsearch this may therefore not be of much use to you.

---

<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 22, 2020, 5:07am UTC](https://discuss.elastic.co/t/how-to-connect-api-with-search-ui/237970/3 "2020-07-22T05:07:58Z")

</div>

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