Yes and no. If you're using an external bluetooth keyboard then as long as your iPad Mini is equipped with Bluetooth then it should be absolutely fine, but if you're using a keyboard case then you'll need to make sure that you purchase the right one for your exact iPad Mini model/size.
To get even more complicated, there are some keyboards out there that use a dongle rather than Bluetooth to connect to your device, and most of the time these will be USB only. In this case, you would need to purchase an extra adapter (from USB-type C or Apple lightning to USB for example) so you can slot the dongle into one of the ports on your iPad Mini.