The majority of Airbnb Inc. rentals recently offered in New York City appeared to be illegal, the state Attorney General's Office said amid a probe of whether the home-sharing service is complying with the law and collecting taxes.

More than 60 percent of the 19,522 listings available through the service in the city as of Jan. 31 offered rental of an "entire apartment" for periods of less than 30 days, according to an affidavit the office said it filed Monday with a state court in Albany.

Under New York law, residents can rent only part of homes they are sharing, not the entire property, for a period of less than 30 days, according to the Attorney General's Office.

Used in Philadelphia and throughout the world, Airbnb has been challenging a probe by New York into whether property managers or brokers have been using the service to skirt the law and avoid collecting or paying lodging taxes.

The San Francisco-based online service, said to have been valued at $10 billion in a financing deal with TPG Capital, said on its website Sunday that a subpoena by the attorney general for company records has "demanded personal information about thousands of New Yorkers."

The company said it would oppose the attorney general's request in arguments Tuesday in Albany after failing to resolve the dispute through negotiations. This month, the company said it favored changes to state law that would allow it to collect more than $21 million in taxes.

"Taking on an attorney general who is determined to fight innovation and attack regular people isn't easy and we won't succeed without standing together," David Hantman, the company's head of global policy, said on the website. "We'll do everything we can to keep you informed about this case and our work to fix the bad law that made it possible."

In a statement Monday, a spokesman for Attorney General Eric Schneiderman, Matt Mittenthal, said that Airbnb had resorted to "name-calling and public relations to confuse the issue."

"Airbnb is simply looking out for its bottom line at the expense of a law that protects quality of life for building residents and safety for tourists," he said.