umbraco-search-provider
Implement search providers in Umbraco backoffice using official docs
What this skill does
# Umbraco Search Provider
## What is it?
A Search Provider integrates custom search functionality into Umbraco's backoffice search bar. It enables users to search custom data sources alongside built-in content, media, and members. The provider implements a `search` method that returns paginated results matching the user's query.
## Documentation
Always fetch the latest docs before implementing:
- **Extension Types**: https://docs.umbraco.com/umbraco-cms/customizing/extending-overview/extension-types
- **Foundation**: https://docs.umbraco.com/umbraco-cms/customizing/foundation
- **Extension Registry**: https://docs.umbraco.com/umbraco-cms/customizing/extending-overview/extension-registry
## Related Foundation Skills
- **Repository Pattern**: For data access in search providers
- Reference skill: `umbraco-repository-pattern`
- **Context API**: For accessing contexts within the provider
- Reference skill: `umbraco-context-api`
## Workflow
1. **Fetch docs** - Use WebFetch on the URLs above
2. **Ask questions** - What data to search? What fields to return? Custom result display needed?
3. **Generate files** - Create manifest + provider class based on latest docs
4. **Explain** - Show what was created and how to test
## Minimal Examples
### Manifest (manifests.ts)
```typescript
import type { ManifestSearchProvider } from '@umbraco-cms/backoffice/extension-registry';
const manifest: ManifestSearchProvider = {
type: 'searchProvider',
alias: 'My.SearchProvider',
name: 'My Search Provider',
api: () => import('./my-search-provider.js'),
meta: {
label: 'My Items',
},
};
export const manifests = [manifest];
```
### Provider Implementation (my-search-provider.ts)
```typescript
import type { UmbSearchProvider, UmbSearchResultItemModel, UmbSearchRequestArgs } from '@umbraco-cms/backoffice/search';
import type { UmbControllerHost } from '@umbraco-cms/backoffice/controller-api';
import { UmbControllerBase } from '@umbraco-cms/backoffice/class-api';
export class MySearchProvider extends UmbControllerBase implements UmbSearchProvider {
constructor(host: UmbControllerHost) {
super(host);
}
async search(args: UmbSearchRequestArgs) {
const { query } = args;
// Fetch results from your data source
const results = await this.#fetchResults(query);
return {
data: {
items: results,
total: results.length,
},
};
}
async #fetchResults(query: string): Promise<UmbSearchResultItemModel[]> {
// Your search logic here - API call, local filtering, etc.
const response = await fetch(`/api/my-items/search?q=${encodeURIComponent(query)}`);
const data = await response.json();
return data.items.map((item: any) => ({
entityType: 'my-entity',
unique: item.id,
name: item.name,
icon: 'icon-document',
href: `/section/my-section/workspace/my-workspace/edit/${item.id}`,
}));
}
}
export default MySearchProvider;
```
### Search Result Item Model
```typescript
// Each result must conform to UmbSearchResultItemModel
interface UmbSearchResultItemModel {
entityType: string; // Entity type identifier
unique: string; // Unique ID
name: string; // Display name
icon?: string | null; // Icon to display
href: string; // URL to navigate when clicked
}
```
### Provider with Repository
```typescript
import type { UmbSearchProvider, UmbSearchResultItemModel, UmbSearchRequestArgs } from '@umbraco-cms/backoffice/search';
import { UmbControllerBase } from '@umbraco-cms/backoffice/class-api';
import { MyRepository } from './my-repository.js';
export class MySearchProvider extends UmbControllerBase implements UmbSearchProvider {
#repository: MyRepository;
constructor(host: UmbControllerHost) {
super(host);
this.#repository = new MyRepository(this);
}
async search(args: UmbSearchRequestArgs) {
const { data } = await this.#repository.search(args.query);
const items: UmbSearchResultItemModel[] = data?.items.map((item) => ({
entityType: 'my-entity',
unique: item.id,
name: item.name,
icon: item.icon ?? 'icon-document',
href: `/section/my-section/workspace/my-workspace/edit/${item.id}`,
})) ?? [];
return {
data: {
items,
total: data?.total ?? 0,
},
};
}
}
export default MySearchProvider;
```
### Search with Context (e.g., search from specific location)
```typescript
async search(args: UmbSearchRequestArgs) {
const { query, searchFrom } = args;
// searchFrom contains the entity to search from (if specified)
const parentId = searchFrom?.unique;
const results = await this.#fetchResults(query, parentId);
return {
data: {
items: results,
total: results.length,
},
};
}
```
## Search Request Args
| Property | Description |
|----------|-------------|
| `query` | The search term entered by user |
| `searchFrom` | Optional entity to search from (for scoped searches) |
That's it! Always fetch fresh docs, keep examples minimal, generate complete working code.
Related in General
modeling-omnistudio-epc-catalog
IncludedSalesforce Industries CME EPC product-modeling skill for Product2-based catalog creation. Use when creating EPC products, configuring product attributes, building offer bundles with Product Child Items, or reviewing EPC DataPack JSON metadata for product catalog changes. TRIGGER when: user creates or updates Product2 EPC records, AttributeAssignment payloads, AttributeMetadata/AttributeDefaultValues, Offer bundles, or ProductChildItem relationships. DO NOT TRIGGER when: designing OmniScripts/FlexCards/Integration Procedures (use building-omnistudio-omniscript, building-omnistudio-flexcard, or building-omnistudio-integration-procedure), implementing Apex business logic (use generating-apex), or troubleshooting deployment pipelines (use deploying-metadata).
relationship-science-coach
IncludedUse this skill for direct, practical adult relationship coaching: couples conflict, repair, trust, marriage, dating, flirting, attachment patterns, emotional connection, sex, desire differences, eroticism, kink negotiation, affection, love languages, breakups, and long-term passion. Draw on Gottman, EFT and Hold Me Tight, attachment science, modern sex research, Perel, Nagoski, Kerner, Schnarch, Love and Stosny, and flexible love-language tools. Be concrete and low-hedge. Redirect only for imminent danger, abuse, coercive control, minors, non-consent, self-harm, stalking, or medical/legal/psychiatric decisions.
building-sf-integrations
IncludedSalesforce integration architecture and runtime plumbing with 120-point scoring. Use this skill to set up Named Credentials, External Credentials, External Services, REST/SOAP callout patterns, Platform Events, and Change Data Capture. TRIGGER when: user sets up Named Credentials, External Services, REST/SOAP callouts, Platform Events, CDC, or touches .namedCredential-meta.xml files. DO NOT TRIGGER when: Connected App/OAuth config (use configuring-connected-apps), Apex-only logic (use generating-apex), or data import/export (use handling-sf-data).
venue-templates
IncludedAccess comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues (Nature, Science, PLOS, IEEE, ACM), academic conferences (NeurIPS, ICML, CVPR, CHI), research posters, and grant proposals (NSF, NIH, DOE, DARPA). This skill should be used when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.
let-fate-decide
IncludedDraws the 12 Houses of the Zodiac Tarot spread to inject entropy into planning when prompts are vague, ambiguous, or casually delegated. Interprets the spread to guide next steps. Use when the user says 'let fate decide', 'YOLO', 'whatever', 'idk', or other nonchalant phrases, makes Yu-Gi-Oh references, or when you are about to arbitrarily pick between multiple reasonable approaches. Prefer over ask-questions-if-underspecified when the user's tone is casual or playful rather than precision-seeking.
net-ops
IncludedCross-platform network troubleshooting (Windows, macOS, Linux) via local or remote shell. Use for: DNS broken, can't resolve hostnames, nslookup/dig works but apps fail, NRPT, WFP, scutil, /etc/resolver, systemd-resolved, /etc/resolv.conf, NetworkManager, VPN DNS leak residue (ProtonVPN/Mullvad/WireGuard/AnyConnect), AV/firewall blocking DNS or DoH, Tailscale DNS interaction, intermittent connectivity, remote diagnostics over SSH.