---
title: "Search Templates"
method: GET
path: "/v2/template/search"
tags: ["template/v2"]
---

# Search Templates

`GET /v2/template/search`

Search templates with filtering, sorting, and faceting capabilities

## Query parameters

- `scope` 'public' | 'private' | 'public_private'
- `limit` integer
- `offset` integer
- `fields` string
- `sort_asc` string
- `sort_desc` string
- `q` string
- `highlight` boolean
- `facet_size` integer

## Headers

- `X-Team-Id` string

## Response `200`

Successful search response

- object
  - `results` TemplateData[], required
    - `uri` string — The URI of the template (could be a path or a ksuid)
    - `id` string — The ID of the template
    - `name` string — The name of the template
    - `author` string[] — The authors of the template
    - `tags` string[] — The tags of the template
    - `severity` string — The severity of the template
    - `type` string — The type of the template
    - `dir` string
    - `ref` string
    - `vendor` string — The vendor of the template
    - `product` string — The product of the template
    - `classification` Classification — Classification of template including additional metadata like cve-id, cwe-id etc
      - `cve-id` string[] — CVE IDs for the template
      - `cwe-id` string[] — CWE IDs for the template
      - `cvss-metrics` string — CVSS Metrics for the template
      - `cvss-score` number, float — CVSS Score for the template
      - `epss-score` number, float — EPSS Score for the template
      - `epss-percentile` number, float — EPSS Percentile for the template
      - `cpe` string — CPE for the template
    - `metadata` object
    - `digest` string — The digest of the template
    - `created_at` string, date-time — The time when template was created
    - `updated_at` string, date-time — The time when template was updated
    - `release_tag` string — The release tag of the template (contains tag when the file was first released)
    - `is_early` boolean — True if template is in early access
    - `raw` string — The raw unparsed template
    - `template_id` string
    - `description` string
    - `filename` string
    - `impact` string
    - `ai_meta` AIMeta
      - `model_used` string — The AI model used to generate the template
      - `is_prompt_by_human` boolean — Whether the prompt was written by a human
      - `is_template_by_human` boolean — Whether the template was written by a human
      - `prompt` string — The prompt used to generate the template
    - `references` string[]
    - `template_type` 'public' | 'user' | 'shared'
    - `is_draft` boolean
    - `is_github` boolean
    - `is_new` boolean
    - `is_pdteam` boolean — Is the template from pdteam
    - `remediation` string
  - `total` integer, required — Total number of matching results
  - `count` integer, required — Number of results in this response
  - `facets` TemplateStats, required
    - `is_new` StatBuckets
      - `buckets` object
      - `missing` integer
      - `other` integer
      - `total` integer
    - `creation_stats` StatBuckets
      - `buckets` object
      - `missing` integer
      - `other` integer
      - `total` integer
    - `author` StatBuckets
      - `buckets` object
      - `missing` integer
      - `other` integer
      - `total` integer
    - `is_early` StatBuckets
      - `buckets` object
      - `missing` integer
      - `other` integer
      - `total` integer
    - `dir` StatBuckets
      - `buckets` object
      - `missing` integer
      - `other` integer
      - `total` integer
    - `product` StatBuckets
      - `buckets` object
      - `missing` integer
      - `other` integer
      - `total` integer
    - `severity` StatBuckets
      - `buckets` object
      - `missing` integer
      - `other` integer
      - `total` integer
    - `tags` StatBuckets
      - `buckets` object
      - `missing` integer
      - `other` integer
      - `total` integer
    - `type` StatBuckets
      - `buckets` object
      - `missing` integer
      - `other` integer
      - `total` integer
    - `vendor` StatBuckets
      - `buckets` object
      - `missing` integer
      - `other` integer
      - `total` integer
  - `message` string

## Other responses

- `400` — Example response
- `401` — Example response
- `500` — Example response
- `default` — Example response

---

[API](https://skmtc.net/projectdiscovery/apis/pdcp-api.md) · [All operations](https://skmtc.net/projectdiscovery/apis/pdcp-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/projectdiscovery/pdcp-api/versions/220f0adf9efd/schema)
