> ## 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.

# Run

> Execute an API call

Execute any API endpoint through Orthogonal. This is the main endpoint for making API calls.

## Request

<ParamField body="api" type="string" required>
  API slug (e.g., "sixtyfour", "fiber"). Get this from search results.
</ParamField>

<ParamField body="path" type="string" required>
  Endpoint path (e.g., "/enrich-lead", "/find-email"). Get this from search results.
</ParamField>

<ParamField body="body" type="object">
  Request body for POST/PUT/PATCH endpoints. Can be an object or array depending on the endpoint.
</ParamField>

<ParamField body="query" type="object">
  Query string parameters as key-value pairs.
</ParamField>

<Note>
  The HTTP method (GET, POST, etc.) is determined automatically based on the endpoint configuration.
</Note>

## Response

```json theme={null}
{
  "success": true,
  "priceCents": 10,
  "data": {
    // Response from the underlying API
  },
  "requestId": "run_1234567890_abc123"
}
```

### Response Fields

| Field        | Type    | Description                    |
| ------------ | ------- | ------------------------------ |
| `success`    | boolean | Whether the call succeeded     |
| `priceCents` | number  | Cost in cents (100 = \$1)      |
| `data`       | object  | Response from the API provider |
| `requestId`  | string  | Unique request identifier      |

## Examples

### Lead Enrichment (Apollo)

<CodeGroup>
  ```bash cURL theme={null}
  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"
      }
    }'
  ```

  ```javascript Node.js theme={null}
  const response = await fetch('https://api.orthogonal.com/v1/run', {
    method: 'POST',
    headers: {
      'Authorization': `Bearer ${process.env.ORTHOGONAL_API_KEY}`,
      'Content-Type': 'application/json'
    },
    body: JSON.stringify({
      api: 'apollo',
      path: '/v1/people/match',
      body: {
        email: 'ceo@stripe.com'
      }
    })
  });

  const { success, priceCents, data } = await response.json();
  console.log(`Enriched for $${(priceCents / 100).toFixed(2)}`);
  console.log(data);
  ```

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

  response = requests.post(
      'https://api.orthogonal.com/v1/run',
      headers={'Authorization': f'Bearer {os.environ["ORTHOGONAL_API_KEY"]}'},
      json={
          'api': 'apollo',
          'path': '/v1/people/match',
          'body': {
              'email': 'ceo@stripe.com'
          }
      }
  )

  result = response.json()
  print(f"Enriched for ${result['priceCents'] / 100:.2f}")
  print(result['data'])
  ```
</CodeGroup>

### AI Web Search (LinkUp)

```bash theme={null}
curl -X POST 'https://api.orthogonal.com/v1/run' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
    "api": "linkup",
    "path": "/v1/search",
    "body": {
      "q": "latest Series A funding rounds fintech 2026",
      "depth": "standard"
    }
  }'
```

### Web Scraping (Olostep)

```bash theme={null}
curl -X POST 'https://api.orthogonal.com/v1/run' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
    "api": "olostep",
    "path": "/v1/scrapes",
    "body": {
      "url_to_scrape": "https://stripe.com/about"
    }
  }'
```

### Multi-API Workflow

Chain APIs for complete lead research:

```bash theme={null}
# Step 1: Research company with AI search (LinkUp)
curl -X POST 'https://api.orthogonal.com/v1/run' \
  -d '{"api": "linkup", "path": "/v1/search", "body": {"q": "Stripe company funding valuation 2026"}}'

# Step 2: Enrich the CEO (Apollo)
curl -X POST 'https://api.orthogonal.com/v1/run' \
  -d '{"api": "apollo", "path": "/v1/people/match", "body": {"email": "ceo@stripe.com"}}'

# Step 3: Find more contacts at the company (Hunter)
curl -X POST 'https://api.orthogonal.com/v1/run' \
  -d '{"api": "hunter", "path": "/domain-search", "body": {"domain": "stripe.com"}}'
```

## Error Handling

### Insufficient Credits (402)

```json theme={null}
{
  "success": false,
  "priceCents": 10,
  "error": "Insufficient credits. Cost: $0.10, Available: $0.02"
}
```

### API Not Found (404)

```json theme={null}
{
  "success": false,
  "error": "API not found: invalid-slug"
}
```

## Error Codes

| Code | Description          | Solution                         |
| ---- | -------------------- | -------------------------------- |
| 400  | Invalid request      | Check api, path, and body format |
| 401  | Unauthorized         | Check your API key               |
| 402  | Insufficient credits | Add credits at dashboard         |
| 404  | Not found            | Check the api/path values        |
| 5xx  | Upstream error       | Check the error message          |
