Oct 17, 2024
Photo by Mohammad Rahmani on Unsplash
The SharpAPI Node.js SDK Client is designed to seamlessly integrate powerful AI-driven automation into your Node.js applications, making advanced capabilities like resume parsing, SEO tag generation, sentiment analysis, and much more readily accessible.
With SharpAPI, developers can automate workflows across industries such as E-commerce, HR, Marketing, and Travel, all without the hassle of extensive manual API setup.
Check out our Node.js SDK directly ➺ npmjs.com
For Node.js developers ready to jump in, our SharpAPI Node.js Test Suite repository on GitHub offers practical code samples and real-world examples. Explore how to utilize various API endpoints for quick deployment and better understanding. The suite includes a range of interactive tests to help you experience SharpAPI's capabilities firsthand, simplifying integration into your projects. Check it out and start leveraging the SharpAPI Node.js SDK to enhance your applications!
The SharpAPI Node.js SDK Client provides a variety of features across multiple sectors:
Getting started with the SharpAPI Node.js SDK Client is easy. You can install it via npm or Yarn for fast setup.
npm install @sharpapi/sharpapi-node-client
yarn add @sharpapi/sharpapi-node-client
To use the SDK, sign up at SharpAPI.com and retrieve your API key.
Store your API key in a .env
file within your project directory:
SHARP_API_KEY=your_sharpapi_api_key_here
Install and use the dotenv
package to load your .env
file:
require('dotenv').config();
The SharpAPI Node.js SDK Client offers an easy-to-use interface for various SharpAPI functionalities. Below are sample usages for some key features.
const { SharpApiService } = require('@sharpapi/sharpapi-node-client');
require('dotenv').config();
const sharpApi = new SharpApiService(process.env.SHARP_API_KEY);
(async () => {
try {
const statusUrl = await sharpApi.productCategories("Lenovo Chromebook Laptop", "German", 400, "Neutral", "Optional e-store categories");
const result = await sharpApi.fetchResults(statusUrl);
console.log(result.getResultJson());
} catch (error) {
console.error("Error:", error);
}
})();
const { SharpApiService } = require('@sharpapi/sharpapi-node-client');
require('dotenv').config();
const sharpApi = new SharpApiService(process.env.SHARP_API_KEY);
(async () => {
try {
const statusUrl = await sharpApi.parseResume("path/to/sample_resume.pdf", "English");
const parsedResume = await sharpApi.fetchResults(statusUrl);
console.log(parsedResume.getResultJson());
} catch (error) {
console.error("Error:", error);
}
})();
const { SharpApiService } = require('@sharpapi/sharpapi-node-client');
require('dotenv').config();
const sharpApi = new SharpApiService(process.env.SHARP_API_KEY);
(async () => {
try {
const statusUrl = await sharpApi.productReviewSentiment("This product exceeded my expectations!");
const sentimentResult = await sharpApi.fetchResults(statusUrl);
console.log(sentimentResult.getResultJson());
} catch (error) {
console.error("Error:", error);
}
})();
Happy Coding! 🚀