v9

latestOpenAPI 3.1.0raw.githubusercontent.com2026-03-1194110197.0 KB
Search

Grep package source

Regex search over public package source code (npm, PyPI, crates.io, Go modules).

post/packages/grep

Request body

registrystring required

Registry: crates_io, golang_proxy, npm, py_pi, or ruby_gems

package_namestring required

Package name

patternstring required

Regex pattern to search

versionstring nullable

Package version

languagestring nullable

Language filter

filename_sha256string nullable

File SHA256 filter

ainteger nullable

Lines after match

binteger nullable

Lines before match

cinteger nullable

Lines before and after match

head_limitinteger nullable

Limit results

output_modestring

Output mode: content, files_with_matches, or count

Response

Successful Response

{"stackTrail":"paths:/packages/grep:post:responses:200:content:application/json:schema","oasType":"schema","type":"unknown"}