# Bitbucket API
> Read Bitbucket Cloud in real time — no token, no OAuth. Look up any public repository by "workspace/slug" for its full detail (description, language, size, fork policy, mainbranch, timestamps) and pull its commits, branches, tags, pull requests, watchers, forks and file tree (browse any directory at any branch/tag/commit). Inspect any workspace profile and list its public repositories. Pass repo as "workspace/slug" (or a bitbucket.org URL). Every call is live (no cache) and returns the upstream Bitbucket 2.0 shape, paginated with page + pagelen (max 100). 11 endpoints. Calls are routed through a rotating residential proxy so per-IP rate limits never bite. The sibling of our GitHub and GitLab APIs — built for dev dashboards, OSS analytics and repo monitoring across the Atlassian ecosystem. No upstream token, no cache.

## Authentication
All requests require your oanor API key in the `x-oanor-key` header. Get one at https://www.oanor.com/developer/keys.

```bash
curl -H "x-oanor-key: oanor_live_…" "https://api.oanor.com/bitbucket-api/..."
```

## Pricing
- **Free** (Free) — 1,850 calls/Mo, 2 req/s
- **Starter** ($10/Mo) — 51,000 calls/Mo, 8 req/s
- **Pro** ($29/Mo) — 258,000 calls/Mo, 20 req/s
- **Mega** ($66/Mo) — 1,260,000 calls/Mo, 50 req/s

## Endpoints

### Repository

#### `GET /v1/repo` — Repository detail

