Skip to main content

RedGIFs API

An asynchronous Python API wrapper and scraper for redgifs.com

Downloads + CodeQL Analysis Sync API Tests

Disclaimer


Features

Category Details
Video Fetching Rich API metadata, independent HTML titles/page metadata, and deferred source/field loading
Video Downloading Direct MP4 downloads with hd, sd, silent, best, half, and worst where available
User & Creator Profiles Profile metadata, separate video/image tabs, uploader relationships and public collections
Collection Fetching Paginated public collections containing typed video and image objects
Video Search Query and tag search, trending/latest/top ordering, verified-only filtering and creator search
Images, Tags & Niches Image metadata/downloads, typed tag records, niche details and video streams
Async-First Fully asynchronous (async / await) built on top of asyncio
Built-in Caching Shared response caching with configurable limits to reduce redundant network requests
CLI Support Single-video or URL-file downloads — run redgifs_api -h for options
Type Safety Typed, source-aware BaseMedia dataclasses and structured ScrapeResult streams

Accepted page hosts are redgifs.com and www.redgifs.com; media identity URLs from media.redgifs.com are also supported. No language or proxy variants are accepted. HLS URLs are exposed for inspection; downloads use DownloadConfigRAW because the current shared HLS downloader does not preserve RedGIFs' byte ranges. Private/account actions and gallery enumeration are not implemented.

Live validation remains incomplete: the final run recorded 38 passed, 12 failed, 0 skipped, with all final failures caused by HTTP 429. Earlier runs also reproduced upstream pagination omissions for equal-timestamp uploads. See the validation report for evidence, quality measurements and limitations.

Networking Features

The networking layer is provided by the eaf_base_api package and is fully configurable through RuntimeConfig:

Feature Description
HTTP/1.1, HTTP/2, HTTP/3 Configurable HTTP version (v1, v2, v3 — defaults to HTTP/2)
Browser Impersonation Built-in browser fingerprint impersonation via curl_cffi (defaults to Chrome)
Custom JA3 Fingerprint Override the TLS fingerprint with a custom JA3 string for advanced use cases
Proxy Support All proxy types supported (HTTP, HTTPS, SOCKS4, SOCKS5)
Proxy Authentication Username/password authentication for proxies
Bandwidth Limiting Set a maximum download speed in MB/s (e.g., 2.0, 3.5)
DNS over HTTPS Configure DNS resolution over HTTPS
SSL Verification Toggle SSL certificate verification on or off
Request Delay Configurable delay between requests to respect rate limits
Concurrency Control Tune video and page concurrency independently for optimal throughput

Supported Platforms

This API has been live-tested on:

  • Linux with Python 3.15.2

Python 3.12 or newer is required. Other platforms have not been verified.


Installation

Install from the local checkout before publication:

pip install .

For development with the neighboring shared backend checkout:

pip install -e ../eaf_base_api -e .

The distribution is named unofficial-api-for-redgifs; publication is not asserted.


Quickstart

Have a look at the Documentation for more details

import asyncio
from redgifs_api import Client, DownloadConfigRAW

async def main():
    # Initialize a Client and close its network resources when finished
    async with Client() as client:
        # Load API metadata and the HTML display title
        video_object = await client.get_video(
            "https://www.redgifs.com/watch/hotpinkacrobatickitfox",
            load_html=True,
        )

        # Information from Video objects
        print(video_object.title)

        # Download the video
        config = DownloadConfigRAW(quality="best", path="./")
        await video_object.download(config)

if __name__ == "__main__":
    asyncio.run(main())

Support the Project ❤️

I develop all my projects entirely for free because I enjoy it and want to keep them accessible. If you find my work useful, please consider supporting me with a small donation — even 1 € makes a big difference and keeps me motivated!

☕ Ko-fi

https://ko-fi.com/EchterAlsFake

💳 PayPal

https://paypal.me/EchterAlsFake

🪙 Crypto (350+ currencies supported)

Crypto donation button by NOWPayments

Contribution

Do you see any issues or having some feature requests? Simply open an Issue or talk in the discussions.

Pull requests are also welcome.

License

This API is licensed under the AGPLv3. See the LICENSE file for details.

Metadata

Release files for unofficial-api-for-redgifs 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for unofficial-api-for-redgifs 1.0.0
File Size Uploaded Provenance Actions
unofficial_api_for_redgifs-1.0.0.tar.gz 31.4 kB Without provenance Details for unofficial_api_for_redgifs-1.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for unofficial-api-for-redgifs 1.0.0
File Interpreter ABI Platform Actions
unofficial_api_for_redgifs-1.0.0-py3-none-any.whl Python 3 none any Details for unofficial_api_for_redgifs-1.0.0-py3-none-any.whl

Total release size: 65.8 kB

Release files / unofficial_api_for_redgifs-1.0.0.tar.gz

Download URL unofficial_api_for_redgifs-1.0.0.tar.gz
Size 31.4 kB
Tags Source
SHA-256 checksum
How to use checksums
ab4c986dd22c83bee59e5c0dcd2d20b23a3ea9cf7cdb5b278e700c91e8b81ac5
BLAKE2b-256 checksum
How to use checksums
ea1c5e6f502579852f6d6e06da5609e2658e9fdf03de2fd8cbda8396d1f8ca94
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.7 {"installer":{"name":"uv","version":"0.13.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Arch Linux","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / unofficial_api_for_redgifs-1.0.0-py3-none-any.whl

Download URL unofficial_api_for_redgifs-1.0.0-py3-none-any.whl
Size 34.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
293576528f57c05f4df9e26b8c1a47cc30050a0d59b4309efd5cfe7463fb9318
BLAKE2b-256 checksum
How to use checksums
e8b72d792095f09a918c5876771d051868f806e8b02bb81a7dd12fb5057ba670
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.7 {"installer":{"name":"uv","version":"0.13.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Arch Linux","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Security for unofficial-api-for-redgifs 1.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page