Integrate ScrapeGraphAI with OpenAI to build AI applications powered by web data.
Setup
Create .env file:
If using Node < 20, install dotenv and add import 'dotenv/config' to your code.
Scrape + Summarize
This example demonstrates a simple workflow: scrape a website and summarize the content using OpenAI.
This example shows how to use OpenAI’s function calling to let the model decide when to scrape websites based on user requests.
This example demonstrates how to use OpenAI’s JSON mode to extract structured data from scraped website content.
For more examples, check the OpenAI documentation.