Find an API

Search public APIs with auth details & Postman guides

← All APIs

Bitbucket API

bitbucket · Developer Tools

Developer Tools No Auth Free & Open developer_tools collaboration

Code against the Bitbucket API to automate simple tasks, embed Bitbucket data into your own site, build mobile or desktop apps, or even add custom UI add-ons into Bitbucket itself using the Connect framework.

Authentication

No authentication requiredFree to use with no key needed.

Sample Requests

GET List public repositories

Returns a paginated list of all public repositories. This endpoint also supports filtering and sorting of the results. See [filtering and sorting](/cloud/bitbucket/rest/intro/#filtering) for more details.

https://api.apis.guru/v2/specs/bitbucket.org/2.0/repositories?q=test&role=admin&sort=desc&after=example

Hover any highlighted part to learn what it does

curl -X GET "https://api.apis.guru/v2/specs/bitbucket.org/2.0/repositories?q=test&role=admin&sort=desc&after=example"
import requests
params = {
    "q": "test",
    "role": "admin",
    "sort": "desc",
    "after": "example"
}
response = requests.get(
    "https://api.apis.guru/v2/specs/bitbucket.org/2.0/repositories",
    params=params,
)
print(response.json())
const url = new URL('https://api.apis.guru/v2/specs/bitbucket.org/2.0/repositories');
url.searchParams.set('q', 'test');
url.searchParams.set('role', 'admin');
url.searchParams.set('sort', 'desc');
url.searchParams.set('after', 'example');

const response = await fetch(url); 
const data = await response.json();
console.log(data);
package main

import (
	"fmt"
	"io"
	"net/http"
	"net/url"
)

func main() {
	baseURL, _ := url.Parse("https://api.apis.guru/v2/specs/bitbucket.org/2.0/repositories")
	q := baseURL.Query()
	q.Set("q", "test")
	q.Set("role", "admin")
	q.Set("sort", "desc")
	q.Set("after", "example")
	baseURL.RawQuery = q.Encode()
	targetURL := baseURL.String()
	req, _ := http.NewRequest("GET", targetURL, nil)

	client := &http.Client{}
	resp, _ := client.Do(req)
	defer resp.Body.Close()
	body, _ := io.ReadAll(resp.Body)
	fmt.Println(string(body))
}
require "net/http"
require "json"

uri = URI("https://api.apis.guru/v2/specs/bitbucket.org/2.0/repositories")
uri.query = URI.encode_www_form({
  "q" => "test",
  "role" => "admin",
  "sort" => "desc",
  "after" => "example"
})

http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = uri.scheme == "https"

req = Net::HTTP::Get.new(uri)

res = http.request(req)
puts JSON.parse(res.body)
<?php
$url = "https://api.apis.guru/v2/specs/bitbucket.org/2.0/repositories?" . http_build_query([
    "q" => "test",
    "role" => "admin",
    "sort" => "desc",
    "after" => "example"
]);
$opts = ["http" => [
    "method" => "GET",
]];
$ctx = stream_context_create($opts);
$res = file_get_contents($url, false, $ctx);
print_r(json_decode($res, true));
GET List snippets

Returns all snippets. Like pull requests, repositories and workspaces, the full set of snippets is defined by what the current user has access to. This includes all snippets owned by any of the workspaces the user is a member of, or snippets by other users that the current user is either watching o

https://api.apis.guru/v2/specs/bitbucket.org/2.0/snippets?role=owner

Hover any highlighted part to learn what it does

curl -X GET "https://api.apis.guru/v2/specs/bitbucket.org/2.0/snippets?role=owner"
import requests
params = {
    "role": "owner"
}
response = requests.get(
    "https://api.apis.guru/v2/specs/bitbucket.org/2.0/snippets",
    params=params,
)
print(response.json())
const url = new URL('https://api.apis.guru/v2/specs/bitbucket.org/2.0/snippets');
url.searchParams.set('role', 'owner');

const response = await fetch(url); 
const data = await response.json();
console.log(data);
package main

import (
	"fmt"
	"io"
	"net/http"
	"net/url"
)

func main() {
	baseURL, _ := url.Parse("https://api.apis.guru/v2/specs/bitbucket.org/2.0/snippets")
	q := baseURL.Query()
	q.Set("role", "owner")
	baseURL.RawQuery = q.Encode()
	targetURL := baseURL.String()
	req, _ := http.NewRequest("GET", targetURL, nil)

	client := &http.Client{}
	resp, _ := client.Do(req)
	defer resp.Body.Close()
	body, _ := io.ReadAll(resp.Body)
	fmt.Println(string(body))
}
require "net/http"
require "json"

uri = URI("https://api.apis.guru/v2/specs/bitbucket.org/2.0/snippets")
uri.query = URI.encode_www_form({
  "role" => "owner"
})

http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = uri.scheme == "https"

req = Net::HTTP::Get.new(uri)

res = http.request(req)
puts JSON.parse(res.body)
<?php
$url = "https://api.apis.guru/v2/specs/bitbucket.org/2.0/snippets?" . http_build_query([
    "role" => "owner"
]);
$opts = ["http" => [
    "method" => "GET",
]];
$ctx = stream_context_create($opts);
$res = file_get_contents($url, false, $ctx);
print_r(json_decode($res, true));
GET List workspaces for user

Returns a list of workspaces accessible by the authenticated user. Example: ``` $ curl https://api.bitbucket.org/2.0/workspaces { "pagelen": 10, "page": 1, "size": 1, "values": [ { "uuid": "{a15fb181-db1f-48f7-b41f-e1eff06929d6}", "links": { "owners": {

https://api.apis.guru/v2/specs/bitbucket.org/2.0/workspaces?q=test&role=owner&sort=desc

Hover any highlighted part to learn what it does

curl -X GET "https://api.apis.guru/v2/specs/bitbucket.org/2.0/workspaces?q=test&role=owner&sort=desc"
import requests
params = {
    "q": "test",
    "role": "owner",
    "sort": "desc"
}
response = requests.get(
    "https://api.apis.guru/v2/specs/bitbucket.org/2.0/workspaces",
    params=params,
)
print(response.json())
const url = new URL('https://api.apis.guru/v2/specs/bitbucket.org/2.0/workspaces');
url.searchParams.set('q', 'test');
url.searchParams.set('role', 'owner');
url.searchParams.set('sort', 'desc');

const response = await fetch(url); 
const data = await response.json();
console.log(data);
package main

import (
	"fmt"
	"io"
	"net/http"
	"net/url"
)

func main() {
	baseURL, _ := url.Parse("https://api.apis.guru/v2/specs/bitbucket.org/2.0/workspaces")
	q := baseURL.Query()
	q.Set("q", "test")
	q.Set("role", "owner")
	q.Set("sort", "desc")
	baseURL.RawQuery = q.Encode()
	targetURL := baseURL.String()
	req, _ := http.NewRequest("GET", targetURL, nil)

	client := &http.Client{}
	resp, _ := client.Do(req)
	defer resp.Body.Close()
	body, _ := io.ReadAll(resp.Body)
	fmt.Println(string(body))
}
require "net/http"
require "json"

uri = URI("https://api.apis.guru/v2/specs/bitbucket.org/2.0/workspaces")
uri.query = URI.encode_www_form({
  "q" => "test",
  "role" => "owner",
  "sort" => "desc"
})

http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = uri.scheme == "https"

req = Net::HTTP::Get.new(uri)

res = http.request(req)
puts JSON.parse(res.body)
<?php
$url = "https://api.apis.guru/v2/specs/bitbucket.org/2.0/workspaces?" . http_build_query([
    "q" => "test",
    "role" => "owner",
    "sort" => "desc"
]);
$opts = ["http" => [
    "method" => "GET",
]];
$ctx = stream_context_create($opts);
$res = file_get_contents($url, false, $ctx);
print_r(json_decode($res, true));

Postman Setup Guide

Get Postman ↗
  1. See official documentation for authentication and setup.

What can you build with Bitbucket API?

Bitbucket API is a Developer Tools API. Developers commonly use developer tools APIs for:

  • automating code review and quality checks
  • integrating CI/CD pipelines and build systems
  • managing feature flags and A/B tests
  • monitoring errors and application performance
  • generating and validating test data

No authentication required. This API is open — no signup or key needed. Ideal for quick prototypes and public-facing features. Bitbucket API is free to use, making it a low-risk choice to experiment with.

New to APIs? Read our beginner's guide · Learn about API keys · What is REST?

Open documentation ↗