For a piano, I recommend that you play it before you buy it because all pianos have a different “feel” when you play it. I also recommend that if you shop for a used one that you have a tuner look at it before you make your final purchase because older pianos might look pretty and sound great, but sometimes the inside of them have not been taken care of and it might not be able to stay tuned, or there might be damage you don’t know about.
For a keyboard, I recommend at least 61 keys with touch sensitivity. My preferred brand is Yamaha. Keyboards are inexpensive to purchase if you don’t have an instrument to practice on:
Here are my 3 recommendations:
Inexpensive Portable 61 Key Keyboard
Search online using keywords: 61 key keyboard, touch sensitive. You should be able to find one for between $175-$300.
76 Key Digital Piano
This size keyboard (digital piano) is terrific if you want a keyboard that you won’t outgrow fast as your skills improve. This keyboard has plenty of room for you to progress so you can reach more notes and even better, this size keyboard usually has “weighted keys” which improves sound quality so you can sound like a Pro right away!
Full Size 88 Key Digital Piano
If you have the money to invest, this is the one you will never outgrow. With all 88 keys of an acoustic piano, it and has the look, touch, sound and feel of a real piano without the high cost and maintenance of an acoustic piano.