Cursor is an AI-powered code editor built on VS Code. Combined with ScrapeGraphAI, you can write, debug, and iterate on scraping pipelines faster using Cursor’s inline AI assistance.Documentation Index
Fetch the complete documentation index at: https://docs.scrapegraphai.com/llms.txt
Use this file to discover all available pages before exploring further.
MCP Server (Recommended)
The fastest way to use ScrapeGraphAI in Cursor is via the MCP Server. This lets Cursor’s AI agent call ScrapeGraphAI tools directly without writing any code. See the MCP Server setup for Cursor guide for full instructions.Manual integration
If you prefer to write code directly, use the Python or JavaScript v2 SDK.Python
Install the SDK:Cmd+K or open the chat with Cmd+L:
Write a Python function using scrapegraph_py v2 that extracts the title, author, and date from any blog post URL.
Cursor will generate:
JavaScript
Install the SDK:
Write a JavaScript function using scrapegraph-js v2 that extracts product details from an e-commerce page.
Tips for using Cursor with ScrapeGraphAI
- Paste error messages into the Cursor chat to get instant fix suggestions.
- Ask Cursor to add a
schema(JSON Schema, Pydantic, or Zod) to get strongly-typed results out ofextract. - Use
@docsin Cursor chat to reference the ScrapeGraphAI docs directly while coding.
Store your API key in a
.env file as SGAI_API_KEY and load it via python-dotenv or process.env — the v2 SDKs pick it up automatically. Never hardcode it in source files.