---
title: "Sonar Query Search"
method: POST
path: "/api/3/sonar_queries/search"
tags: ["Asset Discovery"]
---

# Sonar Query Search

`POST /api/3/sonar_queries/search`

Executes a Sonar query to discover assets with the given search criteria.

## Request body

- SonarCriteria — The criteria for a Sonar query.
  - `filters` SonarCriterion[] — The filters in the Sonar query.
    - `days` integer — If the field is `scan-date-within-the-last`, the number of days to search against.
    - `domain` string — If the field is `domain-contains`, the domain to search against.
    - `lower` string — If the field is `ip-address-range`, the lower limit of the search.
    - `type` 'domain-contains' | 'scan-date-within-the-last' | 'ip-address-range' — The type of query to perform.
    - `upper` string — If the field is `ip-address-range`, the upper limit of the search.

## Response `200`

OK

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `500` — Internal Server Error
- `503` — Service Unavailable

---

[API](https://skmtc.net/rapid7/apis/rapid7-vm-api.md) · [All operations](https://skmtc.net/rapid7/apis/rapid7-vm-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/rapid7/rapid7-vm-api/revisions/3a8197c22d71/schema)
