How it works
Bolt.new can generate Node.js / Express backends alongside your frontend. Make ScrapeGraphAI API calls from the backend to keep your API key secret and avoid CORS errors.Setup
1. Tell Bolt to create an Express backend
Start a new Bolt project and prompt it:Create a full-stack app with an Express backend. Add a POST endpoint at/api/scrapethat acceptsurlandpromptfields, calls the ScrapeGraphAI SmartScraper API, and returns the result.
2. Backend endpoint
Bolt will generate something like this — make sure the API key is loaded from an environment variable:3. Add your API key
In Bolt.new, open the environment variables panel and add:4. Call from the frontend
Example prompt for Bolt
Build a price tracker UI. It should have an input for a product URL and a button. When clicked, it calls the backend scrape endpoint and shows the extracted product name and price in a card.