npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

api-brainly-fork

v0.0.45

Published

Unofficial brainly.com API

Downloads

3

Readme

BrainlyAPI 🌩️

brainly-api logo

NPM Downloads GitHub all releases Travis CI Github Action NPM npm (tag) GitHub last commit Circle CI Lerna

Now some commands have been divided into sections and must be installed separately

Now you can use "find question highlight" to search for the highlighted questions

Notes ‼️

  • This is not the official library from brainly.com
  • This version is not stable yet
  • This library is still under development
  • PLEASE DO NOT USE THIS LIBRARY FOR NEGATIVE PURPOSE ⚠️ ‼️
  • What about documentation? The documentation will be generated as soon as some library components are ready to use

Let's Try with Experimental Mode 😎

const { BrainlyAPI, Server } = require('brainly-api');

BrainlyAPI.startWorker({ experimental: true, server: Server.ID }, async brainly => {
  // find question
  console.log(await brainly.findQuestion('Indonesian!!'));
});

List of Available Locations 📍

Example:

const { Server } = require('brainly-api');

Server.{Code}

Code | Name | Refers to ---- | ----- | -------- PL | Poland 🇵🇱 | brainly.pl RU | Russian Federation (the) | znanija.com ES | Spain | brainly.lat PT | Portugal 🇵🇹 | brainly.com.br TR | Turkey | eodev.com RO | Romania 🇷🇴 | brainly.ro ID | Indonesia 🇮🇩 | brainly.co.id HI | India 🇮🇳 | brainly.in PH | Philippines (the) 🇵🇭 | brainly.ph US | United States of America (the) 🇺🇸 | brainly.com (deprecated)

Source ℹ️ : https://www.iban.com/country-codes

List of Features 😲

All the features below can only be used anonymously (temporarily disabled in auth mode) 😿.

All the available features are still under development and will continue to be improved.

Feature | Method | Status ------- | ------ | ------ Find question | findQuestion | ✔️ Find question by id | ❌ | ❌ Find question highlight | findQuestionHighlight | ✔️ Fetch user profile | fetchUserProfile | ✔️

Using CLI Tools 💻

$ npx brainly-api

Brainly API Tools (@brainly-api-tools) ‼️

Brainly api makes helper tools to simplify the development process. Here is a list of tools that can be used:

Enable Random User Agents ❓

The random user agent can be activated by installing the random-useragent library.

API

AnonymousWorker

AnonymousWorker.findQuestion(question: string)

Used to search for questions based on the server and search queries.

AnonymousWorker.findQuestionById(id: string)

Used to search for questions based on the server and id.

AnonymousWorker.fetchUserProfile(userId: string)

Under development

AnonymousWorker.findQuestionHighlight(lesson: number)

Used to search for highlight questions based on the server and lesson type.

Troubleshooting 😠

Deploy to the server

Many people say that brainly-api has problems when deploying to Heroku. This was not caused by a flaw in the program, but from the security of the Brainly itself. They use Cloudflare for security. As another experiment, brainly-api works well with Microsoft Azure. If you have any suggestions for deploying brainly-api for free, you can do a pull request.

US Server restricted anywhere

Usually, many people ask why when the test on localhost is running well while on hosting it gives a 403 error. However, in this case, if you use US as the server then it will not work well on local and hosting. This is due to the security of Cloudflare.

Who Uses it ❓

Currently no project names are displayed. If you want your project name included here, then contact me with the following format:

  • projectname: your project name
  • projectlink: your project link
  • projectlogo(optional): your project logo (600x400) or lower

Contact me ☎️

Code of Conduct 👥

See code of conduct

Support My Other Project 🔗

Contributing 📝

Thank you for wanting to contribute to this project. The contribution page can be found on contribution page

License 🔓

Licensed under MIT License

See package license

Thanks for using brainly-api 😉