Export Comments v2

Request an export of comments and check on the status of the request.

OpenWeb enables you to export comments. You can export comments based on a date range.

When initiating an export, be mindful of the following:

  • Each time an export is initiated, a new data set is generated.
  • The duration of the export process depends upon the size of the data set.
  • The Export API is not meant for incremental or repetitive queries.


Prerequisites

ItemDescription
Export TokenUnique OpenWeb export token value

Use the following steps to locate the export token:

  • From your OpenWeb Admin Dashboard, click Settings.
  • Under Authentication Tokens, copy the Export value.
Export API EnablementTo use this API, request that it be enabled for your Spot ID from your OpenWeb PSM.


Create an export

Use the following steps to create an export:

  1. Make a POST /v2/export/comments call. The API returns the check status endpoint populated with the export request ID as the value of status_link.

    curl -L -X POST 'https://api-exporter.openweb.com/v2/export/comments' \
         -H 'apikey: EXPORT_TOKEN' \
         -H 'Content-Type: application/json' \
         -d '{"since": "2022-07-30T00:00:00", "to": "2022-07-30T23:59:00"}'
    
  2. Use the status_link value to make a GET /v2/export/comments/status call. The API returns secured URLs to download the export in a links array. If the export download is not ready, the API returns "status": "Processing".

    curl -L GET 'https://api-exporter.openweb.com/v2/export/comments/status?id=EXPORT_REQUEST_ID' \
         -H 'apikey: EXPORT_TOKEN' \
         -H 'Content-Type: application/json'
    
  3. Copy and paste the links into a web browser to download the .csv.zip file. Each .csv file will contain at most 100,000 comments.

    ⚠️

    The links secure links are only available for one week after being generated.



Export Field Reference

This section lists and defines each field returned in the export .csv file.

FieldDescription
contentRaw content of the message
dislikes_countNumber of dislikes on the message
idUnique identifier for the message
label_idIdentifier of the comment label. If no label is returned, value in this field is null.
likes_countNumber of likes on the message
message_statusStatus of the message. Possible values:
  • approved
  • publish and moderate
  • rejected
  • require approval
    post_idUnique article identifier that is specific to the article page
    reports_countNumber of times users reported the message
    typeType of message. Possible values: comment, reply
    updated_atDate of the most recent update to the message
    user_display_nameNon-unique personal identifier used prominently throughout the platform
    user_idID of the user
    user_nameUnique personal identifier used to differentiate between different users
    user_primarykeyUnique user ID generated by a Partner’s backend user management system
    written_atCreation date of the message