{
  "openapi": "3.0.1",
  "info": {
    "title": "apx-toolkit",
    "description": "Discover APIs. Generate code. Save weeks of work.",
    "version": "1.0",
    "x-build-id": "kL83SVQdoVjvDlBvO"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/irun2themoney~apx-toolkit/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-irun2themoney-apx-toolkit",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/irun2themoney~apx-toolkit/runs": {
      "post": {
        "operationId": "runs-sync-irun2themoney-apx-toolkit",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/irun2themoney~apx-toolkit/run-sync": {
      "post": {
        "operationId": "run-sync-irun2themoney-apx-toolkit",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "required": [
          "startUrls"
        ],
        "properties": {
          "startUrls": {
            "title": "Start URLs",
            "type": "array",
            "description": "Array of URLs to start the discovery process from. APX will visit these URLs and discover any APIs they use. Tip: Use web pages (not direct API endpoints) for best results."
          },
          "apiPatterns": {
            "title": "API URL Patterns (Advanced)",
            "type": "array",
            "description": "Optional: Filter specific API endpoints by URL pattern. Examples: ['/api/', '/v1/data']. Leave empty to auto-detect all JSON responses.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "minResponseSize": {
            "title": "Minimum Response Size (bytes)",
            "minimum": 0,
            "type": "integer",
            "description": "Filter out small responses (like config files). Default: 1000 bytes. Increase to focus on larger data APIs.",
            "default": 1000
          },
          "discoveryTimeout": {
            "title": "Discovery Timeout (ms)",
            "minimum": 1000,
            "type": "integer",
            "description": "How long to wait for API discovery on each page. Default: 10 seconds. Increase for slower sites.",
            "default": 10000
          },
          "maxPages": {
            "title": "Maximum Pages",
            "minimum": 1,
            "type": "integer",
            "description": "Maximum number of API pages to process. Default: 100. Increase to get more data, decrease for faster runs.",
            "default": 100
          },
          "maxConcurrency": {
            "title": "Max Concurrency",
            "minimum": 1,
            "type": "integer",
            "description": "Number of API requests to make simultaneously. Default: 5. Increase for speed (but may hit rate limits).",
            "default": 5
          },
          "dataPath": {
            "title": "Data Path",
            "type": "string",
            "description": "JSONPath to extract data items from API response (e.g., 'data.items', 'results'). If empty, will auto-detect",
            "default": ""
          },
          "paginationType": {
            "title": "Pagination Type",
            "enum": [
              "auto",
              "offset",
              "page",
              "cursor"
            ],
            "type": "string",
            "description": "Type of pagination to use",
            "default": "auto"
          },
          "generateDocumentation": {
            "title": "Generate API Documentation",
            "type": "boolean",
            "description": "Automatically generate API documentation in multiple formats (OpenAPI, Postman, cURL, Insomnia)",
            "default": true
          },
          "exportFormats": {
            "title": "Export Formats",
            "type": "array",
            "description": "Formats to export API documentation (openapi, postman, curl, insomnia)",
            "items": {
              "type": "string",
              "enum": [
                "openapi",
                "postman",
                "curl",
                "insomnia"
              ]
            },
            "default": [
              "openapi",
              "postman",
              "curl"
            ]
          },
          "enableInteractionSimulation": {
            "title": "Enable Interaction Simulation",
            "type": "boolean",
            "description": "Automatically scroll and click elements to trigger APIs on landing pages (default: true)",
            "default": true
          },
          "interactionWaitTime": {
            "title": "Interaction Wait Time (ms)",
            "minimum": 500,
            "maximum": 10000,
            "type": "integer",
            "description": "Time to wait after each interaction in milliseconds (default: 2000)",
            "default": 2000
          },
          "authHeaders": {
            "title": "Authentication Headers",
            "type": "object",
            "description": "Custom authentication headers (e.g., {\"Authorization\": \"Bearer TOKEN\"})",
            "default": {}
          },
          "apiKey": {
            "title": "API Key",
            "type": "string",
            "description": "API key for authentication (will be added as X-API-Key header)"
          },
          "bearerToken": {
            "title": "Bearer Token",
            "type": "string",
            "description": "Bearer token for authentication (will be added as Authorization: Bearer TOKEN header)"
          },
          "loginUrl": {
            "title": "Login URL (OAuth Flow)",
            "type": "string",
            "description": "URL for OAuth 2.0 login flow. APX will navigate to this URL and capture authentication tokens automatically"
          },
          "oauthFlow": {
            "title": "Enable OAuth Flow",
            "type": "boolean",
            "description": "Enable automatic OAuth 2.0 token capture from login flow (requires loginUrl)",
            "default": false
          },
          "generateGitHubActions": {
            "title": "Generate GitHub Actions",
            "type": "boolean",
            "description": "Generate GitHub Actions workflow for automated API discovery",
            "default": true
          },
          "generateSecurityReport": {
            "title": "Generate Security Audit Report",
            "type": "boolean",
            "description": "Generate security audit report for discovered APIs",
            "default": true
          },
          "generateEnhancedDocs": {
            "title": "Generate Enhanced Documentation",
            "type": "boolean",
            "description": "Generate markdown documentation with JSDoc comments",
            "default": true
          },
          "enableGitIntegration": {
            "title": "Enable Git Integration",
            "type": "boolean",
            "description": "Automatically commit generated files to git (requires git repository)",
            "default": false
          },
          "generateMockServer": {
            "title": "Generate Mock Server",
            "type": "boolean",
            "description": "Auto-generate production-ready mock server from discovered APIs (Express.js/Fastify). Uses real API response data.",
            "default": true
          },
          "generatePerformanceBenchmark": {
            "title": "Generate Performance Benchmark",
            "type": "boolean",
            "description": "Benchmark all API endpoints and generate performance reports with k6/Artillery load test scripts.",
            "default": true
          },
          "generateContractTests": {
            "title": "Generate Contract Tests",
            "type": "boolean",
            "description": "Generate contract tests (Pact, Schemathesis) to prevent breaking changes. Includes CI/CD integration.",
            "default": true
          },
          "generateMCPIntegration": {
            "title": "Generate MCP Integration",
            "type": "boolean",
            "description": "Generate Model Context Protocol (MCP) integration for AI assistant compatibility. Enables AI models to discover and interact with APIs.",
            "default": true
          },
          "generateX402Integration": {
            "title": "Generate x402 Protocol Integration",
            "type": "boolean",
            "description": "Detect and handle x402 payment-required API endpoints. Auto-generates payment handling code.",
            "default": true
          },
          "generateDependencyGraph": {
            "title": "Generate Dependency Graph",
            "type": "boolean",
            "description": "Create visual dependency graph showing API relationships, critical paths, and bottlenecks. Generates interactive HTML and Mermaid diagrams.",
            "default": true
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}