After six months of looking, the mayor and first lady of the District of Columbia have been unable to buy a house in the city for the $100,000 they are willing to spend.

Mayor Marion Barry and his wife have given serious consideration to 20 houses and had "several" contracts fall through in what they say has been a frustrating search for a home.

But they are not the only top-level city servants turned house hunters to confront the realities of the Washington real estate market.

Over the last several months, several members of the mayor's cabinet also have been unable to find houses they like at prices they can afford. Those who have succeeded have had to pay well over $100,000 - recently reported to be the average selling price for a house in the metropolitan area.

"It's difficult," Effi Barry, the mayor's wife, said recently. "Prices are just extremely expensive. We're all caught in inflation. I think I share the frustration of a lot of people with what's happening in Washington."

"Together, we make a fairly decent salary," Mrs. Barry said. (He earns $60,000 annually and her annual income as a private consultant is about the same.) "But to see what $100,000 is going to buy you in this market, I will not just give up my money like that."

The search for affordable housing by several in the top echelon of the District bureaucracy is necessarily limited by either city law or Barry policy to the District, where houses are generally more expensive than in the suburbs.

"I'm a defenseless consumer without my boxing gloves on. That's pretty much how I feel," said Herbert Simmons, whom Barry nominated last week to be the city's director of consumer affairs. Simmons has been looking for a month. He now lives in a four-bedroom house in Oxon Hill worth about $90,000.

"I'd like to buy one [in the city] for around that price, but to find a comparable house, we've been looking at everything from $175,000 to $200,000," Simmons said. "It looks to me that I'm gonna have to settle for something less than what we would like to have. It's just a question of what we can afford. It certainly will be a change in our life style when we find a house in the District."

Those Barry aides who have purchased homes here have paid well for them.

City Administrator Elijah B. Rogers, who moved here from Berkeley, Calif., to work in the Barry administration, recently bought a new, four-bedroom town house on upper 16th Street NW for $146,000.

"Oh, yeah, that's a lot of money," said Rogers, who earns $52,000 a year. "But in that particular neighborhood, and given the fact that it's new and it's a model unit, we couldn't afford to pass it up."

Jose Gutierrez, acting director of the D.C. Office of Personnel, plans to move into the District from Silver Spring, giving up a five-bedroom house on a half acre of land that he purchased two years ago for $58,000.

The new Gutierrez home is on Roxanna Drive in the "Platinum Coast" section of upper Northwest Washington. It cost $127,000.

"You read about the cost of housing. But it's a whole different thing to go through it yourself," said Gutierrez, who earns $38,160 a year. "It's difficult to begin to recognize that what you may have had in terms of income you no longer have. It takes away all the flexible cash that you may have had. You're house-strapped.

"I have gone from living in the [impoverished] South Bronx [as a child] to a house of $127,000," Gutierrez said, "and I'm just as poor as I was in the South Bronx."

Looking for a house is one of the frustrations that Barry refuses to talk about publicly. "This is a private matter and I'm not going to get involved in this story. You can write whatever you want," he told a reporter recently. "We could find a house if we took more time to look."

The first family still lives in the rented, two-bedroom-unit Capitol Hill row house in which they were married less than two years ago. The house has an English basement rental.

Shortly after his election last fall, Barry began house-hunting, looking first on Capitol Hill. Last December, less than a week before his inauguration, Barry complained to a reporter that prices there were high.

"They wanted $70,000 just for a shell," Barry said. "That's ridiculous."

The Barrys also considered a house on Logan Circle and at least one in Anacostia, sources said. Lately, the couple has concentrated its search in the Naylor-Dupont section of far Southeast Washington around the intersection of Pennsylvania and Branch avenues. It is primarily black and largely middle-class area east of the Anacostia River in Ward 7, where Barry would like to establish a political base, his aides said.

Effi Barry said she likes the neighborhood because it reminds her of her home in Toledo, Ohio.

She said they do not want to buy a house merely as a piece of property to be held a few years and then sold. She wants a house she can live in for many years, she said. "We could have had a home by now, but I don't see a house as a business deal," she said.

"But you're almost forced to buy something because you know if you wait six months it's going to increase 20 percent," Effi Barry said. "We'll just keep on looking. If we can't find a house, I guess we'll look for a condominium. We're not gonna give up."

A condominium is precisely what William R. Ford, Barry's nominee to become director of the D.C. Department of Labor, at a salary of $41,500, is looking for, Ford came here from Detroit expecting to pay about "$85,000-$90,000, at the most" for a three-bedroom condo. Instead, those he has seen range from $100,000 to $182,000 in price, he said yesterday.

So Ford said he has now reconciled himself to paying $150,000, if necessary. "You talk about a problem [finding an affordable three-bedroom condominium]," he said, "Man, it's out o" sight."