apify-js-sdk
Apify JS SDK Documentation - Web scraping, crawling, and Actor development
What this skill does
# Apify-Js-Sdk Skill
Comprehensive assistance with Apify JavaScript SDK development for web scraping, crawling, and Actor creation. This skill provides access to official Apify documentation covering the API, SDK, and platform features.
## When to Use This Skill
This skill should be triggered when:
- Building web scrapers or crawlers with Apify
- Working with Apify Actors (creation, management, deployment)
- Using the Apify JavaScript Client to interact with the Apify API
- Managing Apify datasets, key-value stores, or request queues
- Implementing data extraction with Cheerio or other parsing libraries
- Setting up crawling workflows with link extraction and filtering
- Debugging Apify code or Actor runs
- Configuring logging and monitoring for Apify Actors
- Learning Apify platform best practices
## Key Concepts
### Actors
Serverless cloud programs running on the Apify platform. Actors can perform various tasks like web scraping, data processing, or automation.
### Datasets
Storage for structured data (results from scraping). Each Actor run can have an associated dataset where scraped data is stored.
### Key-Value Stores
Storage for arbitrary data like files, screenshots, or configuration. Each Actor run has a default key-value store.
### Request Queue
Queue for managing URLs to be crawled. Handles URL deduplication and retry logic automatically.
### Apify Client
JavaScript/Python library for interacting with the Apify API programmatically from your code.
## Quick Reference
### Basic Link Extraction with Cheerio
Extract all links from a webpage using Cheerio:
```javascript
import * as cheerio from 'cheerio';
import { gotScraping } from 'got-scraping';
const storeUrl = 'https://warehouse-theme-metal.myshopify.com/collections/sales';
const response = await gotScraping(storeUrl);
const html = response.body;
const $ = cheerio.load(html);
// Select all anchor elements
const links = $('a');
// Extract href attributes
for (const link of links) {
const url = $(link).attr('href');
console.log(url);
}
```
### Running an Actor with Apify Client
Call an Actor and wait for results:
```javascript
import { ApifyClient } from 'apify-client';
const client = new ApifyClient({
token: 'YOUR_API_TOKEN',
});
// Run an Actor and wait for it to finish
const run = await client.actor('some_actor_id').call();
// Get dataset items from the run
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);
```
### Creating and Managing Datasets
Store scraped data in a dataset:
```javascript
import { ApifyClient } from 'apify-client';
const client = new ApifyClient({
token: 'YOUR_API_TOKEN',
});
// Create a new dataset
const dataset = await client.datasets().getOrCreate('my-dataset');
// Add items to the dataset
await client.dataset(dataset.id).pushItems([
{ title: 'Product 1', price: 29.99 },
{ title: 'Product 2', price: 39.99 },
]);
// Retrieve items
const { items } = await client.dataset(dataset.id).listItems();
```
### Key-Value Store Operations
Store and retrieve arbitrary data:
```javascript
import { ApifyClient } from 'apify-client';
const client = new ApifyClient({
token: 'YOUR_API_TOKEN',
});
const store = await client.keyValueStores().getOrCreate('my-store');
// Store a value
await client.keyValueStore(store.id).setRecord({
key: 'config',
value: { apiUrl: 'https://api.example.com' },
});
// Retrieve a value
const record = await client.keyValueStore(store.id).getRecord('config');
console.log(record.value);
```
### Logging Configuration
Set up proper logging for Apify Actors:
```python
import logging
from apify.log import ActorLogFormatter
async def main() -> None:
handler = logging.StreamHandler()
handler.setFormatter(ActorLogFormatter())
apify_logger = logging.getLogger('apify')
apify_logger.setLevel(logging.DEBUG)
apify_logger.addHandler(handler)
```
### Using the Actor Context
Access Actor run context and storage:
```python
from apify import Actor
async def main() -> None:
async with Actor:
# Log messages
Actor.log.info('Starting Actor run')
# Access input
actor_input = await Actor.get_input()
# Save data to dataset
await Actor.push_data({
'url': 'https://example.com',
'title': 'Example Page'
})
# Save to key-value store
await Actor.set_value('OUTPUT', {'status': 'done'})
```
### Running an Actor Task
Execute a pre-configured Actor task:
```javascript
import { ApifyClient } from 'apify-client';
const client = new ApifyClient({
token: 'YOUR_API_TOKEN',
});
// Run a task with custom input
const run = await client.task('task-id').call({
startUrls: ['https://example.com'],
maxPages: 10,
});
console.log(`Task run: ${run.id}`);
```
### Redirecting Logs from Called Actors
Redirect logs from a called Actor to the parent run:
```python
from apify import Actor
async def main() -> None:
async with Actor:
# Default redirect logger
await Actor.call(actor_id='some_actor_id')
# No redirect logger
await Actor.call(actor_id='some_actor_id', logger=None)
# Custom redirect logger
await Actor.call(
actor_id='some_actor_id',
logger=logging.getLogger('custom_logger')
)
```
### Getting Actor Run Details
Retrieve information about an Actor run:
```javascript
import { ApifyClient } from 'apify-client';
const client = new ApifyClient({
token: 'YOUR_API_TOKEN',
});
// Get run details
const run = await client.run('run-id').get();
console.log(`Status: ${run.status}`);
console.log(`Started: ${run.startedAt}`);
console.log(`Finished: ${run.finishedAt}`);
```
### Listing Actor Builds
Get all builds for a specific Actor:
```javascript
import { ApifyClient } from 'apify-client';
const client = new ApifyClient({
token: 'YOUR_API_TOKEN',
});
const { items } = await client.actor('actor-id').builds().list({
limit: 10,
desc: true,
});
for (const build of items) {
console.log(`Build ${build.buildNumber}: ${build.status}`);
}
```
## Reference Files
This skill includes comprehensive documentation in the `references/` directory:
### llms-txt.md
Complete API reference documentation with detailed information on:
- **Actor Management**: Creating, updating, and running Actors
- **Builds**: Managing Actor builds and versions
- **Runs**: Controlling Actor execution and monitoring
- **Tasks**: Pre-configured Actor executions
- **Datasets**: Structured data storage and retrieval
- **Key-Value Stores**: Arbitrary data storage
- **Request Queues**: URL queue management
- **Client SDK**: JavaScript/Python client libraries
- **Logging**: Configuring and managing logs
### llms-full.md
Extensive documentation covering:
- Complete Apify API v2 reference
- All API endpoints with request/response examples
- Authentication and rate limiting
- Error handling
- Webhooks and integrations
### llms.md
High-level overview and getting started guide with:
- Platform concepts and architecture
- Quick start examples
- Common patterns and workflows
- Best practices for web scraping
## Working with This Skill
### For Beginners
Start with these concepts:
1. **Understanding Actors**: Review the Actors introduction to learn about the core building block
2. **First Scraper**: Use the link extraction examples to build your first web scraper
3. **Data Storage**: Learn about Datasets and Key-Value Stores for storing results
4. **API Basics**: Get familiar with the Apify Client for programmatic access
Key reference: `llms.md` for platform overview and getting started guides
### For Intermediate Users
Focus on these areas:
1. **Advanced Crawling**: Implement request queues and link filtering
2. **Actor Tasks**: Set up pre-configured runs with custom inputs
3. **Logging**: Configure proper logging with ActorLogFormatter
4. **Error Handling**: Implement retry logiRelated in Backend & APIs
jfrog
IncludedInteract with the JFrog Platform via the JFrog CLI and REST/GraphQL APIs. Use this skill when the user wants to manage Artifactory repositories, upload or download artifacts, manage builds, configure permissions, manage users and groups, work with access tokens, configure JFrog CLI servers, search artifacts, manage properties, set up replication, manage JFrog Projects, run security audits or scans, look up CVE details, query exposures scan results from JFrog Advanced Security, manage release bundles and lifecycle operations, aggregate or export platform data, or perform any JFrog Platform administration task. Also use when the user mentions jf, jfrog, artifactory, xray, distribution, evidence, apptrust, onemodel, graphql, workers, mission control, curation, advanced security, exposures, or any JFrog product name.
cupynumeric-migration-readiness
IncludedPre-migration readiness assessor for porting NumPy to cuPyNumeric. Use BEFORE substantial porting work begins when the user asks whether code will scale on GPU, whether they should migrate to cuPyNumeric, which NumPy patterns transfer cleanly, what must be refactored before porting, or mentions pre-port assessment, scaling analysis, or refactor planning. Inspect the user's source code, look up NumPy usage, cross-reference the cuPyNumeric API support manifest, and distinguish distributed-scaling-friendly patterns from blockers such as unsupported APIs, scalar synchronization, host round-trips, Python/object-heavy control flow, shape/data-dependent branching, and in-place mutation hazards. Produce a verdict of READY, LIGHT REFACTOR, SIGNIFICANT REFACTOR, or NOT RECOMMENDED, with concrete refactor pointers.
alibabacloud-data-agent-skill
IncludedInvoke Alibaba Cloud Apsara Data Agent for Analytics via CLI to perform natural language-driven data analysis on enterprise databases. Data Agent for Analytics is an intelligent data analysis agent developed by Alibaba Cloud Database team for enterprise users. It automatically completes requirement analysis, data understanding, analysis insights, and report generation based on natural language descriptions. This tool supports: discovering data resources (instances/databases/tables) managed in DMS, initiating query or deep analysis sessions, real-time progress tracking, and retrieving analysis conclusions and generated reports. Use this Skill when users need to query databases, analyze data trends, generate data reports, ask questions in natural language, or mention "Data Agent", "data analysis", "database query", "SQL analysis", "data insights".
token-optimizer
IncludedReduce OpenClaw token usage and API costs through smart model routing, heartbeat optimization, budget tracking, and native 2026.2.15 features (session pruning, bootstrap size limits, cache TTL alignment). Use when token costs are high, API rate limits are being hit, or hosting multiple agents at scale. The 4 executable scripts (context_optimizer, model_router, heartbeat_optimizer, token_tracker) are local-only — no network requests, no subprocess calls, no system modifications. Reference files (PROVIDERS.md, config-patches.json) document optional multi-provider strategies that require external API keys and network access if you choose to use them. See SECURITY.md for full breakdown.
resend-cli
IncludedUse this skill when the task is specifically about operating Resend from an AI agent, terminal session, or CI job via the official resend CLI: installing/authenticating the CLI, sending/listing/updating/cancelling emails, batch sends, domains and DNS, webhooks and local listeners, inbound receiving, contacts, topics, segments, broadcasts, templates, API keys, profiles, or debugging Resend CLI/API failures. Trigger on mentions of Resend CLI, `resend`, `resend doctor`, `resend emails send`, `resend domains`, `resend webhooks listen`, `resend emails receiving`, or agent-friendly terminal automation.
alibabacloud-odps-maxframe-coding
IncludedUse this skill for MaxFrame SDK development and documentation navigation on Alibaba Cloud MaxCompute (ODPS). Helps answer MaxFrame API, concept, official example, and supported pandas API questions; create data processing programs; read/write MaxCompute tables; debug jobs (remote or local); and build custom DPE runtime images. Trigger when users mention MaxFrame, MaxCompute with MaxFrame, ODPS table processing, DPE runtime, MaxFrame docs/examples, DataFrame/Tensor operations, or GPU runtime setup. Works for both English and Chinese queries about Alibaba Cloud data processing with MaxFrame.