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).

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.0.tar.gz (9.7 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.0-py3-none-any.whl (12.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: ph_ai_tracker-0.1.0.tar.gz
  • Upload date:
  • Size: 9.7 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.0.tar.gz
Algorithm Hash digest
SHA256 51cfb746013426b0a45c17198bd5a3ccc9f47a934e1bb0c9c891d1bf3fd5d287
MD5 9518e848fa00d39e83eeb017b164e10b
BLAKE2b-256 fc546e96e280f0804511e55ddccc016b65052b9d3b223775834a03c54c1f65d1

See more details on using hashes here.

File details

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

File metadata

  • Download URL: ph_ai_tracker-0.1.0-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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d65cec446f64377e7586ab22204a032f0fa03e0bd7de226073f5cab6b35835e7
MD5 bacab1d73fd6ce961d02c9466d2936d5
BLAKE2b-256 0813b3ae4f534a0954c25604e221c9ed64d0b0fb5adb74662b4487fb1fcd5e77

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