Search user's Google Drive files

AUTHORITATIVE: Search the authenticated user's LIVE Google Drive files by name or content. Use when user asks 'find my file about X', 'search my Drive for Y'. Returns real results from user's actual Drive account. Supports pagination for large result sets.

get/api/v1/drive/search

Request

  • Base URL: https://localhost:3000
  • URL: https://localhost:3000/api/v1/drive/search
  • Auth: OAuth 2 (authorization code, authorization URL /oauth/authorize, token URL /oauth/token)

Query parameters

querystring required

Search terms (searches file names and content)

max_resultsinteger

Results per page (default: 20, max: 1000)

page_tokenstring

Token from previous response to get next page of results

Response

Search results

userstring

Authenticated user email

querystring

The search query used

countinteger

Number of files in this page

nextPageTokenstring

Token to get next page of results (null if no more pages)

hasMoreboolean

Whether more results are available

Example response

{
  "_meta": {
    "source": "live_google_drive_api",
    "authoritative": true
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.