There’s a house that was involved in an exorcism to rid its spaces of ghosts. There’s a house that, according to local lore, has a piano that repeatedly plays one note by itself. Several other residences have infamous histories associated with them.

If you have a taste for the offbeat and creepy, here’s a way to keep the Halloween mood going year-round: You can buy a purportedly haunted house – or one that looks like it is.

A haunted house, obviously, is not for everyone. But they do appeal to a select segment of the market, realty experts say.

“We have had some people ask to spend the night in the house,” says agent Matt Barnhart of Pagoda Real Estate in West Lawn, Pennsylvania, who is representing a home built in 1749 where there have been reports of a lovelorn female ghost endlessly awaiting the return of her beloved. “Some of them consider it a feature.”

Here’s a look at some spooky houses around the country that are for sale, ranging from $495,000 to $4.5 million:

n It is said that a female ghost occasionally appears in the four-bedroom, four-bathroom Priestly House in Canton, Mississippi. In the house, a piano plays and candles fall out of their holders – all by themselves.

The current owners have extensively renovated the property to its original condition. They tracked down the original tri-fold doors that had been in the house when the Priestly family owned it in the early 1900s. The house is listing for $938,000.

n A besotted female ghost is said to be endlessly waiting for her lover to return to this seven-bedroom, five-bathroom Charming Forge house in Womelsdorf, Pennsylvania, only to be continually disappointed because he was thrown from his horse when riding up the path to the house. One wing of the house dates to 1749, but more pieces were added in later decades.

This pre-Revolutionary War house retains much of its original character with the ornate built-in shelving. According to the listing agent, local folklore has it that the woodwork and the earthwork that powered the forge was done by German prisoners of war during the American Revolution. The house is listing for $825,000.

n Confederate soldier deserters, wearing Union uniforms, were said to have died at the three-bedroom, three-bathroom Adams Griffin House in New Orleans and continued to hang around. Sightings of ghosts, sometimes holding whiskey bottles and singing drinking songs, have been reported.

The third floor is a guest suite with a full kitchen. The house is listing for $1,018,000.

n Wyckoff Villa on Carleton Island in Cape Vincent, New York, was built in 1894 by the Remington typewriter magnate, William Wyckoff, who died of a heart attack the first night he stayed in the home. His son sold it to General Electric in the early 1930s, but plans to build a new plant were scuttled by World War II. The home has been empty for more than 60 years and looks like the set for a scary movie. The 6.9-acre waterfront estate is on the market for $495,000.

n The 16-bedroom, 14-bathroom Campbell Castle in Wichita, Kansas, was modeled after a Scottish castle and took two years to build. Many of the fireplaces, stained-glass windows and other features were imported from castles in Europe, including a 300-year-old staircase from London. It is said that spirits from the old European castles haunt this new location. The home is listed on the local, state and national registers of historic places and has a current asking price of $3.5 million.

n Pillars Estate, built in the early 1800s, is part of a haunted house tour in Albion, New York. Children’s voices have been heard through the house, and the sound of one piano key being played repeatedly, even though there is no one at the piano, is another ghostly feature of the home.

The house underwent a massive renovation that included the addition of a grand ballroom with a stairway modeled after the stairs on the Titanic. One of the prior inhabitants, Patricia Carr, kept a diary of her time living at the estate from the 1940s to the 1960s. Her grandchildren published the memories in a book titled “The Long-Legged View.” The six-bedroom, six-bathroom home is listed for $499,000.

n Villa Paula in Miami was built for the Cuban consul in 1925 and named after his wife, who died following complications from a leg amputation. A recent resident reported repeatedly noticing the strong smell of coffee coming from the kitchen and seeing apparitions of a ghostlike woman who had only one leg disappearing down a hallway.

Villa Paula is currently an art gallery and a Designated Historic Haunted commercial building. On the market for $4.5 million, Villa Paula is part of a bundled sale that includes three other buildings zoned for multifamily use.

n Hampton Lillibridge in Savannah, Georgia, built in 1796, has had multiple reported spooky sightings of a “tall man dressed in black” looking out the window. Jim Williams, the subject of the book “Midnight in the Garden of Good and Evil,” had an exorcism performed in 1963. The house is listing for $1.9 million.