{
  "openapi": "3.0.1",
  "info": {
    "title": "Website to OpenAPI Spec (Hidden API Reverse-Engineering)",
    "description": "Browse any website or web app in a real browser, capture its XHR, fetch and GraphQL calls, and get an OpenAPI 3.1 / Swagger spec of the hidden API behind it: endpoints, parameters, JSON schemas, auth and curl examples. Also converts HAR files. Works as an MCP server for AI agents.",
    "version": "0.0",
    "x-build-id": "Skex7om8cBJgEtse0"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/jixiaohao~network-to-openapi/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-jixiaohao-network-to-openapi",
        "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/jixiaohao~network-to-openapi/runs": {
      "post": {
        "operationId": "runs-sync-jixiaohao-network-to-openapi",
        "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/jixiaohao~network-to-openapi/run-sync": {
      "post": {
        "operationId": "run-sync-jixiaohao-network-to-openapi",
        "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",
        "properties": {
          "startUrls": {
            "title": "Pages to browse",
            "type": "array",
            "description": "Pages of the website or web app whose API you want documented. Links on the same host are followed up to Max pages, preferring pages of a kind not seen yet (one product page teaches as much as ten).",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "maxPages": {
            "title": "Max pages",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "How many pages to open, start URLs included. Each page is billed as page-captured. Free-plan runs browse at most 10.",
            "default": 10
          },
          "crawlScope": {
            "title": "Follow links",
            "enum": [
              "sameHostname",
              "sameSite",
              "none"
            ],
            "type": "string",
            "description": "Which links to follow from the start pages.",
            "default": "sameHostname"
          },
          "harUrls": {
            "title": "HAR files",
            "type": "array",
            "description": "URLs of HAR files to convert (Chrome/Firefox DevTools > Network > Save all as HAR, or Charles, Proxyman, mitmproxy). Upload one to a key-value store or any file host and paste its URL. Works with or without pages to browse; no page charges for HAR traffic.",
            "items": {
              "type": "string"
            }
          },
          "apiScope": {
            "title": "Which APIs to document",
            "enum": [
              "site",
              "all"
            ],
            "type": "string",
            "description": "Site: the site's own API hosts plus hosted backends its front end calls directly (Algolia, Supabase, Firebase, Shopify, Contentful, AWS API Gateway...). All: every host except analytics, ads, chat widgets and other trackers.",
            "default": "site"
          },
          "includeUrlPatterns": {
            "title": "Only these API URLs",
            "type": "array",
            "description": "Regular expressions; when set, only API calls whose URL matches one are documented (and matching calls are kept even if they would be filtered out otherwise), e.g. \"/api/v2/\".",
            "items": {
              "type": "string"
            }
          },
          "excludeUrlPatterns": {
            "title": "Skip these API URLs",
            "type": "array",
            "description": "Regular expressions for API calls to leave out, e.g. \"/feature-flags\".",
            "items": {
              "type": "string"
            }
          },
          "clickSelectors": {
            "title": "Click these elements",
            "type": "array",
            "description": "CSS selectors clicked on every page (first 3 matches each) to trigger API calls that only happen on interaction: tabs, filters, \"show details\". Buttons that could change data (delete, buy, submit, log out) should not be listed here.",
            "items": {
              "type": "string"
            }
          },
          "clickLoadMore": {
            "title": "Click \"Load more\" buttons",
            "type": "boolean",
            "description": "Click up to 2 visible buttons labelled Load more, Show more, Next and similar on each page. Anything that looks like delete, buy, submit or log out is never clicked.",
            "default": true
          },
          "scrolls": {
            "title": "Scroll steps",
            "minimum": 0,
            "maximum": 30,
            "type": "integer",
            "description": "Scroll down this many screens on each page to trigger lazy loading and infinite scroll.",
            "default": 3
          },
          "waitSecs": {
            "title": "Wait after load (seconds)",
            "minimum": 0,
            "maximum": 60,
            "type": "integer",
            "description": "Extra time on each page after it loads and the network goes quiet, for late API calls.",
            "default": 3
          },
          "cookies": {
            "title": "Cookies (logged-in session)",
            "type": "array",
            "description": "To document the API behind a login: cookies exported from your browser with an extension such as Cookie-Editor (JSON export). Their values are redacted in the output."
          },
          "headers": {
            "title": "Extra request headers",
            "type": "object",
            "description": "Headers sent with every request, e.g. {\"Authorization\": \"Bearer ...\"} for an app that keeps its token outside cookies. Values are redacted in the output."
          },
          "title": {
            "title": "Spec title",
            "type": "string",
            "description": "info.title of the generated spec. Default: \"<host> API (inferred)\"."
          },
          "includeExamples": {
            "title": "Include examples",
            "type": "boolean",
            "description": "Put a redacted example request and response for each endpoint in the spec.",
            "default": true
          },
          "redactPersonalData": {
            "title": "Redact personal data",
            "type": "boolean",
            "description": "Replace email addresses in examples. Tokens, passwords, API keys, cookies and JWTs are always redacted.",
            "default": true
          },
          "blockMedia": {
            "title": "Skip images, video and fonts",
            "type": "boolean",
            "description": "Faster and cheaper; turn off only if the site's API calls depend on media loading.",
            "default": true
          },
          "maxConcurrency": {
            "title": "Pages in parallel",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Browser tabs open at once.",
            "default": 3
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "No proxy by default: pages load fastest from Apify's own IPs. Turn on a proxy (residential for strict sites) if the site blocks the run. If nothing is captured through the proxy, the run browses again without it.",
            "default": {
              "useApifyProxy": false
            }
          }
        }
      },
      "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}