> Markdown versions of all pages of this connector library are available by appending `.md` to the page URL. For the full index of connectors, see [llms.txt](https://connectors.appmixer.com/llms.txt).

# Make API Call

- Component: `appmixer.ai.exa.MakeApiCall`
- Kind: Action
- Version: 1.0.0
- Visibility: Public
- Connector: [appmixer.ai.exa 1.0.2](https://connectors.appmixer.com/connector/appmixer.ai.exa/1.0.2.md)
- Component page: <https://connectors.appmixer.com/connector/appmixer.ai.exa/1.0.2/component/appmixer.ai.exa.MakeApiCall>

Perform an arbitrary authorized API call to Exa. Provide a path (or full URL), method, headers, query parameters and body. The API key header is added automatically.

## Input ports

### Port `in`

| Field | Type | Description |
| --- | --- | --- |
| API Endpoint Path (`url`) | text | A path relative to `https://api.exa.ai`, for example `/search`. A full URL is accepted only when it points at `https://api.exa.ai`; any other host is rejected so your API key is never sent elsewhere. |
| HTTP Method (`method`) | select | The HTTP method for the API call. Most Exa data endpoints are POST. |
| Query Parameters (`parameters`) | key-value | Optional query parameters. |
| Request Body (`body`) | textarea | Optional JSON request body. |
| Request Headers (`headers`) | key-value | Optional additional headers. The x-api-key header is set automatically. |

## Output ports

### Port `out`

| Field | Type | Description |
| --- | --- | --- |
| Status Code (`statusCode`) | integer | - |
| Response Headers (`headers`) | object | - |
| Response Body (`body`) | object | - |

## Full metadata (component.json)

```json
{
  "name": "appmixer.ai.exa.MakeApiCall",
  "label": "Make API Call",
  "description": "Perform an arbitrary authorized API call to Exa. Provide a path (or full URL), method, headers, query parameters and body. The API key header is added automatically.",
  "author": "Appmixer <info@appmixer.com>",
  "version": "1.0.0",
  "auth": {
    "service": "appmixer:ai:exa"
  },
  "quota": {
    "manager": "appmixer:ai:exa",
    "resources": "requests",
    "scope": {
      "userId": "{{userId}}"
    }
  },
  "inPorts": [
    {
      "name": "in",
      "schema": {
        "type": "object",
        "properties": {
          "url": {
            "type": "string"
          },
          "method": {
            "type": "string",
            "enum": [
              "GET",
              "POST",
              "PUT",
              "PATCH",
              "DELETE"
            ]
          },
          "headers": {
            "type": "string"
          },
          "parameters": {
            "type": "string"
          },
          "body": {
            "type": "string"
          }
        },
        "required": [
          "url",
          "method"
        ]
      },
      "inspector": {
        "inputs": {
          "url": {
            "type": "text",
            "index": 1,
            "label": "API Endpoint Path",
            "tooltip": "A path relative to <code>https://api.exa.ai</code>, for example <code>/search</code>. A full URL is accepted only when it points at <code>https://api.exa.ai</code>; any other host is rejected so your API key is never sent elsewhere."
          },
          "method": {
            "type": "select",
            "index": 2,
            "label": "HTTP Method",
            "defaultValue": "GET",
            "tooltip": "The HTTP method for the API call. Most Exa data endpoints are POST.",
            "options": [
              {
                "label": "GET",
                "value": "GET"
              },
              {
                "label": "POST",
                "value": "POST"
              },
              {
                "label": "PUT",
                "value": "PUT"
              },
              {
                "label": "PATCH",
                "value": "PATCH"
              },
              {
                "label": "DELETE",
                "value": "DELETE"
              }
            ]
          },
          "parameters": {
            "type": "key-value",
            "keyLabel": "Key",
            "valueLabel": "Value",
            "addLabel": "Add item",
            "removeLabel": "Remove item",
            "index": 3,
            "label": "Query Parameters",
            "tooltip": "Optional query parameters."
          },
          "body": {
            "type": "textarea",
            "index": 4,
            "label": "Request Body",
            "tooltip": "Optional JSON request body."
          },
          "headers": {
            "type": "key-value",
            "keyLabel": "Key",
            "valueLabel": "Value",
            "addLabel": "Add item",
            "removeLabel": "Remove item",
            "index": 5,
            "label": "Request Headers",
            "tooltip": "Optional additional headers. The x-api-key header is set automatically."
          }
        }
      }
    }
  ],
  "outPorts": [
    {
      "name": "out",
      "schema": {
        "type": "object",
        "properties": {
          "statusCode": {
            "type": "integer",
            "title": "Status Code",
            "example": 200
          },
          "headers": {
            "type": "object",
            "title": "Response Headers",
            "properties": {}
          },
          "body": {
            "type": "object",
            "title": "Response Body",
            "properties": {}
          }
        }
      }
    }
  ],
  "icon": "(data URI omitted)"
}
```
