googlemaps-kit 0.5.0 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (343) hide show
  1. package/README.md +56 -3
  2. package/dist/advanced/parsers.d.ts +1 -1
  3. package/dist/advanced/parsers.d.ts.map +1 -1
  4. package/dist/advanced/parsers.js +1 -1
  5. package/dist/advanced/parsers.js.map +1 -1
  6. package/dist/advanced.d.ts +2 -2
  7. package/dist/advanced.d.ts.map +1 -1
  8. package/dist/advanced.js.map +1 -1
  9. package/dist/books.d.ts +30 -0
  10. package/dist/books.d.ts.map +1 -0
  11. package/dist/books.js +77 -0
  12. package/dist/books.js.map +1 -0
  13. package/dist/cli/run.d.ts.map +1 -1
  14. package/dist/cli/run.js +9 -11
  15. package/dist/cli/run.js.map +1 -1
  16. package/dist/cli/tui/app.d.ts.map +1 -1
  17. package/dist/cli/tui/app.js +7 -7
  18. package/dist/cli/tui/app.js.map +1 -1
  19. package/dist/cli.js +14 -11
  20. package/dist/cli.js.map +1 -1
  21. package/dist/client/gmaps-client.d.ts +7 -29
  22. package/dist/client/gmaps-client.d.ts.map +1 -1
  23. package/dist/client/gmaps-client.js +15 -131
  24. package/dist/client/gmaps-client.js.map +1 -1
  25. package/dist/client/http-client.d.ts +3 -1
  26. package/dist/client/http-client.d.ts.map +1 -1
  27. package/dist/client/http-client.js +14 -3
  28. package/dist/client/http-client.js.map +1 -1
  29. package/dist/client/intent.d.ts +1 -11
  30. package/dist/client/intent.d.ts.map +1 -1
  31. package/dist/client/intent.js +17 -13
  32. package/dist/client/intent.js.map +1 -1
  33. package/dist/client/maps-tools.d.ts +8 -4
  34. package/dist/client/maps-tools.d.ts.map +1 -1
  35. package/dist/client/maps-tools.js +20 -11
  36. package/dist/client/maps-tools.js.map +1 -1
  37. package/dist/client/namespaces.d.ts +51 -19
  38. package/dist/client/namespaces.d.ts.map +1 -1
  39. package/dist/client/namespaces.js +82 -28
  40. package/dist/client/namespaces.js.map +1 -1
  41. package/dist/client/place-workflows.d.ts +7 -0
  42. package/dist/client/place-workflows.d.ts.map +1 -0
  43. package/dist/client/place-workflows.js +113 -0
  44. package/dist/client/place-workflows.js.map +1 -0
  45. package/dist/finance/client.d.ts +19 -0
  46. package/dist/finance/client.d.ts.map +1 -0
  47. package/dist/finance/client.js +75 -0
  48. package/dist/finance/client.js.map +1 -0
  49. package/dist/finance/parsers.d.ts +13 -0
  50. package/dist/finance/parsers.d.ts.map +1 -0
  51. package/dist/finance/parsers.js +146 -0
  52. package/dist/finance/parsers.js.map +1 -0
  53. package/dist/finance/types.d.ts +76 -0
  54. package/dist/finance/types.d.ts.map +1 -0
  55. package/dist/finance/types.js +2 -0
  56. package/dist/finance/types.js.map +1 -0
  57. package/dist/finance.d.ts +5 -0
  58. package/dist/finance.d.ts.map +1 -0
  59. package/dist/finance.js +4 -0
  60. package/dist/finance.js.map +1 -0
  61. package/dist/flights/client.d.ts +9 -0
  62. package/dist/flights/client.d.ts.map +1 -0
  63. package/dist/flights/client.js +14 -0
  64. package/dist/flights/client.js.map +1 -0
  65. package/dist/flights/parsers.d.ts +11 -0
  66. package/dist/flights/parsers.d.ts.map +1 -0
  67. package/dist/flights/parsers.js +64 -0
  68. package/dist/flights/parsers.js.map +1 -0
  69. package/dist/flights/types.d.ts +52 -0
  70. package/dist/flights/types.d.ts.map +1 -0
  71. package/dist/flights/types.js +2 -0
  72. package/dist/flights/types.js.map +1 -0
  73. package/dist/flights.d.ts +5 -0
  74. package/dist/flights.d.ts.map +1 -0
  75. package/dist/flights.js +4 -0
  76. package/dist/flights.js.map +1 -0
  77. package/dist/gemini-web/client.d.ts +16 -0
  78. package/dist/gemini-web/client.d.ts.map +1 -0
  79. package/dist/gemini-web/client.js +110 -0
  80. package/dist/gemini-web/client.js.map +1 -0
  81. package/dist/gemini-web/parsers.d.ts +5 -0
  82. package/dist/gemini-web/parsers.d.ts.map +1 -0
  83. package/dist/gemini-web/parsers.js +62 -0
  84. package/dist/gemini-web/parsers.js.map +1 -0
  85. package/dist/gemini-web/types.d.ts +47 -0
  86. package/dist/gemini-web/types.d.ts.map +1 -0
  87. package/dist/gemini-web/types.js +2 -0
  88. package/dist/gemini-web/types.js.map +1 -0
  89. package/dist/gemini-web.d.ts +5 -0
  90. package/dist/gemini-web.d.ts.map +1 -0
  91. package/dist/gemini-web.js +4 -0
  92. package/dist/gemini-web.js.map +1 -0
  93. package/dist/google-search/client.d.ts +16 -0
  94. package/dist/google-search/client.d.ts.map +1 -0
  95. package/dist/google-search/client.js +117 -0
  96. package/dist/google-search/client.js.map +1 -0
  97. package/dist/google-search/errors.d.ts +8 -0
  98. package/dist/google-search/errors.d.ts.map +1 -0
  99. package/dist/google-search/errors.js +13 -0
  100. package/dist/google-search/errors.js.map +1 -0
  101. package/dist/google-search/html.d.ts +12 -0
  102. package/dist/google-search/html.d.ts.map +1 -0
  103. package/dist/google-search/html.js +135 -0
  104. package/dist/google-search/html.js.map +1 -0
  105. package/dist/google-search/parsers.d.ts +6 -0
  106. package/dist/google-search/parsers.d.ts.map +1 -0
  107. package/dist/google-search/parsers.js +177 -0
  108. package/dist/google-search/parsers.js.map +1 -0
  109. package/dist/google-search/types.d.ts +66 -0
  110. package/dist/google-search/types.d.ts.map +1 -0
  111. package/dist/google-search/types.js +2 -0
  112. package/dist/google-search/types.js.map +1 -0
  113. package/dist/google-search.d.ts +6 -0
  114. package/dist/google-search.d.ts.map +1 -0
  115. package/dist/google-search.js +4 -0
  116. package/dist/google-search.js.map +1 -0
  117. package/dist/hotels/client.d.ts +9 -0
  118. package/dist/hotels/client.d.ts.map +1 -0
  119. package/dist/hotels/client.js +14 -0
  120. package/dist/hotels/client.js.map +1 -0
  121. package/dist/hotels/parsers.d.ts +7 -0
  122. package/dist/hotels/parsers.d.ts.map +1 -0
  123. package/dist/hotels/parsers.js +74 -0
  124. package/dist/hotels/parsers.js.map +1 -0
  125. package/dist/hotels/types.d.ts +55 -0
  126. package/dist/hotels/types.d.ts.map +1 -0
  127. package/dist/hotels/types.js +2 -0
  128. package/dist/hotels/types.js.map +1 -0
  129. package/dist/hotels.d.ts +4 -0
  130. package/dist/hotels.d.ts.map +1 -0
  131. package/dist/hotels.js +3 -0
  132. package/dist/hotels.js.map +1 -0
  133. package/dist/index.d.ts +9 -5
  134. package/dist/index.d.ts.map +1 -1
  135. package/dist/index.js +3 -1
  136. package/dist/index.js.map +1 -1
  137. package/dist/known-surfaces.d.ts +35 -5
  138. package/dist/known-surfaces.d.ts.map +1 -1
  139. package/dist/known-surfaces.js +35 -5
  140. package/dist/known-surfaces.js.map +1 -1
  141. package/dist/lens/client.d.ts +14 -0
  142. package/dist/lens/client.d.ts.map +1 -0
  143. package/dist/lens/client.js +116 -0
  144. package/dist/lens/client.js.map +1 -0
  145. package/dist/lens/errors.d.ts +8 -0
  146. package/dist/lens/errors.d.ts.map +1 -0
  147. package/dist/lens/errors.js +13 -0
  148. package/dist/lens/errors.js.map +1 -0
  149. package/dist/lens/types.d.ts +27 -0
  150. package/dist/lens/types.d.ts.map +1 -0
  151. package/dist/lens/types.js +2 -0
  152. package/dist/lens/types.js.map +1 -0
  153. package/dist/lens.d.ts +8 -0
  154. package/dist/lens.d.ts.map +1 -0
  155. package/dist/lens.js +5 -0
  156. package/dist/lens.js.map +1 -0
  157. package/dist/news.d.ts +46 -0
  158. package/dist/news.d.ts.map +1 -0
  159. package/dist/news.js +202 -0
  160. package/dist/news.js.map +1 -0
  161. package/dist/pagespeed/client.d.ts +28 -0
  162. package/dist/pagespeed/client.d.ts.map +1 -0
  163. package/dist/pagespeed/client.js +222 -0
  164. package/dist/pagespeed/client.js.map +1 -0
  165. package/dist/pagespeed/errors.d.ts +9 -0
  166. package/dist/pagespeed/errors.d.ts.map +1 -0
  167. package/dist/pagespeed/errors.js +15 -0
  168. package/dist/pagespeed/errors.js.map +1 -0
  169. package/dist/pagespeed/parsers.d.ts +7 -0
  170. package/dist/pagespeed/parsers.d.ts.map +1 -0
  171. package/dist/pagespeed/parsers.js +236 -0
  172. package/dist/pagespeed/parsers.js.map +1 -0
  173. package/dist/pagespeed/types.d.ts +156 -0
  174. package/dist/pagespeed/types.d.ts.map +1 -0
  175. package/dist/pagespeed/types.js +2 -0
  176. package/dist/pagespeed/types.js.map +1 -0
  177. package/dist/pagespeed/wire.d.ts +10 -0
  178. package/dist/pagespeed/wire.d.ts.map +1 -0
  179. package/dist/pagespeed/wire.js +96 -0
  180. package/dist/pagespeed/wire.js.map +1 -0
  181. package/dist/pagespeed.d.ts +6 -0
  182. package/dist/pagespeed.d.ts.map +1 -0
  183. package/dist/pagespeed.js +4 -0
  184. package/dist/pagespeed.js.map +1 -0
  185. package/dist/parsers/geocode.d.ts.map +1 -1
  186. package/dist/parsers/geocode.js +30 -1
  187. package/dist/parsers/geocode.js.map +1 -1
  188. package/dist/parsers/reviews.d.ts +8 -1
  189. package/dist/parsers/reviews.d.ts.map +1 -1
  190. package/dist/parsers/reviews.js +46 -9
  191. package/dist/parsers/reviews.js.map +1 -1
  192. package/dist/platform/catalog.d.ts +18 -0
  193. package/dist/platform/catalog.d.ts.map +1 -0
  194. package/dist/platform/catalog.js +320 -0
  195. package/dist/platform/catalog.js.map +1 -0
  196. package/dist/platform/parity.d.ts +12 -0
  197. package/dist/platform/parity.d.ts.map +1 -0
  198. package/dist/platform/parity.js +25 -0
  199. package/dist/platform/parity.js.map +1 -0
  200. package/dist/services/elevation.d.ts +6 -4
  201. package/dist/services/elevation.d.ts.map +1 -1
  202. package/dist/services/elevation.js +39 -4
  203. package/dist/services/elevation.js.map +1 -1
  204. package/dist/services/environment/air-quality.d.ts +39 -0
  205. package/dist/services/environment/air-quality.d.ts.map +1 -0
  206. package/dist/services/environment/air-quality.js +82 -0
  207. package/dist/services/environment/air-quality.js.map +1 -0
  208. package/dist/services/environment/weather.d.ts +42 -0
  209. package/dist/services/environment/weather.d.ts.map +1 -0
  210. package/dist/services/environment/weather.js +63 -0
  211. package/dist/services/environment/weather.js.map +1 -0
  212. package/dist/services/geocode.d.ts +5 -1
  213. package/dist/services/geocode.d.ts.map +1 -1
  214. package/dist/services/geocode.js +13 -0
  215. package/dist/services/geocode.js.map +1 -1
  216. package/dist/services/keyed.d.ts +80 -0
  217. package/dist/services/keyed.d.ts.map +1 -0
  218. package/dist/services/keyed.js +152 -0
  219. package/dist/services/keyed.js.map +1 -0
  220. package/dist/services/knowledge.d.ts +6 -2
  221. package/dist/services/knowledge.d.ts.map +1 -1
  222. package/dist/services/knowledge.js +30 -5
  223. package/dist/services/knowledge.js.map +1 -1
  224. package/dist/services/mobility.d.ts.map +1 -1
  225. package/dist/services/mobility.js +13 -2
  226. package/dist/services/mobility.js.map +1 -1
  227. package/dist/services/nearby-search.d.ts +32 -0
  228. package/dist/services/nearby-search.d.ts.map +1 -0
  229. package/dist/services/nearby-search.js +85 -0
  230. package/dist/services/nearby-search.js.map +1 -0
  231. package/dist/services/panorama.d.ts +8 -1
  232. package/dist/services/panorama.d.ts.map +1 -1
  233. package/dist/services/panorama.js +48 -0
  234. package/dist/services/panorama.js.map +1 -1
  235. package/dist/services/photos.d.ts.map +1 -1
  236. package/dist/services/photos.js +9 -2
  237. package/dist/services/photos.js.map +1 -1
  238. package/dist/services/places.d.ts.map +1 -1
  239. package/dist/services/places.js +1 -0
  240. package/dist/services/places.js.map +1 -1
  241. package/dist/services/reviews.d.ts.map +1 -1
  242. package/dist/services/reviews.js +4 -1
  243. package/dist/services/reviews.js.map +1 -1
  244. package/dist/services/search.d.ts +8 -3
  245. package/dist/services/search.d.ts.map +1 -1
  246. package/dist/services/search.js +28 -9
  247. package/dist/services/search.js.map +1 -1
  248. package/dist/translate.d.ts +75 -0
  249. package/dist/translate.d.ts.map +1 -0
  250. package/dist/translate.js +126 -0
  251. package/dist/translate.js.map +1 -0
  252. package/dist/travel-google/common.d.ts +24 -0
  253. package/dist/travel-google/common.d.ts.map +1 -0
  254. package/dist/travel-google/common.js +72 -0
  255. package/dist/travel-google/common.js.map +1 -0
  256. package/dist/trends/client.d.ts +17 -0
  257. package/dist/trends/client.d.ts.map +1 -0
  258. package/dist/trends/client.js +86 -0
  259. package/dist/trends/client.js.map +1 -0
  260. package/dist/trends/errors.d.ts +8 -0
  261. package/dist/trends/errors.d.ts.map +1 -0
  262. package/dist/trends/errors.js +13 -0
  263. package/dist/trends/errors.js.map +1 -0
  264. package/dist/trends/links.d.ts +8 -0
  265. package/dist/trends/links.d.ts.map +1 -0
  266. package/dist/trends/links.js +71 -0
  267. package/dist/trends/links.js.map +1 -0
  268. package/dist/trends/parsers.d.ts +5 -0
  269. package/dist/trends/parsers.d.ts.map +1 -0
  270. package/dist/trends/parsers.js +126 -0
  271. package/dist/trends/parsers.js.map +1 -0
  272. package/dist/trends/types.d.ts +71 -0
  273. package/dist/trends/types.d.ts.map +1 -0
  274. package/dist/trends/types.js +2 -0
  275. package/dist/trends/types.js.map +1 -0
  276. package/dist/trends.d.ts +9 -0
  277. package/dist/trends.d.ts.map +1 -0
  278. package/dist/trends.js +8 -0
  279. package/dist/trends.js.map +1 -0
  280. package/dist/types/common.d.ts +28 -2
  281. package/dist/types/common.d.ts.map +1 -1
  282. package/dist/types/common.js.map +1 -1
  283. package/dist/types/directions.d.ts +1 -1
  284. package/dist/types/directions.d.ts.map +1 -1
  285. package/dist/types/dx.d.ts +23 -10
  286. package/dist/types/dx.d.ts.map +1 -1
  287. package/dist/types/panorama.d.ts +19 -0
  288. package/dist/types/panorama.d.ts.map +1 -1
  289. package/dist/types/reviews.d.ts +3 -4
  290. package/dist/types/reviews.d.ts.map +1 -1
  291. package/dist/types/suggest.d.ts +4 -6
  292. package/dist/types/suggest.d.ts.map +1 -1
  293. package/dist/utils/google-web.d.ts +24 -0
  294. package/dist/utils/google-web.d.ts.map +1 -0
  295. package/dist/utils/google-web.js +150 -0
  296. package/dist/utils/google-web.js.map +1 -0
  297. package/dist/utils/place-ref.d.ts +14 -4
  298. package/dist/utils/place-ref.d.ts.map +1 -1
  299. package/dist/utils/place-ref.js +49 -1
  300. package/dist/utils/place-ref.js.map +1 -1
  301. package/dist/youtube/client.d.ts +19 -0
  302. package/dist/youtube/client.d.ts.map +1 -0
  303. package/dist/youtube/client.js +115 -0
  304. package/dist/youtube/client.js.map +1 -0
  305. package/dist/youtube/errors.d.ts +8 -0
  306. package/dist/youtube/errors.d.ts.map +1 -0
  307. package/dist/youtube/errors.js +13 -0
  308. package/dist/youtube/errors.js.map +1 -0
  309. package/dist/youtube/parsers.d.ts +9 -0
  310. package/dist/youtube/parsers.d.ts.map +1 -0
  311. package/dist/youtube/parsers.js +213 -0
  312. package/dist/youtube/parsers.js.map +1 -0
  313. package/dist/youtube/types.d.ts +90 -0
  314. package/dist/youtube/types.d.ts.map +1 -0
  315. package/dist/youtube/types.js +2 -0
  316. package/dist/youtube/types.js.map +1 -0
  317. package/dist/youtube.d.ts +9 -0
  318. package/dist/youtube.d.ts.map +1 -0
  319. package/dist/youtube.js +6 -0
  320. package/dist/youtube.js.map +1 -0
  321. package/docs/books.md +18 -0
  322. package/docs/environment-research.md +65 -0
  323. package/docs/finance-research.md +153 -0
  324. package/docs/finance.md +43 -0
  325. package/docs/gemini-web.md +36 -0
  326. package/docs/google-ai-books-research.md +53 -0
  327. package/docs/google-media-research.md +105 -0
  328. package/docs/google-search-research.md +36 -0
  329. package/docs/google-search.md +53 -0
  330. package/docs/google-services-research.md +135 -0
  331. package/docs/google-travel-research.md +86 -0
  332. package/docs/internal/reverse-engineering.md +85 -0
  333. package/docs/lens.md +54 -0
  334. package/docs/maps-revalidation.md +31 -0
  335. package/docs/news.md +35 -0
  336. package/docs/pagespeed-research.md +153 -0
  337. package/docs/pagespeed.md +135 -0
  338. package/docs/reviews-research.md +33 -0
  339. package/docs/translate.md +78 -0
  340. package/docs/trends-research.md +82 -0
  341. package/docs/trends.md +75 -0
  342. package/docs/youtube.md +72 -0
  343. package/package.json +77 -2
