---
title: "Search"
method: POST
path: "/data/projects/{projectId}/search"
tags: ["Data -- Catalogs"]
---

# Search

`POST /data/projects/{projectId}/search`

## Request

- Base URL: `https://partner.peaka.studio/api/v1`
- URL: `https://partner.peaka.studio/api/v1/data/projects/{projectId}/search`
- Auth: HTTP bearer

Search for catalogs, schemas, and tables across the project. You can filter the search results by specifying a catalog or schema. You can also specify a limit and offset for pagination.


See the request body for more details.

## Path parameters

- `projectId` string, required

## Request body

- SearchRequest
  - `catalog` string: Catalog Query Name. Search only for that catalog.
  - `schema` string: Schema Name. Search only for that schema. If catalog is also given, find the tables under catalog.schema.*
  - `query` string: Search term. Does a case-insensitive contains search.
  - `limit` integer: Number of results to return. Default is 100.
  - `offset` integer: Number of results to skip. Default is 0.

## Response `200`

Successful Search

- SearchResult
  - `matchedCatalogs` CatalogSchemaTable[]: Catalogs matched.
    - `catalog` string: Catalog Query Name
    - `schema` string: Schema Name
    - `table` string: Table Name
  - `matchedSchemas` CatalogSchemaTable[]: Schemas matched.
    - `catalog` string: Catalog Query Name
    - `schema` string: Schema Name
    - `table` string: Table Name
  - `matchedTables` CatalogSchemaTable[]: Tables matched.
    - `catalog` string: Catalog Query Name
    - `schema` string: Schema Name
    - `table` string: Table Name
  - `meta` Meta
    - `page` Page
      - `limit` integer
      - `offset` integer
      - `nextOffset` integer
    - `query` Query: A saved query belonging to a project.
      - `id` string: The ID of the query.
      - `displayName` string: The display name of the query.
      - `name` string: The name of the query used in SQL, e.g. SELECT * FROM "peaka"."query"."<name>". For a MATERIALIZED query the materialized result is queryable as "peaka"."mtquery"."<name>".
      - `inputQuery` string: The SQL query. For a materialized query created from an existing query (via inputQueryRefId), this holds the snapshot of the source query's SQL resolved when the query was created or last updated with the reference.
      - `queryType` 'PLAIN' | 'MATERIALIZED': The type of the query.
      - `schedule` MaterializedQuerySchedule, nullable: Schedule configuration of a materialized query. Provide EITHER an interval schedule (`type=interval` with `repeatDuration`) OR a cron schedule (`type=cron` with `cronExpression` and optional `timezone`). Use `type=none` for no schedule. The fields that do not apply to the chosen type are omitted.
        - `type` 'interval' | 'cron' | 'none': Type of schedule.
        - `cronExpression` string, nullable: UNIX cron expression (minute hour day-of-month month day-of-week), e.g. '0 0 * * *' for every day at midnight. Set only when the schedule type is 'cron'.
        - `repeatDuration` string, nullable: ISO-8601 duration between refreshes, e.g. 'PT6H' (every 6 hours), 'PT12H' (twice daily), 'P1D' (daily). Set only when the schedule type is 'interval'.
        - `timezone` string, nullable: IANA timezone used to evaluate the cron expression, e.g. 'UTC' or 'Europe/Istanbul'. Set only when the schedule type is 'cron'.
      - `path` string, nullable: The folder path of the query (e.g. "/analytics/dashboards"). Null if not in any folder.
      - `folderId` string, nullable: The ID of the folder containing this query. Null if not in any folder.

---

[API](https://skmtc.dev/peaka/apis/peaka-gateway-api.md) · [All operations](https://skmtc.dev/peaka/apis/peaka-gateway-api/llms.txt) · [OpenAPI document](https://skmtc.dev/peaka/apis/peaka-gateway-api/revisions/e68b033a22d5?raw)
