{"id":27220,"library":"oxylabs","title":"oxylabs","description":"Official Python library for Oxylabs Scraper APIs (Web Scraper API, Real-Time Crawls, etc.). Current version 3.0.0, released Apr 2025. Active development with monthly releases.","status":"active","version":"3.0.0","language":"python","source_language":"en","source_url":"https://github.com/oxylabs/oxylabs-python","tags":["scraping","web-scraper-api","oxylabs","real-time-crawl"],"install":[{"cmd":"pip install oxylabs","lang":"bash","label":"Install from PyPI"}],"dependencies":[{"reason":"HTTP library for API calls","package":"requests","optional":false},{"reason":"Data validation and settings management","package":"pydantic","optional":false}],"imports":[{"note":"In v3, all classes are top-level.","wrong":"from oxylabs.webscraper import WebScraper","symbol":"WebScraper","correct":"from oxylabs import WebScraper"},{"note":"In v2, classes were under submodules.","wrong":"from oxylabs.crawl import RealTimeCrawl","symbol":"RealTimeCrawl","correct":"from oxylabs import RealTimeCrawl"}],"quickstart":{"code":"from oxylabs import WebScraper\n\nscraper = WebScraper(\n    username=os.environ.get('OXYLABS_USERNAME', ''),\n    password=os.environ.get('OXYLABS_PASSWORD', '')\n)\nresponse = scraper.get('https://example.com')\nprint(response.text)","lang":"python","description":"Instantiate WebScraper with credentials from environment variables, then call .get() on a URL."},"warnings":[{"fix":"Use async/await with RealTimeCrawl. For sync, stick to v2.x.","message":"v3.0.0 removed synchronous RealTimeCrawl methods; only async available.","severity":"breaking","affected_versions":">=3.0.0"},{"fix":"Set OXYLABS_USERNAME and OXYLABS_PASSWORD environment variables.","message":"Direct credential strings in code are deprecated; use environment variables or config.","severity":"deprecated","affected_versions":">=3.0.0"},{"fix":"Wrap in try/except: except oxylabs.exceptions.OxylabsConnectionError: ...","message":".get() on WebScraper raises OxylabsConnectionError on network failures; not caught by default.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Use: from oxylabs import WebScraper","cause":"Import path changed in v3; WebScraper now at top level.","error":"ModuleNotFoundError: No module named 'oxylabs.webscraper'"},{"fix":"Use: from oxylabs import RealTimeCrawlConnector","cause":"In v3, Renamed to RealTimeCrawlConnector or similar; check docs.","error":"AttributeError: module 'oxylabs' has no attribute 'RealTimeCrawl'"},{"fix":"Set OXYLABS_USERNAME and OXYLABS_PASSWORD, or pass them to the constructor.","cause":"Empty or wrong credentials; ensure environment variables set.","error":"ValueError: Invalid username or password"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}