@@ -0,0 +1,82 @@
1
+ # Google Trends investigation
2
+
3
+ Investigation date: 2026-10-29. Target: Google's public Trends consumer surfaces,
4
+ with no credentials, API alpha enrollment, CAPTCHA solving, or proxy rotation.
5
+ The questions were which anonymous routes return usable data, how query inputs
6
+ and payloads are encoded, which data can be preserved, and where access prevents
7
+ verification.
8
+
9
+ ## Finding ledger
10
+
11
+ | ID | Evidence | Conclusion | Boundary |
12
+ | --- | --- | --- | --- |
13
+ | TR-01 | Direct HTTP 200, `/trends/api/autocomplete/coffee?hl=en-US`; complete fixture `tests/fixtures/trends/suggestions-coffee.txt` | JSON has an XSSI prefix and `default.topics`, each with `mid`, `title`, `type`. | Observed for one query/locale; extra data is retained. |
14
+ | TR-02 | Direct HTTP 200, `/trending/rss?geo=US`; trimmed fixture `tests/fixtures/trends/trending-us.xml` | RSS has channel metadata, item traffic buckets, dates, pictures and nested `ht:news_item` records. | Observed US feed; geographic availability and item count vary. |
15
+ | TR-03 | First direct Explore page and `/trends/api/explore` attempts returned 429; ordinary fresh Chromium navigation independently displayed 429 | Explore data access is restricted from this network. | This is an observed restriction, not evidence that the protocol never works elsewhere. No retry/rotation flow was added. |
16
+ | TR-04 | Live-served Google embed loader, SHA-256 `5f67429c1b957c1c3472b6e973700f07284a86782ead3791f8f404e1e925fd7e`; REA evidence `ev_152414288f62adb3212d2e73723e68eb6e72ef51fefba57e93cf5aad05e84494` | Source constructs `/trends/embed/explore/{type}` with encoded JSON `req` and minutes-west-of-UTC `tz`. Its compatibility code constructs `comparisonItem`, `category`, and `property`. | Static construction evidence; iframe runtime and data availability remain unverified. |
17
+ | TR-05 | Current landing page and `boq-trends.TrendsUi.en_US.5dr7P7p863E.2018.O` home/exploreview JavaScript, frontend build `boq_trends-boq-servers-frontend_20261028.03_p0` | Current code contains a new Explore sign-in screen and classic Explore retirement notice. Navigation construction uses `/trends/explore`, `q`, `date`, `geo`, and optional `legacy`. | Static UI and navigation evidence; no signed-in session was inspected. |
18
+ | TR-06 | [Official API documentation](https://developers.google.com/search/apis/trends) | The documented API is a limited alpha, distinct from consumer website requests. | No alpha credentials or API service calls were available. |
19
+
20
+ The [Google-hosted embed loader](https://ssl.gstatic.com/trends_nrtr/2965_RC03/embed_loader.js)
21
+ was located using an asset directory referenced by the current shipped home
22
+ bundle. REA analyzed that isolated 12,352-byte artifact as inert JavaScript. Its
23
+ parse coverage was complete, with three graph nodes; dynamic property resolution
24
+ and runtime invocation remain unknown. An initial analysis of the entire scratch
25
+ capture timed out after five minutes, so no conclusions depend on that analysis.
26
+ The focused analysis did not execute Google's code.
27
+
28
+ The current Explore bundle also maps the property keys `images`, `news`,
29
+ `froogle`, and `youtube` to its image, news, Shopping, and YouTube labels.
30
+ Those mappings support the typed link options; successful filtered Explore
31
+ data responses were not observed.
32
+
33
+ The current Explore bundle contains these UI strings: “Sign in to try the new
34
+ Explore” and “Classic Explore is expiring soon, but you can still use it for a
35
+ little longer.” These are static observations, rather than proof that every
36
+ account receives the same rollout or that classic Explore has been retired.
37
+
38
+ ## Encoding and parsing
39
+
40
+ Suggestions use `encodeURIComponent(keyword)` as one path component and `hl` as
41
+ an ordinary query parameter. The observed XSSI prefix is removed before JSON
42
+ parsing. Topic records and the full response remain available without dropping
43
+ unknown properties.
44
+
45
+ RSS parsing supports the observed XML namespace names, standard XML named and
46
+ numeric entities, CDATA, self-closing empty text fields, and nested news items.
47
+ It does not resolve DTDs or external entities. Dates are normalized to ISO while
48
+ the original XML remains available. Approximate traffic is preserved verbatim;
49
+ no exact-volume estimate is inferred from it.
50
+
51
+ The source's embed compatibility constructor uses items shaped as
52
+ `{ keyword, geo, time }`, plus `category` and `property`. Its iframe constructor
53
+ JSON-serializes `req`, serializes `tz`, and strips nonletters from the optional
54
+ locale. The SDK reproduces that URL construction. Defaults of worldwide,
55
+ `today 12-m`, category 0, UTC, and web search are SDK choices. They are explicit
56
+ and tested; they are not a claim about all website defaults.
57
+
58
+ Website links are deliberately limited to shared geo/time and comma-free
59
+ keywords. Independent per-item settings are represented by the embed request
60
+ object, because no successful modern Explore response was available to verify
61
+ more complex link semantics.
62
+
63
+ ## Coverage and remaining questions
64
+
65
+ | Question | Status |
66
+ | --- | --- |
67
+ | Topic suggestion lookup and topic IDs | Answered by a successful capture and live test. |
68
+ | Current trending RSS, article and image metadata | Answered by a successful capture and live test. |
69
+ | Chart iframe request construction | Answered statically; rendering is unverified. |
70
+ | Explore initialization and widget tokens | Unresolved: HTTP 429. |
71
+ | `widgetdata/multiline`, `comparedgeo`, `relatedqueries`, `relatedsearches` | Not implemented: no successful response or corresponding shipped implementation was captured. |
72
+ | Current signed-in new Explore data RPCs | Unresolved: outside the anonymous session inspected. |
73
+ | Restricted official API alpha | Not implemented: enrollment and credentials required. |
74
+ | Current Trending now website filters beyond the RSS export | Unresolved in this pass; RSS does not claim those fields. |
75
+
76
+ [Google's Trending now help](https://support.google.com/trends/answer/3076011?hl=en)
77
+ describes the RSS export, bucketed traffic and refresh behavior. The
78
+ [related-search documentation](https://support.google.com/trends/answer/4355000?hl=en)
79
+ explains top/rising results and Breakout labels; those concepts are not fabricated
80
+ from the RSS feed. [The data FAQ](https://support.google.com/trends/answer/4365533?hl=en)
81
+ explains sampling and normalization. The website's indexed interest values are
82
+ not the consistently scaled values described for the restricted API.
package/docs/trends.md ADDED
@@ -0,0 +1,75 @@
1
+ # Google Trends
2
+
3
+ The Trends client reads topic suggestions and the public Trending now RSS feed.
4
+ It also builds Explore and chart embed links from Google's shipped request
5
+ format. These methods use the consumer website; Google's separately documented
6
+ [Trends API](https://developers.google.com/search/apis/trends) requires alpha
7
+ access.
8
+
9
+ ```ts
10
+ import { trends } from 'googlemaps-kit/trends';
11
+
12
+ const client = trends({ locale: 'en-US', timeoutMs: 30_000 });
13
+ const suggestions = await client.suggestions('coffee');
14
+ const coffee = suggestions.topics[0];
15
+ console.log(coffee?.mid, coffee?.title, coffee?.type);
16
+
17
+ const feed = await client.trending({ geo: 'US' });
18
+ for (const item of feed.items) {
19
+ console.log(item.title, item.approximateTraffic, item.publishedAt);
20
+ console.log(item.articles);
21
+ }
22
+ ```
23
+
24
+ Suggestions return topic IDs such as `/m/02vqfm`, display titles and topic
25
+ types. Both the complete JSON response and every topic object remain available
26
+ as `raw`.
27
+
28
+ RSS items include the exact approximate traffic label, publication time as ISO,
29
+ picture information, and nested news articles. Feed, item and article `raw`
30
+ values retain their XML text, including fields unknown to the client. Traffic
31
+ labels are bucketed display values, rather than precise search counts. The feed
32
+ does not provide arbitrary historical Explore time series or the website's full
33
+ set of Trending now filters.
34
+
35
+ ```ts
36
+ const request = {
37
+ comparisonItem: [{ keyword: '/m/02vqfm', geo: 'US', time: 'today 12-m' }],
38
+ };
39
+ const explore = client.exploreUrl(request);
40
+ const embed = client.embedUrl('TIMESERIES', request);
41
+ ```
42
+
43
+ Embed types are `TIMESERIES`, `GEO_MAP`, `RELATED_TOPICS`, and `RELATED_QUERIES`.
44
+ Keywords may be ordinary terms or topic IDs. Each comparison item accepts a
45
+ location and a website range expression; omitted values select worldwide and
46
+ `today 12-m`. `category` defaults to 0 and `property` to web search (`''`).
47
+ Optional property values are `images`, `news`, `froogle`, and `youtube`.
48
+
49
+ Explore links require a shared location and range, and keywords without commas,
50
+ so the link preserves the intended comparison. Embed requests retain independent
51
+ item settings and literal commas. Link generation performs no request and does
52
+ not establish that a chart can be loaded. The standalone
53
+ `buildTrendsExploreUrl(request, { legacy: true })` follows the current website's
54
+ classic Explore navigation option.
55
+
56
+ Configuration accepts an injected `fetch`, `locale`, `timezone`, and `timeoutMs`.
57
+ `timezone` is minutes west of UTC, matching `Date.getTimezoneOffset()`, and
58
+ applies to embed URLs. Both network methods accept an `AbortSignal`. The timeout
59
+ covers the response body as well as the initial HTTP request.
60
+
61
+ `TrendsError.kind` distinguishes `rate-limit`, `blocked`, `http`, `network`,
62
+ `timeout`, and `parse`. HTTP errors expose `status`; applicable responses expose
63
+ `retryAfterMs`. Caller cancellation retains the caller's abort reason. Requests
64
+ are issued once, so callers can decide their own scheduling after rate limits.
65
+
66
+ The investigation successfully retrieved suggestions and RSS. Explore's page,
67
+ legacy API, and embed page returned HTTP 429 on this network, including an
68
+ ordinary browser visit. The library therefore does not expose unverified widget
69
+ token or widget-data methods. The current shipped Explore frontend also contains
70
+ a sign-in gate for the new Explore and a classic Explore retirement notice.
71
+ See [the research ledger](trends-research.md) for the evidence boundary.
72
+
73
+ Run offline verification with `npx vitest run tests/unit/trends`. Run live
74
+ verification explicitly with
75
+ `GMAPS_LIVE=1 npx vitest run tests/live/trends.test.ts`.
@@ -0,0 +1,72 @@
1
+ # YouTube
2
+
3
+ The anonymous YouTube client reads watch-page metadata, public search results,
4
+ search continuations, and oEmbed metadata. It uses the consumer website without
5
+ an API key.
6
+
7
+ ```ts
8
+ import { youtube } from 'googlemaps-kit/youtube';
9
+
10
+ const client = youtube({ locale: 'en', region: 'US' });
11
+ const video = await client.video('bC8fvcpocBU');
12
+ console.log(video.title, video.author, video.lengthSeconds);
13
+ console.log(video.playability.status, video.playability.reason);
14
+ console.log(video.captions.map(track => [track.languageCode, track.name]));
15
+
16
+ const first = await client.search('Google for Developers');
17
+ console.log(first.items);
18
+ if (first.continuation) {
19
+ const next = await client.continueSearch(first.continuation);
20
+ console.log(next.items);
21
+ }
22
+
23
+ const embedMetadata = await client.oembed('bC8fvcpocBU');
24
+ console.log(embedMetadata.title, embedMetadata.thumbnail_url);
25
+ ```
26
+
27
+ `video()` accepts an 11-character video ID or a YouTube watch, short, embed,
28
+ live, or youtu.be URL. It returns title, channel/author, description, length,
29
+ view-count text, thumbnails, keywords and available caption-track metadata.
30
+ The original player payload and initial watch data remain available through
31
+ `raw` and `initialData`. An unavailable video can have a playability status and
32
+ reason while metadata is absent. `LOGIN_REQUIRED`, age restrictions, bot gates,
33
+ and other player states are retained rather than interpreted as successful
34
+ playback.
35
+
36
+ Search items distinguish video, channel and playlist records. The parser handles
37
+ the observed classic video/channel renderers and current playlist lockup view
38
+ models, including nested result shelves. Unknown renderer structures remain in
39
+ `raw`; the client does not claim to normalize every YouTube presentation.
40
+ Duration, views and publication time from search remain localized display text.
41
+ Duplicate result IDs are deduplicated, and explicit ad containers are excluded
42
+ from the normalized items.
43
+
44
+ The opaque continuation includes its minimal anonymous client context. Pass it
45
+ unchanged to `continueSearch()`. The client uses the version and visitor context
46
+ supplied by the current page; it does not embed a fixed internal API key. These
47
+ cursors are session-specific and may expire.
48
+
49
+ `oembed()` returns the complete provider object, including the iframe HTML. Treat
50
+ that HTML as external content when presenting it. The client returns metadata
51
+ and never fetches audio/video streams or deciphers media signatures.
52
+
53
+ Caption tracks are metadata only. In the captured session, timed-text requests
54
+ returned HTTP 200 with an empty body, both through the website and direct HTTP.
55
+ That response does not prove that a video has no captions. No transcript-content
56
+ method is exposed without a verified content response.
57
+
58
+ Configuration accepts `fetch`, `locale`, `region`, and `timeoutMs` (30 seconds by
59
+ default). Each method accepts `{ signal }`; the deadline includes response-body
60
+ reads. `YouTubeError.kind` identifies `http`, `blocked`, `auth-required`,
61
+ `rate-limit`, `parse`, `network`, and `timeout`. A playability restriction inside
62
+ a successful watch response stays on `video.playability`. Failed requests are
63
+ not retried.
64
+
65
+ The investigation successfully exercised metadata, oEmbed, search, and anonymous
66
+ continuation with the SDK. The suggested Rick Astley test ID was unavailable in
67
+ the observed session; the public Google for Developers introduction supplied a
68
+ successful alternative. See [the media research ledger](google-media-research.md)
69
+ for the capture scope.
70
+
71
+ Run offline tests with `npx vitest run tests/unit/youtube` and opt-in live checks
72
+ with `GMAPS_LIVE=1 npx vitest run tests/live/google-media.test.ts`.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "googlemaps-kit",
3
- "version": "0.5.0",
4
- "description": "TypeScript SDK + Bubble Tea TUI for Google Maps consumer surfaces",
3
+ "version": "0.7.0",
4
+ "description": "TypeScript SDK + Bubble Tea TUI for Google Maps and public Google consumer services",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
7
7
  "types": "./dist/index.d.ts",
@@ -12,6 +12,78 @@
12
12
  "default": "./dist/index.js"
13
13
  }
14
14
  },
15
+ "./pagespeed": {
16
+ "import": {
17
+ "types": "./dist/pagespeed.d.ts",
18
+ "default": "./dist/pagespeed.js"
19
+ }
20
+ },
21
+ "./translate": {
22
+ "import": {
23
+ "types": "./dist/translate.d.ts",
24
+ "default": "./dist/translate.js"
25
+ }
26
+ },
27
+ "./news": {
28
+ "import": {
29
+ "types": "./dist/news.d.ts",
30
+ "default": "./dist/news.js"
31
+ }
32
+ },
33
+ "./google-search": {
34
+ "import": {
35
+ "types": "./dist/google-search.d.ts",
36
+ "default": "./dist/google-search.js"
37
+ }
38
+ },
39
+ "./trends": {
40
+ "import": {
41
+ "types": "./dist/trends.d.ts",
42
+ "default": "./dist/trends.js"
43
+ }
44
+ },
45
+ "./finance": {
46
+ "import": {
47
+ "types": "./dist/finance.d.ts",
48
+ "default": "./dist/finance.js"
49
+ }
50
+ },
51
+ "./flights": {
52
+ "import": {
53
+ "types": "./dist/flights.d.ts",
54
+ "default": "./dist/flights.js"
55
+ }
56
+ },
57
+ "./hotels": {
58
+ "import": {
59
+ "types": "./dist/hotels.d.ts",
60
+ "default": "./dist/hotels.js"
61
+ }
62
+ },
63
+ "./youtube": {
64
+ "import": {
65
+ "types": "./dist/youtube.d.ts",
66
+ "default": "./dist/youtube.js"
67
+ }
68
+ },
69
+ "./lens": {
70
+ "import": {
71
+ "types": "./dist/lens.d.ts",
72
+ "default": "./dist/lens.js"
73
+ }
74
+ },
75
+ "./books": {
76
+ "import": {
77
+ "types": "./dist/books.d.ts",
78
+ "default": "./dist/books.js"
79
+ }
80
+ },
81
+ "./gemini-web": {
82
+ "import": {
83
+ "types": "./dist/gemini-web.d.ts",
84
+ "default": "./dist/gemini-web.js"
85
+ }
86
+ },
15
87
  "./advanced": {
16
88
  "import": {
17
89
  "types": "./dist/advanced.d.ts",
@@ -24,6 +96,7 @@
24
96
  },
25
97
  "files": [
26
98
  "dist",
99
+ "docs",
27
100
  "LICENSE",
28
101
  "README.md",
29
102
  ".github/assets/banner.png"
@@ -41,6 +114,8 @@
41
114
  "test": "vitest run tests/unit",
42
115
  "test:watch": "vitest",
43
116
  "test:live": "GMAPS_LIVE=1 vitest run tests/live",
117
+ "test:pagespeed:live": "GMAPS_LIVE=1 PAGESPEED_LIVE=1 vitest run tests/live/pagespeed.test.ts",
118
+ "test:google-public:live": "GMAPS_LIVE=1 FINANCE_LIVE=1 GOOGLE_TRAVEL_LIVE=1 vitest run tests/live/google-translate.test.ts tests/live/google-news.test.ts tests/live/trends.test.ts tests/live/google-search.test.ts tests/live/finance.test.ts tests/live/google-travel.test.ts tests/live/google-media.test.ts tests/live/google-ai-books.test.ts",
44
119
  "preexample": "npm run build",
45
120
  "example:quick-start": "tsx examples/quick-start.ts",
46
121
  "example:search": "tsx examples/search-text.ts",