Add support for excluding keywords in repo search API #13095

Open
opened 2025-11-02 10:30:31 -06:00 by GiteaMirror · 0 comments
Owner

Originally created by @ErlingHauan on GitHub (Jun 3, 2024).

Feature Description

Hello,
I am writing to request a new feature for the Gitea API that allows users to exclude certain keywords from search results.

Current behavior:
Currently, the Gitea API provides a way to search repositories using the /repos/search endpoint with the q parameter for specifying the search query. However, there is no built-in support for excluding results that contain specific keywords. This limitation requires users to fetch all search results and manually filter them on the client side, which can be inefficient and cumbersome.

Proposed enhancement:
I propose adding a new query parameter, such as not, which can be used to specify keywords that should be excluded from the search results. This would streamline the search process and reduce the need for additional client-side filtering.

Example API Request:

GET /repos/search?q=your_query&not=keyword_to_exclude
Originally created by @ErlingHauan on GitHub (Jun 3, 2024). ### Feature Description Hello, I am writing to request a new feature for the Gitea API that allows users to exclude certain keywords from search results. **Current behavior:** Currently, the Gitea API provides a way to search repositories using the `/repos/search` endpoint with the `q` parameter for specifying the search query. However, there is no built-in support for excluding results that contain specific keywords. This limitation requires users to fetch all search results and manually filter them on the client side, which can be inefficient and cumbersome. **Proposed enhancement:** I propose adding a new query parameter, such as `not`, which can be used to specify keywords that should be excluded from the search results. This would streamline the search process and reduce the need for additional client-side filtering. **Example API Request:** ```http GET /repos/search?q=your_query&not=keyword_to_exclude ```
GiteaMirror added the topic/apitype/proposal labels 2025-11-02 10:30:31 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#13095