Serve it from a backend
Your frontend calls a server-side function; the server-side function calls Synorb with the secret. The REST API wraps responses as { data, usage } — cite each row's source_url and surface usage for quota.
const res = await fetch("https://api.synorb.com/streams/query", {
method: "POST",
headers: {
"Content-Type": "application/json",
"api-key": Deno.env.get("SYNORB_API_KEY"),
"secret": Deno.env.get("SYNORB_SECRET"),
},
body: JSON.stringify({
home_domains: ["all"],
tag_names: ["OpenAI"],
story_type: "briefs",
days: 7,
page_size: 10
}),
});