1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "svg": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 200 200\" width=\"200\" height=\"200\"> <defs> <linearGradient id=\"g\" x1=\"0\" y1=\"0\" x2=\"1\" y2=\"1\"> <stop offset=\"0\" stop-color=\"#f97316\"/> <stop offset=\"1\" stop-color=\"#dc2626\"/> </linearGradient> </defs> <circle cx=\"100\" cy=\"100\" r=\"90\" fill=\"url(#g)\"/> <path d=\"M60 110 L90 140 L145 70\" fill=\"none\" stroke=\"#ffffff\" stroke-width=\"18\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/> </svg>",
10 "sizes": [
11 16,
12 32,
13 48,
14 180,
15 192,
16 512,
17 ],
18}
19
20
21run = client.actor("mauberme/logo-to-social-images").call(run_input=run_input)
22
23
24print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
25for item in client.dataset(run.default_dataset_id).iterate_items():
26 print(item)
27
28