Access our cutting edge Artifical Intelligence backed news data API. The API boasts the following functionality:

Functionality Example
Input Output
For a given set of preferences, return a set of news headlines (title + summary) for a specific timeframe. Politics but nothing related to Donald Trump. News that's less negative (not about death, corruption and scandal). News about blockchain. Biggest stories today. The top 5 (unless otherwises specified) news headlines consisting of both titles and summaries meeting all of the input criteria.
For a given headline, return all the most important publications from the key different news providers. A headline about the White House denouncing Huawei. A summary from the South China Post and one from Wall Street Journal. In addition to this secondary opinion from Europe, The Middle East and Asia would be returned.
For a given headline, return all social media opinion about it. A headline about the White House denouncing Huawei. Amoung others, the direct tweet from Donald Trump and also the reactionary one from Huawei's twitter.
For a given set of preferences, return a set of news articles the user is likely to be interested in. Politics but nothing related to Donald Trump. News that's less negative (not about death, corruption and scandal). News about blockchain. The top 5 (unless otherwises specified) news articles which the user is most likely to be interested in with those preferences.
For a given headline, return links to video about that specific headline. A headline about NASA seeing a Super Nova in space. Links to the most relevent published videos of the Super Nova.

Your API Key must be passed as the argument to the 'Key' header item in every request. Take note of the request type, i.e. GET or POST.

Sources - fetch a complete list of all news sources


[GET] https://scopenews.co.uk/api/sources

Returns:
	array[sources]
	source:
		value: The news source's id used when making requests to the Scope API
		name: The news source's display name.
								

Python Example:


import requests, json
# perform the request
response = requests.get("https://scopenews.co.uk/api/sources", headers={"Key": "<YOUR_API_KEY>"})
# if error making request
if response.status_code != 200:
	# print error message
	print(response.content)
# if request was successful
else:
	# print data
	print(response.json())
								

Topics - fetch a complete list of all news topics


[GET] https://scopenews.co.uk/api/topics

Returns:
	array[topics]
	source:
		value: The news topic id used when making requests to the Scope API
		name: The news topic display name.
								

Python Example:


import requests, json
# perform the request
response = requests.get("https://scopenews.co.uk/api/topics", headers={"Key": "<YOUR_API_KEY>"})
# if error making request
if response.status_code != 200:
	# print error message
	print(response.content)
# if request was successful
else:
	# print data
	print(response.json())
								

Headlines - fetch a set of personalised, breaking news headlines for a given timeframe.


[POST] https://scopenews.co.uk/api/headlines

Arguments:
	from [int]: The oldest age in minutes a news headline can be.
	until [int] (default - 0): The youngest age in minutes a news headline can be.
	topic [list] (default - none): The news topic ids which to check for headlines within.
	source [list] (default - none): The news source ids which to check for headlines from.
	exclude [list] (default - none): The news source ids which explicitly not to check for headlines from. Useful when used in combination with 'topic'.
	custom_show_topic [list] (default - none): Custom topics to look for news within, e.g. Brexit.
	custom_hide_topic [list] (default - none): Custom topics which explicitly to ignore when looking for news headline.
	limit [int] (default - 10): The maximum number of news headlines to return.
	exclude_groups [list] (default - none): Specific headline ids to ignore.

Returns:
	dictionary[headlines]
	headline_id:
		summary: A short one scentence title describing the headline.
		description: A longer paragraph describing the headline.
		rank: The order of importantance of the headlines, most important starting at 0.
		country: The country which the news headline is from. If it is a multi-national headline, returns 'global'.
		category: The topic which the article is about.
		sentiment: How positive in sentiment is the news headline form very negative (0) to very positive (1).
							

Python Example:


import requests, json
# declare personalisation parameters
post_data = {"from": 7*24*60, "topic": ["politics"], "custom_hide_topic": ["donald trump"]}
# perform the request
response = requests.post("https://scopenews.co.uk/api/headlines", headers={"Key": "<YOUR_API_KEY>", "Content-Type": "application/json; charset=utf-8"}, data=json.dumps(post_data))
# if error making request
if response.status_code != 200:
	# print error message
	print(response.content)
