{
  "openapi": "3.0.1",
  "info": {
    "title": "Substack & Medium Scraper",
    "description": "Medium and Substack articles by author, publication, tag or search. Full text of free posts, a preview plus a paywall flag for paid ones, Substack likes and comments, date filters, duplicate removal. $0.002 per article.",
    "version": "0.1",
    "x-build-id": "lopOYflqU8mNRavsC"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/zovo-one~medium-substack-articles/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-zovo-one-medium-substack-articles",
        "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/zovo-one~medium-substack-articles/runs": {
      "post": {
        "operationId": "runs-sync-zovo-one-medium-substack-articles",
        "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/zovo-one~medium-substack-articles/run-sync": {
      "post": {
        "operationId": "run-sync-zovo-one-medium-substack-articles",
        "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": {
          "mediumAuthors": {
            "title": "Medium authors",
            "maxItems": 50,
            "type": "array",
            "description": "Medium usernames or profile URLs, up to 50: @netflixtechblog, https://medium.com/@user or user.medium.com. Each returns the author's 10 newest stories, with full text for free ones. Leave every source field empty to try the Actor on two example sources (Medium netflix-techblog and Substack astralcodexten).",
            "items": {
              "type": "string"
            }
          },
          "mediumPublications": {
            "title": "Medium publications",
            "maxItems": 50,
            "type": "array",
            "description": "Publication names or URLs, up to 50: netflix-techblog, https://medium.com/better-programming, or a publication on its own domain such as netflixtechblog.com (always read over https). 10 newest stories per publication. If every source field is empty, the run reads netflix-techblog and astralcodexten as examples.",
            "items": {
              "type": "string"
            }
          },
          "mediumTags": {
            "title": "Medium tags",
            "maxItems": 50,
            "type": "array",
            "description": "Tags or tag URLs, up to 50: python, machine-learning, https://medium.com/tag/startup. Medium's tag feed has the 10 newest stories and only a short snippet of each (no full text, paywall state unknown). Add the author or publication as a source to get full text.",
            "items": {
              "type": "string"
            }
          },
          "substackPublications": {
            "title": "Substack publications",
            "maxItems": 50,
            "type": "array",
            "description": "Up to 50: a name (astralcodexten), name.substack.com, a custom domain (www.lennysnewsletter.com) or any URL on it. Reads the newest posts first, then older ones through the publication's sitemap, so you can go back past the archive's first page.",
            "items": {
              "type": "string"
            }
          },
          "substackAuthors": {
            "title": "Substack authors",
            "maxItems": 50,
            "type": "array",
            "description": "Profiles, up to 50: @lenny or https://substack.com/@lenny. Reads the author's own (primary) publication and keeps posts that list the author in the byline.",
            "items": {
              "type": "string"
            }
          },
          "substackSearch": {
            "title": "Substack search",
            "maxItems": 20,
            "type": "array",
            "description": "Search terms, up to 20 (200 characters each), one per line. Commas stay part of the term. Uses Substack's site-wide search; results come by relevance, not date.",
            "items": {
              "type": "string"
            }
          },
          "maxArticlesPerSource": {
            "title": "Max articles per source",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Per author, publication, tag or search term (1-1,000). Each saved article costs $0.002, so 10 articles from each of 2 sources cost $0.04. Medium sources stop at 10 because Medium's feeds hold 10 stories.",
            "default": 10
          },
          "dateFrom": {
            "title": "Published from",
            "pattern": "^(|\\s*\\d{4}-\\d{2}-\\d{2}\\s*|\\s*\\d{1,6}\\s*([Hh][Oo][Uu][Rr]|[Dd][Aa][Yy]|[Ww][Ee][Ee][Kk]|[Mm][Oo][Nn][Tt][Hh]|[Yy][Ee][Aa][Rr])[Ss]?(\\s+[Aa][Gg][Oo])?\\s*)$",
            "type": "string",
            "description": "Only posts published on or after this date: YYYY-MM-DD (start of the day, UTC) or relative, such as 7 days, 2 weeks, 6 months. Empty = no limit."
          },
          "dateTo": {
            "title": "Published to",
            "pattern": "^(|\\s*\\d{4}-\\d{2}-\\d{2}\\s*|\\s*\\d{1,6}\\s*([Hh][Oo][Uu][Rr]|[Dd][Aa][Yy]|[Ww][Ee][Ee][Kk]|[Mm][Oo][Nn][Tt][Hh]|[Yy][Ee][Aa][Rr])[Ss]?(\\s+[Aa][Gg][Oo])?\\s*)$",
            "type": "string",
            "description": "Only posts published on or before this date: YYYY-MM-DD (end of the day, UTC) or relative, such as 1 day. Empty = up to now."
          },
          "includeFullText": {
            "title": "Full text of free posts",
            "type": "boolean",
            "description": "Substack: fetch each post to get its text (one extra request per post, not billed). Off = title, metadata and the short preview Substack lists. Posts older than the archive's first page still take one request each, because the sitemap lists only their address. Medium author and publication feeds always include the text of free stories.",
            "default": true
          },
          "includeHtml": {
            "title": "Include HTML",
            "type": "boolean",
            "description": "Also save the article HTML (contentHtml) next to the plain text. Only for free posts with full text.",
            "default": false
          },
          "skipPaywalled": {
            "title": "Skip paywalled posts",
            "type": "boolean",
            "description": "Leave out posts that need a paid subscription (Substack paid posts, Medium member-only stories). Skipped posts are not saved and not charged. Medium tag feeds don't say which stories are member-only (isPaywalled = null), so those stories are kept. Off = save them with the free preview in previewText and isPaywalled = true. The Actor never logs in and never saves paywalled text.",
            "default": false
          },
          "dedupe": {
            "title": "Remove duplicates",
            "type": "boolean",
            "description": "Save each post once per run, even when several sources return it (for example an author and their publication). Skipped duplicates are not charged.",
            "default": true
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Optional. The default is a direct connection. On the Apify platform, if a site blocks the direct connection (403, 429 or a bot check), the run switches once to Apify Proxy by itself.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}