For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Sign Up
DocumentationAPI ReferenceSDKs
DocumentationAPI ReferenceSDKs
  • Documents
    • Ingest Documents
    • Ingest Directories
    • POSTcrawl_website
    • GETget_processing_status_by_id
    • GETlist
    • GETget
    • GETlookup
    • DELdelete (singular)
    • DELdelete (multiple)
    • GETget_processes
    • POSTcopy
    • PUTupdate
    • DELcancel_process
    • GETget_extract
    • GETget_xray
  • Search
    • POSTsearch.content
    • POSTsearch.documents
  • Buckets
    • GETlist
    • GETget
    • POSTcreate
    • PUTupdate
    • DELdelete
  • Groups
    • GETlist
    • GETget
    • POSTcreate
    • PUTupdate
    • DELdelete
    • POSTaddBucket
    • DELremoveBucket
  • Workflows
    • GETlist
    • POSTcreate
    • GETget_account
    • POSTadd_to_account
    • DELremove_from_account
    • POSTadd_to_id
    • DELremove_from_id
    • GETget
    • PUTupdate
    • DELdelete
  • Customer
    • GETget
  • API Key
    • GETlist
    • POSTcreate
    • PUTupdate
    • DELdelete
  • Health
    • GETlist
    • GETget
Sign Up
LogoLogo
Search

search.content

POST
https://api.groundx.ai/api/v1/search/:id
POST
/api/v1/search/:id
1from groundx import GroundX
2
3client = GroundX(
4 api_key="YOUR_API_KEY_HERE",
5)
6
7client.search.content(
8 id=1,
9 query="climate change impact on agriculture",
10)
1{
2 "search": {
3 "count": 1,
4 "results": [
5 {
6 "boundingBoxes": [
7 {
8 "bottomRightX": 450.5,
9 "bottomRightY": 720.3,
10 "pageNumber": 3,
11 "topLeftX": 120,
12 "topLeftY": 680
13 }
14 ],
15 "bucketId": 42,
16 "chunkId": "chunk-9f8b7c6d",
17 "documentId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
18 "fileName": "Climate_Change_Report_2023.pdf",
19 "multimodalUrl": "https://cdn.groundx.ai/images/climate_fig3_clip.jpg",
20 "pageImages": [
21 "https://cdn.groundx.ai/pages/climate_report_page3.jpg"
22 ],
23 "pages": [
24 {
25 "height": 1123,
26 "imageUrl": "https://cdn.groundx.ai/pages/climate_report_page3.jpg",
27 "number": 3,
28 "width": 794
29 }
30 ],
31 "processId": "7e57d004-2b97-0e7a-b45f-5387367791cd",
32 "score": 92.7,
33 "searchData": {},
34 "sourceUrl": "https://www.environmentalagency.gov/reports/climate-change-2023",
35 "suggestedText": "Recent studies indicate significant impacts of climate change on crop yields, particularly in tropical regions.",
36 "text": "The report highlights that rising temperatures and altered precipitation patterns have led to a 15% decrease in staple crop yields over the past decade in affected areas."
37 }
38 ],
39 "query": "climate change impact on agriculture",
40 "score": 92.7,
41 "searchQuery": "climate change impact on agriculture",
42 "text": "Summary: Climate change is adversely affecting agricultural productivity, with notable yield reductions in key crops.",
43 "nextToken": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJwYWdlIjoyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c"
44 }
45}

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.

Was this page helpful?
Previous

search.documents

Next
Built with

Authentication

X-API-Keystring
API Key authentication via header

Path parameters

idinteger or stringRequired
The bucketId, groupId, 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

nintegerOptional1-100Defaults to 20

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

nextTokenstringOptional
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.
verbosityintegerOptional0-2

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

This endpoint expects an object.
querystringRequiredDefaults to my search query
The search query to be used to find relevant documentation.
filterobjectOptional

A dictionary of key-value pairs that can be used to pre-filter documents prior to a search.

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

Response

Search query success
searchobject

Errors

400
Bad Request Error
401
Unauthorized Error