> ## Documentation Index
> Fetch the complete documentation index at: https://padelapi.org/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Show Match Head to Head

> Endpoint to retrieve head-to-head history for a specific match. Returns all previous matches played between the same teams or players.



## OpenAPI

````yaml https://padelapi.org/docs/api.json get /matches/{match}/headtohead
openapi: 3.1.0
info:
  title: Padel API – API Reference
  version: '1.0'
  description: padelapi.org
servers:
  - url: https://padelapi.org/api
security:
  - http: []
paths:
  /matches/{match}/headtohead:
    get:
      tags:
        - Match
      summary: Show Match Head to Head
      description: >-
        Endpoint to retrieve head-to-head history for a specific match. Returns
        all previous matches played between the same teams or players.
      operationId: getMatchHeadToHead
      parameters:
        - name: match
          in: path
          required: true
          description: The match ID
          schema:
            type: integer
      responses:
        '200':
          description: Paginated set of `MatchResource`
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/MatchResource'
                  links:
                    type: object
                    properties:
                      first:
                        type:
                          - string
                          - 'null'
                      last:
                        type:
                          - string
                          - 'null'
                      prev:
                        type:
                          - string
                          - 'null'
                      next:
                        type:
                          - string
                          - 'null'
                    required:
                      - first
                      - last
                      - prev
                      - next
                  meta:
                    type: object
                    properties:
                      current_page:
                        type: integer
                      from:
                        type:
                          - integer
                          - 'null'
                      last_page:
                        type: integer
                      links:
                        type: array
                        description: Generated paginator links.
                        items:
                          type: object
                          properties:
                            url:
                              type:
                                - string
                                - 'null'
                            label:
                              type: string
                            active:
                              type: boolean
                          required:
                            - url
                            - label
                            - active
                      path:
                        type:
                          - string
                          - 'null'
                        description: Base path for paginator generated URLs.
                      per_page:
                        type: integer
                        description: Number of items shown per page.
                      to:
                        type:
                          - integer
                          - 'null'
                        description: Number of the last item in the slice.
                      total:
                        type: integer
                        description: Total number of items being paginated.
                    required:
                      - current_page
                      - from
                      - last_page
                      - links
                      - path
                      - per_page
                      - to
                      - total
                required:
                  - data
                  - links
                  - meta
        '401':
          $ref: '#/components/responses/AuthenticationException'
        '404':
          $ref: '#/components/responses/ModelNotFoundException'
components:
  schemas:
    MatchResource:
      type: object
      properties:
        id:
          type: integer
        self:
          type: string
        name:
          type: string
        url:
          type:
            - string
            - 'null'
        category:
          type: string
        tournament:
          $ref: '#/components/schemas/TournamentResource'
        round:
          type: integer
        round_name:
          type: string
        index:
          type: integer
        seeds:
          type: string
          description: >-
            Each team's draw marker as a string: seed number (e.g. `"1"`), or
            entry code (`"WC"`/`"Q"`/`"LL"`/`"ALT"`) for unseeded special
            entries; `null` when entered by ranking unseeded. Always a `{team_1,
            team_2}` object.
        played_at:
          type:
            - string
            - 'null'
        schedule_label:
          type: string
        scheduled_at:
          type:
            - string
            - 'null'
          description: >-
            Scheduled start in server timezone (`Europe/Madrid`). Resolved from
            `schedule_label`; null for "followed by" matches with no announced
            time.
        scheduled_at_local:
          type:
            - string
            - 'null'
          description: >-
            Same instant as `scheduled_at`, serialized in the tournament's
            timezone.
        court:
          type: string
        court_order:
          type:
            - integer
            - 'null'
        status:
          type: string
          enum:
            - scheduled
            - live
            - ended
            - finished
            - retired
            - walkover
            - bye
        score:
          description: >-
            Final score of the match. On the free plan, matches played more than
            6 months ago return `hidden_free_plan`; paid plans include the full
            historical archive.
          anyOf:
            - type: string
            - type: string
              enum:
                - hidden_free_plan
        winner:
          description: >-
            Winning team (`team_1` or `team_2`). On the free plan, matches
            played more than 6 months ago return `hidden_free_plan`; paid plans
            include the full historical archive.
          anyOf:
            - type: string
            - type: string
              enum:
                - hidden_free_plan
        started_time:
          type:
            - string
            - 'null'
          description: >-
            Actual start of play (first tracked point, after warm-up), in server
            timezone (`Europe/Madrid`). Distinct from `scheduled_at`, which is
            the announced start time.
        started_time_local:
          type:
            - string
            - 'null'
          description: >-
            Same instant as `started_time`, serialized in the tournament's
            timezone.
        duration:
          type: string
        players:
          type: object
          properties:
            team_1:
              $ref: '#/components/schemas/MatchPairResource'
            team_2:
              $ref: '#/components/schemas/MatchPairResource'
          required:
            - team_1
            - team_2
        updated_at:
          type: string
        connections:
          type: string
      required:
        - id
        - self
        - name
        - url
        - category
        - round
        - round_name
        - index
        - seeds
        - played_at
        - schedule_label
        - scheduled_at
        - scheduled_at_local
        - court
        - court_order
        - status
        - score
        - winner
        - started_time
        - started_time_local
        - duration
        - players
        - updated_at
        - connections
      title: MatchResource
    TournamentResource:
      type: object
      properties:
        id:
          type: integer
        self:
          type: string
        name:
          type: string
        url:
          type:
            - string
            - 'null'
        location:
          type: string
        venue:
          type:
            - object
            - 'null'
          properties:
            name:
              type:
                - string
                - 'null'
            address:
              type:
                - string
                - 'null'
          required:
            - name
            - address
        country:
          type: string
        timezone:
          type: string
        level:
          type: string
        status:
          type: string
        court_type:
          anyOf:
            - type: 'null'
            - type: string
              enum:
                - indoor
                - outdoor
                - covered
        prize:
          type:
            - object
            - 'null'
          properties:
            amount:
              type: integer
            currency:
              type: string
          required:
            - amount
            - currency
        start_date:
          type: string
        end_date:
          type: string
        winners:
          type:
            - object
            - 'null'
          additionalProperties:
            $ref: '#/components/schemas/MatchPairResource'
        links:
          type: string
        updated_at:
          type: string
        connections:
          type: string
      required:
        - id
        - self
        - name
        - url
        - location
        - venue
        - country
        - timezone
        - level
        - status
        - court_type
        - prize
        - start_date
        - end_date
        - winners
        - links
        - updated_at
        - connections
      title: TournamentResource
    MatchPairResource:
      type: array
      prefixItems:
        - type: object
          properties:
            id:
              type: integer
            self:
              type: string
            name:
              type: string
            side:
              anyOf:
                - type: 'null'
                - type: string
                  enum:
                    - drive
                    - backhand
            connections:
              type: string
          required:
            - id
            - self
            - name
            - side
            - connections
      minItems: 1
      maxItems: 1
      additionalItems: false
      title: MatchPairResource
  responses:
    AuthenticationException:
      description: Unauthenticated
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Error overview.
            required:
              - message
    ModelNotFoundException:
      description: Not found
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Error overview.
            required:
              - message
  securitySchemes:
    http:
      type: http
      scheme: bearer

````