search
Search for code or filenames in Bitbucket repositories. Filter by project, repository, and content or file type to find relevant code quickly.
Instructions
Search for code or files across Bitbucket repositories. Supports filtering by project, repository, and search type. Supports custom field selection via the fields param ('*all' for full raw response, 'file,hitCount' for a custom subset).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| type | No | Search type: "code" for content search, "file" for filename search. | |
| limit | No | Maximum number of results to return (default: 25, max: 100). | |
| query | Yes | Search query string. | |
| start | No | Start index for pagination (default: 0). | |
| fields | No | Comma-separated fields to return (dot notation for nested paths). Omit for a curated default; use '*all' for the full raw API response. | |
| project | No | Project key to scope the search. Defaults to BITBUCKET_DEFAULT_PROJECT. | |
| repository | No | Repository slug to scope the search. Requires project to be set. |