> ## Documentation Index
> Fetch the complete documentation index at: https://docs.b3os.org/llms.txt
> Use this file to discover all available pages before exploring further.

# Find similar resources

Find resources semantically similar to a given resource

` GET /v1/search/similar/{type}/{id} `

Find similar resources

Find resources semantically similar to a given resource

## Parameters

### ` type ` (path, required)

Resource type: action, template, trigger, connector_def (singular or plural forms accepted)

- ` value `: type ` string `

### ` id ` (path, required)

Resource ID

- ` value `: type ` string `

### ` limit ` (query, optional)

Max results (default: 5, max: 20)

- ` value `: type ` integer `

## Responses

### ` 200 ` — OK

Content type: ` application/json `

- ` value `: type ` object `

  - ` processingTimeMs `: type ` integer `

  - ` query `: type ` string `

  - ` results `: type ` array `

    - ` array item `: type ` object `

      - ` category `: type ` string `

      - ` description `: type ` string `

      - ` id `: type ` string `

      - ` name `: type ` string `

      - ` score `: type ` number `

      - ` status `: type ` string `

      - ` tags `: type ` array `

        - ` array item `: type ` string `

      - ` type `: type ` string `

      - ` workflowType `: type ` string `

  - ` totalHits `: type ` integer `

### ` 400 ` — Bad Request

Content type: ` application/json `

- ` value `: type ` object `

  - ` code `: type ` integer `

  - ` details `: type ` array `

    - ` array item `: type ` unknown `

  - ` message `: type ` string `

  - ` requestId `: type ` string `

### ` 503 ` — Service Unavailable

Content type: ` application/json `

- ` value `: type ` object `

  - ` code `: type ` integer `

  - ` details `: type ` array `

    - ` array item `: type ` unknown `

  - ` message `: type ` string `

  - ` requestId `: type ` string `

## Request examples

### cURL

```curl
curl -X GET 'https://api.example.com/v1/search/similar/string/string' \
  -H 'Authorization: Bearer YOUR_API_TOKEN'
```

### JavaScript

```javascript
const response = await fetch('https://api.example.com/v1/search/similar/string/string', {
  method: 'GET',
  headers: {
      "Authorization": "Bearer YOUR_API_TOKEN"
  }
});

const data = await response.json();
console.log(data);
```

### Python

```python
import requests

headers = {
    'Authorization': 'Bearer YOUR_API_TOKEN'
}

response = requests.get('https://api.example.com/v1/search/similar/string/string', headers=headers)
print(response.json())
```

### Go

```go
package main

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

func main() {
	req, _ := http.NewRequest("GET", "https://api.example.com/v1/search/similar/string/string", nil)
	req.Header.Set("Authorization", "Bearer YOUR_API_TOKEN")

	resp, _ := http.DefaultClient.Do(req)
	defer resp.Body.Close()
	result, _ := io.ReadAll(resp.Body)
	fmt.Println(string(result))
}
```