Skip to main content

Library to identify trending AI products on Product Hunt (API + scraping fallback).

Project description

ph_ai_tracker

A small Python library that finds trending AI products on Product Hunt.

  • Primary: Product Hunt GraphQL API v2
  • Secondary: Web scraping fallback (BeautifulSoup) for when the API is unavailable / rate-limited

Install (dev)

poetry install

Install (PyPI)

pip install ph-ai-tracker

Quickstart

from ph_ai_tracker import AIProductTracker

tracker = AIProductTracker(
    api_token="YOUR_PRODUCTHUNT_TOKEN",  # optional
    strategy="auto",                    # api | scraper | auto
)

result = tracker.get_products(search_term="AI", limit=20)
print(result.to_pretty_json())

Or from the terminal (prints pretty JSON):

poetry run python -m ph_ai_tracker --strategy scraper --search AI --limit 10

After installing from PyPI, you can also run:

ph-ai-tracker --strategy scraper --search AI --limit 10

Trending behavior

  • --strategy api defaults to Product Hunt's RANKING order.
  • The API client first attempts the artificial-intelligence topic; if the schema/topic query fails, it falls back to global posts and applies a client-side filter.

Product Hunt API token

Do not hardcode tokens in code or commit them to git.

Set your token as an environment variable:

export PRODUCTHUNT_TOKEN="<your_token>"
poetry run python -m ph_ai_tracker --strategy api --search AI --limit 10

Notes

  • This project is intended to run well on PyPy 3.
  • All tests are offline and use mocks/fixtures (no real network).
  • Supported Python versions: 3.10–3.14

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ph_ai_tracker-0.1.1.tar.gz (9.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ph_ai_tracker-0.1.1-py3-none-any.whl (12.3 kB view details)

Uploaded Python 3

File details

Details for the file ph_ai_tracker-0.1.1.tar.gz.

File metadata

  • Download URL: ph_ai_tracker-0.1.1.tar.gz
  • Upload date:
  • Size: 9.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.3.2 CPython/3.14.2 Darwin/25.3.0

File hashes

Hashes for ph_ai_tracker-0.1.1.tar.gz
Algorithm Hash digest
SHA256 e0a5e22fde1fa975f3ffc4c0e97a72ecc76a8b9ae3bd251f66a260c9d084b1b1
MD5 576ca1c30bc56db586845ca8bca58043
BLAKE2b-256 dba109b8f69b52d196a666adde84eb36b576f3b04b412261a5cab3bfb6240c69

See more details on using hashes here.

File details

Details for the file ph_ai_tracker-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: ph_ai_tracker-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 12.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.3.2 CPython/3.14.2 Darwin/25.3.0

File hashes

Hashes for ph_ai_tracker-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b399c8d68a7ec18c3652005501ac92a9fb3ed3ab2447ea7a8416dba11703bd50
MD5 5cff3bca9f3c20c7a748178893b8da58
BLAKE2b-256 db39b154a5037dcc4eb41090baf57ae5ad8b80522a2028d03e44afb42c107082

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page