> For the complete documentation index, see [llms.txt](https://docs.gpmautomate.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.gpmautomate.com/automate-en/action-guide/image-search/image-search.md).

# Image search

This is an advanced action that scans the entire screen, finds the location of the target image, and returns the exact coordinates (X, Y) of its center.

* Effect: It serves as a "lifesaver" when the website or application does not have HTML tags (such as games, old applications, or canvas graphics). You use it to determine the coordinates, from which you can instruct the tool to click the mouse at that exact position accurately.

🎥 Watch the tutorial video: [Here](https://youtu.be/xWu0g35YTGo).

> ⚠️ Special note about Scale ratio: The percentage scale of the screen and the resolution of the browser when you take the sample image must match exactly with when the script runs in practice. If when taking the sample image you set the display to 100%, but when running the profile the system automatically opens at a scale of 80% or 125%, the image scanning algorithm will not be able to recognize the pixel structure of the target and will result in not finding the coordinates.

#### Real-world example: Finding the position of a moving object on the screen to click

Suppose you are running a script on a reward gaming website or an application with a button that changes position continuously in real-time without being fixed in one place. You need to find out where that button is located to control the mouse to click on it:

* Configuration method: You take a sample image of that button as the search target.
* Result: When executed, the system will quickly scan the screen. If the button is found, it will immediately calculate the pixel coordinates (For example: `X = 550`, `Y = 420`) and store these two values in the output system variable. Right after that, you can call the Mouse move or Mouse click action directly passing these two coordinate variables `X` and `Y` to have the mouse automatically find and click accurately on the target.

> 💡 *Detailed parameters such as configuring the sample image area (Image), color deviation (Threshold), True color, and output variable (Output) will be analyzed in depth in the guide combining the three actions: Wait to image, Image exists, and Image search.*


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.gpmautomate.com/automate-en/action-guide/image-search/image-search.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
