Lesstep
Bitbucket Cloud · REST API · Checked November 2, 2026

Bitbucket Cloud's old code search API answers 410 Gone from November 3, 2026

Scripts and tools that search code through GET /2.0/workspaces/{workspace}/search/code (or the users and teams versions) start failing on November 3, 2026. Bitbucket Cloud switches the API off in brownouts that get longer each day, and on November 15 it is gone. The replacement is POST /2.0/workspaces/{workspace}/codesearch. Changing the URL is not enough: the method, the request, the credentials, the paging and the answer are all different. Source: Bitbucket Cloud changelog, October 26, 2026.

The dates

On each brownout day, the API is off from 00:00, 06:00, 12:00 and 18:00 UTC for:

Days (2026, UTC)Each brownout
November 3 and 415 minutes
November 5 and 61 hour
November 7 and 82 hours
November 9 and 103 hours
November 11 and 124 hours
November 13 and 145 hours
From November 15, 00:00Removed

During a brownout the old endpoints answer HTTP 410 Gone, with a message that links to the new API's documentation. Between brownouts they still work. On November 13 and 14 they are off 20 hours of the day. The endpoints affected:

GET /2.0/workspaces/{workspace}/search/code
GET /2.0/teams/{team}/search/code
GET /2.0/users/{user}/search/code

Old and new side by side

From the Bitbucket Cloud REST reference (Search code in a workspace). We called both on November 2 without credentials; the rest is from the reference.

OldNew
RequestGET …/search/code?search_query=foo repo:demoPOST …/codesearch with a JSON body and Content-Type: application/json (anything else: 415)
ScopeA workspace, team or userA workspace only
The searchOne string in the web UI's syntaxquery.search_term, plus query.filters for repository, path, language and the like
CredentialsA public workspace answered without any (200 for us)A credential that identifies a user: without one, 401 (our test). App passwords, API keys and Atlassian Connect JWT get 403, and so do users who are not members of the workspace
Pagespage, pagelen and a next linkA cursor: request_id and pagination.next_cursor, until pagination.has_more is false. config.max_results 1 to 100, 50 by default
Resultsvalues[].file.path, content_matches[].lines[]matched_files[].path, matched_files[].matched_chunks[] with source_code and line_range
Countsizemetadata.total_count, approximate and only on the first page

The reference gives 403 to anyone who is not a member of the workspace. Searching another workspace's public repositories, which the old API allowed without signing in, is not offered by the new one.

The new request

The credential the reference names first is an Atlassian API token with both repository:read and workspace:read, sent with Basic authentication and your Atlassian account e-mail. A repository, project or workspace access token works too. This does what search_query=foo repo:demo did:

curl -u '{e-mail}:{API token}' \
  -H 'Content-Type: application/json' \
  -d '{"query": {"search_term": "foo",
                 "filters": {"attribute": "repository", "eq": "demo"}}}' \
  https://api.bitbucket.org/2.0/workspaces/{workspace}/codesearch

For the next page, send the same query again with "request_id" set to the id of the answer and "pagination": {"next_cursor": "…"} from it. The search term and the filters must not change between pages, or the answer is 400.

The modifiers of the old string become filters, each with eq or, for path and repository, wildcard:

In the old stringFilter
repo:demo{"attribute": "repository", "eq": "demo"}
path:src{"attribute": "path", "eq": "src"}
lang:go{"attribute": "language", "eq": "go"}
extension:go{"attribute": "extension", "eq": "go"}
forks:true{"attribute": "forks", "eq": "true"}, on its own
AND, OR, NOT{"and": […]}, {"or": […]}, {"not": {…}}

The new API searches each repository's default branch, and a branches filter set to "true" searches every indexed branch. A namespace filter is refused with 400: the workspace in the URL sets it.

Backstage's Bitbucket Cloud discovery

Backstage's Bitbucket Cloud entity provider finds catalog-info.yaml files with the old API, since its pull request #9924 of March 2022. On November 2, 2026, plugins/bitbucket-cloud-common/src/BitbucketCloudClient.ts on Backstage's main branch still calls /workspaces/{workspace}/search/code, and searching the repository's issues and pull requests found none about the change. Expect its discovery runs to fail during the brownouts and to stop finding files on November 15, until a Backstage release moves to the new API. Locations listed by hand under catalog.locations do not use code search.

Is your code calling it?

Search your scripts, CI jobs and integrations for search/code and search_query=. A brownout on November 3 or 4 shows it too: a job that fails with 410 for 15 minutes at 00:00, 06:00, 12:00 or 18:00 UTC uses the old API.

Bitbucket pull requests in IntelliJ IDEA

Pull Request Inbox for Bitbucket, a plugin by Lesstep for JetBrains IDEs 2024.1 or later, does not use the code search API, so this change does not touch it. It brings Bitbucket Cloud and Data Center pull requests into the IDE: the review inbox, diffs and discussions are free; approving, commenting and merging are Pro (US$1.50 a month, with a 30-day trial).

Get it on JetBrains Marketplace

Bitbucket and Atlassian are trademarks of Atlassian; IntelliJ IDEA is a trademark of JetBrains s.r.o.; Backstage is a project of the Cloud Native Computing Foundation. This page is not affiliated with or endorsed by any of them.

More Bitbucket Cloud changes this autumn: Git Credential Manager before 3.0.0 is blocked on November 30 · SSH moves to ssh.bitbucket.org, brownouts from November 12 · "error: 410" after app passwords · 日本語