Unofficial Tinder API wrapper for Nodejs and Deno.
npm install tinder-api-tstinder-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.
- Perform searches for profiles.
- Like or dislike profiles.
- Retrieve authenticated user profile information.
- Designed for flexibility and easy integration.
Install the package via npm:
``bash`
npm install tinder-api-ts
`bash`
yarn add tinder-api-ts
`bash`
pnpm i tinder-api-ts
Import the package directly from the repository URL:
`bash`
deno add jsr:@miguelo/tinder-api
To use the tinder-api, you need to retrieve your X-AUTH-TOKEN from Tinder web. Here's how you can obtain it:
1. Open your browser and navigate to the Tinder website.
2. Open Developer Tools (usually by pressing F12 or Ctrl+Shift+I). keyval-store
3. Go to the Application tab.
4. Locate IndexedDB in the Storage section.
5. Find the database and the keyval store. persist::mfa
6. Search for the key . authToken
7. Extract the value from the result.
Alternatively, use this script in your browser console to retrieve the token:
`javascript
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);
};
`
`typescript
import { TinderAPI } from "tinder-api";
const api = new TinderAPI({ xAuthToken: "your_auth_token" });
`
`typescript
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',
});
`
| Method | Description |
|--------|-------------|
| search(params?: TinderSearchParams): Promise | Search for profiles. |like(params: TinderLikeParams): Promise
| | Like a profile. |dislike(params: TinderDislikeParams): Promise
| | Dislike a profile. |profile(params?: TinderProfileParams): Promise
| | Retrieve authenticated user profile. |
Parameters for searching profiles.
| Property | Type | Description |
|---------------|------------|----------------------------------------|
| locale | string | The locale to use for the search. |
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. |
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. |
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. |
The library throws detailed errors if a request fails. Wrap your calls in try-catch to handle exceptions gracefully.
`typescript``
try {
const results = await api.search();
console.log(results);
} catch (error) {
console.error("Error:", error.message);
}
This project is licensed under the MIT License. See the LICENSE file for more details.
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.
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!