Skip to main content
POST
/
v1
/
discover
/
search
Search API
curl --request POST \
  --url https://api.bctrl.ai/v1/discover/search \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "query": "<string>",
  "domains": [
    "<string>"
  ],
  "limit": 123
}
'
{
  "query": "<string>",
  "results": [
    {
      "operation": {
        "id": "<string>",
        "domain": "<string>",
        "method": "<string>",
        "path": "<string>",
        "summary": "<string>"
      },
      "score": 123,
      "matched": [
        "<string>"
      ]
    }
  ]
}
query
string
required
Search query string.
domains
string[]
Limit search to specific domain names.
limit
number
Max results to return. Default: 20, max: 100.

Examples

const response = await fetch('https://api.bctrl.ai/v1/discover/search', {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${apiKey}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    query: 'screenshot',
    domains: ['automation'],
    limit: 5,
  }),
});
const { results } = await response.json();

Response

query
string
required
The search query that was executed.
results
array
required
Matching operations ranked by relevance.
Response Example
{
  "query": "screenshot",
  "results": [
    {
      "operation": {
        "id": "automation.call",
        "domain": "automation",
        "method": "POST",
        "path": "/v1/sessions/{id}/automation",
        "summary": "Execute an automation command"
      },
      "score": 0.85,
      "matched": [
        "screenshot"
      ]
    }
  ]
}