# Exporting Saved Search Data

**URL:** <https://discuss.elastic.co/t/exporting-saved-search-data/90843>\
**Category:** Kibana\
**Created:** [June 26, 2017, 3:30pm UTC](https://discuss.elastic.co/t/exporting-saved-search-data/90843 "2017-06-26T15:30:06Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![JoeyMarinello](https://avatars.discourse-cdn.com/v4/letter/j/d9b06d/32.png) [@JoeyMarinello](https://discuss.elastic.co/u/JoeyMarinello)\
**Post date:** [June 26, 2017, 3:30pm UTC](https://discuss.elastic.co/t/exporting-saved-search-data/90843/1 "2017-06-26T15:30:06Z")

</div>

Hi everyone,

I am currently working on an excel export tool. I am fairly new to elasticsearch, and right now I am trying to figure out how to programmatically export the data tied to my saved searches in kibana. Does anyone have any experience with this, and could possibly give some advice?

Thanks in advance,  
Joey

---

<div class="post-metadata">

**Author:** ![Joe\_Fleming](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/joe_fleming/32/3561_2.png) [@Joe\_Fleming](https://discuss.elastic.co/u/Joe_Fleming)\
**Post date:** [June 26, 2017, 9:14pm UTC](https://discuss.elastic.co/t/exporting-saved-search-data/90843/2 "2017-06-26T21:14:58Z")

</div>

> [@JoeyMarinello](#):
>
> I am trying to figure out how to programmatically export the data tied to my saved searches in kibana

I'm afraid I don't really understand what you are asking for. When you say "data tied to my saved searches", what do you mean? The records you see in Discover, for instance, and just the documents in Elasticsearch, converted from a JSON format to an HTML table. If that's all you need, you can just query Elasticsearch directly. Is that what you're asking for?

---

<div class="post-metadata">

**Author:** ![JoeyMarinello](https://avatars.discourse-cdn.com/v4/letter/j/d9b06d/32.png) [@JoeyMarinello](https://discuss.elastic.co/u/JoeyMarinello)\
**Post date:** [June 26, 2017, 9:37pm UTC](https://discuss.elastic.co/t/exporting-saved-search-data/90843/3 "2017-06-26T21:37:46Z")

</div>

Hi Joe,

Apologies, I am still quite new to Elasticsearch and the Elastic Stack in general.

I am an intern trying to build an application that will let our users export the data that populates the discover tab when they open a saved search (request is made externally from Kibana itself).

example: The user logs into our products admin console, selects a time frame, project, and a saved search that already exists in the selected project. The user is then able to export the data to a .csv file (whatever data appears in the discover tab using the selected project, saved search, and time-frame).

Is there a way to return the saved searches that exist within a project, and if so, can I extract the request made from a specific saved search?

Thank you for your reply, I hope this makes a little more sense now. If I'm just shouting non-sense, feel free to tell me 🙂

Kind Regards,  
Joey

---

<div class="post-metadata">

**Author:** ![Joe\_Fleming](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/joe_fleming/32/3561_2.png) [@Joe\_Fleming](https://discuss.elastic.co/u/Joe_Fleming)\
**Post date:** [June 26, 2017, 9:58pm UTC](https://discuss.elastic.co/t/exporting-saved-search-data/90843/4 "2017-06-26T21:58:03Z")

</div>

> Is there a way to return the saved searches that exist within a project  
> can I extract the request made from a specific saved search?

Yes and yes.

You can query Elasticsearch directly, they are simply records in the Kibana index (`.kibana` by default) with a type of saved\_search. The JSON in those documents defined the saved search, which includes any filters and queries that are being used.

If you want to use the UI, you can navigate to Management \> Saved Objects and select the Saved Searches tab. You can even export them as JSON from there if you'd like to.

Once you know the query, you can execute it yourself against Elasticsearch to get the matching documents in JSON format.

As an alternative, you _could_ scrape the screen you see in discover and "export" your data that way. There's an old Kibana plugin called [es-csv-exporter](https://github.com/minewhat/es-csv-exporter) that did exactly this. You could do the same in Kibana 5, using a custom plugin and writing it as a "hack". You could add a button to the top nav that would kick off a function that would scrape data out of Discover and could even serve it up as a CSV file for you.

If that's something you're interested in trying to do, we have a [plugin template](https://github.com/elastic/template-kibana-plugin/) you can use to help you get started.

Also, we have CSV export coming in a future release of Kibana, as part of our X-Pack offering.

Sorry for all the tangents. Hopefully this was helpful.

---

<div class="post-metadata">

**Author:** ![JoeyMarinello](https://avatars.discourse-cdn.com/v4/letter/j/d9b06d/32.png) [@JoeyMarinello](https://discuss.elastic.co/u/JoeyMarinello)\
**Post date:** [June 26, 2017, 10:02pm UTC](https://discuss.elastic.co/t/exporting-saved-search-data/90843/5 "2017-06-26T22:02:53Z")

</div>

Joe,

Beautiful! Thank you for all of the information, this answered my question perfectly!

No need to apologize for the tangents, I enjoy soaking in as much information as I can from smart people like yourself 😄 I'll have to start delving into all of the available options, and I certainly look forward to your CSV export feature!

Have a wonderful week, thanks again!  
Joey

---

<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 24, 2017, 10:03pm UTC](https://discuss.elastic.co/t/exporting-saved-search-data/90843/6 "2017-07-24T22:03:04Z")

</div>

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