OAuth for iCloud developer guide

Search Safari History and Continue Phone Research

An agent can search Safari history that iCloud syncs to a signed-in Mac, using Safari export or a developer-owned helper. Cookies and login sessions do not sync, and Figment has no Safari endpoint.

Figment editorial teamPublished Updated Facts checked November 12, 2026

An AI agent can search iCloud-synced Safari history by reading from a Mac where your Apple Account is signed in and iCloud for Safari is enabled. Apple syncs browsing history, bookmarks, Reading List, open tabs, and Tab Groups across iPhone, iPad, and Mac. Website cookies and active login sessions are not part of that sync. No public Figment Safari API endpoint exists, so the pipeline below is a developer-owned design that uses Apple's built-in export tool and the data already on the Mac.

What does iCloud sync for Safari?

Apple iCloud copies the following Safari data across devices (Apple Support).

Data typeSyncs via iCloudAvailable on a connected MacNotes
Browsing history✓✓Per-profile; includes URL, title, and visit timestamp
Bookmarks✓✓Folders and hierarchy included
Reading List✓✓Saved URLs and titles; article text fetched separately via URL
Open tabs✓✓Tabs from other signed-in devices appear in Safari sidebar
Tab Groups✓✓Named collections; owned and shared groups sync
Safari Profiles✓✓Each profile carries its own history, bookmarks, and Tab Groups
Website cookies✗✗iCloud does not sync cookies
Login sessions✗✗Session state is local to each device
Saved passwords✗✗Keychain access is a separate path; omit from AI search input

History completeness depends on when iCloud was enabled on each device and whether devices were online. Items recorded before the toggle was turned on, or while a device was offline, may be missing from the Mac's local history store.

How do I export Safari history the Apple-supported way?

In Safari on macOS, choose File › Export Browsing Data to File, select a profile and the data types you want, then save. Apple packages the result as an unencrypted ZIP file (Apple Support).

Selectable export types include History, Bookmarks, Extensions, Credit cards, and Passwords. For an AI search pipeline, select only History and optionally Bookmarks. Do not include passwords or payment data in any file you pass to an external AI service or store in a shared location. The exported ZIP is unencrypted, so treat it as sensitive and delete it after import.

How do I build AI search over Safari history?

Map exported history records into a local search index and expose a natural-language query interface. This is not a Figment product endpoint. It is a design you build and control.

StepActionNotes
1. ExportFile › Export Browsing Data to FileSelect History; choose the target profile
2. ParseExtract URL, title, timestamp, visit count from ZIPUse Apple's documented export output; do not rely on internal database schemas
3. FilterDrop non-HTTP URLs; deduplicate by canonical URLReduces noise from internal browser pages
4. IndexEmbed titles and URLs; store timestamps as metadataFull-text or vector index; metadata enables date-range filtering
5. QuerySemantic search plus date and keyword filterRank by recency, relevance, or visit count
6. PresentSurface URLs with titles and visit contextOptionally re-fetch live page titles for stale records

Practical query patterns:

Topic retrieval
"Find every page I visited about climate policy in the last 30 days." Filter by date range and keyword-match title or URL.
Source recovery
"I read a database comparison this week but never bookmarked it." Search recent history for matching title terms, ranked by recency.
Reading List digest
Return all saved Reading List items, fetch current page titles, and generate a summary.

The pipeline runs on a point-in-time snapshot, so re-export on a schedule for more current data. A local Mac daemon that reads the Safari history database directly is possible, but the internal database schema is not a documented Apple API and can change across macOS versions.

How can an agent continue research that started on my phone?

Through iCloud Tabs and Tab Groups. iCloud Tabs shows every open Safari tab from your other signed-in devices in the Mac sidebar. The requirements are the same Apple Account on each device, iCloud for Safari enabled, two-factor authentication, and iOS 13 and macOS Mojave 10.14.4 or later (Apple Support).

A Mac-based integration can read this locally synced tab list without a remote API call. Feeding the current open URLs into an AI context window lets the agent continue a session started on an iPhone, including a named Tab Group such as "2026 mortgage options" built on mobile.

Tab Groups created for collaboration also sync. Reading the Tab Group name and its URLs lets an agent identify interrupted research, group related sources, and pass them to a summarization step without manual copy-paste.

What can I pair with Safari history?

Notes and Reminders. Safari history shows what you found, and Notes and Reminders turn findings into something you can act on. For related developer-owned integration designs, see Create Apple Reminders with EventKit on Mac and Read Apple Notes with a Scoped Mac Helper. For a broader view of Apple data reachable through a connected Mac, see Connect Apple Notes, Photos, Files, and Safari and the OAuth for iCloud overview.

What does OAuth for iCloud cover today?

OAuth for iCloud covers four scopes: Passwords, Messages, Notes, and Reminders (/icloud). A synthetic read-only sandbox is available for Contacts and Calendar. Register your app and review the available scopes at the developer dashboard. Manage existing connections and grants at your connections page.

Connect Apple data to your app

Register your app and start with synthetic sandbox data. Choose the permissions your app needs.

Connect Apple Account

Sandbox is free. Live access is $14 or $29 per connected Apple Account, per month.