# Search for an Image

The Roboflow Python package has a `search_all()` method that lets you search through images in a dataset. You can search using a text prompt, using an existing image in yuor dataset as a reference for semantic search, using tags, class names, and more.

```python
import roboflow

roboflow.login()

rf = roboflow.Roboflow()

project = rf.project("PROJECT_ID")

records = []

for page in project.search_all(
    prompt="mug",
    like_image = image_id,
    offset = 0,
    limit = 100,
    tag = "tag",
    class_name = "class_name",
    in_dataset = True,
    batch = False,
    batch_id = "batch_id",
    annotation_job = False,
    annotation_job_id = "annotation_job_id",
    fields = ["id", "created", "name", "labels"],
):
    records.extend(page)

print(len(records))
```

The code above shows all of the arguments you can pass into the `search_all()` function.


---

# Agent Instructions: 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:

```
GET https://docs.roboflow.com/developer/python-sdk/search-for-an-image.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
