Code Search API

Find code by describing what it does

A natural language code search API. Describe a function in any of 100+ languages and find it.

Sign up for Vecstore

100 free credits on sign up. No card required.

retry a request with exponential backoff
1fn send_with_backoff(req: &Request, max: u32) -> Result<Response> {
2 for i in 0..max {
3 if let Ok(res) = req.send() { return Ok(res); }
4 sleep(Duration::from_millis(100 << i));
5 }
6 Err(Error::Timeout)
7}

Vecstore code search helps with

Insert functions and snippets once, then find them by meaning. No guessing names or grepping for keywords.

Internal code search

Find the helper someone already wrote instead of writing it again.

"parse a date string"

Context for AI tools

Pull the functions that matter into a prompt before the model writes code.

"where do we check tokens"

Snippet libraries

Let people search your examples and docs by the problem they have.

"upload a file to S3"
1 Any language

Search your code in any of 100+ languages, not just English.

Your team doesn't have to search in English. The same question in any language finds the same code.

hashPassword(plain)
hash a password تشفير كلمة المرور 对密码进行哈希 hashear una contraseña パスワードをハッシュ化する Passwort hashen पासवर्ड हैश करें

Search by what it does when you don't know what it's called.

show file size like 2.4 MB formatBytes(n)

Any programming language in the same database.

Rust Python TypeScript JavaScript Go Java Kotlin Swift C# C++ C Ruby PHP Scala Elixir Dart SQL Bash and more
2 How it works

Add your code through the API, then search it in plain words.

Insert code

Send a function, a file or a snippet through the API.

def slugify(text):

It gets indexed

Vecstore stores what the code does, not just its words.

No setup per language

Search in plain words

Describe the job and get the functions that do it.

"make a url-friendly string"

Code search questions

What is natural language code search?

It finds code by what it does instead of what it is called. You describe the job in plain words, like "hash a password", and get back functions such as hashPassword() or hash_password(), even when they share no words with your query.

Which languages can I search in?

Queries work in 100+ languages, including English, Arabic, Chinese, Spanish and Japanese. The code itself can be in any programming language, such as Rust, Python, TypeScript, Go or Java.

How do I add my code?

Insert functions, files or snippets through the API, the same way you insert any text. Each one becomes searchable by meaning, with no setup per programming language.

How fast is code search?

In our tests on 10 million records, a search took 3-4ms. Turning your query into a vector adds about 20ms.

Can I use it to give context to AI coding tools?

Yes. Search returns the functions most related to a question, which you can pass to a model as context before it writes or changes code.

Add code search to your app in an afternoon.

85M+ searches powered by Vecstore this year

Sign up for Vecstore
Start for Free

100 Free credits. No credit card required.