---
title: "Search for media entities using rule triplets"
method: GET
path: "/genres/search"
tags: ["Genres", "Search"]
---

# Search for media entities using rule triplets

`GET /genres/search`

Provide operator plus one or more rule triplets. At minimum, rule_1, rule_1_operator, rule_1_input are required. Additional rules may be supplied as rule_2, rule_2_operator, rule_2_input, etc.

## Query parameters

- `operator` 'and' | 'or', required
- `random` boolean
- `offset` integer
- `limit` integer
- `rule_1` string, required
- `rule_1_operator` string, required
- `rule_1_input` string, required
- `rule_2` string
- `rule_2_operator` string
- `rule_2_input` string
- `rule_3` string
- `rule_3_operator` string
- `rule_3_input` string

## Response `200`

Search results

- GenresResponse
  - `total_count` integer, required
  - `md5` string, required
  - `genre` GenreObject[], required
    - `id` string, required
    - `name` string, nullable, required
    - `albums` integer, required
    - `artists` integer, required
    - `songs` integer, required
    - `videos` integer, required
    - `playlists` integer, required
    - `live_streams` integer, required
    - `is_hidden` boolean, required
    - `merge` GenreReference[], required
      - `id` string, required
      - `name` string, required

## Other responses

- `400` — HTTP 400 Bad Request (errors 4705, 4710).
- `401` — HTTP 401 Unauthorized (error 4701).
- `403` — HTTP 403 Forbidden (errors 4700, 4703, 4742).
- `500` — HTTP 500 Internal Server Error (error 4702).

## Changes

- **2026-07-22** `e8e6b266ea29` — 2 breaking, 4 info
  - for the `query` request parameter `limit`, default value `50` was removed
  - for the `query` request parameter `offset`, default value `0` was removed
  - api operation id `genre-search` removed and replaced with `searchGenres`
  - added the non-success response with the status `401`
  - …2 more
- **2026-07-21** `2ff18e50dcc1` — 3 info
  - added the required property `genre` to the response with the `200` status
  - added the required property `md5` to the response with the `200` status
  - added the required property `total_count` to the response with the `200` status
- **2026-07-17** `9abb9bf6d3bf` — 2 breaking
  - removed the media type `application/json` for the response with the status `200`
  - removed the media type `application/json` for the response with the status `400`
- **2026-07-14** `aaf4166bdf3a` — 1 info
  - added the media type `application/json` for the response with the status `200`
- **2026-06-25** `7ed7a764efd9` — 1 info
  - added the media type `application/json` for the response with the status `400`

[Full history](https://skmtc.dev/ampache/apis/ampache-rest-api/changes/genres/search/get.md)

---

[API](https://skmtc.dev/ampache/apis/ampache-rest-api.md) · [All operations](https://skmtc.dev/ampache/apis/ampache-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/ampache/ampache-rest-api/revisions/42d304fb6867/schema)
