Skip to main content

Official Python client for Apigle.com API

Project description

Apigle Python Client

Official Python client for apigle.com API.

Installation

Install dependencies:

pip install apigle

Quick Start

from apigle.client import ApigleClient

API_KEY = "YOUR_API_KEY"
client = ApigleClient(API_KEY)

Functions & Usage Examples

1. Video Search (v1)

result = client.search_v1(q="lofi music")
print(result)

Search for videos by keyword.


2. Get Download URL & Metadata (v2)

## Available options for resolution: 360,720,1080,2160
info = client.download(video="QW8-UVmMm_Q", type="mp4", resolution=360)
print(info["url"])

Returns a download URL and metadata for the video. Does not download the file.

3. Get Download Stream URLs & Metadata (v2)

info = client.downloadstr(video="QW8-UVmMm_Q")
print(info)

Returns a download stream URLs and metadata for the video. Does not download the file.


4. Download Video File

## Available options for resolution: 360,720,1080,2160
success = client.download_file(video="QW8-UVmMm_Q", output_path="video.mp4", type="mp4", resolution=360)
print("Downloaded:", success)

Downloads the video file to the specified path. Returns True if successful.


5. Advanced Video Search (v2)

result = client.search_v2(q="ban", part="snippet", regionCode="US", maxResults=100, order="relevance")
print(result)

Search with more parameters for advanced filtering.


6. Video Comments

result = client.video_comments(videoId="kffacxfA7G4", part="snippet", maxResults=100)
print(result)

List comments for a video.


7. Video Details

result = client.video_details(id="XGGXlj6grzQ", part="contentDetails,snippet,statistics")
print(result)

Get detailed information about a video.


8. Channel Details

result = client.channel_details(id="UCfM3zsQsOnfWNUppiycmBuw", part="snippet,statistics")
print(result)

Get detailed information about a channel.


9. Channel Videos

result = client.channel_videos(channelId="UCvgfXK4nTYKudb0rFR6noLA", part="snippet,id", order="date", maxResults=50)
print(result)

List videos from a channel.


10. Playlist Details

result = client.playlist_details(id="PLqpXi64f6ul2Nzd5hHdHS4XuWa7ix8Rm-", part="snippet")
print(result)

Get details of a playlist.


11. Playlist Videos

result = client.playlist_videos(playlistId="RDMM", part="snippet", maxResults=50)
print(result)

List videos in a playlist.


12. Trending Videos

result = client.trending(part="snippet", videoCategoryId=1, regionCode="US", maxResults=50)
print(result)

List trending videos for a category and region.


13. Video Categories

result = client.video_categories(part="snippet")
print(result)

List all video categories.


14. Supported Regions (i18nRegions)

result = client.i18n_regions()
print(result)

List all supported regions/countries.


Testing

You can write your own tests or use the provided examples in the examples/ directory to see how each endpoint works. For real-world usage, integrate the client into your own Python scripts or applications.

License

MIT

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

apigle-1.0.3.tar.gz (4.7 kB view details)

Uploaded Source

Built Distribution

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

apigle-1.0.3-py3-none-any.whl (5.5 kB view details)

Uploaded Python 3

File details

Details for the file apigle-1.0.3.tar.gz.

File metadata

  • Download URL: apigle-1.0.3.tar.gz
  • Upload date:
  • Size: 4.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for apigle-1.0.3.tar.gz
Algorithm Hash digest
SHA256 5051395a3980279b37c4a94923c1d7c9ce1c5e50b77836fb0373164c293aec7a
MD5 3833584a0bec122c75e8d1d67a9d088b
BLAKE2b-256 a76eea0098a52cd452b75ae7dd064b2b0315ece72eac72a96e501562562f22bf

See more details on using hashes here.

File details

Details for the file apigle-1.0.3-py3-none-any.whl.

File metadata

  • Download URL: apigle-1.0.3-py3-none-any.whl
  • Upload date:
  • Size: 5.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for apigle-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 bf87c6240b0abd5df74c003db4ef83040c83a67fdf1d6e588a38709cadbd11f5
MD5 8eb4ede7856d7510b92f259ec1a40539
BLAKE2b-256 ad831838da30deb5b50e05903ace579f4fd2699682f20b95db67512ff6086e76

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