# if request was successful
else:
	# print data
	print(response.json())
							

Headlines Audio - read personalised set of breaking news headline aloud.


[POST] https://scopenews.co.uk/api/headlines/audio

Additional_Arguments:
	audio_opening [string] (optional): The start phrase to say before reading any news aloud.
	audio_connectors [list] (optional): The phrases to say when moving onto the next headline. A random one is chosen from the set each time.
	audio_ending [string] (optional): The end phrase to say after reading all of the news headlines.

Returns:
	Audio stream (mp3 format).
							

Python Example:


import requests, json
# declare personalisation parameters
post_data = {"from": 7*24*60, "limit": 3, "topic": ["politics"], "custom_hide_topic": ["donald trump"]}
# perform the request
response = requests.post("https://scopenews.co.uk/api/headlines/audio", headers={"Key": "<YOUR_API_KEY>", "Content-Type": "application/json; charset=utf-8"}, data=json.dumps(post_data))
# if error making request
if response.status_code != 200:
	# print error message
	print(response.content)
# if request was successful
else:
	# save the audio file
	with open("tmp.mp3", "wb") as f:
		f.write(response.content)
	print("audio file written to tmp.mp3")
							

Opinion - fetch all publications about a specific headline.


[POST] https://scopenews.co.uk/api/opinion

Arguments:
	group [int]: The id of the headline for which to fetch publications on.

Returns:
	array[articles]
	article:
		title: The article's headline.
		description: A short summary of the article.
		publishedAt: The timestamp of when the article was published.
		source: The publishers news source id.
		sourceName: The publishers news source name.
		category: The topic id of which the article is about.
		categoryName: The topic name of which the article is about.
		url: A link to the original article.
		urlToImage: A link to the articles image.
		...
							

Python Example:


import requests, json
# declare post parameters
post_data = {"group": 2103}
# perform the request
response = requests.post("https://scopenews.co.uk/api/opinion", headers={"Key": "<YOUR_API_KEY>", "Content-Type": "application/json; charset=utf-8"}, data=json.dumps(post_data))
# if error making request
if response.status_code != 200:
	# print error message
	print(response.content)
# if request was successful
else:
	# print data
	print(response.json())
							

Social - fetch all social media posts about a specific headline.


[POST] https://scopenews.co.uk/api/social

Arguments:
	group [int]: The id of the headline for which to fetch social posts on.
	limit [int] (default - 3): The maximum number of social posts to retrieve.

Returns:
	array[social_posts]
	social_post:
		text: The body of the social media post.
		author: Who posted it.
		source: The platform it was posted on.
		url: A link to the original post.
							

Python Example:


import requests, json
# declare post parameters
post_data = {"group": 2103}
# perform the request
response = requests.post("https://scopenews.co.uk/api/social", headers={"Key": "<YOUR_API_KEY>", "Content-Type": "application/json; charset=utf-8"}, data=json.dumps(post_data))
# if error making request
if response.status_code != 200:
	# print error message
	print(response.content)
# if request was successful
else:
	# print data
	print(response.json())
							

Discover - fetch a set of articles the user is likely to be interested in.


[POST] https://scopenews.co.uk/api/discover

Arguments:
	page [int] (default - 0): Results are returned in groups of 20. To return the next best matching 20 increment page by 1.
	topic [list] (default - none): The news topic ids which to check for headlines within.
	source [list] (default - none): The news source ids which to check for headlines from.
	exclude [list] (default - none): The news source ids which explicitly not to check for headlines from. Useful when used in combination with 'topic'.
	custom_show_topic [list] (default - none): Custom topics to look for news within, e.g. Brexit.
	custom_hide_topic [list] (default - none): Custom topics which explicitly to ignore when looking for news headline.
	threshold [float] (optional): The desired happiness of the news articles from negative to positive [-1, 1]
	seen_articles [dict] (default - none): A list of article ids not to return, formated as {id1: None, id2: None, ...}.
	paywall_setting [string] (default - 'always'): Whether or not to return news from paywall sources. Options are 'always' and 'never'.

