Skip to main content
GET
/
public
/
v1
/
drive
/
search
cURL
curl -X GET "https://api.copera.app/public/v1/drive/search?q=report&limit=10" \
  -H "Authorization: Bearer YOUR_TOKEN"
{
  "hits": [
    {
      "_id": "<string>",
      "name": "<string>",
      "type": "<string>",
      "owner": "<string>",
      "createdAt": "<string>",
      "updatedAt": "<string>",
      "mimeType": "<string>",
      "size": 123,
      "parent": "<string>"
    }
  ],
  "totalHits": 123,
  "query": "<string>"
}

Documentation Index

Fetch the complete documentation index at: https://developer.copera.ai/llms.txt

Use this file to discover all available pages before exploring further.

Overview

Searches across all drive files and folders accessible to the authenticated user using full-text search. Results include relevance-based ordering for easy display.

Query Parameters

  • q (required): The search query string.
  • sortBy (optional): Field to sort results by (e.g., name, createdAt, updatedAt).
  • sortOrder (optional): Sort direction — asc or desc.
  • limit (optional): Maximum number of results to return.

Response

Returns an array of matching drive items with:
  • File or folder ID and name
  • Type (file or folder)
  • Parent folder reference
  • Relevance-based ordering

Authorizations

Authorization
string
header
required

Bearer token

Query Parameters

q
string
required

Search query string

sortBy

Sort field. Defaults to updatedAt.

Available options:
createdAt
sortOrder

Sort order. Defaults to desc.

Available options:
asc
limit
number

Max results (1-50). Defaults to 20.

Required range: 1 <= x <= 50

Response

Default Response

hits
object[]
required
totalHits
number
required
query
string
required