Searches files in the connected Google Drive by full text, name or type and returns names, links, owners and dates.
curl -X POST "https://api.primaryapi.com/v1/run/drive.search" \
-H "Authorization: Bearer $PRIMARYAPI_API_KEY" \
-H "Content-Type: application/json" \
-d '{"query":"Q4","limit":2}'{
"output": {
"found": true,
"data": {
"incompleteSearch": false,
"nextCursor": "eyJ0IjoidG9rMiJ9",
"files": [
{
"name": "Q4 plan",
"shared": false,
"starred": true,
"trashed": false, …
}
]
}
},
"credits": 1
}Input and output
8 fields
Q4.query (full-text search) keeps Drive’s own order.2.14 fields
Good to know
Runs as your connected Google account (read-only Drive access).
Returns file metadata and links, not file contents.
Run the call again to refresh them.
One page per call. Send nextCursor back as cursor to read the next page.
The same key and credits work for every API.