{
  "openapi": "3.0.1",
  "info": {
    "title": "Podcast and Newsletter Feed Enclosure Delivery Gate",
    "description": "Reads your RSS, Atom or JSON Feed, then sends one HEAD and one ranged GET to each recent enclosure. It reports range support, content type, declared length against reported length, the redirect chain, TLS use, and every item whose GUID or enclosure URL ch",
    "version": "0.1",
    "x-build-id": "zW2qu2Sg3tYAL7EbC"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/kingii98~podcast-and-newsletter-feed-enclosure-delivery-gate/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-kingii98-podcast-and-newsletter-feed-enclosure-delivery-gate",
        "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/kingii98~podcast-and-newsletter-feed-enclosure-delivery-gate/runs": {
      "post": {
        "operationId": "runs-sync-kingii98-podcast-and-newsletter-feed-enclosure-delivery-gate",
        "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/kingii98~podcast-and-newsletter-feed-enclosure-delivery-gate/run-sync": {
      "post": {
        "operationId": "run-sync-kingii98-podcast-and-newsletter-feed-enclosure-delivery-gate",
        "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": [
          "feedUrls"
        ],
        "properties": {
          "feedUrls": {
            "title": "Feed URLs",
            "minItems": 1,
            "maxItems": 10,
            "type": "array",
            "description": "1 to 10 public RSS, Atom or JSON Feed URLs. Private, loopback and reserved addresses are refused, and so are URLs that hold credentials.",
            "default": [
              "https://feeds.twit.tv/twit.xml"
            ],
            "items": {
              "type": "string"
            }
          },
          "itemsToCheck": {
            "title": "Items to check",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "How many recent items of each feed to probe. The items are taken in feed order, so the newest episodes come first.",
            "default": 5
          },
          "checks": {
            "title": "Checks",
            "type": "array",
            "description": "The checks that decide the publish gate. An empty list runs every check.",
            "items": {
              "type": "string",
              "enum": [
                "range_support",
                "content_type",
                "declared_length_match",
                "redirect_depth",
                "https_only",
                "guid_stability"
              ],
              "enumTitles": [
                "Range support (206 answer to a ranged GET)",
                "Content type (feed type against served type)",
                "Declared length match (feed length against reported size)",
                "Redirect depth (the chain ends inside the hop limit)",
                "HTTPS only (no plain HTTP hop)",
                "GUID stability (item identity against the baseline)"
              ]
            },
            "default": [
              "range_support",
              "content_type",
              "declared_length_match",
              "redirect_depth",
              "https_only",
              "guid_stability"
            ]
          },
          "maxRedirects": {
            "title": "Maximum redirects",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "Hop limit for one enclosure. A chain that does not end inside this limit fails the redirect_depth check, because a client with a lower limit cannot get the file.",
            "default": 5
          },
          "probeBytes": {
            "title": "Ranged read size (bytes)",
            "minimum": 1024,
            "maximum": 1048576,
            "type": "integer",
            "description": "Size of the ranged read. The Actor asks for bytes 0 to this value minus one, and it never downloads the full media file.",
            "default": 65536
          },
          "lengthTolerancePercent": {
            "title": "Declared length tolerance (percent)",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "How far the size reported by the server may differ from the length declared in the feed. Dynamic ad insertion moves this value by a small amount, so 0 is strict and 1 is the usual setting.",
            "default": 1
          },
          "maxEnclosures": {
            "title": "Maximum enclosures for one run",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Hard cap on the number of probed enclosures in one run. Enclosures above the cap are counted in the feed record and are not probed or charged.",
            "default": 100
          },
          "timeoutSeconds": {
            "title": "Request timeout (seconds)",
            "minimum": 1,
            "maximum": 60,
            "type": "integer",
            "description": "Timeout for one HTTP request, both for a feed fetch and for an enclosure probe.",
            "default": 20
          },
          "maxFeedBytes": {
            "title": "Maximum feed bytes",
            "minimum": 65536,
            "maximum": 10485760,
            "type": "integer",
            "description": "Hard cap on the bytes read from one feed document. A larger document is cut, and a cut document that does not parse is reported as unparsable.",
            "default": 10485760
          },
          "concurrency": {
            "title": "Concurrent probes",
            "minimum": 1,
            "maximum": 8,
            "type": "integer",
            "description": "How many enclosure probes run at the same time. Keep this low, so the media host is not put under load.",
            "default": 4
          },
          "baselineStoreName": {
            "title": "Baseline key-value store name",
            "type": "string",
            "description": "Name of the named key-value store that keeps the previous GUID and enclosure URL of each item. Use one name for each show, so the GUID stability check compares the correct history.",
            "default": "feed-enclosure-baseline"
          },
          "updateBaseline": {
            "title": "Update the baseline",
            "type": "boolean",
            "description": "Write the item identity of this run into the baseline store. Turn it off for a dry run that must not move the baseline.",
            "default": true
          },
          "userAgent": {
            "title": "User agent",
            "pattern": "^[\\x20-\\x7E]*$",
            "type": "string",
            "description": "User-Agent header sent with every request, so your feed host and your media host can identify this Actor in their logs. ASCII characters only.",
            "default": "FeedEnclosureGate/0.1 (+https://apify.com)"
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}