Returns:
	array[articles]
	article:
		title: The article's headline.
		description: A short summary of the article.
		publishedAt: The timestamp of when the article was published.
		source: The publishers news source id.
		sourceName: The publishers news source name.
		category: The topic id of which the article is about.
		categoryName: The topic name of which the article is about.
		url: A link to the original article.
		urlToImage: A link to the articles image.
		...
							

Python Example:


import requests, json
# declare personalisation parameters
post_data = {"topic": ["politics", "science and technology"], "custom_hide_topic": ["donald trump"]}
# perform the request
response = requests.post("https://scopenews.co.uk/api/discover", headers={"Key": "<YOUR_API_KEY>", "Content-Type": "application/json; charset=utf-8"}, data=json.dumps(post_data))
# if error making request
if response.status_code != 200:
	# print error message
	print(response.content)
# if request was successful
else:
	# print data
	print(response.json())
							

Video - fetch all the videos about a specific headline.


[POST] https://scopenews.co.uk/api/video

Arguments:
	group [int]: The id of the headline for which to fetch videos on.
	limit [int] (default - 3): The maximum number of videos to retrieve.

Returns:
	array[videos]
	video:
		title: The name of the video.
		length: How long the video is in seconds.
		author: Who posted it.
		source: The platform it was posted on.
		url: A link to the video.
							

Python Example:


import requests, json
# declare post parameters
post_data = {"group": 2103}
# perform the request
response = requests.post("https://scopenews.co.uk/api/video", headers={"Key": "<YOUR_API_KEY>", "Content-Type": "application/json; charset=utf-8"}, data=json.dumps(post_data))
# if error making request
if response.status_code != 200:
	# print error message
	print(response.content)
# if request was successful
else:
	# print data
	print(response.json())
							

the news you choose

Access our cutting edge Artifical Intelligence backed news data API. The API boasts the following functionality:

Functionality Example
Input Output
For a given set of preferences, return a set of news headlines (title + summary) for a specific timeframe. Politics but nothing related to Donald Trump. News that's less negative (not about death, corruption and scandal). News about blockchain. Biggest stories today. The top 5 (unless otherwises specified) news headlines consisting of both titles and summaries meeting all of the input criteria.
For a given headline, return all the most important publications from the key different news providers. A headline about the White House denouncing Huawei. A summary from the South China Post and one from Wall Street Journal. In addition to this secondary opinion from Europe, The Middle East and Asia would be returned.
For a given headline, return all social media opinion about it. A headline about the White House denouncing Huawei. Amoung others, the direct tweet from Donald Trump and also the reactionary one from Huawei's twitter.
For a given set of preferences, return a set of news articles the user is likely to be interested in. Politics but nothing related to Donald Trump. News that's less negative (not about death, corruption and scandal). News about blockchain. The top 5 (unless otherwises specified) news articles which the user is most likely to be interested in with those preferences.
For a given headline, return links to video about that specific headline. A headline about NASA seeing a Super Nova in space. Links to the most relevent published videos of the Super Nova.

Your API Key must be passed as the argument to the 'Key' header item in every request. Take note of the request type, i.e. GET or POST.

Sources - fetch a complete list of all news sources


	[GET] https://scopenews.co.uk/api/sources

	Returns:
		array[sources]
		source:
			value: The news source's id used when making requests to the Scope API
			name: The news source's display name.
									

Python Example:


	import requests, json
	# perform the request
	response = requests.get("https://scopenews.co.uk/api/sources", headers={"Key": "<YOUR_API_KEY>"})
	# if error making request
	if response.status_code != 200:
		# print error message
		print(response.content)
	# if request was successful
	else:
		# print data
		print(response.json())
									

Topics - fetch a complete list of all news topics


	[GET] https://scopenews.co.uk/api/topics

	Returns:
		array[topics]
		source:
			value: The news topic id used when making requests to the Scope API
			name: The news topic display name.
									

