{
  "openapi": "3.0.1",
  "info": {
    "title": "Medium Scraper — Articles, Authors & Tags",
    "description": "Scrape Medium articles from Medium.com by tags, authors, publications, search or story URL: title, subtitle, author, publication, claps, responses, reading time, tags, publish date and URL, plus the full text of free-to-read stories. Member-only stories give their public preview only.",
    "version": "0.1",
    "x-build-id": "5O48gtkNk9sLtmjxj"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/tortuga~medium-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-tortuga-medium-scraper",
        "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/tortuga~medium-scraper/runs": {
      "post": {
        "operationId": "runs-sync-tortuga-medium-scraper",
        "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/tortuga~medium-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-tortuga-medium-scraper",
        "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": {
          "tags": {
            "title": "Tags",
            "type": "array",
            "description": "Medium tags to scrape, one per line, e.g. `programming`, `machine-learning` or `https://medium.com/tag/python`. Read from the tag's archive page (10 newest + 10 most-read stories, with reading times) and, with 2 pages, its front page (about 33 recommended, popular-this-week and newest stories). These are Medium web pages and need the RESIDENTIAL proxy group; with a datacenter proxy the Actor falls back to the tag's RSS feed (10 latest stories without claps or reading times).",
            "items": {
              "type": "string"
            }
          },
          "searchTerms": {
            "title": "Search terms",
            "type": "array",
            "description": "Keywords to search on Medium, one per line. Each term gives the 10 stories Medium's search page shows (one page, residential proxy).",
            "items": {
              "type": "string"
            }
          },
          "authors": {
            "title": "Authors",
            "type": "array",
            "description": "Medium authors, one per line: `@handle`, `handle`, `handle.medium.com` or a profile URL. Read from the author's RSS feed (the 10 latest stories; free stories come with their full text, member-only stories with their public preview). Feeds work with any proxy, including datacenter.",
            "items": {
              "type": "string"
            }
          },
          "publications": {
            "title": "Publications",
            "type": "array",
            "description": "Medium publications, one per line: the slug (`data-science-collective`), `medium.com/<slug>` or the publication's own domain (`levelup.gitconnected.com`). Read from the publication's RSS feed (the 10 latest stories; free stories with full text, member-only stories with their preview). Feeds work with any proxy.",
            "items": {
              "type": "string"
            }
          },
          "startUrls": {
            "title": "Start URLs",
            "type": "array",
            "description": "Any Medium URLs: tag pages (`medium.com/tag/python`), searches (`medium.com/search?q=rust`), author profiles (`medium.com/@handle`, `handle.medium.com`), publications (`medium.com/<slug>` or a custom domain) and single stories (`.../some-title-eb96184d4c06`). Story URLs always open the story page (charged as a story plus a page opened) and give the full text of free stories.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "maxItems": {
            "title": "Max stories",
            "minimum": 1,
            "type": "integer",
            "description": "Stop after this many stories in total. Keeps the cost predictable: you pay per story saved.",
            "default": 100
          },
          "maxPagesPerSource": {
            "title": "Max pages per source",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "How many listing pages to read per tag. Page 1 is the tag archive (20 stories), page 2 the tag front page (about 33 stories); Medium serves no further pages without login. Search terms, authors and publications have one page each (10 stories).",
            "default": 3
          },
          "includeFullText": {
            "title": "Include full text (opens each story page)",
            "type": "boolean",
            "description": "Open every story's page to add `text`/`html`, word count, language, claps, responses and reading time. Free-to-read stories give their full text; member-only stories give only the public preview Medium shows without login (`isMemberOnly: true`, `textIsPreview: true`), never the paywalled text. One residential request per story, charged as a page opened. Author and publication feeds already include the full text of free stories, so leave this off for cheap feed runs.",
            "default": false
          },
          "postedWithinDays": {
            "title": "Posted within the last N days",
            "minimum": 1,
            "type": "integer",
            "description": "Keep only stories published within this many days (by Medium's publish date). Older stories are dropped before any story page is opened and are not charged."
          },
          "onlyNewOrChanged": {
            "title": "Only new stories",
            "type": "boolean",
            "description": "Remember what earlier runs of this search returned and output only stories not seen before. Use with a Schedule; stories already seen are not charged and their pages are not opened again.",
            "default": false
          },
          "monitoringKey": {
            "title": "Monitoring key",
            "type": "string",
            "description": "Name for this watch, so several schedules on the same search stay separate; defaults to a key derived from the search input"
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Medium's web pages (tags, search, story pages) answer residential IPs only; datacenter IPs get a bot challenge. Keep the RESIDENTIAL group (US) for tags, search and full text. Residential traffic is billed to your Apify account per GB at your plan's rate (a tag page is about 0.3 MB, a story page about 0.2 MB before compression). Author and publication feeds are always fetched through a datacenter proxy, which costs nothing extra.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ],
              "apifyProxyCountry": "US"
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}