v2-api
v2-api-package-search

Grep package source

Changed on

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

post/packages/grep

Request

  • The document declares no server URL.
  • Auth
    none declared

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

unknown required

Changes