---
title: "Search topics"
method: GET
path: "/search/topics"
tags: ["search"]
---

# Search topics

`GET /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/enterprise-server@3.8/rest/guides/using-pagination-in-the-rest-api). See "[Searching topics](https://docs.github.com/enterprise-server@3.8/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/enterprise-server@3.8/rest/search/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.

## Query parameters

- `q` string, required
- `per_page` integer
- `page` integer

## Response `200`

Response

- object
  - `total_count` integer, required
  - `incomplete_results` boolean, required
  - `items` TopicSearchResultItem[], required
    - `name` string, required
    - `display_name` string, nullable, required
    - `short_description` string, nullable, required
    - `description` string, nullable, required
    - `created_by` string, nullable, required
    - `released` string, nullable, required
    - `created_at` string, date-time, required
    - `updated_at` string, date-time, required
    - `featured` boolean, required
    - `curated` boolean, required
    - `score` number, required
    - `repository_count` integer, nullable
    - `logo_url` string, uri, nullable
    - `text_matches` object[]
      - `object_url` string
      - `object_type` string, nullable
      - `property` string
      - `fragment` string
      - `matches` object[]
        - `text` string
        - `indices` integer[]
    - `related` object[], nullable
      - `topic_relation` object
        - `id` integer
        - `name` string
        - `topic_id` integer
        - `relation_type` string
    - `aliases` object[], nullable
      - `topic_relation` object
        - `id` integer
        - `name` string
        - `topic_id` integer
        - `relation_type` string

## Other responses

- `304` — Not modified

---

[API](https://skmtc.net/github/apis/github-v3-rest-api-7.md) · [All operations](https://skmtc.net/github/apis/github-v3-rest-api-7/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/github/github-v3-rest-api-7/versions/5438365412fe/schema)
