Skip to content

All providers / unofficial-api-for-xhamster

xHamster API.

Inspect xHamster video duration, rating percentages, and uploader details.

Unofficial Python library · v3.0.0 · AGPL-3.0-only

Install
pip install unofficial-api-for-xhamster
Open the quickstart ↗

What you can build with xHamster

Metadata fields

  • title
  • duration
  • rating_percentage
  • uploader_name
  • likes
  • views
  • comments_count
  • orientation
  • max_resolution

rating_percentage is a numeric percentage when present. Optional fields can be absent on unrated videos.

Use it in Python

Python · async example
from xhamster_api import Client

async def metadata(client: Client, url: str):
    video = await client.get_video(url)
    return {
        "title": video.title,
        "duration": video.duration,
        "rating_percentage": video.rating_percentage,
    }

Release and tests

Release 3.0.0 was published on 2026-11-15. Inspect the published distribution, source, and tests for this integration.

Integrating commercially?

The library is free under AGPL-3.0-only. Email me to discuss alternative commercial terms.

Ask about a commercial license ↗