🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

@supunlakmal/public-apis

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@supunlakmal/public-apis

@supunlakmal/public-apis

latest
Source
npmnpm
Version
0.0.2
Version published
Maintainers
1
Created
Source

Public APIs Category Search (React Package)

This is a React package that allows you to easily search and retrieve a list of public APIs categorized by different topics. It provides a simple function to get a list of APIs belonging to a specific category from a curated list.

Installation

You can install this package using npm:

bash
npm install your-package-name

(Replace your-package-name with the actual name you will use when publishing)

Usage

The package exports a single function, getApisByCategory, which takes a category name as a string and returns an array of API objects for that category.

javascript
import { getApisByCategory } from 'your-package-name';

// Example usage in a React component or other JavaScript file
const animalApis = getApisByCategory('Animals');

console.log(animalApis);
/*
  Example output (structure may vary slightly based on the actual JSON data):
  [
    {
      name: "Cat Facts",
      description: "Daily cat facts",
      auth: "",
      https: true,
      cors: "yes",
      link: "https://catfact.ninja/"
    },
    // ... more animal APIs
  ]
*/

const animeApis = getApisByCategory('Anime');
console.log(animeApis);

The function will return an empty array if the category is not found.

Scripts

This package includes the following npm scripts for development and publishing:

  • npm run build: Compiles the TypeScript code using the tsc command.
  • npm run format: Formats the code using Prettier.
  • npm run p: Publishes the package to npm with public access.

FAQs

Package last updated on 10 May 2025

Did you know?

Socket

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.

Install

Related posts