openapi: 3.0.1
info:
  title: Football Prediction API
  description: "The Football Prediction API allows developers to get predictions for upcoming football (soccer) matches, results for past matches, and performance monitoring for statistical models."
  version: "2"
servers:
  - url: 'https://football-prediction-api.p.rapidapi.com'
paths:
  /api/v2/predictions:
    get:
      description: This endpoint returns by default the next non-expired football predictions. URL parameters can be specified to show specific date in the past or future or to filter by federation and prediction market name.
      parameters:
        - in: header
          description: Your key obtained from https://boggio-analytics.com/fp-api/
          name: X-RapidApi-Key
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: Good request, returns object that contains data array with all predictions.
        '404':
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: object
                    items:
                      type: object
                      properties:
                        column-with-errors:
                          type: string
                          description: detailed information about the issue encountered
          description: Bad request, check response for detailed errors.

  /api/v2/predictions/{id}:
    get:
      description: Returns all predictions available for a match id.
      parameters:
        - name: id
          in: path
          description: ID of match
          required: true
          schema:
            type: integer
      responses:
        '200':
          description: Good request, returns object that contains all the predictions for a certain event.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                        type: object
        '404':
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: object
                    items:
                      type: object
                      properties:
                        column-with-errors:
                          type: string
                          description: detailed information about the issue encountered
          description: Bad request, check response for detailed errors.

  /api/v2/performance-stats:
    get:
      description: Returns predictions accuracy in the last 1, 7, 14, 30 days.
      parameters:
        - in: header
          description: Your key obtained from https://boggio-analytics.com/fp-api/
          name: X-RapidApi-Key
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: Good request, returns object that contains accuracy and other datails about predictions.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      market:
                        type: string
                      accuracy:
                        type: object
                        properties:
                          yesterday:
                            type: number
                          last_7_days:
                            type: number
                          last_30_days:
                            type: number
                          last_14_days:
                            type: number
                      details:
                        type: object
                        properties:
                          yesterday:
                            type: object
                            properties:
                              total:
                                type: integer
                              lost:
                                type: integer
                              pending:
                                type: integer
                              won:
                                type: integer
                              postponed:
                                type: integer
                          last_7_days:
                            type: object
                            properties:
                              total:
                                type: integer
                              lost:
                                type: integer
                              pending:
                                type: integer
                              won:
                                type: integer
                              postponed:
                                type: integer
                          last_30_days:
                            type: object
                            properties:
                              total:
                                type: integer
                              lost:
                                type: integer
                              pending:
                                type: integer
                              won:
                                type: integer
                              postponed:
                                type: integer
                          last_14_days:
                            type: object
                            properties:
                              total:
                                type: integer
                              lost:
                                type: integer
                              pending:
                                type: integer
                              won:
                                type: integer
                              postponed:
                                type: integer
        '404':
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: object
                    items:
                      type: object
                      properties:
                        column-with-errors:
                          type: string
                          description: detailed information about the issue encountered
          description: Bad request, check response for detailed errors.

  /api/v2/list-federations:
    get:
      description: Returns an array of all the available federations.
      parameters:
        - in: header
          description: Your key obtained from https://boggio-analytics.com/fp-api/
          name: X-RapidApi-Key
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: Static response, shows available federations.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: string
              examples:
                '0':
                  value: >-
                    {"data": ["UEFA", "OFC", "CAF", "CONCACAF", "CONMEBOL",
                    "AFC"]}
        '404':
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: object
                    items:
                      type: object
                      properties:
                        column-with-errors:
                          type: string
                          description: detailed information about the issue encountered
          description: Bad request, check response for detailed errors.

  /api/v2/list-markets:
    get:
      description: Returns an array of all the supported prediction markets

      parameters:
        - in: header
          description: Your key obtained from https://boggio-analytics.com/fp-api/
          name: X-RapidApi-Key
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: Static response, shows available markets for the current subscription and all available markets in general.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      all:
                        type: array
                        items:
                          type: string
                      allowed_for_your_subscription:
                        type: array
                        items:
                            type: string
              examples:
                '0':
                  value: >-
                    {"data": {"all": ["over_25", "away_over_15", "away_over_05",
                    "classic", "home_over_05", "home_over_15", "btts",
                    "over_35"], "allowed_for_your_subscription": ["over_25",
                    "away_over_15", "away_over_05", "classic", "home_over_05",
                    "home_over_15", "btts", "over_35"]}}
        '404':
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: object
                    items:
                      type: object
                      properties:
                        column-with-errors:
                          type: string
                          description: detailed information about the issue encountered
          description: Bad request, check response for detailed errors.
