openapi: 3.1.0
info:
title: quick-start-api-formerly-get-api Articles Region API
version: '1'
servers:
- url: https://api.newswhip.com/v1
tags:
- name: Region
paths:
/region/{Region}/{Category}/{Time_Period}:
get:
summary: /region
description: ''
operationId: region
parameters:
- name: Region
in: path
description: Filters articles published in {region}. The region should be passed in English, using the reference data linked below.
schema:
type: string
default: World
required: true
- name: Category
in: path
description: 'Filters articles by {category}. Note: the category (topic) should be passed in English, using the reference data linked below.'
schema:
type: string
default: All
required: true
- name: Time_Period
in: path
description: Filters articles published within the last {time_period} hours. Valid time_periods range from 1 up to 168 hours
schema:
type: integer
format: int32
default: 24
required: true
- name: key
in: query
description: Your API key
required: true
schema:
type: string
default: DevKey
- name: size
in: query
description: The number of results you wish to have returned in the request. The default is 150 if this is omitted. The maximum you can specify is 500.
schema:
type: integer
format: int32
default: 150
responses:
'200':
description: '200'
content:
application/json:
examples:
Result:
value: "{\n \"total_match\": 1000,\n \"articles\": [\n {\n \"delta_time\": 292,\n \"recent_fb_counts\": 121080,\n \"recent_tw_counts\": 5186,\n \"relatedStories\": [\n \n ],\n \"fb_data\": {\n \"total_engagement_count\": 438712,\n \"total_count_delta\": 121080,\n \"delta_period\": 292,\n \"delta_period_unit\": \"m\",\n \"fb_overperforming\": 27.785593513761\n },\n \"tw_data\": {\n \"tw_count\": 31157,\n \"total_count_delta\": 5186,\n \"delta_period\": 292,\n \"delta_period_unit\": \"m\",\n \"tw_overperforming\": 20.063359883215\n },\n \"li_data\": {\n \"li_count\": 0,\n \"total_count_delta\": 0,\n \"delta_period\": 292,\n \"delta_period_unit\": \"m\"\n },\n \"pi_data\": {\n \"pi_count\": 22,\n \"delta_period\": 292,\n \"delta_period_unit\": \"m\"\n },\n \"predicted_interactions\": 1131719,\n \"predicted_timestamp\": 1522338239279,\n \"uuid\": \"97b2ca00-31f7-11e8-be5b-ef989ddb8d11\",\n \"publication_timestamp\": 1522179772000,\n \"link\": \"https://www.nytimes.com/2018/03/27/opinion/nikolas-cruz-shooting-florida.html\",\n \"headline\": \"Opinion | I Tried to Befriend Nikolas Cruz. He Still Killed My Friends.\",\n \"excerpt\": \"The notion that the Parkland shootings wouldn\\u2019t have occurred if students had been kinder is deeply dangerous.\",\n \"keywords\": \"Parkland Shooting,Nikolas Cruz,Marjory Stoneman Douglas,Murders and Homicides\",\n \"source\": {\n \"publisher\": \"nytimes.com\",\n \"domain\": \"nytimes.com\",\n \"link\": \"https://nytimes.com\",\n \"country\": \"United States\",\n \"country_code\": \"us\",\n \"language\": \"en\"\n },\n \"image_link\": \"https://static01.nyt.com/images/2018/03/27/opinion/27Robinson/27Robinson-facebookJumbo.jpg\",\n \"has_video\": false,\n \"nw_score\": 1781.0086007513,\n \"max_nw_score\": 9797.2621208147,\n \"topics\": [\n {\n \"id\": 2,\n \"name\": \"News\"\n },\n {\n \"id\": 19,\n \"name\": \"Opinion\"\n }\n ],\n \"authors\": [\n \"ISABELLE ROBINSON\"\n ],\n \"entities\": [\n \n ]\n }\n ]\n}"
schema:
type: object
properties:
total_match:
type: integer
example: 1000
default: 0
articles:
type: array
items:
type: object
properties:
delta_time:
type: integer
example: 292
default: 0
recent_fb_counts:
type: integer
example: 121080
default: 0
recent_tw_counts:
type: integer
example: 5186
default: 0
relatedStories:
type: array
fb_data:
type: object
properties:
total_engagement_count:
type: integer
example: 438712
default: 0
total_count_delta:
type: integer
example: 121080
default: 0
delta_period:
type: integer
example: 292
default: 0
delta_period_unit:
type: string
example: m
fb_overperforming:
type: number
example: 27.785593513761
default: 0
tw_data:
type: object
properties:
tw_count:
type: integer
example: 31157
default: 0
total_count_delta:
type: integer
example: 5186
default: 0
delta_period:
type: integer
example: 292
default: 0
delta_period_unit:
type: string
example: m
tw_overperforming:
type: number
example: 20.063359883215
default: 0
li_data:
type: object
properties:
li_count:
type: integer
example: 0
default: 0
total_count_delta:
type: integer
example: 0
default: 0
delta_period:
type: integer
example: 292
default: 0
delta_period_unit:
type: string
example: m
pi_data:
type: object
properties:
pi_count:
type: integer
example: 22
default: 0
delta_period:
type: integer
example: 292
default: 0
delta_period_unit:
type: string
example: m
predicted_interactions:
type: integer
example: 1131719
default: 0
predicted_timestamp:
type: integer
example: 1522338239279
default: 0
uuid:
type: string
example: 97b2ca00-31f7-11e8-be5b-ef989ddb8d11
publication_timestamp:
type: integer
example: 1522179772000
default: 0
link:
type: string
example: https://www.nytimes.com/2018/03/27/opinion/nikolas-cruz-shooting-florida.html
headline:
type: string
example: Opinion | I Tried to Befriend Nikolas Cruz. He Still Killed My Friends.
excerpt:
type: string
example: The notion that the Parkland shootings wouldn’t have occurred if students had been kinder is deeply dangerous.
keywords:
type: string
example: Parkland Shooting,Nikolas Cruz,Marjory Stoneman Douglas,Murders and Homicides
source:
type: object
properties:
publisher:
type: string
example: nytimes.com
domain:
type: string
example: nytimes.com
link:
type: string
example: https://nytimes.com
country:
type: string
example: United States
country_code:
type: string
example: us
language:
type: string
example: en
image_link:
type: string
example: https://static01.nyt.com/images/2018/03/27/opinion/27Robinson/27Robinson-facebookJumbo.jpg
has_video:
type: boolean
example: false
default: true
nw_score:
type: number
example: 1781.0086007513
default: 0
max_nw_score:
type: number
example: 9797.2621208147
default: 0
topics:
type: array
items:
type: object
properties:
id:
type: integer
example: 2
default: 0
name:
type: string
example: News
authors:
type: array
items:
type: string
example: ISABELLE ROBINSON
entities:
type: array
'400':
description: '400'
content:
application/json:
examples:
Result:
value: '{"error":{"message":"Unknown country or region. Received: Wod","id":"2f0c0762-f0ea-4b5a-bd3e-019d259895e2"}}'
schema:
type: object
properties:
error:
type: object
properties:
message:
type: string
example: 'Unknown country or region. Received: Wod'
id:
type: string
example: 2f0c0762-f0ea-4b5a-bd3e-019d259895e2
deprecated: false
security: []
x-readme:
code-samples:
- language: curl
code: curl "https://api.newswhip.com/v1/region/World/All/24?key=DevHub"
samples-languages:
- curl
tags:
- Region
components:
securitySchemes:
sec0:
type: apiKey
in: query
name: key
x-default: DevKey