1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = { "items": [
9 {
10 "url": "https://example.com/a",
11 "title": "Page A",
12 "text": "Deterministic token budgeting helps agent pipelines avoid surprise embedding bills before vector upsert.",
13 },
14 {
15 "url": "https://example.com/b",
16 "title": "Page B",
17 "markdown": "Second document with enough characters to exercise percentile stats and multi-model cost rows.",
18 },
19 {
20 "url": "https://example.com/empty",
21 "title": "Empty",
22 },
23 ] }
24
25
26run = client.actor("fg-ei/dataset-llm-cost-estimator").call(run_input=run_input)
27
28
29print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
30for item in client.dataset(run.default_dataset_id).iterate_items():
31 print(item)
32
33