How do I run these from code, or from an AI agent?
They are Apify Actors, so there is nothing tool-specific to learn: one HTTP call starts a run, and the results come back as JSON. For short jobs the synchronous endpoint does both at once, which is all most people ever need.
One call, results back
curl -X POST \
"https://api.apify.com/v2/acts/power_on~sitemap-url-list/run-sync-get-dataset-items" \
-H "Authorization: Bearer $APIFY_TOKEN" \
-H "Content-Type: application/json" \
-d '{"startUrls": ["https://nodejs.org"], "reportOnly": true}'
[
{
"website": "https://nodejs.org",
"recordType": "sitemap-report",
"sitemapUrl": "https://nodejs.org/sitemap.xml",
"discoveredVia": "robots.txt",
"status": "ok",
"urlCount": 1645,
"note": ""
},
{
"website": "https://nodejs.org",
"recordType": "sitemap-report",
"sitemapUrl": "https://nodejs.org/learn/sitemap.xml",
"discoveredVia": "robots.txt",
"status": "ok",
"urlCount": 88,
"note": ""
},
{
"website": "https://nodejs.org",
"recordType": "sitemap-report",
"sitemapUrl": "all files above",
"status": "total for this website",
"urlCount": 1733,
"note": "1733 URL(s) across 2 sitemap file(s). Report only: no URLs were returned and nothing was charged."
}
]
The Actor name goes in the path with a tilde instead of the slash
(power_on~sitemap-url-list), the input is the request body, and the array you get
back is the run's dataset. Put the token in the Authorization header rather than in
a ?token= query string: URLs end up in logs, proxies and browser history, headers
usually do not.
For longer jobs
A synchronous call has to finish inside the HTTP request, so for a big site or a long list
start the run instead — POST /v2/acts/<actor>/runs with the same body — and
read defaultDatasetId from the response. Poll
GET /v2/actor-runs/<runId> until status is terminal, then fetch
GET /v2/datasets/<datasetId>/items. Official clients for JavaScript and
Python wrap all of this, and a webhook can call you instead of you polling.
From an AI agent
Apify runs an MCP server at mcp.apify.com: an agent that speaks the Model
Context Protocol can search the store, read an Actor's input schema and call it, without you
wiring up any of the endpoints above. These four are pay-per-event with ordinary permissions,
which is the category it supports. The names to give an agent are:
power_on/sitemap-url-list— every page URL of a site, from its sitemapspower_on/screenshot-url-pdf— screenshots and PDFs, from URLs or from your HTMLpower_on/pdf-to-json-extractor— tables, text, metadata and form fields out of a PDFpower_on/tech-stack-audit— what a site is built with, with the evidence
Each one's input schema is published on its Apify page, and the store page carries a set of saved example inputs you can copy as a starting point.
What a run costs you, mechanically
Billing is per event — per URL, per capture, per page, per site — and the run record tells
you exactly what you were charged for in chargedEventCounts. There is no start fee,
so a run that produces nothing costs nothing. You can also cap a run from the outside with
maxTotalChargeUsd, and it will stop rather than exceed it.