search

Search an instance

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

get/api/v4/search

Request

  • Base URL
    https://gitlab.com
  • Auth
    none declared

Query parameters

searchstring required

The expression it should be searched for

scope'wiki_blobs' | 'blobs' | 'commits' | 'notes' | 'projects' | 'issues' | 'work_items' | 'merge_requests' | 'milestones' | 'snippet_titles' | 'users' required

The scope of the search

state'all' | 'opened' | 'closed' | 'merged'

Filter results by state

confidentialboolean

Filter results by confidentiality

typestring[]

Filter work items by type. Only applies to work_items scope. Available types: issue, task, epic, incident, test_case, requirement, objective, key_result, ticket.

include_archivedboolean

Includes archived projects in the search. Introduced in GitLab 18.9.

fieldsstring[]

Array of fields you wish to search. Available with advanced search.

exclude_forksboolean

Excludes forked projects in the search. Available with exact code search. Introduced in GitLab 18.9.

num_context_linesinteger

Number of context lines around each match. Available with advanced and exact code search. Introduced in GitLab 18.11.

regexboolean

Performs a regex code search. Available with exact code search. Introduced in GitLab 18.9

pageinteger

Current page number

per_pageinteger

Number of items per page

Response

Search an instance

Changes

No recorded changes to this operation across all 5 revisions of this API.