Start a conversation

Extracting Product List from Community Platform Using API v2

Overview

There is currently no out-of-the-box (OOTB) feature in Khoros Community to directly export or extract a list of products from the community interface. However, you can retrieve product information programmatically using the Khoros Community API v2, which allows you to query and extract product data including fields such as ID, title, description, price, manufacturer, product URL, and image URL.

Solution

Step 1: Authenticate Using Session Key Method

Before making API calls, you need to authenticate to your community. The recommended approach is to use the session key authentication method:

  1. Review the session key authentication documentation: Khoros Session Key Authentication
    💡 If you are unable to access the Developer Docs above, please request access by sending an email to  communityhelp@khoros.com 
  2. If using an API testing tool like Postman, configure your authentication using the session key method as described in the documentation
  3. Alternatively, you can run API queries directly in your browser while logged in as an admin user

Step 2: Choose Your Query Type

Depending on your needs, you can use one of the following API v2 query approaches:

Option A: Extract Specific Product Fields

Use this query to retrieve only the fields you need (id, title, description, price, manufacturer, product_url, image_url):

https://YOUR-COMMUNITY-URL.com/api/2.0/search?q=SELECT id, title, description, price, manufacturer, product_url, image_url FROM products

Option B: Extract All Product Fields

Use this query to retrieve all available product information:

https://YOUR-COMMUNITY-URL.com/api/2.0/search?q=SELECT * FROM products
Note: Replace YOUR-COMMUNITY-URL.com with your actual community domain.

Step 3: Execute the API Query

You can execute the API query using one of these methods:

  • Using Postman or similar API testing tools: Configure your request with the authentication headers and paste the query URL
  • Using your browser: Log in to your community with an admin account, then paste the API query URL directly into your browser's address bar

Step 4: Process the API Response

The API will return the product data in JSON format. You can then:

  1. Copy the JSON response from the API
  2. Use a JSON-to-Excel converter tool or script to transform the data into an Excel spreadsheet
  3. Alternatively, write a custom script (Python, JavaScript, etc.) to parse the JSON and export it to your desired format

Summary

While Khoros Community doesn't provide a built-in feature to export product lists, you can successfully extract product information using API v2. The process involves authenticating with session keys, constructing a SELECT query to retrieve product fields, executing the API call, and processing the JSON response. This approach gives you flexible control over which product fields you want to extract and how you format the final output.

FAQ

Q1: Can I export the product list without using the API?
A1: No, there is currently no out-of-the-box method to export product lists directly from the Khoros Community interface. The API v2 is the recommended approach for extracting this data.

Q2: Do I need administrator access to use the API?
A2: Yes, you need to be logged in as an admin user to access and run API queries, especially when using the browser method. For Postman or other tools, you'll need proper authentication credentials configured.

Q3: What format does the API return the product data in?
A3: The API v2 returns product data in JSON format. You will need to use a JSON-to-Excel converter or write a custom script to transform the data into an Excel spreadsheet or other desired formats.

Choose files or drag and drop files
Was this article helpful?
Yes
No
  1. Ciprian Nastase

  2. Posted

Comments