Apify Key Rotator for Openclaw

A smart API key management system that rotates Apify keys based on least-recently-used logic and real-time balance checking.

aces1up
v1.0.0
Mar 24, 2026
0
725
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install apify-keys

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install apify-keys using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is Apify Key Rotator?

The Apify Key Rotator is a specialized utility designed to manage multiple Apify API keys through the ColdCore database infrastructure. By integrating this skill, developers can ensure their automated scrapers and agents always have access to an active, high-balance key without manual intervention. It serves as a foundational component for scaling web scraping operations within the Openclaw Skills framework.

This skill eliminates the bottleneck of hardcoded API keys and prevents account exhaustion by intelligently selecting the least-recently-used (LRU) account. It provides a robust interface for querying account health, checking remaining credits, and piping credentials directly into other automated workflows.

Apify Key Rotator Use Cases

  • High-volume web scraping tasks requiring multiple Apify accounts to bypass rate limits.
  • Automated lead generation pipelines that need constant, uninterrupted API access.
  • Cost-management scenarios where monitoring account balances across multiple keys is required.
  • Multi-agent systems within Openclaw Skills that share a common pool of scraping resources.

How Apify Key Rotator Works

  1. The script establishes a secure connection to the ColdCore MySQL database using environment-configured credentials.
  2. It queries the database for active Apify accounts specifically within the accounts table.
  3. The system identifies the account with the oldest usage timestamp to ensure even distribution across your key pool.
  4. It performs a validation check to ensure the selected key has a positive credit balance.
  5. Upon selection, the skill updates the account's last_used timestamp and returns the key to the calling process.

Apify Key Rotator Setup

To deploy this skill, ensure your environment variables are configured to point to your ColdCore instance:

export COLDCORE_HOST='your_host'
export COLDCORE_USER='your_user'
export COLDCORE_PASS='your_password'
export COLDCORE_DB='lead_generator'

Run the following command to verify the installation and list available Openclaw Skills keys:

python3 ~/.openclaw/workspace/skills/apify-keys/scripts/get_key.py --list

Apify Key Rotator Data Schema & Taxonomy

The skill interacts with the ColdCore database schema to track account health and usage history. Below is the primary metadata taxonomy:

Field Type Description
id Integer Unique identifier for the Apify account.
api_key String The actual Apify API token used for authentication.
email String The email address associated with the Apify account.
balance Float The remaining credit balance available on the key.
last_used Timestamp Tracked to facilitate the least-recently-used rotation logic.

Apify Key Rotator Advanced Features

  • Smart Load Balancing: Uses LRU (Least Recently Used) logic to maximize account longevity and minimize rate-limiting risks.
  • JSON Output Support: Use the --json flag to return structured data, making it easy to integrate with other Openclaw Skills via shell piping or Python sub-processes.
  • Automated Balance Guard: Automatically skips any keys that have zero credits, preventing runtime errors in downstream scraping scripts.
  • Integration Ready: Designed to be a 'provider' skill that can be called by any other agent or script requiring Apify access.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*