# sort on GET /search/code stops working

Calls to GET /search/code, query parameter sort on GitHub REST API stopped working on April 10, 2023.

## What to use instead

None: code search results are always sorted by best match; sort client-side if needed.

- API: GitHub REST API (api.github.com)
- Kind: Parameter removal
- Announced: March 10, 2023
- Takes effect: April 10, 2023
- Calls after that day: fail
- Calls it hits: `GET /search/code`, `query parameter sort`
- Source: [Announcement](https://github.blog/changelog/2023-03-10-changes-to-the-code-search-api)
- Verified: November 6, 2026, against GitHub REST API's own pages
- Page: https://www.okapi.bot/providers/github-rest-api/breaking-changes/sort-on-get-search-code-stops-working/

## GitHub REST API's words

> We are deprecating support for sorting code search results. Once these changes take effect, all code search results will be sorted by best match.

Okapi finds the calls this change hits in your repo and opens the pull request with the fix: https://github.com/apps/okapi-agent
