/You.JS

You.com API Library

Primary LanguageTypeScriptApache License 2.0Apache-2.0


You.JS Logo

You.JS

An unofficial JavaScript library for You.com.

AboutInstallHow To UseLicense

About

Welcome to the the You.JS Library!

This library allows developers to easily access and utilize all of the functionality of the You.com platform through a simple and intuitive JavaScript API. With the library, developers can access a variety of You.com apps and services, including but not limited to:

  • The search engine

To get started with You.JS, read install and then how to use.

We hope you enjoy using You.JS!

adapted from YouDotCom's README.md

Install

To install the You.JS library, simply run the following command in your terminal:

npm install youdotjs # for npm
yarn add youdotjs # for yarn
pnpm add youdotjs # for pnpm
bun install youdotjs # for bun

Note: You.JS is named youdotjs on npm because youjs is already taken and you.js is too similar.

Note: It should work in the browser, but it's not tested.

How To Use

Search

To search You.com, you can use the search function. It takes in a query and returns a Promise that resolves to a SearchResult object.

const you = require('youdotjs');

const API_TOKEN = 'Put your API token here';

you.search('Hello world!', API_TOKEN).then((result) => {
  console.log(result);
});

YouChat

Currently not implemented.

Discord

You.com has an official Discord server! Join it here. Don't expect to get any support for this library there, though.

License

This project is licensed under the Apache License 2.0 - see the LICENSE file for details