openapi: 3.2.0 info: description: 'OpticOdds sports betting data API - Version 3 **Pagination**: Endpoints returning lists support two modes. *Offset-based (default)*: Use `page` (1-indexed) and `limit` (max 100, default 100). Response includes `page` and `has_more`. *Cursor-based*: Use `cursor` (opaque token from previous response) and `limit`. Response includes `cursor` (null when no more results). When using cursor, `page` and `has_more` are omitted. Do not pass both `page` and `cursor`. Cursor-based pagination is recommended for large result sets.' title: OpticOdds API v3 Sportsbooks API contact: name: OpticOdds Support url: https://opticodds.com/support license: name: Proprietary url: https://opticodds.com/terms version: '3.0' servers: - url: https://api.opticodds.com/v3 tags: - name: sportsbooks paths: /sportsbooks: get: security: - ApiKeyHeader: [] - ApiKeyQuery: [] description: Returns all available sportsbooks enabled for your API key tags: - sportsbooks summary: List all sportsbooks responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/github_com_opticodds_api-go_internal_v3_response.SportsbooksEnvelope' '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/github_com_opticodds_api-go_internal_v3_response.ErrorResponse' '500': description: Internal Server Error content: application/json: schema: $ref: '#/components/schemas/github_com_opticodds_api-go_internal_v3_response.ErrorResponse' /sportsbooks/active: get: security: - ApiKeyHeader: [] - ApiKeyQuery: [] description: Returns sportsbooks that are currently active for a given sport, league, or fixture tags: - sportsbooks summary: List active sportsbooks parameters: - description: 'Sport IDs (use GET /sports for valid values). Example: ''basketball''' name: sport in: query style: form explode: false schema: type: array items: type: string - description: 'League IDs (use GET /leagues for valid values). Example: ''nba''' name: league in: query style: form explode: false schema: type: array items: type: string - description: 'Fixture IDs. Example: ''202604020E7921D1''' name: fixture_id in: query style: form explode: false schema: type: array items: type: string responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/github_com_opticodds_api-go_internal_v3_response.SportsbooksEnvelope' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/github_com_opticodds_api-go_internal_v3_response.ErrorResponse' '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/github_com_opticodds_api-go_internal_v3_response.ErrorResponse' '404': description: Not Found content: application/json: schema: $ref: '#/components/schemas/github_com_opticodds_api-go_internal_v3_response.ErrorResponse' '500': description: Internal Server Error content: application/json: schema: $ref: '#/components/schemas/github_com_opticodds_api-go_internal_v3_response.ErrorResponse' /sportsbooks/last-polled: get: security: - ApiKeyHeader: [] - ApiKeyQuery: [] description: Returns the last time each sportsbook was polled for a given league or set of fixtures tags: - sportsbooks summary: Get sportsbook last-polled timestamps parameters: - description: 'League IDs (max 1, use GET /leagues for valid values). Example: ''nba''' name: league in: query style: form explode: false schema: type: array items: type: string - description: 'Fixture IDs (max 50). Example: ''202604020E7921D1''' name: fixture_id in: query style: form explode: false schema: type: array items: type: string - description: 'Sportsbook IDs (max 5, use GET /sportsbooks for valid values). Example: ''draftkings''' name: sportsbook in: query style: form explode: false schema: type: array items: type: string responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/github_com_opticodds_api-go_internal_v3_response.SportsbooksLastPolledEnvelope' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/github_com_opticodds_api-go_internal_v3_response.ErrorResponse' '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/github_com_opticodds_api-go_internal_v3_response.ErrorResponse' '404': description: Not Found content: application/json: schema: $ref: '#/components/schemas/github_com_opticodds_api-go_internal_v3_response.ErrorResponse' '500': description: Internal Server Error content: application/json: schema: $ref: '#/components/schemas/github_com_opticodds_api-go_internal_v3_response.ErrorResponse' components: schemas: github_com_opticodds_api-go_internal_v3_response.SportsbooksLastPolled: type: object properties: fixture_id: type: string example: nfl-chiefs-eagles-2025-02-09 league: $ref: '#/components/schemas/github_com_opticodds_api-go_internal_v3_response.BaseLeague' sportsbooks: type: array items: $ref: '#/components/schemas/github_com_opticodds_api-go_internal_v3_response.LastPolledSportsbook' github_com_opticodds_api-go_internal_v3_response.Sportsbook: type: object properties: id: type: string example: draftkings is_active: type: boolean example: true is_onshore: type: boolean example: true logo: type: string example: https://cdn.opticodds.com/logos/draftkings.png name: type: string example: DraftKings github_com_opticodds_api-go_internal_v3_response.BaseLeague: type: object properties: id: type: string example: nba name: type: string example: NBA numerical_id: type: integer example: 3 github_com_opticodds_api-go_internal_v3_response.ErrorResponse: type: object properties: error: type: string example: Invalid API key github_com_opticodds_api-go_internal_v3_response.SportsbooksEnvelope: type: object properties: data: type: array items: $ref: '#/components/schemas/github_com_opticodds_api-go_internal_v3_response.Sportsbook' github_com_opticodds_api-go_internal_v3_response.LastPolledSportsbook: type: object properties: id: type: string example: draftkings name: type: string example: DraftKings timestamp: type: number example: 1739980800 github_com_opticodds_api-go_internal_v3_response.SportsbooksLastPolledEnvelope: type: object properties: data: type: array items: $ref: '#/components/schemas/github_com_opticodds_api-go_internal_v3_response.SportsbooksLastPolled' securitySchemes: ApiKeyHeader: description: API key passed via X-Api-Key header type: apiKey name: X-Api-Key in: header ApiKeyQuery: description: API key passed via query parameter type: apiKey name: key in: query