Python Example:


	import requests, json
	# perform the request
	response = requests.get("https://scopenews.co.uk/api/topics", headers={"Key": "<YOUR_API_KEY>"})
	# if error making request
	if response.status_code != 200:
		# print error message
		print(response.content)
	# if request was successful
	else:
		# print data
		print(response.json())
									

Headlines - fetch a set of personalised, breaking news headlines for a given timeframe.


	[POST] https://scopenews.co.uk/api/headlines

	Arguments:
		from [int]: The oldest age in minutes a news headline can be.
		until [int] (default - 0): The youngest age in minutes a news headline can be.
		topic [list] (default - none): The news topic ids which to check for headlines within.
		source [list] (default - none): The news source ids which to check for headlines from.
		exclude [list] (default - none): The news source ids which explicitly not to check for headlines from. Useful when used in combination with 'topic'.
		custom_show_topic [list] (default - none): Custom topics to look for news within, e.g. Brexit.
		custom_hide_topic [list] (default - none): Custom topics which explicitly to ignore when looking for news headline.
		limit [int] (default - 10): The maximum number of news headlines to return.
		exclude_groups [list] (default - none): Specific headline ids to ignore.

	Returns:
		dictionary[headlines]
		headline_id:
			summary: A short one scentence title describing the headline.
			description: A longer paragraph describing the headline.
			rank: The order of importantance of the headlines, most important starting at 0.
			country: The country which the news headline is from. If it is a multi-national headline, returns 'global'.
			category: The topic which the article is about.
			sentiment: How positive in sentiment is the news headline form very negative (0) to very positive (1).
								

Python Example:


	import requests, json
	# declare personalisation parameters
	post_data = {"from": 7*24*60, "topic": ["politics"], "custom_hide_topic": ["donald trump"]}
	# perform the request
	response = requests.post("https://scopenews.co.uk/api/headlines", headers={"Key": "<YOUR_API_KEY>", "Content-Type": "application/json; charset=utf-8"}, data=json.dumps(post_data))
	# if error making request
	if response.status_code != 200:
		# print error message
		print(response.content)
	# if request was successful
	else:
		# print data
		print(response.json())
								

Headlines Audio - read personalised set of breaking news headline aloud.


	[POST] https://scopenews.co.uk/api/headlines/audio

	Additional_Arguments:
		audio_opening [string] (optional): The start phrase to say before reading any news aloud.
		audio_connectors [list] (optional): The phrases to say when moving onto the next headline. A random one is chosen from the set each time.
		audio_ending [string] (optional): The end phrase to say after reading all of the news headlines.

	Returns:
		Audio stream (mp3 format).
								

Python Example:


	import requests, json
	# declare personalisation parameters
	post_data = {"from": 7*24*60, "limit": 3, "topic": ["politics"], "custom_hide_topic": ["donald trump"]}
	# perform the request
	response = requests.post("https://scopenews.co.uk/api/headlines/audio", headers={"Key": "<YOUR_API_KEY>", "Content-Type": "application/json; charset=utf-8"}, data=json.dumps(post_data))
	# if error making request
	if response.status_code != 200:
		# print error message
		print(response.content)
	# if request was successful
	else:
		# save the audio file
		with open("tmp.mp3", "wb") as f:
			f.write(response.content)
		print("audio file written to tmp.mp3")
								

Opinion - fetch all publications about a specific headline.


	[POST] https://scopenews.co.uk/api/opinion

	Arguments:
		group [int]: The id of the headline for which to fetch publications on.

	Returns:
		array[articles]
		article:
			title: The article's headline.
			description: A short summary of the article.
			publishedAt: The timestamp of when the article was published.
			source: The publishers news source id.
			sourceName: The publishers news source name.
			category: The topic id of which the article is about.
			categoryName: The topic name of which the article is about.
			url: A link to the original article.
			urlToImage: A link to the articles image.
			...
								