**Parameters:**
- `repo` (query, required, string) — Repository as workspace/slug (or bitbucket.org URL) Example: `atlassian/atlassian-event`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/bitbucket-api/v1/repo?repo=atlassian%2Fatlassian-event"
```

**Response:**
```json
{
    "data": {
        "scm": "git",
        "name": "Atlassian Event",
        "size": 2849158,
        "slug": "atlassian-event",
        "type": "repository",
        "uuid": "{3d76c1e2-d4bb-4baf-a957-ad7ba71f88c2}",
        "links": {
            "html": {
                "href": "https://bitbucket.org/atlassian/atlassian-event"
            },
            "self": {
                "href": "https://api.bitbucket.org/2.0/repositories/atlassian/atlassian-event"
            },
            "tags": {
                "href": "https://api.bitbucket.org/2.0/repositories/atlassian/atlassian-event/refs/tags"
            },
            "clone": [
                {
                    "href": "https://bitbucket.org/atlassian/atlassian-event.git",
                    "name": "https"
                },
                {
                    "href": "git@bitbucket.org:atlassian/atlassian-event.git",
                    "name": "ssh"
                }
            ],
            "forks": {
                "href": "https://api.bitbucket.org/2.0/repositories/atlassian/atlassian-event/forks"
            },
            "hooks": {
                "href": "https://api.bitbucket.org/2.0/repositories/atlassian/atlassian-event/hooks"
            },
            "avatar": {
                "href": "https://bytebucket.org/ravatar/%7B3d76c1e2-d4bb-4baf-a957-ad7ba71f88c2%7D?ts=default"
            },
            "source": {
                "href": "https://api.bitbucket.org/2.0/repositories/atlassian/at
…(truncated, see openapi.json for full schema)
```

#### `GET /v1/repo/branches` — Branches

**Parameters:**
- `repo` (query, required, string) — Repository as workspace/slug (or bitbucket.org URL) Example: `atlassian/atlassian-event`
- `pagelen` (query, optional, string) — Page size (max 100)

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/bitbucket-api/v1/repo/branches?repo=atlassian%2Fatlassian-event"
```

**Response:**
```json
{
    "data": {
        "next": "https://api.bitbucket.org/2.0/repositories/atlassian/atlassian-event/refs/branches?pagelen=30&page=2",
        "page": 1,
        "size": 49,
        "values": [
            {
                "name": "3.1.x",
                "type": "branch",
                "links": {
                    "html": {
                        "href": "https://bitbucket.org/atlassian/atlassian-event/branch/3.1.x"
                    },
                    "self": {
                        "href": "https://api.bitbucket.org/2.0/repositories/atlassian/atlassian-event/refs/branches/3.1.x"
                    },
                    "commits": {
                        "href": "https://api.bitbucket.org/2.0/repositories/atlassian/atlassian-event/commits/3.1.x"
                    },
                    "pullrequest_create": {
                        "href": "https://bitbucket.org/atlassian/atlassian-event/pull-requests/new?source=3.1.x&t=1"
                    }
                },
                "target": {
                    "date": "2024-10-08T09:47:34+00:00",
                    "hash": "8a22ad22211b98ff76223ca298c642230468cbd3",
                    "type": "commit",
                    "links": {
                        "diff": {
                            "href": "https://api.bitbucket.org/2.0/repositories/atlassian/atlassian-event/diff/8a22ad22211b98ff76223ca298c642230468cbd3"
                        },
                        "html": {
                        
…(truncated, see openapi.json for full schema)
```

#### `GET /v1/repo/commits` — Commits

**Parameters:**
- `repo` (query, required, string) — Repository as workspace/slug (or bitbucket.org URL) Example: `atlassian/atlassian-event`
- `pagelen` (query, optional, string) — Page size (max 100)

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/bitbucket-api/v1/repo/commits?repo=atlassian%2Fatlassian-event"
```

**Response:**
```json
{
    "data": {
        "next": "https://api.bitbucket.org/2.0/repositories/atlassian/atlassian-event/commits?pagelen=30&page=2&ctx=d617150a8ee9cb6e10fdd662f9a0ae0b",
        "values": [
            {
                "date": "2026-05-13T13:43:05+00:00",
                "hash": "d39478cc0180167a2104323cc78d67fb3716bb24",
                "type": "commit",
                "links": {
                    "diff": {
                        "href": "https://api.bitbucket.org/2.0/repositories/atlassian/atlassian-event/diff/d39478cc0180167a2104323cc78d67fb3716bb24"
                    },
                    "html": {
                        "href": "https://bitbucket.org/atlassian/atlassian-event/commits/d39478cc0180167a2104323cc78d67fb3716bb24"
                    },
                    "self": {
                        "href": "https://api.bitbucket.org/2.0/repositories/atlassian/atlassian-event/commit/d39478cc0180167a2104323cc78d67fb3716bb24"
                    },
                    "patch": {
                        "href": "https://api.bitbucket.org/2.0/repositories/atlassian/atlassian-event/patch/d39478cc0180167a2104323cc78d67fb3716bb24"
                    },
                    "approve": {
                        "href": "https://api.bitbucket.org/2.0/repositories/atlassian/atlassian-event/commit/d39478cc0180167a2104323cc78d67fb3716bb24/approve"
                    },
                    "comments": {
                        "href": "https://api.bitbucket.org/2.0/repositorie
…(truncated, see openapi.json for full schema)
```

#### `GET /v1/repo/forks` — Forks

**Parameters:**
- `repo` (query, required, string) — Repository as workspace/slug (or bitbucket.org URL) Example: `atlassian/atlassian-event`
- `pagelen` (query, optional, string) — Page size (max 100)

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/bitbucket-api/v1/repo/forks?repo=atlassian%2Fatlassian-event"
```

**Response:**
```json
{
    "data": {
        "page": 1,
        "size": 0,
        "values": [],
        "pagelen": 30
    },
    "meta": {
        "timestamp": "2026-06-02T16:52:14.392Z",
        "request_id": "3431cfbf-4af7-4c3b-85c5-ecd19efc6cde"
    },
    "status": "ok",
    "message": "Repository forks",
    "success": true
}
```

#### `GET /v1/repo/pullrequests` — Pull requests

**Parameters:**
- `repo` (query, required, string) — Repository as workspace/slug (or bitbucket.org URL) Example: `atlassian/atlassian-event`
- `state` (query, optional, string) — OPEN|MERGED|DECLINED|SUPERSEDED
- `pagelen` (query, optional, string) — Page size (max 100)

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/bitbucket-api/v1/repo/pullrequests?repo=atlassian%2Fatlassian-event"
```

**Response:**
```json
{
    "data": {
        "page": 1,
        "size": 6,
        "values": [
            {
                "id": 219,
                "type": "pullrequest",
                "draft": false,
                "links": {
                    "diff": {
                        "href": "https://api.bitbucket.org/2.0/repositories/atlassian/atlassian-event/diff/atlassian/atlassian-event:6315b3bac849%0Decdc2efc4f27?from_pullrequest_id=219&topic=true"
                    },
                    "html": {
                        "href": "https://bitbucket.org/atlassian/atlassian-event/pull-requests/219"
                    },
                    "self": {
                        "href": "https://api.bitbucket.org/2.0/repositories/atlassian/atlassian-event/pullrequests/219"
                    },
                    "merge": {
                        "href": "https://api.bitbucket.org/2.0/repositories/atlassian/atlassian-event/pullrequests/219/merge"
                    },
                    "approve": {
                        "href": "https://api.bitbucket.org/2.0/repositories/atlassian/atlassian-event/pullrequests/219/approve"
                    },
                    "commits": {
                        "href": "https://api.bitbucket.org/2.0/repositories/atlassian/atlassian-event/pullrequests/219/commits"
                    },
                    "decline": {
                        "href": "https://api.bitbucket.org/2.0/repositories/atlassian/atlassian-event/pullrequests/219/decline"
  
…(truncated, see openapi.json for full schema)
```

#### `GET /v1/repo/src` — File tree

**Parameters:**
- `repo` (query, required, string) — Repository as workspace/slug (or bitbucket.org URL) Example: `atlassian/atlassian-event`
- `path` (query, optional, string) — Directory path
- `ref` (query, optional, string) — Branch/tag/commit

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/bitbucket-api/v1/repo/src?repo=atlassian%2Fatlassian-event"
```

**Response:**
```json
{
    "data": {
        "ref": "master",
        "path": "/",
        "count": 2,
        "entries": [
            {
                "path": ".gitignore",
                "size": 19,
                "type": "commit_file",
                "commit": "8047fe879513ff5a470b7994aedef94fdcab9b72"
            },
            {
                "path": "README.md",
                "size": 187,
                "type": "commit_file",
                "commit": "8047fe879513ff5a470b7994aedef94fdcab9b72"
            }
        ]
    },
    "meta": {
        "timestamp": "2026-06-02T16:52:16.626Z",
        "request_id": "42be9856-a48b-4757-92b0-c998a4147e5f"
    },
    "status": "ok",
    "message": "Repository file tree",
    "success": true
}
```

#### `GET /v1/repo/tags` — Tags

**Parameters:**
- `repo` (query, required, string) — Repository as workspace/slug (or bitbucket.org URL) Example: `atlassian/atlassian-event`
- `pagelen` (query, optional, string) — Page size (max 100)

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/bitbucket-api/v1/repo/tags?repo=atlassian%2Fatlassian-event"
```

**Response:**
```json
{
    "data": {
        "next": "https://api.bitbucket.org/2.0/repositories/atlassian/atlassian-event/refs/tags?pagelen=30&page=2",
        "page": 1,
        "size": 91,
        "values": [
            {
                "date": null,
                "name": "atlassian-event-0.2",
                "type": "tag",
                "links": {
                    "html": {
                        "href": "https://bitbucket.org/atlassian/atlassian-event/commits/tag/atlassian-event-0.2"
                    },
                    "self": {
                        "href": "https://api.bitbucket.org/2.0/repositories/atlassian/atlassian-event/refs/tags/atlassian-event-0.2"
                    },
                    "commits": {
                        "href": "https://api.bitbucket.org/2.0/repositories/atlassian/atlassian-event/commits/atlassian-event-0.2"
                    }
                },
                "tagger": null,
                "target": {
                    "date": "2010-10-08T18:38:42+00:00",
                    "hash": "7603a42e6ae2e4b8239fd97ad0de9dc46fe2cbec",
                    "type": "commit",
                    "links": {
                        "diff": {
                            "href": "https://api.bitbucket.org/2.0/repositories/atlassian/atlassian-event/diff/7603a42e6ae2e4b8239fd97ad0de9dc46fe2cbec"
                        },
                        "html": {
                            "href": "https://bitbucket.org/atlassian/atlassian-event/commits/760
…(truncated, see openapi.json for full schema)
```

#### `GET /v1/repo/watchers` — Watchers

**Parameters:**
- `repo` (query, required, string) — Repository as workspace/slug (or bitbucket.org URL) Example: `atlassian/atlassian-event`
- `pagelen` (query, optional, string) — Page size (max 100)

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/bitbucket-api/v1/repo/watchers?repo=atlassian%2Fatlassian-event"
```

**Response:**
```json
{
    "data": {
        "page": 1,
        "size": 2,
        "values": [
            {
                "type": "team",
                "uuid": "{02b941e3-cfaa-40f9-9a58-cec53e20bdc3}",
                "links": {
                    "html": {
                        "href": "https://bitbucket.org/%7B02b941e3-cfaa-40f9-9a58-cec53e20bdc3%7D/"
                    },
                    "self": {
                        "href": "https://api.bitbucket.org/2.0/workspaces/%7B02b941e3-cfaa-40f9-9a58-cec53e20bdc3%7D"
                    },
                    "avatar": {
                        "href": "https://bitbucket.org/account/atlassian/avatar/"
                    }
                },
                "username": "atlassian",
                "display_name": "Atlassian"
            },
            {
                "type": "user",
                "uuid": "{4d37aca5-6370-453b-8561-85c1beacaf2c}",
                "links": {
                    "html": {
                        "href": "https://bitbucket.org/%7B4d37aca5-6370-453b-8561-85c1beacaf2c%7D/"
                    },
                    "self": {
                        "href": "https://api.bitbucket.org/2.0/users/%7B4d37aca5-6370-453b-8561-85c1beacaf2c%7D"
                    },
                    "avatar": {
                        "href": "https://avatar-management--avatars.us-west-2.prod.public.atl-paas.net/557057:4952e210-38b5-4515-9c16-bf7fbd9d81a6/79d5ce53-8d49-4fd3-83a2-cef342c05922/128"
                    }
       
…(truncated, see openapi.json for full schema)
```

### Workspace

#### `GET /v1/workspace` — Workspace profile

**Parameters:**
- `workspace` (query, required, string) — Workspace id Example: `atlassian`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/bitbucket-api/v1/workspace?workspace=atlassian"
```

**Response:**
```json
{
    "data": {
        "name": "Atlassian",
        "slug": "atlassian",
        "type": "workspace",
        "uuid": "{02b941e3-cfaa-40f9-9a58-cec53e20bdc3}",
        "links": {
            "html": {
                "href": "https://bitbucket.org/atlassian/"
            },
            "self": {
                "href": "https://api.bitbucket.org/2.0/workspaces/atlassian"
            },
            "hooks": {
                "href": "https://api.bitbucket.org/2.0/workspaces/atlassian/hooks"
            },
            "avatar": {
                "href": "https://bitbucket.org/workspaces/atlassian/avatar/?ts=1760749566"
            },
            "owners": {
                "href": "https://api.bitbucket.org/2.0/workspaces/atlassian/members?q=permission%3D%22owner%22"
            },
            "members": {
                "href": "https://api.bitbucket.org/2.0/workspaces/atlassian/members"
            },
            "projects": {
                "href": "https://api.bitbucket.org/2.0/workspaces/atlassian/projects"
            },
            "snippets": {
                "href": "https://api.bitbucket.org/2.0/snippets/atlassian"
            },
            "repositories": {
                "href": "https://api.bitbucket.org/2.0/repositories/atlassian"
            },
            "html_overview": {
                "href": "https://bitbucket.org/atlassian/workspace/overview/"
            }
        },
        "created_on": "2018-11-29T02:26:39.297476+00:00",
        "is_private": tr
…(truncated, see openapi.json for full schema)
```

#### `GET /v1/workspace/repos` — Workspace repositories

**Parameters:**
- `workspace` (query, required, string) — Workspace id Example: `atlassian`
- `pagelen` (query, optional, string) — Page size (max 100)

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/bitbucket-api/v1/workspace/repos?workspace=atlassian"
```

**Response:**
```json
{
    "data": {
        "next": "https://api.bitbucket.org/2.0/repositories/atlassian?sort=-updated_on&pagelen=30&page=2",
        "page": 1,
        "size": 408,
        "values": [
            {
                "scm": "git",
                "name": "atlassian-connect-spring-boot",
                "size": 9008523,
                "slug": "atlassian-connect-spring-boot",
                "type": "repository",
                "uuid": "{4b29f711-fe1c-43aa-bc77-5db7a7430fed}",
                "links": {
                    "html": {
                        "href": "https://bitbucket.org/atlassian/atlassian-connect-spring-boot"
                    },
                    "self": {
                        "href": "https://api.bitbucket.org/2.0/repositories/atlassian/atlassian-connect-spring-boot"
                    },
                    "tags": {
                        "href": "https://api.bitbucket.org/2.0/repositories/atlassian/atlassian-connect-spring-boot/refs/tags"
                    },
                    "clone": [
                        {
                            "href": "https://bitbucket.org/atlassian/atlassian-connect-spring-boot.git",
                            "name": "https"
                        },
                        {
                            "href": "git@bitbucket.org:atlassian/atlassian-connect-spring-boot.git",
                            "name": "ssh"
                        }
                    ],
                    "forks": {
              
…(truncated, see openapi.json for full schema)
```

### Meta

#### `GET /v1/meta` — Spec

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/bitbucket-api/v1/meta"
```

**Response:**
```json
{
    "data": {
        "auth": "none upstream (no token); this gateway requires x-api-key",
        "name": "Bitbucket API",
        "note": "Public repositories (detail, commits, branches, tags, pull requests, watchers, forks, file tree) and workspaces (profile + repository list). Pass repo as 'workspace/slug'. Live, no cache; paginated with page + pagelen (max 100). (Member lists and global repo search require auth on Bitbucket and are not exposed.)",
        "source": "Bitbucket Cloud API 2.0 (api.bitbucket.org/2.0), unauthenticated public read — via rotating proxy",
        "endpoints": 11
    },
    "meta": {
        "timestamp": "2026-06-02T16:52:20.378Z",
        "request_id": "a027379b-1d24-4a26-8b79-5a5d8b3644c5"
    },
    "status": "ok",
    "message": "Meta",
    "success": true
}
```


---
Marketplace page: https://www.oanor.com/api/bitbucket-api
OpenAPI spec: https://www.oanor.com/api/bitbucket-api/openapi.json
