{
  "openapi": "3.0.1",
  "info": {
    "title": "Apple Podcasts Scraper: Charts, Search & Episodes",
    "description": "Search Apple Podcasts shows by keyword, genre and country, pull top charts for any genre and storefront, and list episodes from public RSS. Official iTunes API and Apple feeds only. Show and publisher metadata, no personal data.",
    "version": "0.1",
    "x-build-id": "gSe1fJIoGuzfqdCCu"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/betteratoms~apple-podcasts-intelligence/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-betteratoms-apple-podcasts-intelligence",
        "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/betteratoms~apple-podcasts-intelligence/runs": {
      "post": {
        "operationId": "runs-sync-betteratoms-apple-podcasts-intelligence",
        "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/betteratoms~apple-podcasts-intelligence/run-sync": {
      "post": {
        "operationId": "run-sync-betteratoms-apple-podcasts-intelligence",
        "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": [
          "mode"
        ],
        "properties": {
          "mode": {
            "title": "Mode",
            "enum": [
              "search",
              "charts",
              "episodes"
            ],
            "type": "string",
            "description": "search = find shows by keyword (and optional genre/country). charts = Apple Podcasts top shows by genre and country. episodes = episodes of given shows from their public RSS feeds.",
            "default": "search"
          },
          "searchTerms": {
            "title": "Search terms (search mode)",
            "type": "array",
            "description": "Keywords to search Apple Podcasts for, e.g. 'AI startups' or 'real estate investing'. One search per term and country.",
            "items": {
              "type": "string"
            }
          },
          "genreId": {
            "title": "Genre (search and charts modes)",
            "enum": [
              "1301",
              "1321",
              "1303",
              "1304",
              "1483",
              "1511",
              "1512",
              "1487",
              "1305",
              "1502",
              "1310",
              "1489",
              "1314",
              "1533",
              "1324",
              "1545",
              "1309",
              "1318",
              "1488"
            ],
            "type": "string",
            "description": "Restrict search results or the chart to one Apple Podcasts genre. Leave empty for all genres."
          },
          "countries": {
            "title": "Countries",
            "type": "array",
            "description": "Two-letter Apple storefront codes, e.g. us, gb, in, ca, au, de. Search and charts run once per country; episodes mode uses the first country for Apple ID lookups.",
            "default": [
              "us"
            ],
            "items": {
              "type": "string"
            }
          },
          "resultsPerSearch": {
            "title": "Results per search term",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "How many shows to request from the iTunes Search API per term and country (Apple's maximum is 200).",
            "default": 50
          },
          "minEpisodeCount": {
            "title": "Minimum episode count (search mode)",
            "minimum": 0,
            "type": "integer",
            "description": "Skip shows with fewer episodes than this. 0 = no filter.",
            "default": 0
          },
          "activeWithinDays": {
            "title": "Released an episode within N days (search mode)",
            "minimum": 0,
            "type": "integer",
            "description": "Keep only shows whose latest episode is at most this many days old. 0 = no filter.",
            "default": 0
          },
          "chartLimit": {
            "title": "Chart size (charts mode)",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "How many top shows to fetch per country (Apple's feed returns up to 200).",
            "default": 100
          },
          "enrichChartShows": {
            "title": "Add RSS feed URL, episode count and genres to chart rows",
            "type": "boolean",
            "description": "Looks up each charted show with the official iTunes Lookup API (one extra request per 150 shows).",
            "default": true
          },
          "shows": {
            "title": "Shows (episodes mode)",
            "type": "array",
            "description": "Apple Podcasts show URLs (https://podcasts.apple.com/us/podcast/.../id1200361736), bare Apple IDs (1200361736) or RSS feed URLs.",
            "items": {
              "type": "string"
            }
          },
          "maxEpisodesPerShow": {
            "title": "Max episodes per show",
            "minimum": 0,
            "type": "integer",
            "description": "Newest episodes first, as ordered in the feed. 0 = no per-show limit (maxItems still applies).",
            "default": 50
          },
          "episodesPublishedAfter": {
            "title": "Episodes published on or after",
            "type": "string",
            "description": "Only return episodes published on or after this date (YYYY-MM-DD)."
          },
          "descriptionMaxChars": {
            "title": "Max episode description length",
            "minimum": 0,
            "type": "integer",
            "description": "Episode descriptions are converted to plain text and truncated to this length. 0 = no limit.",
            "default": 500
          },
          "maxItems": {
            "title": "Max results",
            "minimum": 1,
            "type": "integer",
            "description": "Maximum number of rows to return in total. Each row is one billable result.",
            "default": 100
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}