{
  "openapi": "3.0.1",
  "info": {
    "title": "Medium Scraper: Articles by Tag, Author, Publication",
    "description": "Scrape Medium articles by tag, author, publication or article link: title, subtitle, author and followers, publication, date, reading time, claps, responses, tags, member-only flag, image and optional full text of free stories. No login. Pay per article.",
    "version": "0.1",
    "x-build-id": "vqxSlEDB29ih8hWsR"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/themineworks~medium-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-themineworks-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/themineworks~medium-scraper/runs": {
      "post": {
        "operationId": "runs-sync-themineworks-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/themineworks~medium-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-themineworks-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": "One Medium tag per line, the way Medium writes it in links (programming, machine-learning) or a tag link (https://medium.com/tag/programming). \"Machine Learning\" and #machinelearning work too. Each tag returns the stories of that tag's feed on Medium.",
            "items": {
              "type": "string"
            }
          },
          "publications": {
            "title": "Publications",
            "type": "array",
            "description": "One publication per line: its name in the link (towardsdev, the-pragmatic-programmer), a medium.com link (https://medium.com/towards-data-science) or its own domain (towardsdev.com, https://levelup.gitconnected.com). Returns the publication's stories, newest first.",
            "items": {
              "type": "string"
            }
          },
          "authors": {
            "title": "Authors",
            "type": "array",
            "description": "One author per line: @username, username, a profile link (https://medium.com/@username) or https://username.medium.com. Returns the author's stories, newest first.",
            "items": {
              "type": "string"
            }
          },
          "articleUrls": {
            "title": "Article links",
            "type": "array",
            "description": "One Medium story per line: any story link (medium.com, a publication's own domain, username.medium.com), a medium.com/p/<id> link or the 12 character story id. One row per story.",
            "items": {
              "type": "string"
            }
          },
          "maxArticles": {
            "title": "Max articles per tag, publication or author",
            "minimum": 10,
            "maximum": 5000,
            "type": "integer",
            "description": "How many stories to collect from each tag, publication or author, 10 to 5,000. Medium serves 25 stories per request. Story links always return one row each.",
            "default": 20
          },
          "tagSort": {
            "title": "Tag order",
            "enum": [
              "latest",
              "most_read",
              "recommended"
            ],
            "type": "string",
            "description": "How each tag's stories are ordered. latest reads the tag newest first and keeps going back in time up to your max. most_read reads the tag's most read stories, all time or in the year or month you set below. recommended is the ranked feed on the tag page, which stops at about 75 stories.",
            "default": "latest"
          },
          "tagPeriod": {
            "title": "Tag period (year or month)",
            "type": "string",
            "description": "Optional, for the latest and most_read orders: a year (2025) or a month (2026-09). For example most_read with 2026-09 returns September 2026's most read stories of each tag."
          },
          "includeFullText": {
            "title": "Include full text of free stories",
            "type": "boolean",
            "description": "Adds the story body as plain Markdown (headings, lists, quotes and code kept, images left out) to every story that is free to read. Member-only stories keep their other fields and show full_text_status member_only; their text is never included. Same price per row.",
            "default": false
          },
          "skipMemberOnly": {
            "title": "Skip member-only stories",
            "type": "boolean",
            "description": "Leave out stories behind Medium's paywall. Skipped stories are not charged.",
            "default": false
          },
          "publishedAfter": {
            "title": "Published on or after",
            "type": "string",
            "description": "Optional. A date (2026-10-01), an ISO time, or a window such as \"7 days\" or \"24 hours\". Older stories are skipped and not charged."
          },
          "onlyNewResults": {
            "title": "Only stories not delivered by an earlier run",
            "type": "boolean",
            "description": "For scheduled runs: skip stories an earlier run of yours already delivered, so you pay only for new ones. Remembers up to 50,000 story ids.",
            "default": 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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}