Search for shared drives

Users can search for shared drives in which they are a member, and specify the q parameter to filter results.

Domain administrators can search for all shared drives in the organization by setting the useDomainAdminAccess parameter with the drives.list method.

Use the q parameter to do a search query combining one or more search clauses. Each search clause is made up of three parts.

Attribute of the shared drive that is searched, e.g., the attribute name of the shared drive.
Test that is performed on the data to provide a match, e.g., contains.
The content of the attribute that is tested, e.g. the name of the shared drive My cool project.

Combine clauses with the conjunctions and or or, and negate the query with not.

Valid fields for drives.list

Field Value Type Operators Description
createdTime1 date <=, <, =, !=, >, >= Date when the shared drive was created.
hidden2 boolean =, != Specifies whether or not the shared drive is hidden.
memberCount1 number <=, <, =, !=, >, >= Number of users and groups that are members of the shared drive.
name1 string contains, =, != Name of the shared drive.
organizerCount1 number <=, <, =, !=, >, >= Number of users and groups that are organizers of the shared drive.

Value types

Value Type Notes
String Surround with single quotes '. Escape single quotes in queries with \', e.g., 'Valentine\'s Day'.
Boolean true or false.
Date RFC 3339 format, default timezone is UTC, e.g., 2012-06-04T12:00:00-08:00.
Number A numerical value.


Operator Notes
contains The content of one string is present in the other.
= The content of a string or boolean is equal to the other.
!= The content of a string or boolean is not equal to the other.
< A value is less than another
<= A value is less than or equal to another.
> A value is later than another.
>= A value is later than or equal to another.
and Return items that match both clauses.
or Return items that match either clause.
not Negates a search clause.

For compound clauses, you can use parentheses to group clauses together. For example:

createdTime > '2019-01-01T12:00:00' and (organizerCount > 5 or memberCount > 20)

This search returns all shared drives created after January 1st, 2019 that have more than 5 organizers or more than 20 members. Because and and or operators are evaluated from left to right, without parentheses the above example would return only shared drives with more than 5 organizers that were created after January 1st, 2019, but would return all shared drives with more than 20 members, even those created before January 1st, 2019.


All examples on this page show the unencoded q parameter, where organizerCount = 0 is encoded as organizerCount+%3d+0. Client libraries handle this encoding automatically.

Examples for drives.list

Search for shared drives with no assigned organizer

organizerCount = 0

Search for shared drives created after June 1, 2017

createdTime > '2017-06-01T12:00:00'

Search for shared drives with the word 'confidential' in the title and 20 or more members

name contains 'confidential' and memberCount >= 20