You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
ImportError: cannot import name 'Client' from scrapegraph_py when using scrapegraph-py 2.1.0 #1097
Hi @adithyanajay! I'm Dosu and I'm helping the ScrapeGraphAI, Inc team.
The Client class still exists in scrapegraph-py v2.x — it was not removed, but its methods were significantly refactored in PR #1058. Specifically, in v2.x the API changed as follows:
v1 Method
v2 Method
smartscraper(website_url=, user_prompt=)
extract(url=, prompt=, output_schema=)
searchscraper(user_prompt=)
search(query=)
markdownify(website_url=)
scrape(url=)
get_credits()
credits()
So from scrapegraph_py import Client should still work with scrapegraph-py==2.1.0. If you're getting an ImportError, it's possible there's a packaging or installation conflict in your environment.
That said, the cognee-community-tasks-scrapegraph package is not part of this repository — it's a third-party community package. The incompatibility you're experiencing is in that external package's code, not in scrapegraph-py itself. The fix would need to come from the maintainers of cognee-community-tasks-scrapegraph.
As a workaround, you could try pinning to an older version:
pip install "scrapegraph-py<2"
Or, if you don't need the cognee-community-tasks-scrapegraph wrapper, you can use scrapegraph-py v2.x directly [1]:
fromscrapegraph_pyimportClientclient=Client(api_key="your-api-key")
result=client.extract(url="https://cognee.ai", prompt="Extract the product description, key features, and target use cases")
Activity
dosubot commentedon Jul 1, 2026
Hi @adithyanajay! I'm Dosu and I'm helping the ScrapeGraphAI, Inc team.
The
Clientclass still exists inscrapegraph-pyv2.x — it was not removed, but its methods were significantly refactored in PR #1058. Specifically, in v2.x the API changed as follows:smartscraper(website_url=, user_prompt=)extract(url=, prompt=, output_schema=)searchscraper(user_prompt=)search(query=)markdownify(website_url=)scrape(url=)get_credits()credits()So
from scrapegraph_py import Clientshould still work withscrapegraph-py==2.1.0. If you're getting anImportError, it's possible there's a packaging or installation conflict in your environment.That said, the
cognee-community-tasks-scrapegraphpackage is not part of this repository — it's a third-party community package. The incompatibility you're experiencing is in that external package's code, not inscrapegraph-pyitself. The fix would need to come from the maintainers ofcognee-community-tasks-scrapegraph.As a workaround, you could try pinning to an older version:
pip install "scrapegraph-py<2"Or, if you don't need the
cognee-community-tasks-scrapegraphwrapper, you can usescrapegraph-pyv2.x directly [1]:To reply, just mention @dosu.
Docs are dead. Just use Dosu.