# Multiple EngineUrls depending on search term

**URL:** https://discourse.devontechnologies.com/t/multiple-engineurls-depending-on-search-term/6540
**Category:** Automation
**Created:** [January 9, 2009, 7:47pm UTC](https://discourse.devontechnologies.com/t/multiple-engineurls-depending-on-search-term/6540 "2009-01-09T19:47:21Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![mgrimes](https://discourse.devontechnologies.com/user_avatar/discourse.devontechnologies.com/mgrimes/32/4135_2.png) [@mgrimes](https://discourse.devontechnologies.com/u/mgrimes)
#### Post date: [January 9, 2009, 7:47pm UTC](https://discourse.devontechnologies.com/t/multiple-engineurls-depending-on-search-term/6540/1 "2009-01-09T19:47:21Z")

</div>

How does one write a plugin for a site search where the EngineUrl changes form entirely depending on the word entered in the search field.

E.g. visit [stackoverflow.com](http://stackoverflow.com)

Enter “UITableView” in the search field note, EngineUrl is of the form:  
[stackoverflow.com/search?q=_agentQuery_](http://stackoverflow.com/search?q=_agentQuery_)  
with next url being [stackoverflow.com/search?q=\_agen … =relevance](http://stackoverflow.com/search?q=_agentQuery_&page=_agentOffset_&sort=relevance)

Now enter “ruby” in the search field – note it is identified as a “tag” so it gets different treatment. EngineUrl is of the form:  
[stackoverflow.com/questions/tagged/_agentQuery_](http://stackoverflow.com/questions/tagged/_agentQuery_)  
with next url being [stackoverflow.com/questions/tagg … entNumber\_](http://stackoverflow.com/questions/tagged?tagnames=_agentQuery_&page=_agentOffset_&sort=newest&pagesize=_agentNumber_)

Do I need to write two unique plugins or is there someway I can handle all this in a single plugin?

---

<div class="post-metadata">

### Author: ![annard](https://discourse.devontechnologies.com/user_avatar/discourse.devontechnologies.com/annard/32/57_2.png) [@annard](https://discourse.devontechnologies.com/u/annard)
#### Post date: [January 12, 2009, 8:39am UTC](https://discourse.devontechnologies.com/t/multiple-engineurls-depending-on-search-term/6540/2 "2009-01-12T08:39:17Z")

</div>

There is only a concept of a “next page” URL. In your case you’ll need to create two different plugins. But you can combine them in a search set.

---

<div class="post-metadata">

### Author: ![mgrimes](https://discourse.devontechnologies.com/user_avatar/discourse.devontechnologies.com/mgrimes/32/4135_2.png) [@mgrimes](https://discourse.devontechnologies.com/u/mgrimes)
#### Post date: [January 14, 2009, 7:05am UTC](https://discourse.devontechnologies.com/t/multiple-engineurls-depending-on-search-term/6540/3 "2009-01-14T07:05:06Z")

</div>

Thanks Annard. Stack Overflow plugin(s) are @ [http://github.com/statefullabs/devonagent-plugins](http://github.com/statefullabs/devonagent-plugins)

---

<div class="post-metadata">

### Author: ![system](https://devontech-discourse.s3.dualstack.us-east-1.amazonaws.com/uploads/original/2X/4/4e6ff70c96be2eb307a274d890bba8d71ba671b3.png) [@system](https://discourse.devontechnologies.com/u/system)
#### Post date: [January 21, 2022, 11:03am UTC](https://discourse.devontechnologies.com/t/multiple-engineurls-depending-on-search-term/6540/4 "2022-01-21T11:03:17Z")

</div>


