dev.knotless.searchCode

Searches the default branches of the public repositories an appview indexes, in Zoekt's query language: words and quoted text as substrings, ignoring case unless the query holds a capital, a regular expression between slashes, and filters such as file:, lang: and case:yes. No authentication needed. Repositories taken down are left out. An appview that searches no code answers 501.

Details · query
Kindquery
Authorityknotless.dev
Indexed

Query

query · GET

Parameters

query string

cursor

string

How many files the pages before held. The pages go 200 files deep at most.

  • maxLength: 32

limit

integer

The most files to answer with.

  • minimum: 1
  • maximum: 50
  • default: 20

q

requiredstring

What to search for.

  • maxLength: 1000

repo

string · at-uri

Only this repository's dev.knotless.repo record, its authority a DID or a handle.

Output

application/json

cursor

string

Absent on the last page, and once the pages are 200 files deep.

fileCount

requiredinteger

How many files the query found in all, of which files are the best.

  • minimum: 0

files

requiredarray
itemsref
Reference

The languages of the files found, counting those its lang: filters leave out, most files first: of the first 1000 files at most. The first page alone lists them.

itemsref
Reference

matchCount

requiredinteger

How many matches the query found in all.

  • minimum: 0

#chunk

object

Lines of a file holding matches, with a line on either side.

Properties

content

requiredstring

The lines, each after the first following a newline, with no newline at the end.

What its highlighting paints over the content, encoded as dev.knotless.getFile's ranges are, the lines read alone. Absent for a language with no grammar.

ranges

requiredarray
itemsref
Reference

startLine

requiredinteger

The first line's number, from 1.

  • minimum: 1

#fileView

object

A file the query found, with the lines around what it found there.

Properties

chunks

requiredarray

Runs of lines holding matches, in order. Empty when only the path matched.

itemsref
Reference

commit

string

The commit of the default branch that was indexed, whose lines these are: a page of the file links there, as the branch may have moved since.

  • maxLength: 64

language

string

What it is written in, as Zoekt names it from its extension or contents.

  • maxLength: 100

path

requiredstring

The file's path in the repository's default branch.

  • maxLength: 4096

repo

requiredref

#languageCount

object

A language files were found in, and how many.

Properties

color

string

Its color, as linguist has it. Absent for a language with none known here.

files

requiredinteger
  • minimum: 1

name

requiredstring

As Zoekt names it, and lang: takes it.

#range

object

A match, or the part of one on one line.

Properties

byteEnd

requiredinteger

Where it ends, in UTF-8 bytes, exclusive.

  • minimum: 0

byteStart

requiredinteger

Where the match starts on the line, in its UTF-8 bytes.

  • minimum: 0

line

requiredinteger

The line's number, from 1.

  • minimum: 1

Similar lexicons

semantic match

Lexicons whose schemas describe something close to this one. Check them before publishing a new one that overlaps.