topics
Creates, updates, deletes, gets or lists a topics resource.
Overview
| Name | topics |
| Type | Resource |
| Id | github.search.topics |
Fields
The following fields are returned by SELECT queries:
- topics
Response
| Name | Datatype | Description |
|---|---|---|
incomplete_results | boolean | |
items | array | |
total_count | integer |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
topics | select | q | per_page, page | Find topics via various criteria. Results are sorted by best match. This method returns up to 100 results per page. See "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.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:featuredThis 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. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
q | string | 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 the web interface for GitHub. To learn more about the format of the query, see Constructing a search query. |
page | integer | The page number of the results to fetch. For more information, see "Using pagination in the REST API." |
per_page | integer | The number of results per page (max 100). For more information, see "Using pagination in the REST API." |
SELECT examples
- topics
Find topics via various criteria. Results are sorted by best match. This method returns up to 100 results per page. See "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.
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.
SELECT
incomplete_results,
items,
total_count
FROM github.search.topics
WHERE q = '{{ q }}' -- required
AND per_page = '{{ per_page }}'
AND page = '{{ page }}'
;