---
title: "Search a project"
method: GET
path: "/api/v4/projects/{id}/(-/)search"
tags: ["search", "projects"]
---

# Search a project

`GET /api/v4/projects/{id}/(-/)search`

## Request

- Base URL: `https://gitlab.com`
- URL: `https://gitlab.com/api/v4/projects/{id}/(-/)search`
- Auth: none declared

Searches for content in a specified project.

## Path parameters

- `id` string, required

## Query parameters

- `search` string, required
- `scope` 'issues' | 'work_items' | 'merge_requests' | 'milestones' | 'notes' | 'wiki_blobs' | 'commits' | 'blobs' | 'users', required
- `ref` string
- `state` 'all' | 'opened' | 'closed' | 'merged'
- `confidential` boolean
- `type` string[]
- `fields` string[]
- `num_context_lines` integer
- `regex` boolean
- `page` integer
- `per_page` integer

## Response `200`

Search a project

---

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