Apple Inc. purchased data-analytics firm Topsy Labs Inc., giving the world’s most valuable company new tools to spot trends as they emerge on Twitter Inc.’s social network. Apple paid more than $200 million for Topsy, said people with knowledge of the deal, who asked not to be identified because the information is private. The San Francisco-based startup’s service is used by companies to analyze consumer sentiment on Twitter, be it responses to TV shows or politics. Topsy is one of a few partners that has real-time access to the messages that roll across the microblogging service, and can search through every tweet published since 2006. Access to information about what is being discussed on Twitter can be integrated in any number of ways by Apple, according to Debra Aho Williamson, an analyst with EMarketer Inc. That includes to improve results within Apple’s voice-based search tool Siri, analytics of the iAd mobile-advertising service, or to make purchase recommendations from iTunes and App Store, “A key point is they are one of the few companies that has access to the Twitter fire hose and can do real-time analysis of the trends and discussions happening on Twitter,” she said. The underlying technology Apple acquires is often used to enhance existing services or for future products. Apple last year purchased fingerprint-security firm AuthenTec Inc., whose technology was recently incorporated into the new iPhone 5s. Purchases of navigation companies have been used to improve its mapping software.