1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "apiSpec": "https://petstore3.swagger.io/api/v3/openapi.json",
10 "manualEndpoints": [{
11 "name": "getUser",
12 "method": "GET",
13 "path": "/users/{id}",
14 "description": "Get a user by ID",
15 "parameters": [{
16 "name": "id",
17 "type": "string",
18 "in": "path",
19 "required": True,
20 "description": "User ID",
21 }],
22 }],
23 "baseUrl": "https://api.example.com/v1",
24}
25
26
27run = client.actor("maximus242/mcp-gateway").call(run_input=run_input)
28
29
30print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
31for item in client.dataset(run.default_dataset_id).iterate_items():
32 print(item)
33
34