Download gifs from Redgifs programtically.
For CLI usage, see redgifs-dl.
Zero dependencies.
Gets the highest quality.
If not, fallback to standard quality.
Much more stable than scraping methods.
import { getGif } from "redgif"
npm i redgif
const buffer = await getGif(gifId)
fs.writeFileSync("redgif.mp4", buffer)
gifId refers to the ID extracted from the full URL.
Use the appropriate file extension to save, can be .jpg or .mp4 for example.
AGPL-3.0 ©️ Zubin