openapi: 3.1.0
info:
title: quick-start-api-formerly-get-api Articles Social API
version: '1'
servers:
- url: https://api.newswhip.com/v1
tags:
- name: Social
paths:
/fbPosts:
post:
summary: /fbPosts
description: ''
operationId: fbposts
parameters:
- name: key
in: query
description: Your API key.
required: true
schema:
type: string
default: DevHub
requestBody:
content:
application/json:
schema:
type: object
required:
- filters
properties:
filters:
type: array
description: See the Notes section at the bottom of this page. The _Lucene query strings_ section shares important considerations, including the limits to the number of filters that are allowed.
default:
- country_code:us
items:
type: string
from:
type: integer
description: Unix timestamp in milliseconds. Filters articles published after {from}. Defaults to 1 week ago.
default: null
format: int64
to:
type: integer
description: Unix timestamp in milliseconds. Filters articles published before {to}. Defaults to now.
default: null
format: int64
language:
type: string
description: Two letter ISO 639-1 language code. Defaults to any language.
default_fields:
type: array
description: 'Up to 3 available fields to be used when filtering only by keywords (like "Barack Obama"). Defaults to `page_name` and `external_link`. You can choose from: `headline`, `external_link`, `page_id`, `page_name`, `country_code`, `authors`, `language`, `region_code`, and `summary`.'
default:
- page_name
- external_link
items:
type: string
size:
type: integer
description: Max number of articles to be returned (includes relatedStories.) Defaults to 200. The maximum you can specify is 5,000.
default: 5
format: int32
content_type:
type: string
description: '`all`, `all_video`, `embedded_video`, `native_video`, `live_video`, `link`, `photo`, `status`, `branded_content`. Defaults to return all content types.'
sort_by:
type: string
description: 'Sorts by the following in descending order: `default`, `nw_max_score`, `fb_overperforming`, `fb_total_engagement`, `created_at`, `fb_likes`, `fb_shares`, `fb_comments`, `fb_loves`, `fb_wows`, `fb_hahas`, `fb_sads`, `fb_angrys`. The default `sort_by` is `nw_max score` when the selected time-range is <= 25h, otherwise it will be `fb_overperforming`.'
default: default
responses:
'200':
description: '200'
content:
application/json:
examples:
Result:
value: "{\n \"total_match\":1500,\n \"fbPosts\": [\n {\n \"page_id\": \"1557825057865287\",\n \"page_name\": \"JayShettyIW\",\n \"post_type\": \"Native Video\",\n \"is_live_video\": false,\n \"fb_story\": \"Jay Shetty added a new episode.\",\n \"fb_sponsor_tags\": [],\n \"fb_data\": {\n \"total_engagement_count\": 2941272,\n \"total_count_delta\": 116841,\n \"delta_period\": 493,\n \"delta_period_unit\": \"m\",\n \"fb_overperforming\": 11.044809337609504,\n \"reactions\": {\n \"comments\": 54114,\n \"likes\": 405282,\n \"shares\": 2362549,\n \"loves\": 104918,\n \"wows\": 13387,\n \"hahas\": 441,\n \"sads\": 500,\n \"angrys\": 81\n }\n },\n \"uuid\": \"f94dab70-31c7-11e8-a52e-a128b18e226e\",\n \"publication_timestamp\": 1522159200000,\n \"link\": \"https://www.facebook.com/1557825057865287/posts/1995740577407064\",\n \"headline\": \"Before You Feel Pressure Watch This\",\n \"excerpt\": \"Everyone has a different clock. Wait for your time\",\n \"keywords\": \"\",\n \"source\": {\n \"publisher\": \"\",\n \"link\": \"http://\",\n \"country\": \"United States\",\n \"country_code\": \"us\",\n \"language\": \"en\" \n },\n \"image_link\": \"https://scontent.xx.fbcdn.net/v/t15.0-10/s720x720/27599510_1995747294073059_3197960858223247360_n.jpg?_nc_cat=0&oh=ae39d986d63f1cf2dac596d3f93cf53b&oe=5B303B2E\",\n \"has_video\": true,\n \"nw_score\": 869.3953298785547,\n \"max_nw_score\": 16524.22956588446,\n \"topics\": [\n {\n \"id\": 285,\n \"name\": \"Viral Sites\"\n }\n ],\n \"authors\": null,\n \"entities\": []\n },\n {\n \"page_id\": \"92304305160\",\n \"page_name\": \"Will Smith\",\n \"post_type\": \"Native Video\",\n \"is_live_video\": false,\n \"fb_story\": \"\",\n \"fb_sponsor_tags\": [],\n \"fb_data\": {\n \"total_engagement_count\": 2730954,\n \"total_count_delta\": 30339,\n \"delta_period\": 683,\n \"delta_period_unit\": \"m\",\n \"fb_overperforming\": 8.63659222535034,\n \"reactions\": {\n \"comments\": 74647,\n \"likes\": 1094596,\n \"shares\": 849410,\n \"loves\": 566717,\n \"wows\": 4295,\n \"hahas\": 141110,\n \"sads\": 107,\n \"angrys\": 72\n }\n },\n \"uuid\": \"888447c0-3044-11e8-a52e-a128b18e226e\",\n \"publication_timestamp\": 1521993008000,\n \"link\": \"https://www.facebook.com/92304305160/posts/10160067736600161\",\n \"headline\": \"\",\n \"excerpt\": \"#Bucketlist - Salsa Lessons from @MarcAnthony... ✔️ \\n\\nI just realized this is my 100th Post - Thank You All! Let’s Go Get the next \U0001F4AF\",\n \"keywords\": \"\",\n \"source\": {\n \"publisher\": \"\",\n \"link\": \"http://\",\n \"country\": \"United States\",\n \"country_code\": \"us\"\n },\n \"image_link\": \"https://scontent.xx.fbcdn.net/v/t15.0-10/s720x720/27603910_10160067743400161_4242397347268526080_n.jpg?_nc_cat=0&oh=54bdf5c764e8fe2bfab3911e2f0474fc&oe=5B2F7118\",\n \"has_video\": true,\n \"nw_score\": 227.7659232536071,\n \"max_nw_score\": 89325.11841407913,\n \"topics\": [\n {\n \"id\": 3,\n \"name\": \"Entertainment\"\n },\n {\n \"id\": 699,\n \"name\": \"Celebrity\"\n }\n ],\n \"authors\": null,\n \"entities\": []\n }\n ]\n}"
schema:
type: object
properties:
total_match:
type: integer
example: 1500
default: 0
fbPosts:
type: array
items:
type: object
properties:
page_id:
type: string
example: '1557825057865287'
page_name:
type: string
example: JayShettyIW
post_type:
type: string
example: Native Video
is_live_video:
type: boolean
example: false
default: true
fb_story:
type: string
example: Jay Shetty added a new episode.
fb_sponsor_tags:
type: array
fb_data:
type: object
properties:
total_engagement_count:
type: integer
example: 2941272
default: 0
total_count_delta:
type: integer
example: 116841
default: 0
delta_period:
type: integer
example: 493
default: 0
delta_period_unit:
type: string
example: m
fb_overperforming:
type: number
example: 11.044809337609504
default: 0
reactions:
type: object
properties:
comments:
type: integer
example: 54114
default: 0
likes:
type: integer
example: 405282
default: 0
shares:
type: integer
example: 2362549
default: 0
loves:
type: integer
example: 104918
default: 0
wows:
type: integer
example: 13387
default: 0
hahas:
type: integer
example: 441
default: 0
sads:
type: integer
example: 500
default: 0
angrys:
type: integer
example: 81
default: 0
uuid:
type: string
example: f94dab70-31c7-11e8-a52e-a128b18e226e
publication_timestamp:
type: integer
example: 1522159200000
default: 0
link:
type: string
example: https://www.facebook.com/1557825057865287/posts/1995740577407064
headline:
type: string
example: Before You Feel Pressure Watch This
excerpt:
type: string
example: Everyone has a different clock. Wait for your time
keywords:
type: string
example: ''
source:
type: object
properties:
publisher:
type: string
example: ''
link:
type: string
example: http://
country:
type: string
example: United States
country_code:
type: string
example: us
language:
type: string
example: en
image_link:
type: string
example: https://scontent.xx.fbcdn.net/v/t15.0-10/s720x720/27599510_1995747294073059_3197960858223247360_n.jpg?_nc_cat=0&oh=ae39d986d63f1cf2dac596d3f93cf53b&oe=5B303B2E
has_video:
type: boolean
example: true
default: true
nw_score:
type: number
example: 869.3953298785547
default: 0
max_nw_score:
type: number
example: 16524.22956588446
default: 0
topics:
type: array
items:
type: object
properties:
id:
type: integer
example: 285
default: 0
name:
type: string
example: Viral Sites
authors: {}
entities:
type: array
'400':
description: '400'
content:
application/json:
examples:
Result:
value: "{\n \"error\": {\n \"message\": \"Fields 'foo_field' is not allowed for filters query!\",\n \"id\": \"cdf16324-3c65-4330-9137-ea8efcf7e3a0\"\n }\n}"
schema:
type: object
properties:
error:
type: object
properties:
message:
type: string
example: Fields 'foo_field' is not allowed for filters query!
id:
type: string
example: cdf16324-3c65-4330-9137-ea8efcf7e3a0
deprecated: false
security: []
x-readme:
code-samples:
- language: curl
code: "curl -H \"Content-Type: application/json\" -X POST -d '{\n \"filters\": [\"country_code:us\"],\n \"sort_by\":\"fb_likes\",\n \"content_type\":\"Status\"\n}' \"https://api.newswhip.com/v1/fbPosts?key=DevHub\""
samples-languages:
- curl
tags:
- Social
components:
securitySchemes:
sec0:
type: apiKey
in: query
name: key
x-default: DevKey