{"id":15639405,"url":"https://github.com/austinkelleher/giphy-api","last_synced_at":"2025-08-13T22:04:05.173Z","repository":{"id":48925743,"uuid":"39413804","full_name":"austinkelleher/giphy-api","owner":"austinkelleher","description":"🎥    Isomorphic JavaScript client for the Giphy.com API","archived":false,"fork":false,"pushed_at":"2021-07-05T11:32:44.000Z","size":1757,"stargazers_count":84,"open_issues_count":10,"forks_count":19,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-02T10:51:22.566Z","etag":null,"topics":["gif","giphy","giphy-api","javascript","node"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/austinkelleher.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-07-20T23:41:42.000Z","updated_at":"2024-11-19T21:56:36.000Z","dependencies_parsed_at":"2022-09-26T20:21:32.134Z","dependency_job_id":null,"html_url":"https://github.com/austinkelleher/giphy-api","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/austinkelleher%2Fgiphy-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/austinkelleher%2Fgiphy-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/austinkelleher%2Fgiphy-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/austinkelleher%2Fgiphy-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/austinkelleher","download_url":"https://codeload.github.com/austinkelleher/giphy-api/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247834853,"owners_count":21004061,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["gif","giphy","giphy-api","javascript","node"],"created_at":"2024-10-03T11:25:45.206Z","updated_at":"2025-04-09T16:07:12.914Z","avatar_url":"https://github.com/austinkelleher.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"giphy-api\n===========\n[![Build Status](https://travis-ci.org/austinkelleher/giphy-api.svg)](https://travis-ci.org/austinkelleher/giphy-api)\n![NPM version](https://badge.fury.io/js/giphy-api.svg)\n\nJavaScript module for the [giphy.com](http://giphy.com) API that\nsupports **promises and callbacks**. All search parameters and endpoints can be\nfound on the [Giphy API documentation](https://developers.giphy.com/docs/).\n\n## Installation\n```bash\nnpm install giphy-api --save\n```\n\n# Browser build\nJavaScript browser bundles are built to `dist/giphy-api.bundle.js` and\n`dist/giphy-api.bundle.min.js` using:\n\n```bash\nnpm run build\n```\n\n## Requiring\n```javascript\n// Require with custom API key\nvar giphy = require('giphy-api')('API KEY HERE');\n// Require with the public beta key\nvar giphy = require('giphy-api')();\n```\n\n## Initialization Options\n\n```javascript\nvar giphy = require('giphy-api')({\n    ...\n});\n```\n\n- https {Boolean} - Whether to utilize HTTPS library for requests or HTTP. Defaults to HTTP.\n- timeout {Number} - Maximum timeout of an API request. Defaults to 30 seconds.\n- apiKey {String} - Giphy API key. Defaults to API beta key\n\n## [Phrase search](https://developers.giphy.com/docs/#operation--gifs-search-get)\nSearch all Giphy GIFs for a word or phrase. Supported parameters:\n- q - search query term or phrase\n- limit - (optional) number of results to return, maximum 100. Default 25.\n- offset - (optional) results offset, defaults to 0.\n- rating - limit results to those rated (y,g, pg, pg-13 or r).\n- fmt - (optional) return results in html or json format (useful for viewing responses as GIFs to debug/test)\n\n```javascript\n// Search with a plain string using callback\ngiphy.search('pokemon', function (err, res) {\n    // Res contains gif data!\n});\n\n// Search with options using promise\ngiphy.search('pokemon').then(function (res) {\n    // Res contains gif data!\n});\n```\n```javascript\n// Search with options using callback\ngiphy.search({\n    q: 'pokemon',\n    rating: 'g'\n}, function (err, res) {\n    // Res contains gif data!\n});\n```\n\n## [Giphy Id search](https://developers.giphy.com/docs/#path--gifs)\nSearch all Giphy gifs for a single Id or an array of Id's\n\n```javascript\n//Search with a single Id using callback\ngiphy.id('feqkVgjJpYtjy', function (err, res) {\n\n});\n\n//Search with a single Id using promise\ngiphy.id('feqkVgjJpYtjy').then(function (res) {\n\n});\n```\n```javascript\n// Search with an array of Id's\ngiphy.id([\n    'feqkVgjJpYtjy',\n    '7rzbxdu0ZEXLy'\n], function (err, res) {\n\n});\n```\n\n## [Translate search](https://developers.giphy.com/docs/#path--gifs-translate)\nExperimental search endpoint for gif dialects. Supported parameters:\n- s - term or phrase to translate into a GIF\n- rating - limit results to those rated (y,g, pg, pg-13 or r).\n- fmt - (optional) return results in html or json format (useful for viewing responses as GIFs to debug/test)\n\n```javascript\n// Translate search with a plain string using callback\ngiphy.translate('superman', function (err, res) {\n\n});\n\n// Translate search with a plain string using promise\ngiphy.translate('superman').then(function (res) {\n\n});\n```\n```javascript\n// Translate search with options\ngiphy.translate({\n    s: 'superman',\n    rating: 'g',\n    fmt: 'html'\n}, function (err, res) {\n\n});\n```\n\n## [Random](https://developers.giphy.com/docs/#path--gifs-random)\nRandom gif(s) filtered by tag. Supported parameters:\n- tag - the GIF tag to limit randomness by\n- rating - limit results to those rated (y,g, pg, pg-13 or r).\n- fmt - (optional) return results in html or json format (useful for viewing responses as GIFs to debug/test)\n\n```javascript\n// Random gif by tag using callback\ngiphy.random('superman', function (err, res) {\n\n});\n\n// Random gif by tag using promise\ngiphy.random('superman').then(function (res) {\n\n});\n```\n```javascript\n// Random gif with options\ngiphy.random({\n    tag: 'superman',\n    rating: 'g',\n    fmt: 'json'\n}, function (err, res) {\n\n});\n```\n\n## [Trending](https://developers.giphy.com/docs/#path--gifs-trending)\nTrending gifs on [The Hot 100](http://giphy.com/hot100) list\n- limit (optional) limits the number of results returned. By default returns 25 results.\n- rating - limit results to those rated (y,g, pg, pg-13 or r).\n- fmt - (optional) return results in html or json format (useful for viewing responses as GIFs to debug/test)\n\n```javascript\n// Trending Hot 100 gifs using callback\ngiphy.trending(function (err, res) {\n\n});\n\n// Trending Hot 100 gifs using promise\ngiphy.trending().then(function (res) {\n\n});\n```\n```javascript\n// Trending Hot 100 gifs with options\ngiphy.trending({\n    limit: 2,\n    rating: 'g',\n    fmt: 'json'\n}, function (err, res) {\n\n});\n```\n\n## [Stickers](https://developers.giphy.com/docs/#giphy-sticker-api)\n[Animated stickers](https://giphy.com/stickers) are gifs with transparent backgrounds. All giphy-api functions\nsupport stickers **except id**, which is not a supported Giphy sticker endpoint.\nIn order to use the sticker API instead of the gif API, simply pass the ```api```\nproperty to a giphy-api function.\n```javascript\n// Sticker search using callback\ngiphy.search({\n    api: 'stickers',\n    q: 'funny'\n}, function (err, res) {\n\n});\n\n// Sticker search using promise\ngiphy.search({\n    api: 'stickers',\n    q: 'funny'\n}).then(res) {\n\n});\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faustinkelleher%2Fgiphy-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faustinkelleher%2Fgiphy-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faustinkelleher%2Fgiphy-api/lists"}