Type something once into a search field > Open multiple tabs using different keywords in a URL

Suppose one has a pre-set of search terms but searches multiple websites.

Search terms:

  • blueberry muffins
  • lemon tart
  • apple pie

Is there a way where a single search term can be typed into a website and multiple search tabs open up with the different pre-defined search terms :point_up_2: typed into that same field?

The URLs for searching websites look similar, except they have different "search terms" in the URL. For example:

  • https://www.allrecipes.com/search?q=blueberry+muffins
  • https://www.foodnetwork.com/search/blueberry-muffins-
  • https://www.kingarthurbaking.com/search?query=blueberry%20muffins#all_indices

This can also be useful in a job search where one could search a corporate website for multiple different jobs

Search terms

To further explain the question suppose you're a "program manager" but are also searching for "project manager" or "program director" jobs, essentially all the same thing except different titles.

Is there a way to search a corporate website (not a job search website) for multiple job titles all at once? Prompt a shortcut once into a field and have 3 different search tabs populate with pre-defined search terms?

Yes, you’ll want to use loops (for each, collection of lines in), with variables and open url actions. I’d recommend having a go at it yourself first.

Hey Teddy,

This is a simple one, although you need to know of and understand the various bits and pieces...

Concatenating variables may also be useful.

Set Variable to Text.kmactions (470 B)
Keyboard Maestro Export


@ccstone Chris sir can you break this down for me Barney style. I'm still a noob to KM.

How do I access 'lines in collection,' 'search and replace action', and 'open a URL action'?

Thank you

@vincent_ardern sir can you screenshot what you are referring to? I can't seem to find it.

Did you examine the links I provided links to those items in Keyboard Maestro Wiki?

Yes, but I still don't understand how to create a workflow to search a field with multiple keywords. Can you break it down for me please?


Explanations are worthless when someone doesn't yet have the vocabulary to understand them.

Don't worry, you'll get there. In the meantime a good example goes a long way.

Download: Multi-Site-Search with Multiple Search Terms v1.00.kmmacros (29 KB)


Keyboard Maestro Export

  • Macros are always disabled when imported into the Keyboard Maestro Editor.
    • The user must ensure the macro is enabled.
    • The user must also ensure the macro's parent macro-group is enabled.

System Information
  • macOS 10.14.6
  • Keyboard Maestro v10.2

Keep in mind that I just spent about two hours of my time on you, and when you ask questions like this one that kind of time is required to give a good answer.

1 Like

@ccstone Thank you Chris. I'll reverse engineer the example and read these again

  • Lines In collection
  • Search and Replace action
  • Open a URL action

I hope my question provides value to other readers

1 Like