You can search for devices matching certain attributes with the
[`mobiledevices.list`](https://developers.google.com/workspace/admin/directory/v1/reference/mobiledevices/list)
method of the Directory API. This method accepts the `query` parameter which is
a search query combining one or more search clauses. Each search clause is made
up of three parts:

Field
:   Device attribute that is searched. For example, `serial`.

Operator
:   Test that is performed on the data to provide a match. For example, the `:`
    operator tests if a text attribute *matches* a value.

Value
:   The content of the attribute that is tested. For example, `serialNumber`.

Multiple clauses are separated by whitespace and are implicitly joined by an
`AND` operator.

> [!NOTE]
> **Note:** Most device data updates within 1 hour, however, it may take up to 36 hours for new data to be reflected in all search results.

## Examples

All queries use the [`mobiledevices.list`](https://developers.google.com/workspace/admin/directory/v1/reference/mobiledevices/list)
method, which has an HTTP request similar to the following (line breaks included for readability):

```
GET https://admin.googleapis.com/admin/directory/v1/customer/customerId/devices/mobile
?query=query parameters
```

The `query` parameters must be URL encoded. For example, the query
`query=brand:goo*` is URL encoded as `query=brand%3goo*`.
All examples on this page show unencoded `query` parameters.
Client libraries handle this URL encoding automatically.

Search for devices matching an serial number prefix

    serial:525*

Search for devices with email starting with fred

    email:fred* email:contact*

> [!NOTE]
> **Note:** For a complete list of mobile device fields, refer to [Personal device search fields](https://developers.google.com/workspace/admin/directory/v1/search-operators).