How Safari Highlights Extracts Data in iOS 18
In iOS 18, Safari Highlights uses a combination of on-device machine learning, structured web data parsing, and Apple's built-in Data Detectors to surface relevant information like venue locations and phone numbers directly from web articles. By analyzing the structure and content of a webpage locally, Safari identifies key entities and presents them as actionable cards—allowing users to quickly get directions, place phone calls, or view business details without leaving the browser.
Semantic Web Markup Analysis
Safari first inspects the webpage's Document Object Model (DOM) for
structured metadata. Web developers frequently embed semantic schemas
using formats such as JSON-LD, Microdata, or RDFa based on Schema.org
standards. When an article contains standard schema tags for a
LocalBusiness, Restaurant, or
Organization, Safari directly reads defined fields such as
telephone, address, and geographic
coordinates. This provides the most accurate and immediate source of
information.
Apple Data Detectors
When structured schema markup is absent, Safari relies on Apple's Data Detectors framework. Data Detectors scan the plain text of the rendered page for recognized syntax patterns, including standard international and local telephone formats, postal codes, and street naming conventions. This pattern-matching technology identifies actionable strings within unstructured text, such as an address mentioned casually in a review.
On-Device Machine Learning and NLP
iOS 18 expands traditional pattern recognition using on-device Natural Language Processing (NLP) models. These models evaluate the context surrounding an address or phone number to confirm its relevance. For instance, the system differentiates between the physical location of a reviewed venue and the corporate headquarters of the publication hosting the article. By processing contextual cues—such as proximity to words like "located at," "visit," or "call"—the algorithm determines which details should be surfaced in the Highlights interface.
Cross-Referencing with Apple Maps
To verify physical locations, Safari matches detected names and addresses against the Apple Maps Point of Interest (POI) database. If a travel article mentions a restaurant by name and neighborhood, Safari correlates this data with Apple Maps entries. Once verified, the browser generates an interactive card containing driving directions, operating hours, and contact details, ensuring that the extracted data corresponds to a real, accessible business.
Localized, Privacy-Preserving Processing
All extraction and analysis occur locally on the user's device. Safari processes the webpage contents using local compute power, meaning the text of the article, browsing history, and extracted metadata are not transmitted to external cloud servers to generate the Highlights summary.