Skip to main content
GET
https://sandbox.getcollate.io/api
/
v1
/
search
/
query
GET /v1/search/query
from metadata.sdk import configure, get_client

configure(
    host="https://your-company.getcollate.io/api",
    jwt_token="your-jwt-token"
)
client = get_client()

# Search for tables matching "customer"
response = client.get("/search/query", params={
    "q": "customer",
    "index": "table_search_index",
    "from": 0,
    "size": 10
})

for hit in response["hits"]["hits"]:
    entity = hit["_source"]
    print(f"{entity['entityType']}: {entity['fullyQualifiedName']} (score: {hit['_score']})")
{
  "took": 8,
  "timed_out": false,
  "_shards": {
    "total": 1,
    "successful": 1,
    "failed": 0,
    "skipped": 0
  },
  "hits": {
    "total": {
      "value": 53,
      "relation": "eq"
    },
    "hits": [
      {
        "_index": "table_search_index",
        "_id": "455e3d9d-dbbf-455e-b3be-7191daa825f3",
        "_score": 2.3,
        "_source": {
          "id": "455e3d9d-dbbf-455e-b3be-7191daa825f3",
          "name": "dim_address",
          "fullyQualifiedName": "sample_data.ecommerce_db.shopify.dim_address",
          "entityType": "table",
          "serviceType": "BigQuery",
          "description": "Address dimension table",
          "owners": [],
          "tags": [],
          "columns": [
            {
              "name": "address_id",
              "dataType": "NUMERIC",
              "fullyQualifiedName": "sample_data.ecommerce_db.shopify.dim_address.address_id"
            }
          ]
        }
      }
    ]
  }
}

Search Entities

Full-text search across all entity types in the metadata catalog. Uses Elasticsearch query syntax under the hood.

Query Parameters

q
string
required
Search query string. Supports Elasticsearch query syntax including wildcards, boolean operators, and phrase matching.
index
string
default:"all"
Search index to query. Options: all, table_search_index, topic_search_index, dashboard_search_index, pipeline_search_index, mlmodel_search_index, container_search_index, search_entity_search_index, glossary_term_search_index, tag_search_index, user_search_index, team_search_index, domain_search_index, data_product_search_index.
from
integer
default:"0"
Starting offset for pagination.
size
integer
default:"10"
Number of results to return.
deleted
boolean
default:"false"
Include soft-deleted entities in the results.
sortField
string
Field to sort by (e.g., name, updatedAt, totalVotes).
sortOrder
string
Sort order: asc or desc.
trackTotalHits
boolean
default:"true"
Track exact total hit count. Set to false for faster queries when exact count is not needed.
getHierarchy
boolean
default:"false"
Include entity hierarchy in results.
fetchSource
boolean
default:"true"
Include the full source document in results. Set to false to return only metadata.
includeSourceFields
string
Comma-separated list of source fields to include. Use this to limit the response payload.
queryFilter
string
JSON query filter using Elasticsearch DSL. Applied before scoring.
postFilter
string
JSON post-filter using Elasticsearch DSL. Applied after scoring without affecting aggregations.
GET /v1/search/query
from metadata.sdk import configure, get_client

configure(
    host="https://your-company.getcollate.io/api",
    jwt_token="your-jwt-token"
)
client = get_client()

# Search for tables matching "customer"
response = client.get("/search/query", params={
    "q": "customer",
    "index": "table_search_index",
    "from": 0,
    "size": 10
})

for hit in response["hits"]["hits"]:
    entity = hit["_source"]
    print(f"{entity['entityType']}: {entity['fullyQualifiedName']} (score: {hit['_score']})")
{
  "took": 8,
  "timed_out": false,
  "_shards": {
    "total": 1,
    "successful": 1,
    "failed": 0,
    "skipped": 0
  },
  "hits": {
    "total": {
      "value": 53,
      "relation": "eq"
    },
    "hits": [
      {
        "_index": "table_search_index",
        "_id": "455e3d9d-dbbf-455e-b3be-7191daa825f3",
        "_score": 2.3,
        "_source": {
          "id": "455e3d9d-dbbf-455e-b3be-7191daa825f3",
          "name": "dim_address",
          "fullyQualifiedName": "sample_data.ecommerce_db.shopify.dim_address",
          "entityType": "table",
          "serviceType": "BigQuery",
          "description": "Address dimension table",
          "owners": [],
          "tags": [],
          "columns": [
            {
              "name": "address_id",
              "dataType": "NUMERIC",
              "fullyQualifiedName": "sample_data.ecommerce_db.shopify.dim_address.address_id"
            }
          ]
        }
      }
    ]
  }
}

Returns

Returns an Elasticsearch-style response containing matched entities ranked by relevance score.

Response

took
integer
Time in milliseconds the search took to execute.
timed_out
boolean
Whether the search timed out.
hits
object
Search results container.

Error Handling

CodeError TypeDescription
400BAD_REQUESTInvalid query syntax or parameters
401UNAUTHORIZEDInvalid or missing authentication token
403FORBIDDENUser lacks permission to search entities