There have exiting API can get all commits from the branch
https://developer.atlassian.com/bitbucket/api/2/reference/resource/repositories/%7Bworkspace%7D/%7Brepo_slug%7D/commits#get
What I'm trying to do is search commits by some keywords in the committed message, this can be done from the WebGUI but seems not provided in v2 REST API ?