Autypo is a blazing-fast .NET library for fuzzy autocomplete, typo correction, and short-string search. Designed for structured data and autocomplete-first experiences, it supports per-token configuration, background indexing. For full integration with ASP.NET Core, use Autypo.AspNetCore.
$ dotnet add package AutypoBlazing-fast autocomplete and typo-tolerant search for .NET
Autypo is a powerful, developer-friendly search engine for autocomplete, fuzzy matching, and short-string lookups. Whether you're building a product search bar, form helper, or CLI — Autypo makes it effortless to deliver typo-tolerant, fast, and intelligent user experiences.
Autypo works out-of-the-box — no config required. Just provide your data and start getting intelligent completions.
using Autypo;
using Autypo.Configuration;
string[] movies = [
"The Lord of the Rings: The Return of the King",
"Star Wars: Return of the Jedi",
"Batman Returns"
];
IAutypoComplete autypoComplete = await AutypoFactory.CreateCompleteAsync(config => config
.WithDataSource(movies));
IEnumerable<string> suggestions = autypoComplete.Complete("retur of the");
// → "Star Wars: Return of the Jedi", "The Lord of the Rings: The Return of the King"
suggestions = autypoComplete.Complete("bamman rets");
// → "Batman Returns"
No tokenization setup. No fuzzy matching config. Just smart results.
For real-world apps, Autypo integrates seamlessly with ASP.NET Core and supports background indexing, multi-field search, and dependency-injected data sources.
using Autypo;
using Autypo.AspNetCore;
using Autypo.Configuration;
builder.Services.AddScoped<ProductsLoader>();
builder.Services.AddAutypoSearch<Product>(config => config
.WithDataSource(serviceProvider => serviceProvider.GetRequiredService<ProductsLoader>())
.WithBackgroundLoading(UninitializedBehavior.ReturnEmpty)
.WithIndex(product => product.Name, index => index
.WithAdditionalKeys(product => [product.Description]) // Index name + description
.WithUnorderedTokenOrdering() // Order of words doesn't matter
.WithPartialTokenMatching() // Partial queries still match
// ... and many more configuration options!
));
Define a search endpoint using dependency-injected Autypo:
app.MapGet("/products/search", async (
[FromQuery] string query,
[FromServices] IAutypoSearch<Product> search) =>
{
var results = await search.SearchAsync(query);
return results.Select(r => r.Value);
});
Example Query:
GET /products/search?query=fngerprint usb recogn
Example Result:
[
{
"code": "A1067",
"name": "Fingerprint USB",
"description": "Secure USB flash drive with fingerprint encryption"
},
]
Autypo is available on NuGet.
For ASP.NET Core integration (includes the core engine):
dotnet add package Autypo.AspNetCore
For standalone or non-web scenarios (e.g., console apps, background jobs):
dotnet add package Autypo
Autypo gives you fast, typo-tolerant search with modern developer ergonomics — zero config to start, but extreme tuning if you need it.
name + description)IAutypoCompleteIAutypoSearch<T>AutypoRefreshToken✅ Open source & MIT licensed
🛡️ Built for scale and safety
🎉 Developer-first design
Autypo is intentionally designed for short-text and autocomplete scenarios — not full-text search.
This tradeoff is deliberate: it keeps Autypo incredibly fast, predictable, and ideal for UX-critical search.
| Guide | Description |
|---|---|
| ASP.NET Core Integration | End-to-end setup with dependency injection and hosted services |
| Indexing & Data Loading | Data sources, refresh tokens |
| Search & Matching | Customize fuzzy logic, token ordering and more |
| Text Analysis & Tokenization | Configure tokenizers, transformers, and analyzers |
| Custom Scoring & Filtering | Enrich matches with metadata and business logic |
| Sample | What it demonstrates |
|---|---|
| "Did You Mean?" Console Demo | Interactive CLI Helper – Suggests valid commands with fuzzy matching |
| ASP.NET Core Search API | Product Search – REST API with background indexing and multi-field matching |
| Blazor City Autocomplete | Real-Time Search UI – Typeahead with typo tolerance and reindexing |
Autypo competes head-to-head with Lucene and outperforms many .NET libraries for short-string search:
| Library | Multi-Token | Index Time | Search Time | Avg/Search |
|---|---|---|---|---|
| Autypo | ✅ Yes | 163 ms | 3.34 s | 1.33 ms |
| Lucene (Fuzzy) | ✅ Yes | 776 ms | 2.91 s | 1.16 ms |
| Lucene (Suggest) | ❌ No | 1.12 s | 503 ms | 0.20 ms |
| Levenshtypo* | ❌ No | 25 ms | 312 ms | 0.12 ms |
| FuzzyWuzzy | ❌ No | 1 ms | 4m 49s | 92.56 ms |
* Levenshtypo is the fuzzy string search library that powers Autypo’s low-level approximate matching engine. It supports typo-tolerant single-token search using optimized Tries and Levenshtein Automata.
/src
└── Autypo/ # Core library
└── Autypo.AspNetCore/ # ASP.NET Core integration
└── Autypo.Benchmarks/ # Microbenchmarks
└── Autypo.IntegrationTests/
└── Autypo.UnitTests/
└── Autypo.Aot/ # Ensures that Autypo works in AOT scenarios
/samples
└── ApiSearchProducts/ # REST API example
└── BlazorCities/ # Blazor Server autocomplete
└── ConsoleDidYouMean/ # CLI demo
🧠 Have a question?
💡 Got feedback?
🐛 Found a bug?
Open an issue or start a discussion. We'd love to hear from you.
Autypo is released under the MIT License.
Autocomplete + Typo-tolerance = Autypo.
Simple name, serious power.
Built for modern .NET developers.