-
Notifications
You must be signed in to change notification settings - Fork 2
Discussion API
Isaac edited this page Aug 6, 2021
·
4 revisions
https://www.diffbot.com/dev/docs/discussion/
let discussion = await diffbot.discussion({
url: 'https://www.theverge.com/2020/8/25/21400240/epic-apple-ruling-unreal-engine-fortnite-temporary-restraining-order',
body: 'optional-html-post-body',
});
console.log(discussion.objects[0].title);
console.log(discussion.objects[0].posts);
console.log(discussion.objects[0].participants);
console.log(discussion.objects[0].sentiment);| Param | Type | Required | Description |
|---|---|---|---|
| url | string | Yes | Web page URL of the article to process (required unless posting plain text) |
| fields | string[] | No | Used to specify optional fields to be returned by the Article API. |
| paging | boolean | No | Pass paging=false to disable automatic concatenation of multiple-page articles. (By default, Diffbot will concatenate up to 20 pages of a single article.) |
| maxTags | number | No | Set the maximum number of automatically-generated tags to return. By default a maximum of ten tags will be returned. |
| tagConfidence | number | No | Set the minimum relevance score of tags to return, between 0.0 and 1.0. By default only tags with a score equal to or above 0.5 will be returned. |
| discussion | boolean | No | Pass discussion=false to disable automatic extraction of article comments. |
| timeout | number | No | Sets a value in milliseconds to wait for the retrieval/fetch of content from the requested URL. The default timeout for the third-party response is 30 seconds (30000). |
| callback | string | No | Use for jsonp requests. Needed for cross-domain ajax. |
| proxy | string | No | Used to specify the IP address of a custom proxy that will be used to fetch the target page, instead of Diffbot's default IPs/proxies. (Ex: &proxy=168.212.226.204) |
| proxyAuth | string | No | Used to specify the authentication parameters that will be used with the proxy specified in the &proxy parameter. (Ex: &proxyAuth=username:password) |
| naturalLanguage | string[] | No | Used to request the output of the Diffbot Natural Language API in the field naturalLanguage. Example: &naturalLanguage=entities,facts,categories,sentiment. |
| body | string | No | Optional HTML markup to pass as POST body |
- API Documentation