{
  "openapi": "3.0.1",
  "info": {
    "title": "Sofascore Rankings Scraper",
    "description": "Scrape every global ranking Sofascore publishes: FIFA world rankings, UEFA club and league coefficients, ATP and WTA singles and live, UTR, World Rugby, rugby league, Premier Padel and all twelve UFC divisions. Plus name-to-ID search. No API key, no login.",
    "version": "1.0",
    "x-build-id": "TRejV1hPBsNoFl4pf"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/incognito_mode~sofascore-rankings-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-incognito_mode-sofascore-rankings-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/incognito_mode~sofascore-rankings-scraper/runs": {
      "post": {
        "operationId": "runs-sync-incognito_mode-sofascore-rankings-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/incognito_mode~sofascore-rankings-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-incognito_mode-sofascore-rankings-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": {
          "rankings": {
            "title": "Ranking tables",
            "uniqueItems": true,
            "type": "array",
            "description": "Which global ranking tables to scrape. Sofascore's API returns these as bare numbers with no name attached, so the list below is this Actor's own catalogue — 25 live tables across football, tennis, rugby, MMA and padel. A raw Sofascore ranking type number is also accepted, in case one is added that this list does not name yet.",
            "items": {
              "type": "string",
              "enum": [
                "all",
                "fifa-world-ranking",
                "uefa-club-coefficients",
                "uefa-league-coefficients",
                "atp-singles",
                "wta-singles",
                "atp-live",
                "wta-live",
                "utr-men",
                "utr-women",
                "world-rugby",
                "rugby-league-world",
                "premier-padel-men",
                "premier-padel-women",
                "ufc-flyweight",
                "ufc-bantamweight",
                "ufc-featherweight",
                "ufc-lightweight",
                "ufc-welterweight",
                "ufc-middleweight",
                "ufc-light-heavyweight",
                "ufc-heavyweight",
                "ufc-womens-strawweight",
                "ufc-womens-flyweight",
                "ufc-womens-bantamweight",
                "ufc-womens-featherweight"
              ],
              "enumTitles": [
                "Everything — all 25 tables",
                "FIFA Men's World Ranking (Football)",
                "UEFA club coefficients (Football)",
                "UEFA league coefficients (Football)",
                "ATP singles ranking (Tennis)",
                "WTA singles ranking (Tennis)",
                "ATP live ranking (Tennis)",
                "WTA live ranking (Tennis)",
                "UTR men (Tennis)",
                "UTR women (Tennis)",
                "World Rugby rankings (Rugby)",
                "Rugby league world rankings (Rugby)",
                "Premier Padel men (Padel)",
                "Premier Padel women (Padel)",
                "UFC flyweight (Mixed Martial Arts)",
                "UFC bantamweight (Mixed Martial Arts)",
                "UFC featherweight (Mixed Martial Arts)",
                "UFC lightweight (Mixed Martial Arts)",
                "UFC welterweight (Mixed Martial Arts)",
                "UFC middleweight (Mixed Martial Arts)",
                "UFC light heavyweight (Mixed Martial Arts)",
                "UFC heavyweight (Mixed Martial Arts)",
                "UFC women's strawweight (Mixed Martial Arts)",
                "UFC women's flyweight (Mixed Martial Arts)",
                "UFC women's bantamweight (Mixed Martial Arts)",
                "UFC women's featherweight (Mixed Martial Arts)"
              ]
            }
          },
          "topN": {
            "title": "Rows per table",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Keep only the top N of each table. Useful because the tennis and padel tables are 500 rows each while the UFC divisions are 16. Leave empty for the whole table."
          },
          "entities": {
            "title": "Entities to look up",
            "type": "array",
            "description": "Sofascore team IDs or URLs. Returns every ranking that entity appears in — and for a club, its UEFA coefficient for every year on record, which the bulk tables do not carry. Only works for entities Sofascore models as teams: clubs, national teams, tennis players, MMA fighters and motorsport drivers. Footballers and other team-sport athletes are not ranked individually and return nothing.",
            "items": {
              "type": "string"
            }
          },
          "searchQueries": {
            "title": "Search queries",
            "type": "array",
            "description": "Find the Sofascore ID for a team, player, competition, manager or referee by name — the IDs the other Sofascore Actors take as input. Each query must be 2 to 100 characters.",
            "items": {
              "type": "string"
            }
          },
          "searchType": {
            "title": "What to search",
            "enum": [
              "all",
              "teams",
              "players",
              "tournaments",
              "managers",
              "referees"
            ],
            "type": "string",
            "description": "Narrow the search to one kind of entity, or leave it on everything.",
            "default": "all"
          },
          "maxSearchPages": {
            "title": "Search pages per query",
            "minimum": 1,
            "maximum": 25,
            "type": "integer",
            "description": "Sofascore returns 20 results per page. Paging stops early on a short page.",
            "default": 1
          },
          "maxItems": {
            "title": "Maximum rows",
            "minimum": 1,
            "type": "integer",
            "description": "Stop after this many rows across all record types.",
            "default": 10000
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Optional. This Actor calls Sofascore directly and only reaches for a proxy if a request is actually blocked, trying datacenter IPs (included in every Apify plan) before residential ones. Set this only to pin a specific proxy or country from the start.",
            "default": {
              "useApifyProxy": 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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}