Olostep integration package for Bubble Lab workflows (scrape, batch, crawl, maps, answers, MCP passthrough).
npm install olostep-bubblelabrunResearchFlow) chaining map → batch scrape → answer.
@olostep/bubblelab).
bash
npm install @olostep/bubblelab
peer deps expected in your Bubble Lab app:
npm install @bubblelab/bubble-core @bubblelab/bubble-runtime
`
Usage (add to a Bubble Lab project)
`ts
import { createOlostepBubbles } from '@olostep/bubblelab';
const apiKey = process.env.OLOSTEP_API_KEY!;
const bubbles = createOlostepBubbles(apiKey);
// Example: scrape a page
const scrape = await bubbles.scrapeWebsite.run({
url_to_scrape: 'https://example.com',
formats: ['markdown'],
});
// Example: batch scrape + citations
const answer = await bubbles.answerQuestion.run({
task: 'Summarize this site',
context_urls: ['https://example.com'],
format: 'markdown',
include_citations: true,
});
`
Bundled workflow
runResearchFlow (see src/workflows/researchFlow.ts) discovers URLs, batch-scrapes them, and answers a question. You can drop this into a Bubble Lab template or expose it via the generated API.
`ts
import { runResearchFlow } from '@olostep/bubblelab/dist/workflows/researchFlow';
await runResearchFlow({
apiKey: process.env.OLOSTEP_API_KEY!,
targetUrl: 'https://example.com',
question: 'What are the main products and prices?',
});
`
Exposed Bubbles
- scrapeWebsite – single URL scrape, formats: markdown/html/json/text, optional country, wait, parser.
- batchScrape – scrape many URLs in parallel with optional parser and wait.
- createCrawl – start a crawl with optional follow_links, formats, country, parser.
- createMap – discover URLs with include/exclude patterns and search query.
- answerQuestion – AI-powered search/answer with optional citations, format, top_k_sources, json_schema.
Environment
- OLOSTEP_API_KEY (required): bearer token for the Olostep API.
- OLOSTEP_BASE_URL (optional): override https://api.olostep.com/v1.
Build & test
`bash
npm run build
npm test
`
How to hand this off to Bubble Lab
1) Publish @olostep/bubblelab to npm (or give them a tarball).
2) Send them this README plus a short note that createOlostepBubbles exposes the five nodes above and runResearchFlow is a ready-made template.
3) (Optional) Open a PR to their examples/templates repo pointing to runResearchFlow`.