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

# Search components

GET https://api/public/v1/components/search

Searches wordpress.org itself for a plugin or theme by name — not the token's inventory (`GET /components`/`GET /site-items` already cover that) — to resolve the exact slug `POST /components/install` needs.\n\nQuery parameters:\n- `type` (string, required): `plugin` | `theme`.\n- `s` (string, 2 to 100 chars): required for a plugin search; optional for a theme search, which browses wordpress.org's popular list without one.\n- `page[number]` (integer, default 1).\n- `page[size]` (integer, 1 to 50, default 15).\n\n200 with a `wordpress-repository-items` collection: `slug`, `name`, `version`, `author`, `active_installs`, `rating`, `requires_wp`, `tested_wp`, `requires_php`, `last_updated`, `download_link`. The id is the repository slug.\n\n- **422**: `type` missing/not `plugin`|`theme`; `s` missing for a plugin search, or under 2/over 100 chars; `page[number]`/`page[size]` out of range.\n- **502**: wordpress.org could not be reached — retry in a moment.\n\nUnscoped to any organization data: a read-only token may call it.

Reference: https://api.docs.modulards.com/modular-ds-public-api/components/search-components

## Authentication

- `Authorization` header (bearer token, required)

## Request

### Query parameters

- `type` (string, optional) — plugin | theme
- `s` (string, optional) — Required for a plugin search; optional for a theme search

## Response

### 200

Successful response

## Examples

**Response**

```json
{}
```

**SDK Code**

```python
import requests

url = "https://https/api/public/v1/components/search"

querystring = {"s":"woocommerce","type":"plugin"}

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers, params=querystring)

print(response.json())
```

```javascript
const url = 'https://https/api/public/v1/components/search?s=woocommerce&type=plugin';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://https/api/public/v1/components/search?s=woocommerce&type=plugin"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://https/api/public/v1/components/search?s=woocommerce&type=plugin")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://https/api/public/v1/components/search?s=woocommerce&type=plugin")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://https/api/public/v1/components/search?s=woocommerce&type=plugin', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://https/api/public/v1/components/search?s=woocommerce&type=plugin");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://https/api/public/v1/components/search?s=woocommerce&type=plugin")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```