{"id":20904,"library":"advertools","title":"Advertools","description":"Advertools is a Python library for digital marketing and SEO analysis, providing tools for keyword research, spider simulations, social media analysis, and more. Current version: 0.17.2, released irregularly.","status":"active","version":"0.17.2","language":"python","source_language":"en","source_url":"https://github.com/eliasdabbas/advertools","tags":["seo","digital-marketing","keyword-research","google-ads","web-scraping","social-media"],"install":[{"cmd":"pip install advertools","lang":"bash","label":"Standard install"}],"dependencies":[{"reason":"Data manipulation and analysis","package":"pandas","optional":false},{"reason":"HTTP requests","package":"requests","optional":false},{"reason":"XML/HTML parsing","package":"lxml","optional":false},{"reason":"Web scraping","package":"beautifulsoup4","optional":false},{"reason":"Machine learning support","package":"scikit-learn","optional":true}],"imports":[{"note":"Using wildcard imports is discouraged; use 'import advertools as adv' for clarity.","wrong":"from advertools import *","symbol":"advertools","correct":"import advertools as adv"},{"note":"ad_create is a function, not a submodule; wrong import leads to ModuleNotFoundError.","wrong":"import advertools.ad_create","symbol":"advertools.ad_create","correct":"from advertools import ad_create"}],"quickstart":{"code":"import advertools as adv\n\n# Generate keywords from a seed list\nseed_words = ['shoes', 'boots']\nkeywords = adv.generate_google_keywords(seed_words)\nprint(keywords.head())","lang":"python","description":"Generates keyword permutations for Google Ads using seed words."},"warnings":[{"fix":"Replace serp.googlesearch with serp.serp_goog.","message":"Function 'advertools.serp.googlesearch' is deprecated in v0.17.0. Use 'advertools.serp.serp_goog' instead.","severity":"deprecated","affected_versions":">=0.17.0"},{"fix":"Update keyword argument from 'headline' to 'headlines'.","message":"In v0.15.0, the 'advertools.ad_create' function's 'headline' parameter was renamed to 'headlines' (plural).","severity":"breaking","affected_versions":">=0.15.0"},{"fix":"Add retries or use proxies. Set user-agent if needed.","message":"Google Trends functions require a working internet connection and may raise HTTPError if rate-limited.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-04-27T00:00:00.000Z","next_check":"2026-07-26T00:00:00.000Z","problems":[{"fix":"Use 'from advertools import ad_create'.","cause":"Incorrect import style: 'import advertools.ad_create' instead of 'from advertools import ad_create'.","error":"ModuleNotFoundError: No module named 'advertools.ad_create'"},{"fix":"Extract scalar values or use .any()/.all() methods.","cause":"Passing a pandas DataFrame directly to a function that expects a boolean or scalar.","error":"ValueError: The truth value of a DataFrame is ambiguous"},{"fix":"Increase delays or reduce request frequency. Use 'adv.spider' with 'max_requests_per_second' parameter.","cause":"Rate limiting by Google when using spider or search functions.","error":"requests.exceptions.HTTPError: 429 Client Error: Too Many Requests"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}