DEV Community

Cover image for Introducing SharpAPI Node.js SDK Client
Dawid Makowski
Dawid Makowski

Posted on

Introducing SharpAPI Node.js SDK Client

Photo by Mohammad Rahmani on Unsplash

πŸš€ Empowering JavaScript/TypeScript Developers with AI-Powered Workflow Automation

We're thrilled to announce the release of the SharpAPI Node.js SDK Clientβ€”a powerful, AI-driven tool designed to seamlessly integrate workflow automation into your JS/Node projects.

Why SharpAPI Node.js SDK Client?

SharpAPI npm 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

Code Samples & Real-World Use Cases

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!

Key Benefits:

  • Simplified Integration: With minimal setup, connect your Node.js applications to SharpAPI and access an array of AI services.
  • Extensive Functionality: From generating product categories to analyzing sentiment in travel reviews, the SDK offers a comprehensive toolkit.
  • Reliable & Efficient: The Node.js SDK provides a robust interface to interact with SharpAPI, complete with error handling and response management.

🌟 Features at a Glance

The SharpAPI Node.js SDK Client provides a variety of features across multiple sectors:

E-Commerce

  • Engaging Product Introductions: Generate captivating product descriptions to attract customers.
  • Personalized Thank-You Emails: Create tailored thank-you messages to enhance customer relationships.
  • Product Categorization: Automatically categorize products for optimized catalog management.
  • Product Review Sentiment Analysis: Gain insights into customer feedback to inform business decisions.

Content & Marketing Automation

  • Translation for Global Reach: Translate content to bridge language gaps effortlessly.
  • Paraphrasing & Proofreading: Improve content quality and readability with automated tools.
  • Spam Detection: Identify and filter out spam content efficiently.
  • Contact Information Extraction: Extract phone numbers and emails for streamlined lead generation.
  • SEO Enhancement: Automatically generate keywords, tags, and meta descriptions to improve search visibility.

HR Tech

  • Job Description Generation: Create comprehensive job postings to attract talent.
  • Skill & Position Analysis: Discover related job positions and skill sets.
  • Resume Parsing: Extract structured information from resumes to speed up hiring.

Travel, Tourism & Hospitality

  • Travel Review Sentiment Analysis: Understand customer sentiments to improve services.
  • Tours & Hospitality Categorization: Categorize travel and hospitality offerings for better management.

πŸ“¦ Installation

Getting started with the SharpAPI Node.js SDK Client is easy. You can install it via npm or Yarn for fast setup.

Using npm:

npm install @sharpapi/sharpapi-node-client
Enter fullscreen mode Exit fullscreen mode

Using Yarn:

yarn add @sharpapi/sharpapi-node-client
Enter fullscreen mode Exit fullscreen mode

πŸ”§ Configuration

1. Obtain Your SharpAPI API Key

To use the SDK, sign up at SharpAPI.com and retrieve your API key.

2. Set Up Environment Variables

Store your API key in a .env file within your project directory:

SHARP_API_KEY=your_sharpapi_api_key_here
Enter fullscreen mode Exit fullscreen mode

3. Loading Environment Variables

Install and use the dotenv package to load your .env file:

require('dotenv').config();
Enter fullscreen mode Exit fullscreen mode

πŸ’» Usage

The SharpAPI Node.js SDK Client offers an easy-to-use interface for various SharpAPI functionalities. Below are sample usages for some key features.

πŸ›  Basic Example: Generating Product Categories

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);
    }
})();
Enter fullscreen mode Exit fullscreen mode

πŸ›  Advanced Example: Parsing a Resume

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);
    }
})();
Enter fullscreen mode Exit fullscreen mode

πŸ›  Example: Performing Sentiment Analysis on Product Reviews

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);
    }
})();
Enter fullscreen mode Exit fullscreen mode

Happy Coding! πŸš€


Top comments (0)