The inputs read-only property of the MIDIAccess interface provides access to any available MIDI input ports.
inputs
MDN Reference