file_system

Search files by relevance

Changed on

Ranks entries by words matched, typos, word proximity, name before folder, exact words, word position, exactness, the user's recent views, and recency.

get/api/projects/{project_id}/file_system/search/

Request

  • Base URL: https://us.posthog.com
  • URL: https://us.posthog.com/api/projects/{project_id}/file_system/search/
  • Auth: HTTP bearer

Path parameters

project_idstring required

Project ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/.

Query parameters

limitinteger

Maximum number of results to return, best first.

per_typeinteger

Also include the best matches of every type, up to this many per type, so each type can show a preview.

searchstring required

Search text. Supports the same field filters as the list search (type:, user:, path:, name:, negation with - or !). Free words are ranked by relevance.

Response

matched_all_wordsboolean required

True when every result contains every search word. False when no entry matched every word and the results match only some words.

matched_wordsstring[] required

Search words that the best result matched. Use it to tell the user which words were dropped when matched_all_words is false.

matched_with_typosboolean required

True when no entry matched the words as typed, so every result is a close spelling.

counts_cappedboolean required

True when the search stopped at its candidate limit, so type_counts are lower bounds.

Changes