# test Crawler (`lemesdaniel/test-crawler`) Actor

- **URL**: https://apify.com/lemesdaniel/test-crawler.md
- **Developed by:** [Daniel Lemes](https://apify.com/lemesdaniel) (community)
- **Categories:** Social media, Integrations, Developer tools
- **Security:** Full permissions
- **Stats:** 12 total users, 0 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$2.00 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Spotify Data Crawler

Extract detailed information from Spotify albums and artists using the official Spotify web API. This Actor can process up to 100 items in a single run, making it perfect for bulk data extraction.

### 🎵 What it does

This crawler:

- Fetches detailed album or artist data using Spotify's GraphQL API
- Processes multiple items (up to 100) in batch
- Returns structured data ready for analysis

### 📊 Output

The Actor returns structured data for each requested item including:

- **Albums**: Track listings, duration, release info, artist details
- **Artists**: Discography, follower count, genres, related artists

### 🚀 Input Configuration

Configure your crawl with these parameters:

#### Content Type

Choose what type of content to extract:

- `album` - Album information and track listings
- `artist` - Artist profile and discography data

#### Spotify IDs

Provide a list of Spotify IDs (maximum 100):

- Each ID should be exactly 22 characters
- Get IDs from Spotify URLs: `https://open.spotify.com/album/4aawyAB9vmqN3uQ7FjRGTy`
- The ID is the part after the last slash: `4aawyAB9vmqN3uQ7FjRGTy`

#### Example Input

```json
{
  "request_type": "album", 
  "ids": [
    "4aawyAB9vmqN3uQ7FjRGTy",
    "1DFixLWuPkv3KT3TnV35m3",
    "2noRn2Aes5aoNVsU6iWThc"
  ]
}
```

### 💡 Use Cases

- **Music Analytics**: Analyze album performance and track popularity
- **Playlist Curation**: Gather detailed info for playlist recommendations
- **Artist Research**: Study discographies and artist relationships
- **Data Analysis**: Export Spotify data for research projects

### 📈 Performance

- Processes up to 100 items per run
- Average processing time: ~1-2 seconds per item
- Built-in rate limiting prevents API throttling
- Efficient token reuse across multiple requests

### 🔍 Data Quality

- Direct access to official Spotify data
- Real-time information (not cached)
- Complete track and artist metadata
- Structured JSON output format

### 🚀 Getting Started

1. Add your Spotify IDs to the input
2. Choose content type (album or artist)
3. Run the Actor
4. Download results from the dataset

Perfect for music industry professionals, researchers, and developers building music-related applications.

# Actor input Schema

## `request_type` (type: `string`):

Type of Spotify content to crawl

## `ids_text` (type: `string`):

Enter Spotify IDs separated by commas or new lines (max 100). Each ID should be 22 characters long. Example: 4aawyAB9vmqN3uQ7FjRGTy,1DFixLWuPkv3KT3TnV35m3

## Actor input object example

```json
{
  "request_type": "album",
  "ids_text": "4aawyAB9vmqN3uQ7FjRGTy,1DFixLWuPkv3KT3TnV35m3,2noRn2Aes5aoNVsU6iWThc"
}
```

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "ids_text": "4aawyAB9vmqN3uQ7FjRGTy,1DFixLWuPkv3KT3TnV35m3,2noRn2Aes5aoNVsU6iWThc"
};

// Run the Actor and wait for it to finish
const run = await client.actor("lemesdaniel/test-crawler").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "ids_text": "4aawyAB9vmqN3uQ7FjRGTy,1DFixLWuPkv3KT3TnV35m3,2noRn2Aes5aoNVsU6iWThc" }

# Run the Actor and wait for it to finish
run = client.actor("lemesdaniel/test-crawler").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "ids_text": "4aawyAB9vmqN3uQ7FjRGTy,1DFixLWuPkv3KT3TnV35m3,2noRn2Aes5aoNVsU6iWThc"
}' |
apify call lemesdaniel/test-crawler --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,lemesdaniel/test-crawler"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/TQyL1tpXK0OlXU01b/builds/96d5GXgDw95jioKjC/openapi.json
