Scrapinghub API Reference

Comments API

The comments API lets you add comments directly to scraped data, which can later be viewed on the items page.

Comment object

Field Description
id Comment ID.
created Created date.
archived Archived date.
author Comment author.
avatar User gravatar URL.
text Comment text
editable If set to true, comment can be edited.


Edits or archives a comment.

Parameter Description Required
comment_id Comment ID. Yes
text Comment text. PUT
Method Description Supported Parameters
PUT Update comment text. comment_id, text
DELETE Delete comment. comment_id

PUT example:

$ curl -X PUT -u APIKEY: --data 'text=my+new+text' ""

DELETE example:

$ curl -X DELETE -u APIKEY: ""


Retrieves all comments for a job indexed by item or item/field.


$ curl -u APIKEY: ""
    "0": [comment, comment, ...],
    "0/title": [comment, comment, ...],
    "12/url": [comment, comment, ...],

Where comment is a comment object as defined above.


Retrieves the number of items with unarchived comments for each job of the project.


$ curl -u APIKEY: ""
    "51/422/2": 1,
    "51/414/2": 1,
    "51/421/2": 1,
    "51/423/2": 4,
    "51/413/3": 3,
    "51/418/2": 1


Retrieves, updates or archives comments.

Parameter Description Required
text Comment text. POST
Method Description Supported parameters
GET Retrieve comments for an item or field.  
POST Update the specified comments with the given text. text
DELETE Archive the specified comment.  

GET examples:

$ curl -u APIKEY: ""
$ curl -u APIKEY: ""

POST examples:

$ curl -X POST --data 'text=some+text' -u APIKEY: ""
$ curl -X POST --data 'text=some+text' -u APIKEY: ""

DELETE examples:

$ curl -X DELETE -u APIKEY: ""
$ curl -X DELETE -u APIKEY: ""