1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "beforeXml": "<urlset xmlns=\"http://www.sitemaps.org/schemas/sitemap/0.9\"><url><loc>https://example.com/keep</loc><lastmod>2026-09-01</lastmod></url><url><loc>https://example.com/old</loc></url></urlset>",
10 "afterXml": "<urlset xmlns=\"http://www.sitemaps.org/schemas/sitemap/0.9\"><url><loc>https://example.com/keep</loc><lastmod>2026-09-02</lastmod></url><url><loc>https://example.com/new</loc></url></urlset>",
11}
12
13
14run = client.actor("ecomopskits/sitemap-snapshot-diff").call(run_input=run_input)
15
16
17print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
18for item in client.dataset(run.default_dataset_id).iterate_items():
19 print(item)
20
21