HARPA.AI
LIBRARYUSE CASESGUIDESAI COMMANDSBLOG

Web Search Operators

CONTENTS
NAVIGATE

Google reigns supreme as the go-to search engine.

To harness its full potential, understanding and utilizing Google's advanced search operators is crucial. These tools are not just for SEO experts; they can be beneficial for anyone looking to refine their search for more precise results.

Google Search Operators can be used in HARPA AI using the {{serp query}} parameter, allowing you to incorporate data from searches into custom commands.

First, we will explain what Google Search Operators are, then briefly describe their basic and advanced options, and finally, explain how to use them in HARPA AI.

# What are Google Search Operators?

Google search operators are special words that enhance the capabilities of regular text searches. They are sometimes referred to as “advanced operators” and extend beyond the basic keyword input, allowing users to specify their searches in a much more detailed manner.

# Basic Search Operators

These operators modify standard text searches to yield more targeted results:

  • Country Code: You can ensure the SERP contains only the local search results from your desired country. Specify cr:XX to get results from a specific country. If the cr:XX does not work, try gl:XX, these operators are interchangeable. XX is the two-letter country code
  • Date filter: You can also filter the query by date by writing "before:date".
  • Website Domain Zones: You can filter by domain zone using “website:.XX” (where XX is the country code TLD in the URL - e.g., .uk, .ca, etc).
  • Exact Match: Using quotation marks around a phrase ensures an exact-match search.
  • Logical Operators: "OR" and "|" help combine different search terms, while "-" excludes certain terms.
  • Wildcard: The asterisk (*) acts as a wildcard, replacing it with any word or phrase.
  • Number Range: Searching with a number range like "2015..2017" can narrow down results to a specific timeframe.
  • Price Search: Symbols like "$" and "€" can be used for price-related searches.

# Advanced Search Operators

# Google Operators in HARPA AI

Operators can be used in SERP queries in HARPA AI via the {{serp query}} parameter. This can aid in solving tasks with custom commands and can also be applied in the pre-made /search-agent command, making searches more targeted and ensuring maximum relevance of the search results.

For example, let's create a simple custom command in HARPA AI that would search Google for data for further use:

  1. Open HARPA AI and type / in the chat.
  2. Click on the CREATE button in the top right corner.

  1. Add the ASK step that would request the text of your search query to save it in a {{query}} parameter. Here, you can use the above-mentioned Google Search Operators to conduct a search, for example, “Nikola Tesla website:.uk”.

  1. Add a SAY step that will display the {{serp query}} results in the chat. Note that this will be unformatted text.

icon

Remember, you can always type /help to open the Help Command, which can assist you in finding answers to questions about HARPA AI.

Advanced Custom command functions:

  1. If you want more, you can save the result as a parameter using the CALC step and use it later. Use CALC: SET PARAMETER to create a new parameter with information from {{serp query}}, called {{data}}.

  1. Let's extract a data array for further processing in LOOPs. For this, use the CALC: EXTRACT SERP LINKS step. This step will take the necessary information from the {{data}} parameter and form an array of data containing titles, URLs, and descriptions in a format suitable for use in LOOPs.

  1. You can use data from arrays by referring to the item's ordinal number in the array (0 - the first item) and the name of the element. For example, {{array.0.title}} will be the title of the first data array item, i.e., the first title from SERP. And specifying [{{array.0.title}}]({{array.0.url}}) will create a link to the first SERP page in markdown format.

  1. For example, you can display all the SERP data received (Markdown link and descriptions stored in the array) as a message in the chat with SAY step. For this, you need to enter the following text in the chat:
✅ SERP data extracted:
- [{{array.0.title}}]({{array.0.url}}): {{array.0.description}}.
- [{{array.1.title}}]({{array.1.url}}): {{array.1.description}}.
- [{{array.2.title}}]({{array.2.url}}): {{array.2.description}}.
- [{{array.3.title}}]({{array.3.url}}): {{array.3.description}}.
- [{{array.4.title}}]({{array.4.url}}): {{array.4.description}}.
- [{{array.5.title}}]({{array.5.url}}): {{array.5.description}}.
- [{{array.6.title}}]({{array.6.url}}): {{array.6.description}}.
- [{{array.7.title}}]({{array.7.url}}): {{array.7.description}}.

  1. Later, you can use this data {{array}} for navigating through links in LOOPs using NAVIGATE steps.
  • Add a LOOP step where actions will be performed on an {{array}}.

  • Go into the LOOP step and add a NAVIGATE step with the {{item.url}} parameter, which will refer to the URL value for each item used.

  • By navigating through each link in the SERP, you can perform some action, for example, create Summary pages using the /summary command.
  • To use the “command inside a command”, add a COMMAND step with the /summary call. Specify the required inputs to select options in advance, so you don't have to do it manually later. You can find out the required inputs by trying this command in another browser window.

  • Great, now your Custom Command goes through the links in the SERP, creating a summary for each of them.

What can you do next?

  • After that, you can save all the information from /summary into one parameter, such as a new array with a different name using CALC: ADD LIST ITEM.

  • Then create a prompt that combines it all into one complete text containing details about your initial query. This effectively results in a fully customized Search Agent for your specific task.

GPT STEP:

Please ignore all previous instructions.  I want you to only respond in {{language}}.

You are a Research Agent. I want you to create the detailed response to [MY QUESTION], adhering to a specific format I provide.
- Utilize both your inherent knowledge and the [WEB RESEARCH RESULTS] provided at the end.
- Utilize as many URLs from [WEB RESEARCH RESULTS] as possible, even if you've found the answer in one of them.
- Do not use any other tools and sources.
- Please integrate insights from the [WEB RESEARCH RESULTS] into your response and ensure the inclusion of links in a markdown format: [[1]](URL)
- Please avoid general phrases and unrelated words from your response to my question.
- Do not hallucinate facts or information.

FOLLOW THE FORMAT:

## Answer for '{{query}}':
400 words detailed response text with links, e.g. [[1]](URL)


[MY QUESTION]: {{query}}

[WEB RESEARCH RESULTS]:
{{array2}}

ADDITIONAL SOURCES:
- [{{array.0.title}}]({{array.0.url}}): {{array.0.description}}.
- [{{array.1.title}}]({{array.1.url}}): {{array.1.description}}.
- [{{array.2.title}}]({{array.2.url}}): {{array.2.description}}.
- [{{array.3.title}}]({{array.3.url}}): {{array.3.description}}.
- [{{array.4.title}}]({{array.4.url}}): {{array.4.description}}.

[DETAILED RESPONSE]:

icon

The choice is yours; depending on your task, you can create combinations of new steps, building complex AI automation systems with the help of HARPA AI.

NEXT POST
Contact us
HomeUse CasesGuidesPrivacy PolicyTerms of Service