Search query
GET P/search takes these query parameters. Lists are comma separated (kind=image,video); the Node client’s files.search() takes arrays and builds them. How search matches is on Search.
Parameters
Section titled “Parameters”| Parameter | Meaning |
|---|---|
q |
Words and “quoted phrases” |
in |
Where q matches: name (names that start with q, ignoring case), keywords (whole words in the name, title, description, tags, category, department and custom values), content (whole words in the text extracted from documents, see Searching inside documents). Default name,keywords: whole words, or names that start with q when no whole word matches. See What q matches |
folder_id |
Only files in this folder |
recursive |
true: also its subfolders |
kind |
image, video, audio, pdf, document, spreadsheet, presentation, text, archive, other |
mime_type, extension |
Exact types or extensions |
created_from, created_to, updated_from, updated_to |
ISO dates or date-times |
status |
draft, in_review, approved, rejected, archived |
visibility |
private, application, public |
state |
available (default), trashed (only items the caller may delete), quarantined |
owner_id, created_by_user_id, created_by_client_id |
Ids |
department, category |
Exact values |
tags, tags_match |
Tags; any (default) or all of them |
external_ref |
Your own id, exact |
min_size, max_size |
Bytes |
custom.<key> |
An exact value of your own metadata; up to five keys |
sort |
relevance (only with q; the default with q; a name-only match sorts by name), name, created_at, updated_at (the default without q), size |
order |
asc or desc |
after, limit |
Paging: default 50, at most 200 |
The answer
Section titled “The answer”{ "items": [ { "type": "file", "file_id": "01J9Z6S9Q5F5R6Y2W2GZ3B3K4D", "name": "spring-brochure.pdf", "…": "…", "highlights": [ { "field": "name", "snippet": "spring-brochure.pdf" } ] } ], "next_cursor": "01J9Z6S9Q5F5R6Y2W2GZ3B3K4D", "total": 12, "provider": "standard"}- Each item is a file, with
my_actionsfor the caller and, whenqmatched, up to threehighlights: the field and a plain-text excerpt around the first match. A match in a document’s text isfield: "content", at most 200 characters, with…where it was cut. totalis exact up to 10,000, thennull: keep paging withnext_cursor. Within=content, relevance pages through the best 1,000 matches; other sorts through every match.providernames the search engine in use; do not depend on its value.
Errors
Section titled “Errors”invalid_request for a malformed parameter, invalid_cursor, invalid_limit, and too_many_scopes for a user whose access spans more than 5,000 folder scopes (add folder_id).