Taking antibiotics for kidney stones is probably a bad idea. A review of almost 300,000 patient records from the United Kingdom (UK) revealed higher rates of kidney stones in people who took 5 categories of oral antibiotics, including broad-spectrum penicillins and fluoroquinolones, which include Cipro. 
Broad-spectrum penicillins are antibiotics containing both penicillin and another active ingredient.
The study doesn’t prove that antibiotics cause kidney stones, but that would be a logical assumption to make based on previously-published studies. The findings of the review were concerning enough that pediatric urologist Gregory E. Tasian said that he would consider looking for alternatives to the antibiotics shown to cause kidney stones whenever feasible.
“These findings just add weight to the large body of evidence that antibiotics should be prescribed for appropriate reasons and used judiciously.” 
In as many as one-third of cases, antibiotics are prescribed for conditions the drugs can’t treat, such as a virus. This, in addition to potentially upping the risk of kidney stones, is a known contributor to drug resistance and superbugs.
In the study, researchers reviewed the records of patients who developed kidney stones at least 3 months after taking antibiotics. Since stones can take weeks to months to develop, the researchers excluded any patients who might have developed them for other reasons.
The strongest link between antibiotics and kidney stones was found in sulfa drugs, including Bactrim. Patients who took sulfa antibiotics were more than twice as likely to develop kidney stones within 3-12 months after finishing a course of the drugs compared to people who hadn’t taken the medicines.
A slightly weaker link was found between kidney stones and 4 other categories of antibiotics:
- Fluoroquinolones (Cipro, Flagyl)
- Nitrofurantoin (sold as Macrobid)
- Broad-spectrum penicillins
The risks were especially high for children younger than 18. 
Patients who took broad-spectrum penicillins were found to be 30% more likely to develop kidney stones within 3-12 months of finishing the medicines than those who did not take the antibiotics. No link was found between regular penicillin and antibiotics. 
According to Joshua M. Stern, a New York urologist who was not part of the study, the relationship between the five categories of antibiotics and kidney stones is a complicated one; but it’s likely that antibiotics disrupt the microbiome in such a way that it creates an ideal environment for the formation of stones.
“This study really shows at a large scale that antibiotics are associated with increased kidney stone risk.” 
The findings remained consistent even when the study subjects were taking other medications or suffered from other conditions that might predispose them to kidney stones, according to Tasian.
Apart from the pain that kidney stones can cause, there are other risks involved with them, too, including a higher risk of high blood pressure, decreased bone density, and heart disease. Tasian called for more research to determine whether those disorders are also associated with antibiotic use.
Fortunately, the microbiome does a pretty good job of protecting and regenerating itself. In the study, the risk of kidney stones did decline somewhat over time, suggesting that the patients’ internal bacteria had started to recover.
Remember: Don’t take antibiotics for kidney stones!
The full details of the research can be found in the Journal of the American Society of Nephrology.