{
  "openapi": "3.0.1",
  "info": {
    "title": "Turkish Football Scraper",
    "description": "Scrape Turkish football standings, fixtures, results, lineups, goals and cards from TFF and Mackolik: Super Lig, 1. Lig, 2. Lig, 3. Lig and past seasons. Fast HTTP scraper, no browser.",
    "version": "0.0",
    "x-build-id": "vJY2wrba4enT4lx7p"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/dodoflix~sports-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-dodoflix-sports-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/dodoflix~sports-scraper/runs": {
      "post": {
        "operationId": "runs-sync-dodoflix-sports-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/dodoflix~sports-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-dodoflix-sports-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": {
          "leagues": {
            "title": "Leagues",
            "type": "array",
            "description": "Leagues to scrape. 2. Lig and 3. Lig are split into groups and every group is returned. With source Mackolik only Super Lig and 1. Lig are available here: use Start URLs for any other competition.",
            "items": {
              "type": "string",
              "enum": [
                "superLig",
                "lig1",
                "lig2",
                "lig3",
                "womenSuperLig"
              ],
              "enumTitles": [
                "Super Lig",
                "1. Lig",
                "2. Lig",
                "3. Lig",
                "Women's Super Lig"
              ]
            }
          },
          "source": {
            "title": "Source",
            "enum": [
              "tff",
              "mackolik"
            ],
            "type": "string",
            "description": "TFF is the official federation site: current season only, with referees, venues and lineups. Mackolik has every season since 1997 and any competition (via Start URLs), plus half-time scores, form and match stats.",
            "default": "tff"
          },
          "season": {
            "title": "Season",
            "type": "string",
            "description": "Season such as 2023-2024. Needs source Mackolik. Leave empty for the current season."
          },
          "dataTypes": {
            "title": "What to return",
            "type": "array",
            "description": "standings: one row per team. matches: one row per match. events: one row per goal, card or substitution (needs one extra request per match).",
            "items": {
              "type": "string",
              "enum": [
                "standings",
                "matches",
                "events"
              ],
              "enumTitles": [
                "Standings",
                "Matches (fixtures and results)",
                "Match events (goals, cards, substitutions)"
              ]
            },
            "default": [
              "standings",
              "matches"
            ]
          },
          "weeks": {
            "title": "Weeks",
            "type": "string",
            "description": "Which rounds to return: 5, 3-6, 1,4,9-10, all, or current. Empty means current, or all when a date range is set. With TFF the standings are the table after each requested week (use all for the title race); with Mackolik the standings are the latest table."
          },
          "dateFrom": {
            "title": "Matches from date",
            "type": "string",
            "description": "Only matches on or after this local (Istanbul) date, YYYY-MM-DD. Searches all weeks unless you set Weeks."
          },
          "dateTo": {
            "title": "Matches until date",
            "type": "string",
            "description": "Only matches on or before this local (Istanbul) date, YYYY-MM-DD."
          },
          "teams": {
            "title": "Teams",
            "type": "array",
            "description": "Only matches of these teams. Part of the name is enough and Turkish letters are optional, for example galatasaray or fenerbahce. Standings are not filtered.",
            "items": {
              "type": "string"
            }
          },
          "includeDetails": {
            "title": "Include match details",
            "type": "boolean",
            "description": "Add venue, referee and officials, lineups (starters, substitutes, coaches) and the goal, card and substitution list to every match row. Needs one extra request per match, so the run takes longer.",
            "default": false
          },
          "startUrls": {
            "title": "Start URLs",
            "type": "array",
            "description": "Optional. A TFF league page (https://www.tff.org/Default.aspx?pageID=198), a TFF match page (Default.aspx?pageId=29&macId=317827) or a Mackolik competition page such as https://www.mackolik.com/puan-durumu/turkiye-trendyol-super-lig/2024-2025/482ofyysbdbeoxauk19yg7tdt. Mackolik covers cups and foreign leagues too.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "maxItems": {
            "title": "Max items",
            "minimum": 1,
            "type": "integer",
            "description": "Stop the whole run after this many results."
          },
          "maxItemsPerLeague": {
            "title": "Max items per league",
            "minimum": 1,
            "type": "integer",
            "description": "Stop collecting for a league after this many results (standings, matches and events together)."
          },
          "maxConcurrency": {
            "title": "Max concurrency",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Parallel requests. TFF answered 15 parallel requests without errors in testing, but its pages take 1 to 5 seconds each, so the default is kept low.",
            "default": 4
          },
          "maxRequestsPerMinute": {
            "title": "Max requests per minute",
            "minimum": 1,
            "type": "integer",
            "description": "Request speed limit across all parallel requests. Raise this only if you see no errors in the log.",
            "default": 120
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Apify residential proxy in Turkey is on by default: Mackolik only answers Turkish IPs (a plain geo block, 403 elsewhere). TFF works without a proxy, so for TFF-only runs you can switch it off to save cost.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ],
              "apifyProxyCountry": "TR"
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}