It was just after 6 p.m., and Lim Lao Sa, a fishball noodle stand in an alleyway near the Chao Phraya River in Bangkok, had just opened. Rain was falling. A series of deftly arranged tarps sheltered patrons sitting on red plastic stools at a handful of tables. Water drizzled off the tarp edges, down the concrete walls and past exposed wiring. Fluorescent bulbs cast harsh shadows. Lim Lao Sa’s owners, a brother and sister who had inherited the 60-year-old business from their father, bickered vigorously.

My friend Win Luanchaison, a real estate developer and fervent culinary explorer, and I tucked into our bowls. The quenelle-like fish balls were at once springy and creamy, the rice noodles supple, the broth clear and sure of purpose.

It was easy to understand why Lim Lao Sa cooked annually for Thai Princess Maha Chakri Sirindhorn. “She eats egg noodles served dry,” said Pawita Boriboonchaisiri, the sister.

In fact, given all of this — the setting, the food, the feeling that Lim Lao Sa could be washed away in an instant, by a bad mood or even worse weather — I decided that Lim Lao Sa was the platonic ideal of street food. And it was precisely why I had come to Bangkok.

Last April, the Bangkok Metropolitan Authority (BMA) made international headlines when it announced that the city of more than 8 million would ban street food vendors — often considered the world’s best — in order to make sidewalks more accessible. The BMA soon walked back its statement, saying street food would be preserved in Chinatown and the Khao San Road backpacker district, but elsewhere it would be eliminated, the vendors relocated from “vital walkways,” as the Tourism Authority of Thailand put it, to “designated zones and nearby markets.” This would happen by year’s end. Eventually. Maybe. Sometime.

I wasn’t going to take a chance. If Bangkok’s ad hoc restaurants were threatened — not only by the government but, just as seriously, by gentrification and changing tastes — I had to go before it was too late. In July, I flew to Bangkok for a week of eating nothing but street food. Pretty much immediately, I learned that street food was a term with many definitions.

Defining street food

“For me, street food is only a cart,” said Duangporn Songvisava, known as Bo, who with her husband, Dylan Jones, runs the restaurants Bo.lan, which received a Michelin star in December. When she was young, Songvisava, now 37, remembered, as many as 20 carts would line up outside her school to sell snacks on sticks. “They have, like, the moo ping — grilled pork on a stick, barbecue — the sausage, the fish ball.”

Some were pushcarts, others bicycle-based, but all were mobile and ephemeral. That, she said, was the tail end of the golden age of Bangkok street food. “In the old days when someone wants to open a cart or a stall, they know how to cook,” she said. “The idea was, you’re a good cook — maybe you should make some food for other people, for a living.”

Now, Songvisava said, profit margins rule. “They just buy everything from the factory, use industrial processed food.”

Songvisava was telling me this over beers at Talad Saphan Phut, a night market that she considered a sad remedy for Bangkok’s street food woes. It was here, at an out-of-the-way parking lot, that the city had relocated vendors from the slated-for-destruction Flower Market, on the theory that loyal customers would follow.

We were joined by an intrepid eating crew, which included Jones; Chawadee Nualkhair, the blogger behind Bangkok Glutton known as Chow; and writer Vincent Vichit-Vadakan, who had put me up for my stay and now edits the Michelin Guide’s Bangkok site.

“This is like a good 5 to 10 kilometers from where the original was,” Nualkhair said. “So the people who used to eat these guys’ food wouldn’t come here on a regular basis with this special trip.”

We decided to drown our concerns in the most apropos way: with street food. Along Thanon Chan, in a surprisingly quiet little neighborhood, were alleyways full of food vendors who had been relocated off the main street. Our gang descended upon them, ordering bowls of noodles.

As we crowded around folding metal tables and accentuated our treasures with chilies in vinegar, or ground dried chilies, and cracked open Thai craft beers, it all felt deliciously normal — the kind of Bangkok street-food life I’d always imagined. That picture grew more complex over the next few days. In the mornings, I’d leave Vincent’s apartment in search of coffee — and more often than not would return with a baggie of sticky rice and skewers of sweet, fatty grilled pork from the cart stationed outside his front door.

By lunchtime, I would hook up with a friend for exploratory eating. With Dwight Turner, an American who blogs at BKKFatty.com, I went to the farther reaches of Sukhumvit Road, a central artery through Bangkok. Several SkyTrain stops past the glistening condos and megamalls, the street-food crackdown didn’t seem to matter, and Turner and I had to squeeze past countless vendors — of curries, sausages, fruit, flowers, electronics — occupying sidewalk space.

For Turner, street food was not necessarily defined by mobility. “The necessity,” he said, “is that it’s convenient, at a price that people are willing to pay.”

His definition — which will no doubt enrage certain corners of the internet — opened up what I could consider street food to include Bangkok’s shophouse restaurants: boxy, frill-free dining rooms where the cooking is done up front, in a kitchen that’s often little more than an elaborate, sedentary cart. Such was the case at Sai Kaew, the duck noodle shop Turner brought me to.

“In the beginning, I worked full-time in an office like most Thais,” said Sai Kaew’s owner, Ruengchai Chartmongkoljaroen. Thirty years ago, however, he quit his job to push a cart. He set up 10 tables on sidewalk space he’d rented in front of a building, walked his cart in circles to attract attention, and of course worked on his recipes, developing the condiment that became his calling card: light, crunchy, slippery boiled duck intestines, or sai kaew. (Excellent with a slather of his vibrant green hot sauce, and a worthy foil for the sweetly rich duck.) The price for a bowl in 1987: 10 baht, or about 40 cents at the time.

He pushed the cart for 16 years before parking it at this shophouse. Although his duck noodles are now well known, the price remains right: Lunch for two was 160 baht, or less than $5. There might be many reasons to open a cart but, eventually, almost everyone wants the security of bricks and mortar.

Discovering food and the city

However endangered street food is, pursuing it remains an eye-opening way to discover a city like Bangkok. One morning, Rattama Pongponrat, known as Pom, an ebullient culinary consultant and former curator at Museum Siam, led me on a daylong binge, from a breakfast of toast with coconut jam to a sidewalk stand selling noodles with atypically thick slices of offal. There was fried chicken piled atop metal tables. There was glorious mango ice cream from a dinky corner shop.

And there was Pongponrat, overjoyed at it all. When the sun was high, we strode through the shaded alleyways of Chinatown, past tropical fruits pickled in chilies, batter-fried squid roe with a spicy-sweet sauce — until, finally, we burst out onto a bridge where Pongponrat had hoped to find one particular vendor. Instead, the bridge had been entirely cleared.

“Omigod, it’s all gone!” Pongponrat shouted. “I never knew it was a bridge. I’ve never seen this before in my life.” She began swearing, then looked up at a well-tended four-story building, yellow with green shutters, the crisp style at once Chinese and neoclassical. “What a beautiful building,” she said in wonder. Then we plunged back into the fray to find another snack.