> This page is for Designer API.

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://developers.webflow.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://developers.webflow.com/_mcp/server.

# Search for Components (Beta)

## `webflow.searchComponents(options)`

Searches for Components in a way similar to the search box in the Components panel in the Webflow Designer.

This command returns Components in the same order as a search in the Components panel and uses the same search logic.
It searches fields including the name and description.

> **Beta**
>
> These methods are in public beta and may change with future releases.

### Syntax

```typescript
interface SearchComponentsOptions {
  /** Fuzzy search query matching Component panel search behavior */
  q?: string;
}
interface ComponentLibrary {
  name: string;
  id: string;
}
interface ComponentSearchResult {
  id: string;
  name: string;
  group: string;
  description: string;
  instances: number;
  canEdit: boolean;
  library: ComponentLibrary | null;
}

webflow.searchComponents(options: SearchComponentsOptions?): Promise<Array<ComponentSearchResult>>
```

### Returns

**Promise\<Array\<*ComponentSearchResult*>>**

A Promise that resolves to an array or objects with information about matching Components, not the `Component` objects themselves.

### Example

```typescript
// Get all Components
const allComponents = await webflow.searchComponents();
/*
[
  {
    id: 'xxxx',
    name: 'Hero section',
    group: 'Sections',
    description: 'Lorem ipsum',
    instances: 3,
    canEdit: true,
    library: null,
  },
  {
    id: 'yyyy',
    name: 'Nav Bar',
    group: 'Navigation',
    description: '',
    instances: 5,
    canEdit: false,
    library: { name: 'Core Library', id: 'lib_123' },
  },
]
*/

// Search for Components by query
const heroes = await webflow.searchComponents({ q: 'Hero' });
/*
[
  {
    id: 'xxxx',
    name: 'Hero section',
    group: 'Sections',
    description: 'Lorem ipsum',
    instances: 3,
    canEdit: true,
    library: null,
  },
]
*/
```

[Try this example](https://webflow.com/oauth/authorize?response_type=code\&client_id=19511de1ec410f9228d8dcbc9420e67916dea80d86d18f0c9a533eb475ea0f62)

---

### Designer Ability

Checks for authorization only

| Designer Ability    | Permission | Locale | Branch | Workflow | Sitemode |
| :------------------ | :--------- | :----- | :----- | :------- | :------- |
| **canAccessCanvas** | any        | any    | any    | any      | any      |