Want a Spiced Apple Soda? Rhubarb? Come to Brooklyn.

In a back kitchen in Brooklyn, Anton Nocito stood over a giant pot of water bubbling with cane sugar, golden raisins and bits of a woody-looking herb. Inside the pot was a familiar thing: soda syrup. What wasn’t so familiar was the flavor: lovage.

The savory, almost celery flavor is one of P&H Soda Co.’s, signature syrups, but it is also an endemic sign of the effervescent beverage’s new stage of life — one that exists largely outside the familiar chilled cans of corn-syrup sweetened fizz.

The soft drink has gone artisanal.

It’s hardly surprising that soda syrups have joined the ranks of the DIY revolution that has conquered nearly every food staple in the past decade. Growing health concerns over the amount of sugar, sweeteners and artificial flavor in brand-name sodas, New York City’s proposed ban on large soda size purchases, and the environmental impact of all those plastic bottles and cans have all dented the traditional soda’s appeal.

By mixing their own soda, restaurants and home cooks are leading a revival that is bringing the culinary values of seasonal, homemade and local to the beverage, while reminding us of the soda fountain’s heyday.

And naturally, they’re doing it most often in Brooklyn, N.Y.— America’s unofficial artisanal capital.

“We really do take the ingredients and our sourcing seriously and ultimately you taste that when it’s in the bottle,” said Kari Morris, one of the owners of Brooklyn’s Morris Kitchen, which produces ginger, preserved lemon, rhubarb and spiced apple syrups. “There is a similar aesthetic popping up all around the country for these homemade syrups.”

And thanks to the ease, size and price of home carbonators on today’s market, it has never been easier to mix your own pop. Americans bought more than 1.2 million carbonators like the SodaStream and the SodaSparkle last year and Samsung now makes a refrigerator with a built-in sparking water dispenser.

Home carbonation manufactures maintain a profitable sideline in flavored syrups, usually artificially sweetened, that can be mixed with the fizzy water to recreate the taste of name-brand sodas, but they often lack the health and taste benefits of their homemade peers.

These somewhat healthier syrups come in a limitless spectrum of flavors that often use fresh ingredients like lemon or ginger, which rarely make it into name-brand drinks because of their short shelf life.

“This is a niche market, but with SodaStream growing, the small retail bottles are selling more,” Nocito said.  “The general public still doesn’t really know what our syrup is, but when I’m doing demos and stuff, people often say ‘oh, you mean this thing will go with my SodaStream’ and then they want a bottle.”

Nocito first started experimenting with soda syrups in 2009 using his own home carbonator. His wife loved the flavors so much, she convinced him to get a stall at a market and begin selling them. At first he just sold cups of soda made from his syrup, but customers kept asking to buy the syrups for themselves for use with their home carbonators and a few stores even asked for bottles of syrup to sell alongside home carbonators in their shops.

Queens resident Ashley Zari loves the ginger and preserved lemon syrups from Morris Kitchen with seltzer water and even brought bottles back to her family on the West Coast.

“When I taste regular ginger sodas, I’m like ‘where is the ginger?” but with this you can really taste it. It actually tastes like what it says it is,” Zari said. “It’s fresher and more flavorful and it taste exactly how you want it to because you can put in as little or as much as you want.”

Several restaurants — like Brooklyn Farmacy & Soda Fountain, Portland’s Blueplate lunch counter and soda fountain and L.A.’s Bar Ama — have taken their soda-making a step further.  Not content with buying other artisanal syrups, they now mix their own in-house flavors.

“We get to take something that was historically popular and break it down and recreate it to fit our own legend,” said Peter Freeman, owner of Brooklyn Farmacy.

Although there was some initial customer hesitation to branch out into these recreated or new flavors, Jeff Reiter, owner of Blueplate, said “we turned many to the sweet side.” And Josef Centeno, owner of Bar Ama, said he sells about 2,000 cases a year of his housemade sodas, called Baco Pop, in flavors like tamarindo and mango.

“It has a unique flavor I can’t put my finger on; it doesn’t taste like regular soda,” Susan Macpherson said while sipping one of Brooklyn Farmacy’s homemade sodas. “ I’m not sure I would know it was a cola if I hadn’t ordered it, but I really like it.”

But most home cooks and restaurants who just want to dabble in homemade sodas choose the premade small-batch syrup flavors as a way to lock in all the taste benefits without the work.

“It’s a good product to carry,” said Sam Bates, one of the owners of Eagle Trading Co., a restaurant and food shop that sells P&H soda. “It’s in line with our kind of homemade, local aesthetic that we are going for. It is simple, but it tastes great and people really appreciate the extra effort.”

Bates makes serving the soda a full-on production. A tall glass is filled with the syrup and then fresh fizz added, mixed and served with the kind of flair normally given to fancy cocktails.

He said the procedure takes the soda and elevates it, enticing customers to buy and making it more fun than pushing a button on a soda dispenser.

The novelty of the syrups also helps sell their versatility. These homemade flavors have been dashed in cocktails, poured on ice cream, stirred into teas and mixed with yogurt.

All of which helps to offer an odd distinction.

“People always tell me ‘I won’t give my kids soda, but I’ll give them yours’ or ‘I don’t drink soda, but I’ll drink this,’” said Nocito. “They always seem to surprise people.”