{
  "openapi": "3.0.1",
  "info": {
    "title": "Site Audit: SEO, Broken Links & AI-Crawler Check",
    "description": "Audit a public website over plain HTTP: on-page SEO, broken links, sitemap and robots.txt, llms.txt and AI-crawler rules, security headers and the TLS certificate. One row per page, with each issue's severity, reason and fix.",
    "version": "1.0",
    "x-build-id": "WOj5x50dcUH3Ogz4B"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/gapforge~site-audit/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-gapforge-site-audit",
        "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/gapforge~site-audit/runs": {
      "post": {
        "operationId": "runs-sync-gapforge-site-audit",
        "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/gapforge~site-audit/run-sync": {
      "post": {
        "operationId": "run-sync-gapforge-site-audit",
        "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": "Sites to audit",
            "minItems": 1,
            "maxItems": 20,
            "uniqueItems": true,
            "type": "array",
            "description": "One address per site, for example https://example.com. The audit starts at this address and stays on its host (with or without www). Two addresses on the same host are audited once. Public sites only.",
            "items": {
              "type": "string",
              "minLength": 4,
              "maxLength": 2000
            }
          },
          "maxPagesPerSite": {
            "title": "Maximum pages per site",
            "minimum": 1,
            "maximum": 2000,
            "type": "integer",
            "description": "The audit stops after this many pages on each site. You pay per page, so this number also caps what a run can cost. 25 pages is a good first try; raise it to audit a bigger site (up to 2,000). Left empty, it audits up to 100 pages.",
            "default": 100
          },
          "useSitemap": {
            "title": "Start from the sitemap too",
            "type": "boolean",
            "description": "On: pages listed in the site's sitemaps (from robots.txt and /sitemap.xml) are audited along with the pages found by following links. Off: only pages reached by links from the start address are audited. The sitemap itself is read and reported either way.",
            "default": true
          },
          "maxRequestsPerSecond": {
            "title": "Maximum requests per second (per host)",
            "minimum": 1,
            "maximum": 5,
            "type": "integer",
            "description": "How fast the audit may ask one host for pages. A Crawl-delay in the site's robots.txt that is slower than this setting is used instead.",
            "default": 2
          },
          "checkExternalLinks": {
            "title": "Check links to other sites",
            "type": "boolean",
            "description": "On: links that point to other sites are tested too (a light HEAD request, then GET if needed), up to the limit below, and dead ones are listed in brokenLinks. Off: links between pages of the audited site are still tested.",
            "default": false
          },
          "maxExternalLinksPerSite": {
            "title": "Maximum external links per site",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "With \"Check links to other sites\" on: test at most this many different external links per site. The site row says how many were left untested.",
            "default": 200
          },
          "checkSecurityHeaders": {
            "title": "Security checks",
            "type": "boolean",
            "description": "Check the http to https redirect, six security headers on the start page, and the TLS certificate (days until it expires, issuer).",
            "default": true
          },
          "checkAiReadiness": {
            "title": "AI-readiness checks",
            "type": "boolean",
            "description": "Check /llms.txt and /llms-full.txt, and report what robots.txt tells each of 12 AI crawlers (GPTBot, ClaudeBot, PerplexityBot and others) about the home page.",
            "default": true
          },
          "onlyChanges": {
            "title": "Only new or fixed issues since last run",
            "type": "boolean",
            "description": "Monitor mode. Deliver (and charge for) a page row only when the page has an issue that is new, or an issue that has gone, compared with the last run that used the same state key. The first run reports each current issue as new.",
            "default": false
          },
          "stateKey": {
            "title": "State key",
            "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$",
            "minLength": 1,
            "maxLength": 40,
            "type": "string",
            "description": "Name of the memory used by monitor mode. Use different keys for different schedules, e.g. weekly-my-site. Lower-case letters and digits, with single dashes between them. The memory is a key-value store in your account named site-audit-state-KEY; delete it to start fresh.",
            "default": "default"
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}