Guides
Guides
Copy-paste examples for the most common ways to run an Actor.
1. Run it from the Apify console
Open the Actor on Apify Store, press Try for free, fill in the input form and press Start. When the run finishes, open the Output tab to preview and download the dataset.
2. Run it from the API
Use your Apify API token in the Authorization header. This starts a run and waits for the results in one request.
curl -X POST \
"https://api.apify.com/v2/acts/rawtojson~telegram-channel-scraper/run-sync-get-dataset-items" \
-H "Authorization: Bearer YOUR_APIFY_TOKEN" \
-H "Content-Type: application/json" \
-d '{"channels": ["durov"], "maxMessagesPerChannel": 20}'3. JavaScript client
Install the client with npm install apify-client.
import { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: process.env.APIFY_TOKEN });
const run = await client.actor('rawtojson/telegram-channel-scraper').call({
channels: ['durov'],
onlyNewMessages: true,
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items.length, 'new messages');4. Python client
Install it with pip install apify-client.
from apify_client import ApifyClient
client = ApifyClient("YOUR_APIFY_TOKEN")
run = client.actor("rawtojson/telegram-channel-scraper").call(
run_input={"channels": ["durov"], "maxMessagesPerChannel": 50}
)
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
print(item["date"], item["views"], item["text"][:80])5. n8n
Add the Apify node, choose Run an Actor, and select rawtojson/telegram-channel-scraper. Paste your input JSON, then add a second Apify node, Get dataset items, to read the results.
To get alerts: put a Schedule Trigger in front, set onlyNewMessages to true, and connect the output to Slack, Telegram or email. Only new messages come through, and you pay only for those.
6. Make
Use the Apify module Run an Actor, then Get Dataset Items. Schedule the scenario and map the fields (text, views, url, date) to your next step.
7. AI agents (MCP)
Connect your agent to the Apify MCP server and enable the Actor. Because the input schema is small and flat, a model can call it with a natural request such as “get the last 30 messages from this channel”.
Server address: https://mcp.apify.com. Follow Apify’s documentation to add it to Claude, Cursor or another MCP client.