---
title: "Search an instance"
method: GET
path: "/api/v4/search"
tags: ["search"]
---

# Search an instance

`GET /api/v4/search`

## Request

- Base URL: `https://gitlab.com`
- URL: `https://gitlab.com/api/v4/search`
- Auth: none declared

Searches for a term across the entire GitLab instance. The response depends on the requested scope.

## Query parameters

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

## Response `200`

Search an instance

---

[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)
