Search

search.content

Search documents on GroundX for the most relevant information to a given query.

The result of this query is typically used in one of two ways; result['search']['text'] can be used to provide context to a language model, facilitating RAG, or result['search']['results'] can be used to observe chunks of text which are relevant to the query, facilitating citation.

Interact with the "Request Body" below to explore the arguments of this function. Enter your GroundX API key to send a request directly from this web page. Select your language of choice to structure a code snippet based on your specified arguments.

post/v1/search/{id}

Path parameters

integer required
OR
string uuid required

The bucketId, groupId, projectId, or documentId to be searched. The document or documents within the specified container will be compared to the query, and relevant information will be extracted.

Query parameters

ninteger

The maximum number of returned search results. Accepts 1-100 with a default of 20.

nextTokenstring
Example:eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9

A token for pagination. If the number of search results for a given query is larger than n, the response will include a "nextToken" value. That token can be included in this field to retrieve the next batch of n search results.

verbosityinteger

The amount of data returned with each search result. 0 == no search results, only the recommended context. 1 == search results but no searchData. 2 == search results and searchData.

Request body

querystring required

The search query to be used to find relevant documentation.

relevancenumber float

The minimum search relevance score required to include the result. By default, this is 10.0.

Example request

{
  "query": "my search query",
  "relevance": 10
}

Response

Search query success

Changes

Changed in 14 of the 50 revisions of this API.6317

    • path request parameter id list-of-types was widened by adding types string

      request-parameter-list-of-types-widened

    • for the path request parameter id, the type was generalized from integer to no type

      request-parameter-type-generalized

    • path request parameter id list-of-types was narrowed by removing types string

      request-parameter-list-of-types-narrowed

    • for the path request parameter id, the type changed from no type to integer

      request-parameter-type-changed

    • path request parameter id list-of-types was widened by adding types string

      request-parameter-list-of-types-widened

    • for the path request parameter id, the type was generalized from integer to no type

      request-parameter-type-generalized

    • added the new optional request property

      new-optional-request-property

    • added the optional property /// to the response with the status

      response-optional-property-added

    • added the optional property /// to the response with the status

      response-optional-property-added

    • added the optional property /// to the response with the status

      response-optional-property-added

    • added the optional property /// to the response with the status

      response-optional-property-added

    • added the new optional query request parameter verbosity

      new-optional-request-parameter

    • added the optional property /// to the response with the status

      response-optional-property-added

    • the request property default value my search query was added

      request-property-default-value-added

  • 072146bdd1f9111See the full diff
    • added the new required request property

      new-required-request-property

    • removed the request property

      request-property-removed

    • added the new optional query request parameter nextToken

      new-optional-request-parameter

  • 3bb56505863611See the full diff
    • removed the optional property /// from the response with the status

      response-optional-property-removed

    • added the optional property /// to the response with the status

      response-optional-property-added

    This revision also has 3 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog