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

# RapidAPI: Request

> Call an endpoint on a registered RapidAPI listing that has no dedicated Deepline tool yet. Includes inputs, outputs, SDK V2 examples, and Deepline cost.

Call an endpoint on a registered RapidAPI listing that has no dedicated Deepline tool yet.

<Info>
  Tool ID: `rapidapi_request`
</Info>

## Run this action

Use the TypeScript SDK for a single call. Put `ctx.tools.execute(...)` inside a Play when the call should be durable, scheduled, or run across a CSV.

```ts theme={null}
import { Deepline } from 'deepline';

const deepline = await Deepline.connect();
const result = await deepline.tools.execute(
  'rapidapi_request',
  {
    "host": "api.example.com",
    "path": "example"
  },
);

console.log(result.toolResponse.raw);
```

### CLI

```bash theme={null}
deepline tools execute rapidapi_request --input '{
  "host": "api.example.com",
  "path": "example"
}' --json
```

## Example response

The SDK exposes this shape at `result.toolResponse.raw`. Values below are representative.

```json theme={null}
{
  "listing": {
    "slug": "example",
    "host": "api.example.com",
    "label": "example"
  },
  "method": "example",
  "path": "example",
  "status_code": 123,
  "ok": true,
  "billed_requests": 1,
  "data": {}
}
```

Use `deepline tools get rapidapi_request --json` for the latest machine-readable contract.

## Input reference

Call one endpoint on a RapidAPI listing that Deepline has registered and priced.

| Name                 | Type              | Required | Default | Details                                                                                                                                                                                                                  |
| -------------------- | ----------------- | -------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `payload.host`       | `string`          | Yes      | —       | RapidAPI listing host such as real-time-google-search-api.p.rapidapi.com, or just its slug. Only listings Deepline has registered and priced can be called; run rapidapi\_list\_listings to see them. Minimum length: 1. |
| `payload.method`     | `"GET" \| "POST"` | No       | —       | HTTP method. Defaults to GET. Allowed: `GET`, `POST`.                                                                                                                                                                    |
| `payload.path`       | `string`          | Yes      | —       | Endpoint path on the listing host, for example /api/v1/google-search/web. Put query-string values in query, not in the path. Minimum length: 1.                                                                          |
| `payload.query`      | `record`          | No       | —       | Query-string parameters.                                                                                                                                                                                                 |
| `payload.body`       | `unknown`         | No       | —       | JSON request body. Only valid with method POST.                                                                                                                                                                          |
| `payload.timeout_ms` | `integer`         | No       | —       | Per-request timeout in milliseconds. Defaults to 30000. Minimum: 1000. Maximum: 120000.                                                                                                                                  |

<details>
  <summary>Show raw input schema</summary>

  ### Input JSON Schema

  ```json theme={null}
  {
    "type": "object",
    "description": "Call one endpoint on a RapidAPI listing that Deepline has registered and priced.",
    "properties": {
      "host": {
        "type": "string",
        "description": "RapidAPI listing host such as real-time-google-search-api.p.rapidapi.com, or just its slug. Only listings Deepline has registered and priced can be called; run rapidapi_list_listings to see them.",
        "minLength": 1
      },
      "method": {
        "type": "string",
        "description": "HTTP method. Defaults to GET.",
        "enum": [
          "GET",
          "POST"
        ]
      },
      "path": {
        "type": "string",
        "description": "Endpoint path on the listing host, for example /api/v1/google-search/web. Put query-string values in query, not in the path.",
        "minLength": 1
      },
      "query": {
        "type": "object",
        "description": "Query-string parameters.",
        "additionalProperties": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "number"
            },
            {
              "type": "boolean"
            },
            {
              "type": "array",
              "minItems": 1,
              "items": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "number"
                  },
                  {
                    "type": "boolean"
                  }
                ]
              }
            }
          ]
        }
      },
      "body": {
        "description": "JSON request body. Only valid with method POST."
      },
      "timeout_ms": {
        "type": "integer",
        "description": "Per-request timeout in milliseconds. Defaults to 30000.",
        "minimum": 1000,
        "maximum": 120000
      }
    },
    "required": [
      "host",
      "path"
    ],
    "additionalProperties": false
  }
  ```
</details>

## Output reference

| Name                     | Type      | Required | Default | Details                                                                                               |
| ------------------------ | --------- | -------- | ------- | ----------------------------------------------------------------------------------------------------- |
| `result.listing`         | `object`  | Yes      | —       | —                                                                                                     |
| `result.listing.slug`    | `string`  | Yes      | —       | —                                                                                                     |
| `result.listing.host`    | `string`  | Yes      | —       | —                                                                                                     |
| `result.listing.label`   | `string`  | Yes      | —       | —                                                                                                     |
| `result.method`          | `string`  | Yes      | —       | —                                                                                                     |
| `result.path`            | `string`  | Yes      | —       | —                                                                                                     |
| `result.status_code`     | `integer` | Yes      | —       | —                                                                                                     |
| `result.ok`              | `boolean` | Yes      | —       | True for a 2xx upstream response. 404 and 410 are returned with ok=false instead of failing the call. |
| `result.billed_requests` | `integer` | Yes      | —       | Requests the listing reported in its X-RapidAPI-Billing header, or null when the header was absent.   |
| `result.data`            | `unknown` | Yes      | —       | Upstream response body as returned.                                                                   |

<details>
  <summary>Show raw output schema</summary>

  ### Output JSON Schema

  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "listing": {
        "type": "object",
        "properties": {
          "slug": {
            "type": "string"
          },
          "host": {
            "type": "string"
          },
          "label": {
            "type": "string"
          }
        },
        "required": [
          "slug",
          "host",
          "label"
        ],
        "additionalProperties": false
      },
      "method": {
        "type": "string"
      },
      "path": {
        "type": "string"
      },
      "status_code": {
        "type": "integer"
      },
      "ok": {
        "type": "boolean",
        "description": "True for a 2xx upstream response. 404 and 410 are returned with ok=false instead of failing the call."
      },
      "billed_requests": {
        "type": [
          "integer",
          "null"
        ],
        "description": "Requests the listing reported in its X-RapidAPI-Billing header, or null when the header was absent."
      },
      "data": {
        "description": "Upstream response body as returned."
      }
    },
    "required": [
      "listing",
      "method",
      "path",
      "status_code",
      "ok",
      "billed_requests",
      "data"
    ],
    "additionalProperties": false
  }
  ```
</details>

## Deepline cost

* Pricing model: `provider_usage` (provider usage).
* Estimated Deepline credits: `0` per pricing unit.

## Related documentation

* [RapidAPI provider guide](/docs/providers/rapidapi/guide)
* [SDK V2 quickstart](/docs/sdk-v2/quickstart)
* [SDK reference](/docs/sdk-v2/sdk-reference)
* [Run tools across a CSV](/docs/sdk-v2/batch-csv)
