From 7f79b2f05b256b50a4795ca479be5172f7edfa19 Mon Sep 17 00:00:00 2001 From: Marco Vinciguerra Date: Mon, 20 Apr 2026 11:52:43 +0200 Subject: [PATCH 1/2] chore: update default API base URL to v2-api host Point SDK at https://v2-api.scrapegraphai.com/api/v2 so clients hit the new v2 endpoint by default. Verified with a live credits call. Co-Authored-By: Claude Opus 4.7 (1M context) --- README.md | 2 +- src/scrapegraph_py/env.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index af4b3d60..72e0653a 100644 --- a/README.md +++ b/README.md @@ -333,7 +333,7 @@ async with AsyncScrapeGraphAI() as sgai: | Variable | Description | Default | |----------|-------------|---------| | `SGAI_API_KEY` | Your ScrapeGraphAI API key | — | -| `SGAI_API_URL` | Override API base URL | `https://api.scrapegraphai.com/api/v2` | +| `SGAI_API_URL` | Override API base URL | `https://v2-api.scrapegraphai.com/api/v2` | | `SGAI_DEBUG` | Enable debug logging (`"1"`) | off | | `SGAI_TIMEOUT` | Request timeout in seconds | `120` | diff --git a/src/scrapegraph_py/env.py b/src/scrapegraph_py/env.py index ff9d8453..95437ebb 100644 --- a/src/scrapegraph_py/env.py +++ b/src/scrapegraph_py/env.py @@ -15,7 +15,7 @@ def timeout(self) -> int: @property def base_url(self) -> str: - return os.environ.get("SGAI_API_URL") or "https://api.scrapegraphai.com/api/v2" + return os.environ.get("SGAI_API_URL") or "https://v2-api.scrapegraphai.com/api/v2" env = Env() From e025813d7c6d68333297922a6396f2524c3c6405 Mon Sep 17 00:00:00 2001 From: Marco Vinciguerra Date: Tue, 21 Apr 2026 09:36:41 +0200 Subject: [PATCH 2/2] chore(release): 2.0.1 Bump to 2.0.1 and fix default API base URL from `/api/v2` to `/api` (the v2 host already serves the API under `/api`). Updates README docs and env.py default to match. Co-Authored-By: Claude Opus 4.7 (1M context) --- README.md | 2 +- pyproject.toml | 2 +- src/scrapegraph_py/env.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 72e0653a..c601dfdd 100644 --- a/README.md +++ b/README.md @@ -333,7 +333,7 @@ async with AsyncScrapeGraphAI() as sgai: | Variable | Description | Default | |----------|-------------|---------| | `SGAI_API_KEY` | Your ScrapeGraphAI API key | — | -| `SGAI_API_URL` | Override API base URL | `https://v2-api.scrapegraphai.com/api/v2` | +| `SGAI_API_URL` | Override API base URL | `https://v2-api.scrapegraphai.com/api` | | `SGAI_DEBUG` | Enable debug logging (`"1"`) | off | | `SGAI_TIMEOUT` | Request timeout in seconds | `120` | diff --git a/pyproject.toml b/pyproject.toml index b28439ec..5fd39d21 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "scrapegraph-py" -version = "2.0.0" +version = "2.0.1" description = "Official Python SDK for ScrapeGraph AI API" readme = "README.md" license = "MIT" diff --git a/src/scrapegraph_py/env.py b/src/scrapegraph_py/env.py index 95437ebb..c9657c45 100644 --- a/src/scrapegraph_py/env.py +++ b/src/scrapegraph_py/env.py @@ -15,7 +15,7 @@ def timeout(self) -> int: @property def base_url(self) -> str: - return os.environ.get("SGAI_API_URL") or "https://v2-api.scrapegraphai.com/api/v2" + return os.environ.get("SGAI_API_URL") or "https://v2-api.scrapegraphai.com/api" env = Env()