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 URL 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.2.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.2-py3-none-any.whl (5.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: apigle-1.0.2.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.2.tar.gz
Algorithm Hash digest
SHA256 61892a64f055eb7d9b53ec76fab62f00f6aa1416228b6e45b8af0057384eed93
MD5 0bbe0acdba0910aaac0f1dc550cd4fbd
BLAKE2b-256 3a33ba70b4765d35cd1f5f9a47a5423b4a676d36864b2340457edd140c3ba6b1

See more details on using hashes here.

File details

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

File metadata

  • Download URL: apigle-1.0.2-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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 007136be71e839ba9fa3cb316d472d2a3b6e43b0485d91567313e209478c76df
MD5 599fb2cba27f73e6e4aac262a07f0808
BLAKE2b-256 e00ab6641629c8cf5983d2065b72e3b1e4574d486aa0f2f39cae0d02a40d0946

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