Let's get real here.
It depends on the age of the dog, not necessarily the breed of the dog and also on the activity level of the dog you want.
Just so that it is clear, there are some small dogs that clearly cannot live in an appartment due to excessive barking...this can also go for big dogs.
Best advice is to consult with a rescue group that have their dogs foster home based. They will be able to advise you based on real live experience what dog will do well and what dog will not.
People who live in appartments MUST take their dogs for necessary walks. There is no choice as those that live in houses who just toss the dog in the backyard without any further 'adventure'.
Be wise and considerate towards your neighbours. Ensure that your dog is well behaved and that you follow through with training and outdoor activity. Again my best advice is to consult with a rescue group. They know the dogs in their care.