Export Comments v4 ᴺᴱᵂ

Request an export of comments, users, and ranks by Conversation ID or date range.

OpenWeb enables you to export comments with their authors and ranks. You can export comments based on a Conversation ID or 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.
  • Export by date range is limited to a range of 30 days.


Prerequisite

Item

Description

JWT Token

JWT token to be used for OpenWeb API



Create an export

Use the following steps to create an export:

  1. Make a POST /v4/export call with a JSON body that defines the date range or Conversation ID. The API returns the check status endpoint populated with the export request ID as the value of status_link.

    ⚠️

    Be mindful of the following when creating an export:

    • Only one export can be run at a time per spot.
    • When defining the date range, the duration between the from and until values must be ≤ 1 month (730 hours).
    curl -L -X POST 'https://api-exporter.openweb.com/v4/export' \
         -H 'Authorization: Bearer JWT_TOKEN' \
         -H 'x-spot-id: "SPOT_ID"' \
         -H 'Content-Type: application/json' \
         -d '{"from": "2022-07-30T00:00:00Z","until": "2022-07-30T23:59:00Z","max_records_in_file": 10000}'
    curl -L -X POST 'https://api-exporter.openweb.com/v4/export' \
         -H 'Authorization: Bearer JWT_TOKEN' \
         -H 'x-spot-id: "SPOT_ID"' \
         -H 'Content-Type: application/json' \
         -d '{"delimiter": ",","conversation_id": "CONVERSATION_ID","max_records_in_file": 10000}'

  2. Use the status_link value to make a GET /v4/export/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/v4/export/status?id=EXPORT_REQUEST_ID' \
         -H 'Authorization: Bearer JWT_TOKEN' \
         -H 'x-spot-id: "SPOT_ID"' \
         -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.



💡

You can also abort an export request or [list

all finished exports](ref:get_v4-export-list) .



Export Field Reference

This section lists and defines each field returned in the exported data.

Comments

FieldDescription
MessageIDUnique ID of the message
UserIDID of the user
UsernameUsername of the user
SpotIDID of the spot
PostIDID of the post
MessageStatus

Status of the message



Possible Values:

  • approved
  • publish and moderate
  • rejected
  • require approval
ContentRaw content of the message
WrittenAtCreation timestamp
UpdatedAtUpdate timestamp
TagsViolation tags
Type

Type of the message



Possible Values:

  • comment
  • reply
EditedIdentifies was the message edited
ParentIDID of the direct message parent
ParentCommentIDID of the root message
PreviousStateIdentifies previous state
LikesNumber of likes on the message
DislikesNumber of dislikes on the message
ArticleURLURL of the article in which the comment is posted
ReportsCountNumber of times users reported the message
AutomatedStateIdentifies automated state
ManuallyResolvedIdentifies was the message manually resolved
PublishedIdentifies was the message published
IPIP of the comment's author

Users

FieldDescription
UserIDID of the user
DisplayNameDisplay name of the user
UsernameUsername of the user
EmailEmail of the user
ImageIDImage ID of the user

Ranks

FieldDescription
UserIDID of the user
CreatedAtCreation timestamp
MessageIDUnique ID of the message
PostIDID of the post
Operation

Identifies the operation type



Possible values:

  • 0: dislike
  • 1: like