1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = { "markdown": """# Quarterly Report: Q3 2026
9
10**Prepared by** the analytics agent, October 2026
11
12## Summary
13
14Revenue grew **18%** quarter over quarter, driven by the new self-serve plan.
15
16| Metric | Q2 | Q3 | Change |
17| --- | ---: | ---: | ---: |
18| Revenue | $1.20M | $1.42M | +18% |
19| New customers | 310 | 402 | +30% |
20| Churn | 3.1% | 2.6% | −0.5 pts |
21
22## How a visitor becomes a customer
23
24```mermaid
25flowchart LR
26 A[Visit] --> B[Free trial]
27 B --> C{Activated?}
28 C -->|Yes| D[Paid plan]
29 C -->|No| E[Nurture emails]
30 E --> B
31```
32
33## Forecast
34
35Next quarter's revenue is estimated with compound monthly growth:
36
37$$R_{t+3} = R_t \\times (1 + g)^{3}, \\quad g = 0.06$$
38
39```python
40def forecast(revenue, growth=0.06, months=3):
41 return revenue * (1 + growth) ** months
42```
43
44> [!NOTE]
45> Figures are unaudited.
46
47## Next steps
48
49- [x] Launch the self-serve plan
50- [ ] Add annual billing
51""" }
52
53
54run = client.actor("jumblemog/markdown-to-pdf").call(run_input=run_input)
55
56
57print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
58for item in client.dataset(run.default_dataset_id).iterate_items():
59 print(item)
60
61