Python Example:


	import requests, json
	# declare post parameters
	post_data = {"group": 2103}
	# perform the request
	response = requests.post("https://scopenews.co.uk/api/opinion", headers={"Key": "<YOUR_API_KEY>", "Content-Type": "application/json; charset=utf-8"}, data=json.dumps(post_data))
	# if error making request
	if response.status_code != 200:
		# print error message
		print(response.content)
	# if request was successful
	else:
		# print data
		print(response.json())
								

Social - fetch all social media posts about a specific headline.


	[POST] https://scopenews.co.uk/api/social

	Arguments:
		group [int]: The id of the headline for which to fetch social posts on.
		limit [int] (default - 3): The maximum number of social posts to retrieve.

	Returns:
		array[social_posts]
		social_post:
			text: The body of the social media post.
			author: Who posted it.
			source: The platform it was posted on.
			url: A link to the original post.
								

Python Example:


	import requests, json
	# declare post parameters
	post_data = {"group": 2103}
	# perform the request
	response = requests.post("https://scopenews.co.uk/api/social", headers={"Key": "<YOUR_API_KEY>", "Content-Type": "application/json; charset=utf-8"}, data=json.dumps(post_data))
	# if error making request
	if response.status_code != 200:
		# print error message
		print(response.content)
	# if request was successful
	else:
		# print data
		print(response.json())
								

Discover - fetch a set of articles the user is likely to be interested in.


	[POST] https://scopenews.co.uk/api/discover

	Arguments:
		page [int] (default - 0): Results are returned in groups of 20. To return the next best matching 20 increment page by 1.
		topic [list] (default - none): The news topic ids which to check for headlines within.
		source [list] (default - none): The news source ids which to check for headlines from.
		exclude [list] (default - none): The news source ids which explicitly not to check for headlines from. Useful when used in combination with 'topic'.
		custom_show_topic [list] (default - none): Custom topics to look for news within, e.g. Brexit.
		custom_hide_topic [list] (default - none): Custom topics which explicitly to ignore when looking for news headline.
		threshold [float] (optional): The desired happiness of the news articles from negative to positive [-1, 1]
		seen_articles [dict] (default - none): A list of article ids not to return, formated as {id1: None, id2: None, ...}.
		paywall_setting [string] (default - 'always'): Whether or not to return news from paywall sources. Options are 'always' and 'never'.

	Returns:
		array[articles]
		article:
			title: The article's headline.
			description: A short summary of the article.
			publishedAt: The timestamp of when the article was published.
			source: The publishers news source id.
			sourceName: The publishers news source name.
			category: The topic id of which the article is about.
			categoryName: The topic name of which the article is about.
			url: A link to the original article.
			urlToImage: A link to the articles image.
			...
								

Python Example:


	import requests, json
	# declare personalisation parameters
	post_data = {"topic": ["politics", "science and technology"], "custom_hide_topic": ["donald trump"]}
	# perform the request
	response = requests.post("https://scopenews.co.uk/api/discover", headers={"Key": "<YOUR_API_KEY>", "Content-Type": "application/json; charset=utf-8"}, data=json.dumps(post_data))
	# if error making request
	if response.status_code != 200:
		# print error message
		print(response.content)
	# if request was successful
	else:
		# print data
		print(response.json())
								

Video - fetch all the videos about a specific headline.


	[POST] https://scopenews.co.uk/api/video

	Arguments:
		group [int]: The id of the headline for which to fetch videos on.
		limit [int] (default - 3): The maximum number of videos to retrieve.

	Returns:
		array[videos]
		video:
			title: The name of the video.
			length: How long the video is in seconds.
			author: Who posted it.
			source: The platform it was posted on.
			url: A link to the video.
								

Python Example:


	import requests, json
	# declare post parameters
	post_data = {"group": 2103}
	# perform the request
	response = requests.post("https://scopenews.co.uk/api/video", headers={"Key": "<YOUR_API_KEY>", "Content-Type": "application/json; charset=utf-8"}, data=json.dumps(post_data))
	# if error making request
	if response.status_code != 200:
		# print error message
		print(response.content)
	# if request was successful
	else:
		# print data
		print(response.json())