
Company News
Socket Named Top Sales Organization by RepVue
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.
tenor-gif-api
Advanced tools
A simple and easy-to-use wrapper for the Tenor API, enabling quick and effective integrations.
tenor-gif-api is a simple and easy-to-use wrapper for the Tenor API, enabling quick and effective integrations for searching and sharing GIFs and stickers. This package simplifies the process of interacting with Tenor's extensive multimedia library.
For more detailed information about the Tenor API, visit the official Tenor API documentation.
Install the package via npm:
npm install tenor-gif-api
Basic Example Here's a quick example of how to use tenor.js to search for GIFs:
import { TenorClient } from 'tenor.js';
const client = new TenorClient('YOUR_API_KEY');
async function searchGIFs() {
const response = await client.search.query({ q: 'funny', limit: 5 });
console.log(response.results);
}
searchGIFs();
Search for GIFs, stickers, and other media.
Copiar código
const response = await client.search.getGIFs({ q: 'hello', limit: 10 });
Get a list of the current global featured GIFs.
const response = await client.featured.getFeatured({ limit: 5 });
Retrieve a list of GIF categories.
const response = await client.categories.getCategories();
Get a list of alternative search terms for a given search term.
const response = await client.suggestions.getSuggestions({ q: 'happy' });
Fetch a list of completed search terms for a given partial search term.
const response = await client.autocomplete.getAutocomplete({ q: 'fun' });
Fetch a list of the current trending search terms.
const response = await client.trending.getTrendingTerms();
Register a user's sharing of a GIF or sticker.
await client.registerShare.registerShare({ id: 'GIF_ID' });
Fetch GIFs, stickers, or a combination of both for the specified IDs.
const response = await client.posts.getPosts({ ids: 'GIF_ID' });
The TenorClient class provides access to all services available through the Tenor API.
constructor(apiKey: string, clientKey?: string)
For detailed parameters and examples for each service, refer to the API documentation.
To use tenor.js, you need to configure your API key. Optionally, you can provide a clientKey to differentiate your integrations.
Setting the API Key You can set the API key when initializing TenorClient:
const client = new TenorClient('YOUR_API_KEY');
All methods return promises that may reject with errors. Use try...catch blocks or .catch() methods to handle errors.
try {
const response = await client.search.getGIFs({ q: 'oops' });
} catch (error) {
console.error('Error fetching GIFs:', error);
}
Contributions are welcome! Please follow these steps:
Please make sure your code passes all tests before submitting a pull request.
This project is licensed under the MIT License - see the LICENSE file for details.
If you encounter any issues or have questions, feel free to open an issue on the GitHub repository.
All notable changes to this project will be documented in this section.
Acknowledgements Special thanks to the developers at Tenor for providing a robust and versatile API.
Q: How do I get an API key?
A: You can obtain an API key by signing up at the Tenor API website.
Q: Can I use this package in a Node.js environment?
A: Yes, tenor.js is designed to work in both browser and Node.js environments.
FAQs
A simple and easy-to-use wrapper for the Tenor API, enabling quick and effective integrations.
The npm package tenor-gif-api receives a total of 119 weekly downloads. As such, tenor-gif-api popularity was classified as not popular.
We found that tenor-gif-api demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Company News
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.

Security News
NIST will stop enriching most CVEs under a new risk-based model, narrowing the NVD's scope as vulnerability submissions continue to surge.

Company News
/Security News
Socket is an initial recipient of OpenAI's Cybersecurity Grant Program, which commits $10M in API credits to defenders securing open source software.