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

# Apollo: Check Credits

> Check your Apollo API usage and rate limits per endpoint (limit, consumed, left over per minute, hour and day). Requires master API key.

Check your Apollo API usage and rate limits per endpoint (limit, consumed, left over per minute, hour and day).

> [!NOTE]
>
> Tool ID: `apollo_check_credits`

## Run this action

Use the TypeScript SDK for one call. Use `ctx.tools.execute(...)` inside a Play for durable calls, scheduled calls, or CSV processing.

```ts theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
import { Deepline } from 'deepline';

const deepline = await Deepline.connect();
const result = await deepline.tools.execute(
  'apollo_check_credits',
  {},
);

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

### CLI

```bash theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
deepline run apollo_check_credits --input '{}'
```

## Example response

The SDK returns this shape at `result.toolResponse.raw`. The example values illustrate the response.

```json theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
{
  "api_accessible": true,
  "data": {
    "rate_limits": [
      {
        "endpoint": "example",
        "action": "example"
      }
    ]
  }
}
```

Use `deepline describe apollo_check_credits --json` for the latest machine-readable contract.

## Input reference

Show Apollo API usage and rate limits (limit, consumed, left over per minute, hour and day) for each Apollo endpoint. Requires master API key.

This action requires no input fields.

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

  ### Input JSON Schema

  ```json theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
  {
    "type": "object",
    "description": "Show Apollo API usage and rate limits (limit, consumed, left over per minute, hour and day) for each Apollo endpoint. Requires master API key.",
    "properties": {},
    "required": [],
    "additionalProperties": false
  }
  ```
</details>

## Output reference

Apollo API usage and rate limits for the connected master API key, read from Apollo usage\_stats/api\_usage\_stats.

| Name | Type | Required | Default | Details |
| - | - | - | - | - |
| `result.api_accessible` | `true` | Yes | — | The connected Apollo key answered the request. |
| `result.data` | `object` | Yes | — | — |
| `result.data.rate_limits` | `array` | Yes | — | One row per Apollo endpoint with its per-minute, per-hour and per-day limit, consumed and left\_over counts. |
| `result.data.rate_limits[].endpoint` | `string` | Yes | — | Apollo API path, e.g. 'api/v1/contacts'. |
| `result.data.rate_limits[].action` | `string \| null` | Yes | — | Apollo action on that path, e.g. 'search'. null when Apollo did not name one. |
| `result.data.rate_limits[].minute` | `object` | No | — | — |
| `result.data.rate_limits[].minute.limit` | `number` | No | — | Calls allowed in this window. |
| `result.data.rate_limits[].minute.consumed` | `number` | No | — | Calls used in this window. |
| `result.data.rate_limits[].minute.left_over` | `number` | No | — | Calls remaining in this window. |
| `result.data.rate_limits[].hour` | `object` | No | — | — |
| `result.data.rate_limits[].hour.limit` | `number` | No | — | Calls allowed in this window. |
| `result.data.rate_limits[].hour.consumed` | `number` | No | — | Calls used in this window. |
| `result.data.rate_limits[].hour.left_over` | `number` | No | — | Calls remaining in this window. |
| `result.data.rate_limits[].day` | `object` | No | — | — |
| `result.data.rate_limits[].day.limit` | `number` | No | — | Calls allowed in this window. |
| `result.data.rate_limits[].day.consumed` | `number` | No | — | Calls used in this window. |
| `result.data.rate_limits[].day.left_over` | `number` | No | — | Calls remaining in this window. |

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

  ### Output JSON Schema

  ```json theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
  {
    "type": "object",
    "description": "Apollo API usage and rate limits for the connected master API key, read from Apollo usage_stats/api_usage_stats.",
    "properties": {
      "api_accessible": {
        "type": "boolean",
        "description": "The connected Apollo key answered the request.",
        "const": true
      },
      "data": {
        "type": "object",
        "properties": {
          "rate_limits": {
            "type": "array",
            "description": "One row per Apollo endpoint with its per-minute, per-hour and per-day limit, consumed and left_over counts.",
            "items": {
              "type": "object",
              "properties": {
                "endpoint": {
                  "type": "string",
                  "description": "Apollo API path, e.g. 'api/v1/contacts'."
                },
                "action": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Apollo action on that path, e.g. 'search'; null when Apollo did not name one."
                },
                "minute": {
                  "type": "object",
                  "properties": {
                    "limit": {
                      "type": "number",
                      "description": "Calls allowed in this window."
                    },
                    "consumed": {
                      "type": "number",
                      "description": "Calls used in this window."
                    },
                    "left_over": {
                      "type": "number",
                      "description": "Calls remaining in this window."
                    }
                  },
                  "additionalProperties": false
                },
                "hour": {
                  "type": "object",
                  "properties": {
                    "limit": {
                      "type": "number",
                      "description": "Calls allowed in this window."
                    },
                    "consumed": {
                      "type": "number",
                      "description": "Calls used in this window."
                    },
                    "left_over": {
                      "type": "number",
                      "description": "Calls remaining in this window."
                    }
                  },
                  "additionalProperties": false
                },
                "day": {
                  "type": "object",
                  "properties": {
                    "limit": {
                      "type": "number",
                      "description": "Calls allowed in this window."
                    },
                    "consumed": {
                      "type": "number",
                      "description": "Calls used in this window."
                    },
                    "left_over": {
                      "type": "number",
                      "description": "Calls remaining in this window."
                    }
                  },
                  "additionalProperties": false
                }
              },
              "required": [
                "endpoint",
                "action"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "rate_limits"
        ],
        "additionalProperties": false
      }
    },
    "required": [
      "api_accessible",
      "data"
    ],
    "additionalProperties": false
  }
  ```
</details>

## Deepline cost

* Pricing model: `fixed` (per call).
* Estimated Deepline credits: `0` per pricing unit.
* Provider-native pricing may still exist outside Deepline credit billing.

## Related documentation

* [Connect integrations](https://deepline.com/docs/integrations.md)
* [SDK V2 quickstart](https://deepline.com/docs/sdk-v2/quickstart.md)
* [SDK reference](https://deepline.com/docs/sdk-v2/sdk-reference.md)
* [Run tools across a CSV](https://deepline.com/docs/sdk-v2/batch-csv.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.