{
  "openapi": "3.0.1",
  "info": {
    "title": "Medium Scraper — Articles by Tag, Author & Publication",
    "description": "Scrape Medium stories from tags, authors, publications or article links: title, URL, date, claps, responses, reading time, tags, member-only flag, author and publication. Optional body as Markdown or text. No login.",
    "version": "0.1",
    "x-build-id": "TZDjXlWyv8eZsNhZv"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/fabrikit~medium-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-fabrikit-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/fabrikit~medium-scraper/runs": {
      "post": {
        "operationId": "runs-sync-fabrikit-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/fabrikit~medium-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-fabrikit-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 (topics)",
            "type": "array",
            "description": "Medium tag slugs or names, one per line: artificial-intelligence, javascript, Machine Learning, or a tag link such as https://medium.com/tag/startup. Each tag feed is read in the order chosen in 'Tag feed'. Medium serves about 100 stories per tag feed.",
            "items": {
              "type": "string"
            }
          },
          "tagSort": {
            "title": "Tag feed",
            "enum": [
              "latest",
              "trending",
              "top-week",
              "top-month",
              "top-year",
              "top-all-time"
            ],
            "type": "string",
            "description": "Which feed of each tag to read. latest = newest first; trending = Medium's hot list; top-week / top-month / top-year / top-all-time = most read in that period. To go past ~100 stories for one tag, run several feeds (duplicates are removed inside a run).",
            "default": "latest"
          },
          "urls": {
            "title": "Authors, publications and articles",
            "type": "array",
            "description": "One per line. Author: @username, https://medium.com/@username or https://username.medium.com. Publication: https://medium.com/better-programming, its own domain (https://javascript.plainenglish.io) or the bare slug. Article: any story link or its 11-12 character id. Author and publication archives are read newest first (pinned stories first), page after page.",
            "items": {
              "type": "string"
            }
          },
          "maxItems": {
            "title": "Maximum articles",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Stop after this many articles in total (all sources together). You are charged only for the rows saved.",
            "default": 100
          },
          "maxArticlesPerSource": {
            "title": "Articles per source",
            "minimum": 0,
            "maximum": 100000,
            "type": "integer",
            "description": "Cap for each tag, author or publication. 0 = no cap (read the whole archive, up to Maximum articles).",
            "default": 100
          },
          "includeContent": {
            "title": "Include the article body (add-on)",
            "type": "boolean",
            "description": "Also return each story's body. Free stories come complete; member-only stories return the public preview that Medium shows to logged-out readers (contentIsPreview = true). Charged per article that got a body.",
            "default": false
          },
          "contentFormat": {
            "title": "Body format",
            "enum": [
              "markdown",
              "text",
              "both"
            ],
            "type": "string",
            "description": "markdown keeps headings, lists, links, code blocks and image links; text is plain text; both returns the two fields.",
            "default": "markdown"
          },
          "publishedAfter": {
            "title": "Published after",
            "type": "string",
            "description": "Keep stories published on or after this date: 2026-01-31, an ISO timestamp or a relative period such as 7 days, 12 hours, 3 months. On newest-first feeds the run stops paging once the stories get older."
          },
          "publishedBefore": {
            "title": "Published before",
            "type": "string",
            "description": "Keep stories published before this date (same formats as above)."
          },
          "minClaps": {
            "title": "Minimum claps",
            "minimum": 0,
            "type": "integer",
            "description": "Skip stories with fewer claps. Filtered stories are not charged.",
            "default": 0
          },
          "access": {
            "title": "Free or member-only",
            "enum": [
              "all",
              "free",
              "member-only"
            ],
            "type": "string",
            "description": "all, only stories anyone can read (free), or only stories behind Medium's paywall (member-only).",
            "default": "all"
          },
          "languages": {
            "title": "Languages",
            "type": "array",
            "description": "Keep only stories in these languages, as detected by Medium (two-letter codes: en, es, pt, de...). Empty = all.",
            "items": {
              "type": "string"
            }
          },
          "maxConcurrency": {
            "title": "Sources in parallel",
            "minimum": 1,
            "maximum": 5,
            "type": "integer",
            "description": "How many tags, authors or publications are read at the same time. Requests to Medium stay spaced out either way.",
            "default": 2
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Not needed in normal use: the Actor starts with direct requests. If Medium blocks them, it switches by itself to Apify datacenter and then residential proxies (see 'Automatic proxy fallback').",
            "default": {
              "useApifyProxy": false
            }
          },
          "autoProxyFallback": {
            "title": "Automatic proxy fallback",
            "type": "boolean",
            "description": "When a request is blocked with every browser fingerprint, continue the run through Apify datacenter proxies, then residential proxies. Turn off to never use a proxy you did not choose.",
            "default": true
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}