search_code
Find code across GitHub repositories using GitHub code search syntax. Optionally narrow to a specific repository and adjust results per page.
Instructions
Search code with GitHub code search syntax.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| repo | No | Optional "owner/repo" to restrict the search to one repository. | |
| query | Yes | Code search query, e.g. "addEventListener language:python". | |
| per_page | No | Results per page, max 100 (default 20). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |