ShopSavvy for Hono

TypeScriptBeta

Edge-first ShopSavvy integration for Hono. Ships a middleware, mountable router with 5 endpoints, JSX server components, OpenAPI documentation, and an SSE streaming deals endpoint. Works on Cloudflare Workers, Bun, Deno, Node, and Vercel Edge with a single package.

Set up ShopSavvy for Hono

  1. 1

    Get a ShopSavvy Data API key

    Create a key at shopsavvy.com/data. Keys look like ss_live_ followed by 32 characters. Keep it out of source control.

  2. 2

    Install from GitHub

    The package in the install command (npm install @shopsavvy/hono) is not on its public registry yet, so install from the source repository and follow its README:

    git clone https://github.com/shopsavvy/hono-shopsavvy.git
  3. 3

    Add your API key

    Set the SHOPSAVVY_API_KEY environment variable to your key (shell, .env file or Hono's secrets settings), or pass it to the client as the README shows.

  4. 4

    Make your first call

    From the shopsavvy/hono-shopsavvy README (Quick Start):

    import { Hono } from "hono"
    import { createShopSavvyRouter } from "@shopsavvy/hono"
    
    const app = new Hono()
    app.route("/shopsavvy", createShopSavvyRouter())
    export default app

    Copied from the repository README.

  5. 5

    Quick Start

    From the shopsavvy/hono-shopsavvy README (Quick Start):

    export SHOPSAVVY_API_KEY=ss_live_your_key_here

    Copied from the repository README.

  6. 6

    Configuration

    From the shopsavvy/hono-shopsavvy README (Configuration):

    createShopSavvyRouter({
      apiKey: process.env.SHOPSAVVY_API_KEY,
      timeout: 10000,
    })

    Copied from the repository README.

Keys come with a Data API plan. See plans.

Features

ShopSavvy middleware (c.get("shopsavvy"))
Mountable router with /search, /offers, /history, /deals, /categories
JSX server components (ProductCard, PriceComparisonTable, DealFeed)
Auto-generated OpenAPI spec + Swagger UI at /docs
SSE streaming deals endpoint
Runtime-aware caching (CF Cache API, KV, Vercel Edge Config)
Typed RPC export for hc() clients

Use Cases

1.Price lookups at the edge on Cloudflare Workers
2.Server-rendered product pages with zero-JS
3.Typed mobile backends via Hono RPC
4.Real-time deal streams via Server-Sent Events
5.API gateways with Zod validation

What data, how often, which direction

Data
Product records, current offers from tens of thousands of retailers and price history back to 2011, dense from 2019, from the ShopSavvy Data API. Prices are in US dollars.
How often
Every offer carries the time it was last checked. With the Data API you can schedule refreshes hourly, daily or weekly for retailers we can re-check through an official retailer API; other retailers update as ShopSavvy sees them.
Direction
ShopSavvy data flows into Hono. Requests carry only what you ask about (identifiers, search terms or schedules) and your API key.

FAQ

Do I need an API key?

Yes. The Hono integration calls the ShopSavvy Data API, which needs a Data API key. Create one at shopsavvy.com/data, then add it as the setup steps above show.

What data does it return?

ShopSavvy product records (title, brand, model, barcode, ASIN), current offers from tens of thousands of retailers with price, availability and condition, and price history back to 2011, dense from 2019. Products can be looked up by barcode, ASIN, URL or model number. Prices are in US dollars.

How fresh are the prices?

Every offer carries the time ShopSavvy last checked it, so you can see how current each price is. Through the Data API you can schedule refreshes hourly, daily or weekly for retailers we can re-check through an official retailer API; other retailers update as ShopSavvy sees them.

Is my API key stored securely?

The README has you supply it through the SHOPSAVVY_API_KEY environment variable or your own configuration, so it stays out of source code. The key is sent to the ShopSavvy API (api.shopsavvy.com) over HTTPS in the Authorization header. You can revoke a key and create a new one at shopsavvy.com/data/api-keys.

Can I install it from a package registry?

Not yet. The package named in its install command has not been published to its public registry, so install it from the GitHub repository (https://github.com/shopsavvy/hono-shopsavvy) for now.

Is it open source?

Yes. The source is on GitHub at https://github.com/shopsavvy/hono-shopsavvy under the MIT license.

Powered by the ShopSavvy Data API

This integration connects to the ShopSavvy Data API: product data and current prices from tens of thousands of retailers, across 30M+ products, with price history back to 2011, dense from 2019. Look up products by barcode, ASIN, URL or keyword, compare prices, read history and schedule refreshes.