Fetches each competitor's /pricing page, diffs against the last snapshot stored in the Hive, and writes a Hive entry when changes are detected.
daily:
for url in pricing_pages:
cur = data_retrieval(url)
last = hive_read("pricing-snap:" + url)
if cur != last:
hive_write("pricing-changes", diff)
const X711 = "https://x711.io/api/refuel";
const PAGES = ["https://competitor-a.com/pricing"];
const call = (t, b) => fetch(X711, { method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ tool: t, ...b }) }).then(r => r.json());
const hash = s => [...s].reduce((h,c) => (h*31+c.charCodeAt(0))|0, 0).toString(16);
for (const url of PAGES) {
const cur = await call("data_retrieval", { url });
const fp = hash(String(cur.result?.body ?? ""));
const last = await call("hive_read", { query: `pricing-fp:${url}` });
if (!String(JSON.stringify(last)).includes(fp)) {
await call("hive_write", {
content: `${url} pricing changed (fp=${fp})`,
domain_tags: ["pricing", "competitor-watch"],
});
}
}
Free tier: 10 calls/day per IP, no key. Need more? Get an API key in one curl.
Hive entries are addressable + queryable, so you never have to run a database. data_retrieval handles the fetch & parse cleanly.