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

# Search

> Find APIs using natural language

Search for APIs by describing what you need. Uses semantic search to find the most relevant endpoints.

## Request

<ParamField body="prompt" type="string" required>
  Natural language description of what you're looking for.

  Examples:

  * "enrich lead with contact info"
  * "find email for a person"
  * "company enrichment from domain"
</ParamField>

<ParamField body="limit" type="number" default="10">
  Maximum number of results to return. Max: 50
</ParamField>

## Response

Results are grouped by API, with each API containing its matching endpoints:

```json theme={null}
{
  "success": true,
  "results": [
    {
      "id": "api-uuid",
      "name": "Apollo.io",
      "slug": "apollo",
      "baseUrl": "https://api.apollo.io",
      "payableBaseUrl": "https://api.orthogonal.com/pay/apollo",
      "endpoints": [
        {
          "id": "endpoint-uuid",
          "path": "/v1/people/match",
          "method": "POST",
          "description": "Enrich a person by email, name, or LinkedIn URL",
          "price": "0.03",
          "isPayable": true,
          "verified": true,
          "score": 0.95
        },
        {
          "path": "/v1/organizations/enrich",
          "method": "POST",
          "description": "Enrich a company by domain",
          "price": "0.03",
          "verified": true,
          "score": 0.90
        }
      ]
    },
    {
      "id": "api-uuid-2",
      "name": "Hunter.io",
      "slug": "hunter",
      "endpoints": [
        {
          "path": "/domain-search",
          "method": "POST",
          "description": "Find email addresses for a company domain",
          "price": "0.01",
          "verified": true,
          "score": 0.85
        }
      ]
    }
  ],
  "count": 3,
  "apisCount": 2,
  "prompt": "enrich lead with contact info",
  "searchType": "semantic",
  "responseTime": 145
}
```

### Response Fields

| Field                            | Description                                       |
| -------------------------------- | ------------------------------------------------- |
| `results`                        | Array of APIs, each containing matching endpoints |
| `results[].slug`                 | API identifier to use with `/v1/run`              |
| `results[].endpoints[].path`     | Endpoint path to use with `/v1/run`               |
| `results[].endpoints[].verified` | Whether the API is verified by Orthogonal         |
| `results[].endpoints[].score`    | Relevance score (0-1, higher is better)           |
| `count`                          | Total number of endpoints returned                |

## Example

<CodeGroup>
  ```bash cURL theme={null}
  curl -X POST 'https://api.orthogonal.com/v1/search' \
    -H 'Authorization: Bearer YOUR_API_KEY' \
    -H 'Content-Type: application/json' \
    -d '{
      "prompt": "enrich lead find email",
      "limit": 5
    }'
  ```

  ```javascript Node.js theme={null}
  const response = await fetch('https://api.orthogonal.com/v1/search', {
    method: 'POST',
    headers: {
      'Authorization': `Bearer ${process.env.ORTHOGONAL_API_KEY}`,
      'Content-Type': 'application/json'
    },
    body: JSON.stringify({
      prompt: 'enrich lead find email',
      limit: 5
    })
  });

  const { results } = await response.json();

  // Get verified endpoints only
  const verified = results.flatMap(api => 
    api.endpoints.filter(ep => ep.verified)
  );
  console.log('Verified endpoints:', verified);
  ```

  ```python Python theme={null}
  import requests
  import os

  response = requests.post(
      'https://api.orthogonal.com/v1/search',
      headers={'Authorization': f'Bearer {os.environ["ORTHOGONAL_API_KEY"]}'},
      json={'prompt': 'enrich lead find email', 'limit': 5}
  )

  results = response.json()['results']

  # Get verified endpoints only
  verified = [ep for api in results for ep in api['endpoints'] if ep.get('verified')]
  print(f"Found {len(verified)} verified endpoints")
  ```
</CodeGroup>

## Using Search Results

The `slug` and `path` from search results can be used directly with the [Run API](/api-reference/run):

```bash theme={null}
# From search: slug="apollo", path="/v1/people/match"
curl -X POST 'https://api.orthogonal.com/v1/run' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
    "api": "apollo",
    "path": "/v1/people/match",
    "body": {"email": "ceo@stripe.com"}
  }'
```
