diff --git a/api-reference/introduction.mdx b/api-reference/introduction.mdx index df09d0a..2032a6f 100644 --- a/api-reference/introduction.mdx +++ b/api-reference/introduction.mdx @@ -32,7 +32,7 @@ We offer a growing list of [first-party integrations](https://app.greptile.com/l - Optionally, use [`POST /search`](/api-reference/query) to search the repo or repos in natural language and get back just the list of relevant files, functions, classes etc., not the answer. + Optionally, use [`POST /search`](/api-reference/search) to search the repo or repos in natural language and get back just the list of relevant files, functions, classes etc., not the answer. diff --git a/api-reference/search.mdx b/api-reference/search.mdx new file mode 100644 index 0000000..e252cb7 --- /dev/null +++ b/api-reference/search.mdx @@ -0,0 +1,12 @@ +--- +title: 'Search Repo(s)' +openapi: 'POST /search' +--- + +Submit a natural language search query to find relevant code references without generating an AI response. + +Returns a list of relevant code files, functions, and snippets based on your search query, similar to the query endpoint but **without the AI-generated answer**. + +Use this endpoint when you only need the source references and don't need an AI explanation. + +Note: Before Greptile can search a repo, it must be indexed. See [Index Repository](/api-reference/index) for more information. \ No newline at end of file diff --git a/api-reference/search.txt b/api-reference/search.txt deleted file mode 100644 index 366682e..0000000 --- a/api-reference/search.txt +++ /dev/null @@ -1,14 +0,0 @@ ---- -title: 'Search Repo(s)' -openapi: 'POST /search' ---- - -Submit a natural language query about the codebase, get a list of relevant code references (filepaths, line numbers, etc). - -*Examples* - -1. "Code to provision new API keys" -2. "Functions that use recursion" -3. "Code that touches session management in any way" - -Note: Before Greptile can search a repo, it must be indexed. See [Index Repository](/api-reference/index) for more information. \ No newline at end of file diff --git a/docs.json b/docs.json index 6819f8c..c0be2a9 100644 --- a/docs.json +++ b/docs.json @@ -55,6 +55,7 @@ "api-reference/index", "api-reference/get-repository", "api-reference/query", + "api-reference/search", "api-reference/zapier" ] }