Search the files of a site
Lines matching a regular expression (ripgrep style; regex=false for plain text) in the project's text files, case-insensitive by default. glob and under narrow the files, context adds lines around each match, output=files lists only the matching files. Bounded: at most 100 results, and truncated says when there are more.
GET/v1/sites/{site_id}/search
Requires sites:read.
When truncated is true, narrow the search with under or a more specific query.
Authorizations
Authorizationbearerin headerrequiredPath parameters
site_idstringrequiredThe site's id, or its slug (the address before .atelier201.page).
Query parameters
querystringrequiredlength: 1–500 charsA regular expression (ripgrep style), or plain text with regex=false.
regexbooleanDefault true. false searches the text literally.
case_sensitivebooleanDefault false.
understringlength: ≤ 300 charsOnly search under this folder.
globstringlength: ≤ 200 charsOnly search files matching this glob, e.g. .astro or src/**/.css.
contextintegerrange: 0–5Lines of context before and after each match (like grep -C). Default 0.
outputenum<string>one of: lines, fileslines (default): each matching line. files: only the files that match, with their number of matching lines.
limitintegerrange: 1–100revisionstringlength: 40–40 charsA Git commit id (40 hex characters) of the site's repository.
Response
Search the files of a site
dataobjectrequiredrequest_idstringrequiredPossible codes: invalid_request, unknown_field, invalid_parameter, invalid_cursor
errorobjectrequiredrequest_idstringrequiredPossible codes: authentication_required, invalid_api_key, api_key_expired, api_key_revoked
errorobjectrequiredrequest_idstringrequiredPossible codes: insufficient_credits
errorobjectrequiredrequest_idstringrequiredPossible codes: insufficient_scope, feature_not_available, admin_required
errorobjectrequiredrequest_idstringrequiredPossible codes: resource_not_found
errorobjectrequiredrequest_idstringrequiredPossible codes: conflict, result_not_ready, idempotency_key_reused
errorobjectrequiredrequest_idstringrequiredPossible codes: result_expired
errorobjectrequiredrequest_idstringrequiredPossible codes: request_too_large
errorobjectrequiredrequest_idstringrequiredPossible codes: request_too_large_for_plan
errorobjectrequiredrequest_idstringrequiredPossible codes: rate_limited
errorobjectrequiredrequest_idstringrequiredPossible codes: internal_error
errorobjectrequiredrequest_idstringrequiredPossible codes: service_unavailable
errorobjectrequiredrequest_idstringrequired