Export Comments v4

Request an export of comments, users, and ranks.

OpenWeb enables you to export comments with their authors and ranks. You can export comments based on a Conversation ID.

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.


Prerequisite

ItemDescription
JWT TokenJWT 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. 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/v4/export' \
         -H 'apikey: JWT_TOKEN' \
         -H 'Content-Type: application/json' \
         -d '{"from": "2022-07-30T00:00:00Z", "until": "2022-07-30T23:59:00Z","conversation_id": "CONVERSATION_ID"}'
    

  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 'apikey: JWT_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 exported data.

Comments

Field Description
id Unique ID of the message
user_id ID of the user
user_name Username of the user
spot_id ID of the spot
post_id ID of the post
message_status Status of the message. Possible values:
  • approved
  • publish and moderate
  • rejected
  • require approval
content Raw content of the message
written_at Creation timestamp
updated_at Update timestamp
violation_tags Violation tags
type Type of the message. Possible values: comment, reply
edited Identifies was the message edited
parent_comment_id ID of the parent message
previous_state Identifies previous state
likes_count Number of likes on the message
dislikes_count Number of dislikes on the message
reports_count Number of times users reported the message
automated_state Identifies automated state
manually_resolved Identifies was the message manually resolved
published Identifies was the message published
ip IP of the comment's author

Users

Field Description
user_id ID of the user
user_display_name Display name of the user
user_name Username of the user
user_email Email of the user
user_image_id Image ID of the user

Ranks

Field Description
spot_id ID of the spot
post_id ID of the post
message_id Unique ID of the message
user_id ID of the user
operation Identifies the operation type
created_at Creation timestamp