If you absolutely cannot move, talk to the landlord, yes. But if there is smoking allowed in the building, the landlord may say he or she cannot tell tenants what to do regarding an activity that is legal and allowed in this building.
There is a very good and sobering commercial that runs in our area, courtesy of a local health department. It shows someone smoking in the basement of a house, and it traces the smoke's path through every air vent right to a small child upstairs. It points out that there is no way, NO way, that others are safe from second-hand smoke.
Getting an air purifier will not get the chemicals out of the air or out of your lungs. It might improve the air smell, that's it, but go in your closet right now and really smell your clothes. I bet they smell of smoke and so do your kids' clothes. And their soft stuffed toys, which suck up odors from the air. Eventually you will start to find a mysterious brown, sticky substance clinging in odd places such as items deep in the kitchen cabinets, items you haven't used in a while so they've sat there in the back of a drawer. That substance is from cigarettes. Imagine it in your kids' lungs.
I may be sounding dramatic here but the nastiness of smoke is for real. We had to scrub down the basement of our house because the previous owner smoked there and the walls -- which appeared clean and white -- actually ran with that sticky brown crud once we started washing them down. Same happened when I cleaned out my late mom's home in which she smoked for decades. I knew both times what the goo was because it stank of cigarettes.
Asking them to open their windows when they smoke won't make much difference. You would be depending on the thoughtfulness of strangers who don't know you or particularly care. Nicotine's addictive and they need it more than they need a good relationship with their upstairs neighbor.
KayB's post is right. This is a serious health issue. I'd really look into whether there are non-smoking buildings in your current apartment complex or elsewhere. Meanwhile, impress on the landlord that you share the air ducts with the entire building and your family is breathing the same air as the smokers downstairs.