Skip to main content

Official Python client for Apigle.com API

Project description

Apigle Python Client

A Python client for the Apigle API, providing YouTube-like data endpoints.

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


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


5. Video Comments

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

List comments for a video.


6. Video Details

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

Get detailed information about a video.


7. Channel Details

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

Get detailed information about a channel.


8. Channel Videos

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

List videos from a channel.


9. Playlist Details

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

Get details of a playlist.


10. Playlist Videos

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

List videos in a playlist.


11. Trending Videos

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

List trending videos for a category and region.


12. Video Categories

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

List all video categories.


13. 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.1.tar.gz (4.6 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.1-py3-none-any.whl (5.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: apigle-1.0.1.tar.gz
  • Upload date:
  • Size: 4.6 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.1.tar.gz
Algorithm Hash digest
SHA256 e7a307e7586b9f4740756e5bf0d0a98b1d40eb115dd16cd91c51cfa7b0f51685
MD5 6c095f96f0a9f650d12d2b905e551eb9
BLAKE2b-256 a6ad2af5393937013bec7ff658cfe3c3a8c3ecfb4d0e98b4e2a50285e03fac4a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: apigle-1.0.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 01fa97cc0ad76af9ed8f54989ec64c75112f2e33e783e2df5c1f16854fe03123
MD5 28aa0b87d6e09ac3b8d405937cc4040a
BLAKE2b-256 ee6995fb5e3d931aeec4d448791978c612314ab83cb5eb2daae7cdf6b6e910e9

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