1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "compounds": [
10 {
11 "value": "aspirin",
12 "type": "name",
13 },
14 {
15 "value": "2244",
16 "type": "cid",
17 },
18 {
19 "value": "C8H9NO2",
20 "type": "formula",
21 },
22 ],
23 "maxItems": 10,
24 "maxResultsPerInput": 5,
25 "maxSynonyms": 20,
26}
27
28
29run = client.actor("automation-lab/pubchem-compound-batch-lookup").call(run_input=run_input)
30
31
32print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
33for item in client.dataset(run.default_dataset_id).iterate_items():
34 print(item)
35
36