{
  "openapi": "3.0.1",
  "info": {
    "title": "Sitemap Extractor & Per-URL robots.txt Checker",
    "description": "Give it a website. It reads robots.txt, finds and follows the sitemaps, and returns the listed URLs — up to the maxUrls cap — with last-modified dates, a page type, and whether robots.txt allows a crawler you name (Googlebot, GPTBot) to fetch it.",
    "version": "0.1",
    "x-build-id": "7ZftBVFYljvxGh2Uq"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/kopachelli~sitemap-extractor-robots-checker/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-kopachelli-sitemap-extractor-robots-checker",
        "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/kopachelli~sitemap-extractor-robots-checker/runs": {
      "post": {
        "operationId": "runs-sync-kopachelli-sitemap-extractor-robots-checker",
        "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/kopachelli~sitemap-extractor-robots-checker/run-sync": {
      "post": {
        "operationId": "run-sync-kopachelli-sitemap-extractor-robots-checker",
        "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": "Websites or sitemaps",
            "maxItems": 10000,
            "type": "array",
            "description": "Websites (https://docs.apify.com) or sitemap files (https://docs.apify.com/sitemap.xml). For a website, the Actor reads robots.txt and finds the sitemaps itself. For the address of a page, the root of its site is used. For a sitemap file, only that sitemap is read.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "maxUrls": {
            "title": "Maximum number of URLs",
            "minimum": 1,
            "maximum": 1000000,
            "type": "integer",
            "description": "The run stops when it has returned this many URLs. There is no \"unlimited\": the largest value is 1,000,000.",
            "default": 1000
          },
          "robotsUserAgent": {
            "title": "Check robots.txt for this crawler",
            "maxLength": 200,
            "type": "string",
            "description": "Every returned URL says whether the site's robots.txt allows this crawler to fetch it, or that it cannot be known. Write the name of the crawler, for example Googlebot, Bingbot, GPTBot or ClaudeBot. A whole User-Agent string works too: the name after \"compatible;\" is used. The value * means the rules for all crawlers.",
            "default": "*"
          },
          "includePatterns": {
            "title": "Keep only URLs that match",
            "maxItems": 100,
            "type": "array",
            "description": "Regular expressions, at most 100 of 300 characters each. A URL is kept if it matches at least one of them, in its written form or its decoded form: /café/ also matches /caf%C3%A9/. Expressions with look-ahead or look-behind are not accepted. Leave empty to keep all URLs.",
            "items": {
              "type": "string",
              "maxLength": 300
            },
            "default": []
          },
          "excludePatterns": {
            "title": "Drop URLs that match",
            "maxItems": 100,
            "type": "array",
            "description": "Regular expressions, at most 100 of 300 characters each. A URL that matches one of them is dropped, in its written or decoded form. Example: \\?page=\\d+$ drops paginated lists.",
            "items": {
              "type": "string",
              "maxLength": 300
            },
            "default": []
          },
          "modifiedAfter": {
            "title": "Changed on or after",
            "type": "string",
            "description": "Keep only URLs whose last-modified date in the sitemap is this day or later. The day starts at 00:00 UTC and the sitemap dates are compared in UTC. URLs for which the sitemap gives no date are dropped when this is set."
          },
          "discoverSitemaps": {
            "title": "Try the common sitemap addresses",
            "type": "boolean",
            "description": "When robots.txt names no sitemap, try /sitemap.xml, /sitemap_index.xml, /sitemap-index.xml, /wp-sitemap.xml, /sitemap.xml.gz and /sitemap.txt, and use the first that holds a sitemap.",
            "default": true
          },
          "includeExtensions": {
            "title": "Add images and language versions",
            "type": "boolean",
            "description": "Add the image addresses and the language versions (hreflang) that a sitemap gives for a URL, at most 20 of each.",
            "default": false
          },
          "maxSitemaps": {
            "title": "Maximum number of sitemap files",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "The run stops when it has read this many sitemap files; the common-path guesses and files that robots.txt closes for this Actor do not count. The largest value is 10,000.",
            "default": 500
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}