It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

[BitBucket] Does BitBucket have a public code search API?

Ishtiaque Zafar Nov 15, 2017

I have gone through the REST API docs for BB cloud but could not find any documentation for Code Search. Is it public? If not, then, are there any plans to make it public in the near future?

2 answers

1 accepted

0 votes
Answer accepted
Martin Jopson Atlassian Team Jan 11, 2018

Hi @Ishtiaque Zafar,

We're working on the public API for code search in Bitbucket Cloud and it will be available in the near future.

Kind regards,
Martin

Product Manager
Bitbucket Cloud

Martin Jopson Atlassian Team Apr 08, 2018

The code search public API is now available, 

https://blog.bitbucket.org/2018/04/05/bitbucket-code-search-api-now-available

Kind regards,
Martin

Product Manager
Bitbucket Cloud

0 votes
Gonchik Tsymzhitov Community Leader Nov 15, 2017

Hi! 

I have not found in documentation, but you can use method 

using develop mode. 3.PNG

 

Where I got this request.  

api.bitbucket.org/internal/search/account/%7Bf728b512-c0be-4020-9168-23bb4e04c486%7D/code?q=repo%3Aconfluence-newcode-macro-plugin%20import&fields=%2Bcode.values.repository.mainbranch.name%2C%2Bcode.values.repository.mainbranch.target.hash

 

Hence you can use it. 

 

Hope it helps.

 

Cheers,

Gonchik Tsymzhitov

Ishtiaque Zafar Nov 16, 2017

Hi Gonchik Tsymzhitov,

I had already seen the networks requests in my browser's developer tools. But on seeing it, I noticed that is uses the /internal path.

api.bitbucket.org/internal/search

It seems that is some internal API which they have not made public. So is it safe to use or illegal to use?

Suggest an answer

Log in or Sign up to answer
This widget could not be displayed.
This widget could not be displayed.
Community showcase
Published in Bitbucket Pipelines

Building a Bitbucket Pipe as a casual coder

...ipe.sh :  #!/bin/bash source "$(dirname "$0")/common.sh" enable_debug extra_args="" if [[ "${DEBUG}" == "true" ]]; then extra_args="--verbose" fi # mandatory variables R...

3,242 views 1 22
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you