---
editLink: false
lastUpdated: false
---

[@salesforce/b2c-tooling-sdk](../../modules.md) / [docs](../index.md) / searchSchemas

# Function: searchSchemas()

> **searchSchemas**(`query`, `limit`): [`SchemaSearchResult`](../interfaces/SchemaSearchResult.md)[]

Defined in: [packages/b2c-tooling-sdk/src/docs/schema.ts:126](https://github.com/SalesforceCommerceCloud/b2c-developer-tooling/blob/67fb8580ac3c5b372617ee3ec3fc8f2bc9f16174/packages/b2c-tooling-sdk/src/docs/schema.ts#L126)

Search schemas by fuzzy query.

## Parameters

### query

`string`

The search query string to match against schema IDs

### limit

`number` = `20`

Maximum number of results to return (default: 20)

## Returns

[`SchemaSearchResult`](../interfaces/SchemaSearchResult.md)[]

Array of schema search results with relevance scores, sorted by match score (lower scores indicate better matches)

## Example

```typescript
const results = searchSchemas('catalog');
results.forEach(r => console.log(r.entry.id, r.score));
```
