The `tineye-api` package is the official Node.js library for interacting with the TinEye API, a commercial reverse image search solution. It enables developers to programmatically search for images using a URL or raw image data, retrieve the number of remaining searches, and query the total indexed image count. The current stable version is 2.0.6, which primarily includes updates to underlying dependencies like Axios and Jest, with no functional changes from 2.0.5. Releases appear to focus on maintenance and dependency updates rather than frequent new features, implying a stable API. Its key differentiator is being the official, supported client for accessing the paid TinEye API, ensuring compatibility and adherence to API specifications for professional and high-volume users. It simplifies authentication and request handling, abstracting away the complexities of HMAC-SHA256 authentication for previous versions, now using a simpler header key.
npm install tineye-apiVerified import paths — ran on the pinned version, not inferred.
Demonstrates how to instantiate the TinEye API client with an API key, perform a reverse image search using a public image URL, and check the remaining search credits for your account.
Update your `TinEye` constructor instantiation from `new TinEye(url, publicKey, privateKey)` to `new TinEye(url, apiKey)` where `apiKey` is your old `privateKey`.
For production use or to get actual search results, replace the sandbox key with a valid, paid TinEye API key obtained from your account dashboard.
Confirm the `apiBaseUrl` parameter in the `TinEye` constructor matches the official documentation, typically `https://api.tineye.com/rest/` for production or `https://sandbox.tineye.com/rest/` for the sandbox environment.
Ensure you are using `const TinEye = require('tineye-api');` at the top of your file for CommonJS modules, or `import { TinEye } from 'tineye-api';` for ES Modules if your environment supports it and the package is configured for it.Double-check that your `apiKey` passed to the `TinEye` constructor is correct and active. For versions 2.0.0 and above, ensure you are passing only your `privateKey` as the `apiKey`.
Add `const fs = require('fs');` at the top of your file if you intend to read image data from the local filesystem for `searchData`.