
Security News
Another Round of TEA Protocol Spam Floods npm, But It’s Not a Worm
Recent coverage mislabels the latest TEA protocol spam as a worm. Here’s what’s actually happening.
@giphy/js-fetch-api
Advanced tools
Javascript API to fetch gifs and stickers from the GIPHY API.
Get started with your own api key: https://developers.giphy.com/docs/
import { GiphyFetch } from '@giphy/js-fetch-api'
const gf = new GiphyFetch('your api key')
// fetch 10 gifs
const { data: gifs } = await gf.trending({ limit: 10 })
Search all Giphy GIFs for a word or phrase. Punctuation will be stripped and ignored.
search(term: string, options?: SearchOptions): Promise<GifsResult>
| option | type | description | default |
|---|---|---|---|
| lang | string | See list of supported languages here. | en |
| sort | number | Specifies the starting position of the results. | recent |
Other Options: Type Option, Rating Option, Pagination Options
const { data: gifs } = await gf.search('dogs', { sort: 'relevant', lang: 'es', limit: 10, type: 'stickers' })
Fetch GIFs currently trending online. Hand curated by the Giphy editorial team. The data returned mirrors the GIFs showcased on the Giphy homepage.
trending(options?: TrendingOptions): Promise<GifsResult>
Trending Options: Type Option, Rating Option, Pagination Options
const { data: gifs } = await gf.trending({ limit: 10, offset: 25, rating: 'g' })
Fetch a gif by id
gif(id: string): Promise<GifResult>
const { data: gif } = await gf.gif('3oEjHGr1Fhz0kyv8Ig')
// by id
gifs(ids: string[]): Promise<GifsResult>
// by category and subcatetory
gifs(category: string, subcategory: string): Promise<GifsResult>
// by id
const { data: gifs } = await gf.gifs(['3oEjHGr1Fhz0kyv8Ig'])
// by category and subcatetory
const { data: gifs } = await gf.gifs('tv', 'arrested-development')
Create animated text gifs dynamicaly based on the text input. This endpoint will require you to create a new SDK key
animate(text: string, options?: PaginationOptions): Promise<GifsResult>
Options: Pagination Options
const { data: gifs } = await gf.animate('some text to animate!', { limit: 5 })
Fetch related gifs based on the id of a gif
related(id: string, options?: RelatedOptions): Promise<GifsResult>
Options: Pagination Options, Type Option
const { data: gifs } = await gf.related('3oEjHGr1Fhz0kyv8Ig', { limit: 10 })
Fetch emoji. Emoji are stickers from a currated channel. There's no search or trending emoji.
emoji(options?: PaginationOptions): Promise<GifsResult>
Emoji Options: Pagination Options
const { data: gifs } = await gf.emoji()
Returns a random single GIF
random(options?: RandomOptions): Promise<GifResult>
| option | type | description | default |
|---|---|---|---|
| tag | string | The GIF tag to limit randomness by. | undefined |
Options: Type Option
const { data: gif } = await gf.random({ tag: 'beer', type: 'stickers' })
categories(options?: CategoriesOptions): Promise<CategoriesResult>
const { data: categories } = await gf.categories()
categories.forEach((category) => {
console.log(category) // ICategory
})
Options: Pagination Options
subcategories(category: string, options?: SubcategoriesOptions): Promise<CategoriesResult>
// Example:
const { data: categories } = await gf.subcategories('tv', { limit: 10, offset: 25, rating: 'g' })
categories.forEach((category) => {
console.log(category) // ICategory
})
Options: Pagination Options
| option | type | description | default |
|---|---|---|---|
| limit | number | Number of results to return, maximum 100 | 25 |
| offset | number | Specifies the starting position of the results. | 0 |
| option | type | description | default |
|---|---|---|---|
| rating | string | limit results by rating: y, g, pg, pg-13, r. | g |
| option | type | description | default |
|---|---|---|---|
| type | string | gifs / stickers / text / videos | gifs |
FAQs
Javascript API to fetch gifs and stickers from the GIPHY API.
The npm package @giphy/js-fetch-api receives a total of 85,071 weekly downloads. As such, @giphy/js-fetch-api popularity was classified as popular.
We found that @giphy/js-fetch-api demonstrated a healthy version release cadence and project activity because the last version was released less than 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.

Security News
Recent coverage mislabels the latest TEA protocol spam as a worm. Here’s what’s actually happening.

Security News
PyPI adds Trusted Publishing support for GitLab Self-Managed as adoption reaches 25% of uploads

Research
/Security News
A malicious Chrome extension posing as an Ethereum wallet steals seed phrases by encoding them into Sui transactions, enabling full wallet takeover.