National Enquirer owner American Media Inc. has been shopping itself in recent months and has managed to attract at least one potential buyer, The Post has learned.

Sources said private-equity giant Apollo Management had stalked AMI, which also owns Star, Radar Online, Shape and Muscle & Fitness, but that its interest had cooled lately.

“They looked at it very hard for months,” said one source with knowledge of the talks. “The due diligence went fine, but I think they were concerned about the state of the [publishing] industry in general.”

AMI has had its financial ups and downs but seemed to be on firmer footing after emerging from a pre-packaged Chapter 11 bankruptcy late last year.

The debt-for-equity swap erased $355 million in loans, leaving the company owing $500 million.

Former debt holders Angelo Gordon, Avenue Capital, Capital Research and Oppenheimer became majority shareholders with 98 percent of the stock.

The bankruptcy marked the second time AMI has had to restructure its debt. An earlier debt-for-equity deal wiped out the stake of original backers Evercore and THL Partners.

It could not be determined what price, if any, had come up in the talks between AMI and Apollo, but it would likely be below $500 million.

AMI doesn’t report audited results for the fiscal year that ended March 31 until later this month. In the previous fiscal year, revenue fell 3 percent to $412 million, while cash flow inched up by $2 million to $114 million.

One source said that while the latest numbers would probably be in the same ballpark, shrinking newsstand sales of celebrity mags, including Star, are an ongoing concern.

Sources speculate that if Apollo made a deal, it would likely fold AMI into recently acquired CKX, owner of “American Idol.”

There have been various attempts to expand AMI franchises through TV, but none has been a breakout success.

Financial pressures have also kept AMI from developing its digital presence other than Radar Online, which has broken a string of celebrity scandal stories.

Asked about Apollo, an AMI spokeswoman said that CEO David Pecker had made presentations as part of last year’s debt restructuring and “there have been a lot of inbound calls.”