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 🙏

© 2025 – Pkg Stats / Ryan Hefner

tinder-api-ts

v0.2.0

Published

Unofficial Tinder API wrapper for Nodejs and Deno.

Readme

tinder-api

tinder-api is an unofficial library to interact with Tinder's API. Designed to work seamlessly with both Node.js and Deno, it simplifies the process of performing actions such as liking, disliking, and retrieving profiles, as well as accessing search results.

Features

  • Perform searches for profiles.
  • Like or dislike profiles.
  • Retrieve authenticated user profile information.
  • Designed for flexibility and easy integration.

Installation

Node.js

Install the package via npm:

npm install tinder-api-ts
yarn add tinder-api-ts
pnpm i tinder-api-ts

Deno

Import the package directly from the repository URL:

deno add jsr:@miguelo/tinder-api

Authentication Token

To use the tinder-api, you need to retrieve your X-AUTH-TOKEN from Tinder web. Here's how you can obtain it:

Steps to Get Your Token:

  1. Open your browser and navigate to the Tinder website.
  2. Open Developer Tools (usually by pressing F12 or Ctrl+Shift+I).
  3. Go to the Application tab.
  4. Locate IndexedDB in the Storage section.
  5. Find the keyval-store database and the keyval store.
  6. Search for the key persist::mfa.
  7. Extract the authToken value from the result.

Alternatively, use this script in your browser console to retrieve the token:

const dbName = 'keyval-store';
const storeName = 'keyval';
const key = 'persist::mfa';

const dbPromise = indexedDB.open(dbName);

dbPromise.onsuccess = function(event) {
  const db = event.target.result;
  
  // Creamos una transacción de lectura
  const transaction = db.transaction([storeName], 'readonly');
  
  // Obtenemos el objeto store
  const objectStore = transaction.objectStore(storeName);
  
  // Realizamos la petición para obtener el valor
  const request = objectStore.get(key);
  
  request.onsuccess = function(event) {
    const result = JSON.parse(event.target.result);
    console.log(result.authToken)
  };
  
  request.onerror = function(event) {
    console.error('Error al obtener el valor:', event.target.error);
  };
};

dbPromise.onerror = function(event) {
  console.error('Error al abrir la base de datos:', event.target.error);
};

Usage

Init API client example

import { TinderAPI } from "tinder-api";

const api = new TinderAPI({ xAuthToken: "your_auth_token" });

Search profiles and give like example

const results = await api.search()
const profile = results.data.data.results[0]

// Like a profile
const likeResponse = await api.like({
    s_number: profile.s_number,
    userId: profile.user._id,
    liked_content_id: profile.user.photos.at(0)?.id!,
    liked_content_type: 'photo',
});

API Methods

| Method | Description | |--------|-------------| | search(params?: TinderSearchParams): Promise<TinderResponse<TinderSearchResponse>> | Search for profiles. | | like(params: TinderLikeParams): Promise<TinderResponse<TinderLikeResponse>> | Like a profile. | | dislike(params: TinderDislikeParams): Promise<TinderResponse<TinderDislikeResponse>> | Dislike a profile. | | profile(params?: TinderProfileParams): Promise<TinderResponse<TinderProfileResponse>> | Retrieve authenticated user profile. |

Interfaces

TinderSearchParams

Parameters for searching profiles.

| Property | Type | Description | |---------------|------------|----------------------------------------| | locale | string | The locale to use for the search. |

TinderLikeParams

Parameters for liking a profile.

| Property | Type | Description | |--------------------|------------|----------------------------------------| | userId | string | The ID of the profile to like. | | s_number | string | The session number for the request. | | liked_content_id | string | The ID of the content to like. | | liked_content_type | string | The type of content to like. |

TinderDislikeParams

Parameters for disliking a profile.

| Property | Type | Description | |------------|------------|----------------------------------------| | userId | string | The ID of the profile to dislike. | | s_number | string | The session number for the request. |

TinderProfileParams

Parameters for retrieving the authenticated user profile.

| Property | Type | Description | |------------|------------|----------------------------------------| | locale | string | The locale to use for the profile. | | scopes | string[] | Additional data to include in the response. |

Error Handling

The library throws detailed errors if a request fails. Wrap your calls in try-catch to handle exceptions gracefully.

try {
  const results = await api.search();
  console.log(results);
} catch (error) {
  console.error("Error:", error.message);
}

License

This project is licensed under the MIT License. See the LICENSE file for more details.

Contributing

Contributions are welcome! If you encounter issues, have ideas for improvements, or want to contribute new features, feel free to open an issue or submit a pull request on the GitHub repository.

Guidelines:

  1. Fork the repository and create a new branch for your feature or bug fix.
  2. Ensure your code adheres to the project's coding standards.
  3. Write tests for any new functionality or changes.
  4. Submit a detailed pull request describing your changes.

Thank you for your contributions!