SearXNG is a free internet metasearch engine which aggregates results from various search services and databases. Users are neither tracked nor profiled.
Find a file
Filip Mikina 6b57705e50
[feat] engines: add GitHub Code Search engine (#5074)
This patch adds GitHub Code Search [1] engine to allow querying the codebases.

Template code.html is changed to allow passthrough of strip and highlighting
options.

Engine Searchcode is adjusted to pass filename and not rely on hardcoded
extensions.

GitHub search code API does not return the exact code line indices, this
implementation assigns the code arbitrary numbers starting from 1
(effectively relabeling the code).

The API allows for unauth calls, and the default engine settings default to
that, although the calls are heavily rate limited.

The 'text' lexer is the default pygments lexer when parsing fails.

[1] https://docs.github.com/en/rest/search/search?apiVersion=2022-11-28#search-code

Co-authored-by: Markus Heiser <markus.heiser@darmarIT.de>
2025-08-20 07:35:31 +02:00
.devcontainer [fix] devcontainers: missing Valkey package (#4997) 2025-07-11 16:51:58 +02:00
.github [mod] theme/simple: migrate codebase to TypeScript 2025-08-18 16:38:32 +02:00
.vscode Add GitHub Codespaces configuration 2023-03-21 20:58:13 +00:00
client/simple [upd] web-client (simple): Bump the minor group across 1 directory with 6 updates (#5128) 2025-08-18 23:17:50 +02:00
container [fix] container: change mirror (#5127) 2025-08-18 21:33:27 +02:00
docs [feat] engines: add GitHub Code Search engine (#5074) 2025-08-20 07:35:31 +02:00
searx [feat] engines: add GitHub Code Search engine (#5074) 2025-08-20 07:35:31 +02:00
searxng_extra [license] client/simple: SPDX-License-Identifier: AGPL-3.0-or-later 2025-08-18 16:38:32 +02:00
tests [feat] engines: add GitHub Code Search engine (#5074) 2025-08-20 07:35:31 +02:00
utils [mod] switching from pyright to basedpyright (plus first rules) 2025-08-19 12:04:35 +02:00
.coveragerc [mod] use github actions instead of travis 2020-11-17 15:09:06 +01:00
.dir-locals-template.el [fix] .dir-locals.el -> .dir-locals-template.el 2024-03-29 08:57:02 +01:00
.dockerignore [enh] container: tidy builds (#5086) 2025-08-07 10:46:26 +02:00
.editorconfig [mod] theme/simple: migrate codebase to TypeScript 2025-08-18 16:38:32 +02:00
.gitattributes [fix] update .gitattributes 2021-06-22 20:34:39 +02:00
.gitignore [mod] add Golang ecosystem to the SearXNG toolchain 2025-07-28 12:53:26 +02:00
.nvmrc [mod] theme/simple: migrate codebase to TypeScript 2025-08-18 16:38:32 +02:00
.pylintrc [upd] pypi: Bump pylint from 3.2.7 to 3.3.1 2024-10-15 14:29:10 +02:00
.tool-versions [mod] theme/simple: migrate codebase to TypeScript 2025-08-18 16:38:32 +02:00
.weblate weblate: migration to https://translate.codeberg.org/ 2023-01-21 15:45:12 +00:00
.yamllint.yml [enh] add test.yamllint - lint yaml files 2021-06-05 17:41:24 +02:00
AUTHORS.rst [feat] engines: add GitHub Code Search engine (#5074) 2025-08-20 07:35:31 +02:00
babel.cfg [fix] jinja/babel: WithExtension and AutoEscapeExtension are built-in now. 2022-03-25 09:42:12 +01:00
CHANGELOG.rst [releases] rolling release: commit history replaces the CHANGELOG 2023-05-06 14:49:33 +02:00
CONTRIBUTING.md fix(docs): Fix development quickstart url 2024-01-06 16:20:38 +01:00
go.mod [mod] create a Go project with the developer tools from Go 2025-07-28 12:53:26 +02:00
go.sum [mod] create a Go project with the developer tools from Go 2025-07-28 12:53:26 +02:00
LICENSE [fix] full AGPLv3+ license according to #382 2015-07-04 18:23:54 +02:00
Makefile [mod] switching from pyright to basedpyright (plus first rules) 2025-08-19 12:04:35 +02:00
manage [fix] add missing nvm environment to the "./manage dev.env" command 2025-08-18 16:38:32 +02:00
package.json [mod] switching from pyright to basedpyright (plus first rules) 2025-08-19 12:04:35 +02:00
PULL_REQUEST_TEMPLATE.md [chore] fix typo and spacing in pull request template 2023-09-15 10:46:51 +02:00
pyrightconfig.json [mod] switching from pyright to basedpyright (plus first rules) 2025-08-19 12:04:35 +02:00
README.rst [README] Updated logo paths 2025-03-07 13:40:31 +01:00
requirements-dev.txt [mod] switching from pyright to basedpyright (plus first rules) 2025-08-19 12:04:35 +02:00
requirements-server.txt [upd] pypi: Bump the minor group with 2 updates (#5077) 2025-08-01 10:55:45 +02:00
requirements.txt [upd] pypi: Bump the minor group across 1 directory with 2 updates (#5126) 2025-08-18 20:00:37 +02:00
SECURITY.md [enh] add security policy 2022-01-25 00:56:20 +01:00
setup.py [mod] Revision of the favicon solution 2024-10-05 08:18:28 +02:00



Privacy-respecting, hackable metasearch engine

Searx.space lists ready-to-use running instances.

A user, admin and developer handbook is available on the homepage.

SearXNG install SearXNG homepage SearXNG wiki AGPL License Issues commits weblate SearXNG logo


Contact

Ask questions or chat with the SearXNG community (this not a chatbot) on

IRC

#searxng on libera.chat which is bridged to Matrix.

Matrix

#searxng:matrix.org

Setup

Translations

Help translate SearXNG at Weblate

Contributing

Are you a developer? Have a look at our development quickstart guide, it's very easy to contribute. Additionally we have a developer documentation.

Codespaces

You can contribute from your browser using GitHub Codespaces:

  • Fork the repository
  • Click on the <> Code green button
  • Click on the Codespaces tab instead of Local
  • Click on Create codespace on master
  • VSCode is going to start in the browser
  • Wait for git pull && make install to appear and then disappear
  • You have 120 hours per month (see also your list of existing Codespaces)
  • You can start SearXNG using make run in the terminal or by pressing Ctrl+Shift+B