# How to acess search bar query string in kibana custom plugin

**URL:** <https://discuss.elastic.co/t/how-to-acess-search-bar-query-string-in-kibana-custom-plugin/72864>\
**Category:** Kibana\
**Created:** [January 26, 2017, 8:27am UTC](https://discuss.elastic.co/t/how-to-acess-search-bar-query-string-in-kibana-custom-plugin/72864 "2017-01-26T08:27:22Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![shaunak](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/shaunak/32/6643_2.png) [@shaunak](https://discuss.elastic.co/u/shaunak)\
**Post date:** [January 26, 2017, 1:29pm UTC](https://discuss.elastic.co/t/how-to-acess-search-bar-query-string-in-kibana-custom-plugin/72864/2 "2017-01-26T13:29:38Z")

</div>

Hi @tarun_kumar,

About the search bar, may I ask why you are unable to simply use the filter bar itself? It is also capable of doing text searches. Providing two search/filter bars on the same page might be a confusing UX for the user.

To extract the date range filter applied to the dashboard, look into using the [`timefilter`](https://github.com/elastic/kibana/blob/master/src/ui/public/timefilter/timefilter.js) Angular service provided by Kibana. Once injected, you can call its [`getBounds`](https://github.com/elastic/kibana/blob/master/src/ui/public/timefilter/timefilter.js#L96) method to get an object with `min` and `max` properties. You can see an example usage [here](https://github.com/elastic/kibana/blob/master/src/ui/public/courier/fetch/strategy/search.js#L25-L26).

---

_[View the full topic](https://discuss.elastic.co/t/how-to-acess-search-bar-query-string-in-kibana-custom-plugin/72864)._
