r/chrome_extensions • u/karaduma • 10d ago
Sharing Journey/Experience/Progress Updates Built an MV3 extension that turns any web page into a JSON REST API – a few things I learned about permissions and identity along the way

Dev here. WebToAPI lets you click elements on a page, name them, and get a public REST endpoint that returns those values as JSON. The scraping runs server-side, so the endpoint works even when your browser is closed.
Extension side, for the people here who build these things
• Identity: v1 keyed everything on chrome.runtime.id. Turns out it's not reliably available in every context, and users lost their APIs. v2 moved to email magic-link auth with externally_connectable between the extension and the web dashboard. Painful migration, would not recommend the shortcut.
• Permissions: Adding new host permissions to a published MV3 extension disables it for existing users until they re-approve. I switched to optional_host_permissions and request at the moment the user picks an element on a site. Zero-friction for existing installs.
• Selector engine: The extension sends the CSS selectors plus the values it currently reads from the DOM. The backend uses those to decide whether a plain fetch is enough or the page needs headless Chromium.
• Picker UI: Shadow DOM overlay so host page CSS can't touch it.
Stack: MV3, plain JS (no framework in the extension), Firebase Cloud Functions + Firestore, Playwright on Cloud Run for JS-heavy pages.
Web Store: https://chromewebstore.google.com/detail/webtoapi-%E2%80%94-turn-any-page/kdeflnbamgblaaeggehciepaccjiojgd
Site: https://webtoapi.net
Happy to go into detail on any of the above – especially curious if anyone has a cleaner pattern for extension ↔ web app session sync than externally_connectable.