Transition from v1 to v2
If you are coming from the legacy v1 docs, use this page as your migration checkpoint. Before anything else, log in to the dashboard at scrapegraphai.com/login.Method-by-method migration
Use this table to map old entry points to new ones. Details and examples follow below.| v1 | v2 | Notes |
|---|---|---|
markdownify | scrape with format="markdown" (Python) or format: "markdown" (JS) | HTML → markdown and related “raw page” outputs live under scrape. |
smartscraper / smartScraper | extract | Same job: structured extraction from a URL. Rename params and pass extra fetch/LLM options via config objects. |
searchscraper / searchScraper | search | Web search + extraction; use query (or positional string in JS). |
crawl (single start call) | crawl.start, then crawl.get, crawl.stop, crawl.resume, crawl.delete | Crawl is explicitly async: you poll or track job id. |
| Monitors (if you used them) | monitor.create, monitor.list, monitor.get, pause/resume/delete | Same product, namespaced API. |
sitemap | Removed from v2 SDKs | Discover URLs with crawl.start and URL patterns, or call the REST sitemap endpoint if your integration still requires it—see Sitemap and SDK release notes. |
agenticscraper | Removed | Use extract with FetchConfig (e.g. mode="js", stealth=True, wait=2000) for hard pages, or crawl.start for multi-page flows. |
healthz / checkHealth, feedback, built-in mock helpers | Removed or changed | Use credits, history, and dashboard features; check the SDK migration guides for replacements. |
Code-level transition
1. Markdownify → scrape
Before: markdownify(url).
After: scrape(url, format="markdown") (Python) or scrape(url, { format: "markdown" }) (JS).
2. SmartScraper → extract
Before (v1): website_url + user_prompt, optional flags on the same object.
After (v2): url + prompt; move fetch-related flags into FetchConfig / fetchConfig.
3. SearchScraper → search
Before: searchscraper / searchScraper with a prompt-style query.
After: search with query (Python keyword argument; JS first argument is the query string).
4. Crawl jobs
Before: One-shotcrawl(...) style usage depending on SDK version.
After: Start a job, then poll or webhook as documented:
5. REST calls
If you call the API withcurl or a generic HTTP client:
- Use the v2 host and path pattern:
https://api.scrapegraphai.com/api/v2/<endpoint>(e.g./api/v2/scrape,/api/v2/extract,/api/v2/search,/api/v2/crawl,/api/v2/monitor). - Replace JSON fields to match v2 bodies (e.g.
urlandpromptinstead ofwebsite_urlanduser_prompton extract). - Keep using the
SGAI-APIKEYheader unless the endpoint docs specify otherwise.
What else changed in v2 (docs & product)
- Unified and clearer API documentation
- Updated service pages and endpoint organization
- New guides for MCP server and SDK usage
Recommended path
- Log in at scrapegraphai.com/login
- Start from Introduction
- Follow Installation
- Upgrade packages:
pip install -U scrapegraph-py/npm i scrapegraph-js@latest(Node ≥ 22 for JS v2)