Skip to main content

Search topics

Find topics via various criteria. Results are sorted by best match. This method returns up to 100 results [per page](https://docs.github.com/[email protected]/rest/overview/resources-in-the-rest-api#pagination). See "[Searching topics](https://docs.github.com/articles/searching-topics/)" for a detailed list of qualifiers. When searching for topics, you can get text match metadata for the topic's **short\_description**, **description**, **name**, or **display\_name** field when you pass the `text-match` media type. For more details about how to receive highlighted search results, see [Text match metadata](https://docs.github.com/[email protected]/rest/reference/search#text-match-metadata). For example, if you want to search for topics related to Ruby that are featured on https://github.com/topics. Your query might look like this: `q=ruby+is:featured` This query searches for topics with the keyword `ruby` and limits the results to find only topics that are featured. The topics that are the best match for the query appear first in the search results.

GET/search/topics
Source
github-v3-rest.json
Revision
f5f067c1e6f6
Active snapshot
85e53e3d0d65

Request

Query Parameters
q string
required

The query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub. The REST API supports the same qualifiers as GitHub.com. To learn more about the format of the query, see [Constructing a search query](https://docs.github.com/[email protected]/rest/reference/search#constructing-a-search-query).

per_page integer
optional

Results per page (max 100)

page integer
optional

Page number of the results to fetch.

Responses

application/json object

Response

incomplete_results boolean
required
items array[Topic Search Result Item object]
required
items Topic Search Result Item object

Topic Search Result Item

aliases array[object]
optionalnullable
created_at string<date-time>
required
created_by string
requirednullable
curated boolean
required
description string
requirednullable
display_name string
requirednullable
featured boolean
required
logo_url string<uri>
optionalnullable
name string
required
related array[object]
optionalnullable
released string
requirednullable
repository_count integer
optionalnullable
score number
required
short_description string
requirednullable
text_matches Search Result Text Matches array[object]
optional
updated_at string<date-time>
required
total_count integer
required

Not modified

application/json object

Preview header missing

documentation_url string
required
message string
required