Summary
search_apple_docs (and search_wwdc_content) return 0 results even for common, well-documented Apple APIs — e.g. NavigationStack, Observable, ScrollView — while search_framework_symbols and get_apple_doc_content return those exact pages fine.
Root cause
searchAppleDocs fetches https://developer.apple.com/search/?q=<query> and parses .search-result DOM nodes (src/index.ts → parseSearchResults). That page is now JS-rendered: the shell HTML only echoes the query, and results are loaded client-side by /search/scripts/search.js, which calls window.SEARCH_CONFIG.api (an Apple host, path /api/v1/search) that isn't reachable as a public JSON endpoint. So the .search-result selector matches nothing and the parser returns 0 for essentially every query. The legacy search_data.php endpoint is also gone (404).
Repro
search_apple_docs("NavigationStack") → 0 results
search_framework_symbols("swiftui", namePattern="NavigationStack") → NavigationStack (struct)
get_apple_doc_content("https://developer.apple.com/documentation/swiftui/navigationstack") → full page
Suggested fix
When the HTML scrape yields 0 results, fall back to the stable public documentation index JSON — the same source search_framework_symbols already uses (https://developer.apple.com/tutorials/data/index/<framework>). Resolve candidate frameworks from the query (a symbol-prefix → framework map plus a common-framework scan set), fetch their indexes in parallel, and return matching symbols. This is index-backed rather than dependent on Apple's shifting/internal search API.
Happy to open a PR if useful.
Environment: v1.0.26, macOS, Node 20.
Summary
search_apple_docs(andsearch_wwdc_content) return 0 results even for common, well-documented Apple APIs — e.g.NavigationStack,Observable,ScrollView— whilesearch_framework_symbolsandget_apple_doc_contentreturn those exact pages fine.Root cause
searchAppleDocsfetcheshttps://developer.apple.com/search/?q=<query>and parses.search-resultDOM nodes (src/index.ts→parseSearchResults). That page is now JS-rendered: the shell HTML only echoes the query, and results are loaded client-side by/search/scripts/search.js, which callswindow.SEARCH_CONFIG.api(an Apple host, path/api/v1/search) that isn't reachable as a public JSON endpoint. So the.search-resultselector matches nothing and the parser returns 0 for essentially every query. The legacysearch_data.phpendpoint is also gone (404).Repro
Suggested fix
When the HTML scrape yields 0 results, fall back to the stable public documentation index JSON — the same source
search_framework_symbolsalready uses (https://developer.apple.com/tutorials/data/index/<framework>). Resolve candidate frameworks from the query (a symbol-prefix → framework map plus a common-framework scan set), fetch their indexes in parallel, and return matching symbols. This is index-backed rather than dependent on Apple's shifting/internal search API.Happy to open a PR if useful.
Environment: v1.0.26, macOS, Node 20.