1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "endpoints": [
10 {
11 "url": "https://api.bitbucket.org/2.0/repositories",
12 "method": "GET",
13 },
14 {
15 "url": "https://postman-echo.com/response-headers?Deprecation=%401735689600&Sunset=Wed%2C%2031%20Dec%202031%2023%3A59%3A59%20GMT&Link=%3Chttps%3A%2F%2Fpostman-echo.com%2Fget%3E%3B%20rel%3D%22successor-version%22",
16 "method": "GET",
17 },
18 {
19 "url": "https://api.github.com/",
20 "method": "GET",
21 "headers": { "X-GitHub-Api-Version": "2022-11-28" },
22 },
23 {
24 "url": "https://gitlab.com/api/v3/projects",
25 "method": "GET",
26 },
27 ],
28 "sunset_warning_days": 90,
29 "alert_webhook_url": "",
30 "baseline_name": "DEFAULT",
31 "request_timeout_seconds": 15,
32 "concurrency": 5,
33 "max_redirects": 3,
34 "max_run_seconds": 240,
35}
36
37
38run = client.actor("kingii98/third-party-api-deprecation-and-sunset-header-watch").call(run_input=run_input)
39
40
41print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
42for item in client.dataset(run.default_dataset_id).iterate_items():
43 print(item)
44
45