Skip to main content
GET
/
v0
/
search
curl "https://api.getagentdrive.com/v0/search?q=annual+report&tags=2026&mime_type=application/pdf" \
  -H "Authorization: Bearer YOUR_API_KEY"
[
  {
    "id": "file_xyz789",
    "drive_id": "drv_abc123",
    "path": "documents/report.pdf",
    "filename": "annual-report.pdf",
    "mime_type": "application/pdf",
    "size": 24576,
    "content_hash": "sha256:abcdef1234567890",
    "content_preview": "Annual Report 2026 - Executive Summary...",
    "tags": ["report", "2026"],
    "metadata": { "author": "Jane Doe" },
    "created_at": "2026-01-15T10:30:00Z",
    "updated_at": "2026-03-19T08:15:00Z"
  }
]

Query Parameters

q
string
required
The search query string. Matches against file names and content previews.
drive_id
string
Limit the search to a specific drive.
tags
string
Filter by tags, specified as a comma-separated list (e.g., report,2026).
mime_type
string
Filter by MIME type. Supports wildcards (e.g., image/* to match all image types).
curl "https://api.getagentdrive.com/v0/search?q=annual+report&tags=2026&mime_type=application/pdf" \
  -H "Authorization: Bearer YOUR_API_KEY"
[
  {
    "id": "file_xyz789",
    "drive_id": "drv_abc123",
    "path": "documents/report.pdf",
    "filename": "annual-report.pdf",
    "mime_type": "application/pdf",
    "size": 24576,
    "content_hash": "sha256:abcdef1234567890",
    "content_preview": "Annual Report 2026 - Executive Summary...",
    "tags": ["report", "2026"],
    "metadata": { "author": "Jane Doe" },
    "created_at": "2026-01-15T10:30:00Z",
    "updated_at": "2026-03-19T08:15:00Z"
  }
]

Response

Returns an array of file records matching the search criteria. See Get File for the full response schema.