{
  "openapi": "3.0.1",
  "info": {
    "title": "Medium Scraper - articles, authors, tags, search, no login",
    "description": "Scrape public Medium articles by URL, author, tag, publication or search: full text and Markdown, claps, tags, author followers, paywall flag, responses. No login, no browser, $3 per 1,000 articles.",
    "version": "0.1",
    "x-build-id": "xcSi1AN8MemvEVQuy"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/datagleaner~medium-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-datagleaner-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/datagleaner~medium-scraper/runs": {
      "post": {
        "operationId": "runs-sync-datagleaner-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/datagleaner~medium-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-datagleaner-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": {
          "startUrls": {
            "title": "Medium URLs (any kind)",
            "type": "array",
            "description": "Paste any Medium links: articles, author profiles (medium.com/@name or name.medium.com), publications (medium.com/better-programming or netflixtechblog.com) or tag pages (medium.com/tag/python). Each is scraped by what it points at, using the per-source caps below.",
            "items": {
              "type": "string"
            }
          },
          "articleUrls": {
            "title": "Article URLs",
            "type": "array",
            "description": "Medium article URLs, including ones on custom domains or publication subdomains. Returns each article with full text. Profile, publication and tag URLs placed here are routed to the right source too.",
            "items": {
              "type": "string"
            }
          },
          "authors": {
            "title": "Authors",
            "type": "array",
            "description": "Author handles (@netflixtechblog) or profile URLs (https://medium.com/@netflixtechblog). Returns their newest articles.",
            "items": {
              "type": "string"
            }
          },
          "maxArticlesPerAuthor": {
            "title": "Max articles per author",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Upper bound on articles for each author.",
            "default": 20
          },
          "tags": {
            "title": "Tags",
            "type": "array",
            "description": "Medium tags such as python, startup or machine-learning (a medium.com/tag/... URL also works).",
            "items": {
              "type": "string"
            }
          },
          "maxArticlesPerTag": {
            "title": "Max articles per tag",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Upper bound on articles for each tag.",
            "default": 20
          },
          "tagSort": {
            "title": "Tag order",
            "enum": [
              "newest",
              "top"
            ],
            "type": "string",
            "description": "Newest articles first, or the tag's top (hot) articles.",
            "default": "newest"
          },
          "publications": {
            "title": "Publications",
            "type": "array",
            "description": "Publication slugs, URLs or domains, for example better-programming, https://medium.com/netflix-techblog or netflixtechblog.com.",
            "items": {
              "type": "string"
            }
          },
          "maxArticlesPerPublication": {
            "title": "Max articles per publication",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Upper bound on articles for each publication.",
            "default": 20
          },
          "searchQuery": {
            "title": "Search query",
            "type": "string",
            "description": "Keywords to search Medium stories for."
          },
          "maxArticlesPerSearch": {
            "title": "Max articles for the search",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Upper bound on articles returned for the search query.",
            "default": 20
          },
          "maxArticles": {
            "title": "Max articles in total (optional)",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Optional cap on articles across every source in the run, so one number bounds the cost of a mixed input. Leave empty for no total cap."
          },
          "includeContent": {
            "title": "Include full article text",
            "type": "boolean",
            "description": "Add contentText and contentMarkdown. Member-only stories return the public preview Medium shows without a subscription, flagged with contentIsPartial. Switching this off makes runs faster; the price per article stays the same.",
            "default": true
          },
          "includeResponses": {
            "title": "Include responses (comments)",
            "type": "boolean",
            "description": "Also return the responses under each article as separate items of type response, charged per response.",
            "default": false
          },
          "maxResponsesPerArticle": {
            "title": "Max responses per article",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Upper bound on responses for each article when responses are on.",
            "default": 10
          },
          "requestDelaySeconds": {
            "title": "Delay between requests (seconds)",
            "minimum": 0.2,
            "maximum": 30,
            "type": "number",
            "description": "Base pause between requests; the actual pause is randomised up to 1.5x. Raise it if you see throttling.",
            "default": 0.6
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Optional. Medium works without a proxy; enable Apify Proxy if your runs start getting blocked."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}