{
  "openapi": "3.0.1",
  "info": {
    "title": "Flashscore Basketball Scraper - Live Scores, Stats",
    "description": "Basketball data from Flashscore: live scores, fixtures and results for the NBA, NCAA and 60+ leagues, with points per quarter, box-score statistics, venue, referees and head-to-head in every row. Fast, no proxy. Export to Excel, CSV, JSON or API.",
    "version": "0.1",
    "x-build-id": "ObN0sqB2fCErpuAf8"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/pshivam~flashscore-basketball-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-pshivam-flashscore-basketball-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/pshivam~flashscore-basketball-scraper/runs": {
      "post": {
        "operationId": "runs-sync-pshivam-flashscore-basketball-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/pshivam~flashscore-basketball-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-pshivam-flashscore-basketball-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": {
          "mode": {
            "title": "What to get",
            "enum": [
              "schedule",
              "live",
              "match"
            ],
            "type": "string",
            "description": "Fixtures and results: every match of the chosen days, upcoming, live and finished. Live: only the matches in play right now. Matches by id: full detail for the match ids or URLs you give.",
            "default": "schedule"
          },
          "daysBack": {
            "title": "Days back",
            "minimum": 0,
            "maximum": 7,
            "type": "integer",
            "description": "Fixtures mode: also get this many days before today (finished matches). At most 7.",
            "default": 0
          },
          "daysAhead": {
            "title": "Days ahead",
            "minimum": 0,
            "maximum": 7,
            "type": "integer",
            "description": "Fixtures mode: also get this many days after today (upcoming matches). At most 7.",
            "default": 0
          },
          "dates": {
            "title": "Or exact days",
            "type": "array",
            "description": "Fixtures mode: days like 2026-11-07, up to 7 days back and 7 days ahead of today. Added to the days above.",
            "items": {
              "type": "string"
            }
          },
          "countries": {
            "title": "Only these countries",
            "type": "array",
            "description": "Keep matches of leagues in these countries (part of a name is enough: USA, Spain, Greece). Use Europe or World for international competitions.",
            "items": {
              "type": "string"
            }
          },
          "leagues": {
            "title": "Only these leagues",
            "type": "array",
            "description": "Keep matches of leagues whose name contains one of these words (NBA, NCAA, Liga A, NBL).",
            "items": {
              "type": "string"
            }
          },
          "teams": {
            "title": "Only these teams",
            "type": "array",
            "description": "Keep matches where one of the teams has one of these names (part of a name is enough: Lakers, Suns, Duke).",
            "items": {
              "type": "string"
            }
          },
          "status": {
            "title": "Match status",
            "enum": [
              "any",
              "scheduled",
              "live",
              "finished"
            ],
            "type": "string",
            "description": "Keep only scheduled (not started), live or finished matches. Live mode always means live.",
            "default": "any"
          },
          "matchIds": {
            "title": "Match ids or URLs",
            "type": "array",
            "description": "For 'Matches by id': Flashscore match ids (ppDcHIDs) or match URLs (https://www.flashscore.com/match/ppDcHIDs/).",
            "items": {
              "type": "string"
            }
          },
          "includeMatchInfo": {
            "title": "Add the round",
            "type": "boolean",
            "description": "Open the match page for the round (Quarter-finals, Round 5) where Flashscore has one. On by default for 'Matches by id', off for lists (one more request per match)."
          },
          "includeStatistics": {
            "title": "Add box-score statistics",
            "type": "boolean",
            "description": "Field goals, three-pointers, free throws, rebounds, assists, steals, blocks, turnovers and more, for the match and for each quarter. Venue, referees and attendance come with any detail option. On by default for 'Matches by id', off for lists."
          },
          "includeHeadToHead": {
            "title": "Add head-to-head",
            "type": "boolean",
            "description": "Both teams' last 10 matches and their previous meetings. On by default for 'Matches by id', off for lists."
          },
          "onlyNew": {
            "title": "Only new matches",
            "type": "boolean",
            "description": "Skip matches that earlier runs of this same search already returned, so you never get or pay for the same match twice. The first run works as usual and remembers what it returned, in your key-value store 'flashscore-basketball-scraper-only-new'.",
            "default": false
          },
          "maxItems": {
            "title": "Maximum matches",
            "minimum": 1,
            "type": "integer",
            "description": "Stop after this many matches. You are charged per match. A full day has about 600 matches.",
            "default": 100
          },
          "maxConcurrency": {
            "title": "Max parallel requests",
            "minimum": 1,
            "maximum": 16,
            "type": "integer",
            "description": "Requests at the same time (the scraper never sends more than 20 a second). More helps runs with detail blocks.",
            "default": 8
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}