1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = { "pages": [
9 {
10 "url": "https://example.com/",
11 "title": "Example Shop: Handmade Goods for Everyday Life",
12 "description": "Browse handmade goods for the home, from durable kitchenware to compact desk gear, shipped fast from our local workshop.",
13 "canonical": "https://example.com/",
14 "h1": ["Example Shop"],
15 "lang": "en",
16 "wordCount": 420,
17 },
18 {
19 "url": "https://example.com/products/widget",
20 "title": "Handmade Widget for Home and Office Use",
21 "canonical": "https://example.com/products/widget",
22 "h1": ["Handmade Widget"],
23 "lang": "en",
24 "wordCount": 310,
25 },
26 {
27 "url": "https://example.com/products/gadget",
28 "title": "The Ultimate Handmade Gadget with an Extremely Long Name That Keeps Going and Going Forever",
29 "description": "A compact handmade gadget that fits any desk, built from durable materials and finished by hand in our local workshop.",
30 "canonical": "https://example.com/products/gadget",
31 "h1": ["Ultimate Gadget"],
32 "lang": "en",
33 "wordCount": 280,
34 },
35 {
36 "url": "https://example.com/blog/seo-tips",
37 "title": "SEO Tips for Online Stores: A Practical Guide",
38 "description": "Practical tips for improving your online store visibility, from titles and descriptions to clean URLs and fast pages.",
39 "canonical": "https://example.com/blog/seo-tips",
40 "h1": ["SEO Tips"],
41 "lang": "en",
42 "wordCount": 650,
43 },
44 {
45 "url": "https://example.com/blog/seo-tips-2",
46 "title": "SEO Tips for Online Stores: A Practical Guide",
47 "description": "A second collection of ideas for growing store traffic with better metadata, structured pages and consistent internal links.",
48 "canonical": "https://example.com/blog/seo-tips-2",
49 "h1": [
50 "SEO Tips Part Two",
51 "More Tips",
52 ],
53 "lang": "en",
54 "wordCount": 540,
55 },
56 {
57 "url": "https://example.com/blog/old-post",
58 "title": "Our Old Post About Shipping Policies and Returns",
59 "description": "This older post explains how shipping and returns used to work before we moved to the new fulfillment partner last year.",
60 "canonical": "https://example.com/blog/new-post",
61 "h1": ["Old Shipping Post"],
62 "lang": "en",
63 "wordCount": 230,
64 },
65 ] }
66
67
68run = client.actor("hiredhandai/seo-metadata-auditor").call(run_input=run_input)
69
70
71print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
72for item in client.dataset(run.default_dataset_id).iterate_items():
73 print(item)
74
75