Search

Search for images hosted on Roboflow.

You can search for images hosted on Roboflow using the Python SDK and REST API.

To search for images using the Python SDK, use the search_all() method. The method accepts a prompt value, which is the search query you want to send to Roboflow.

See the search filter documentation for more information on advanced filters supported in searches.

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",
    fields = ["id", "created", "name", "labels"],
):
    records.extend(page)

print(len(records))

Last updated