Endpoints

We provide a variety of both retrieval and analysis features in the News API that allow you to search, collect and analyze news content at scale.

Our retrieval endpoints:

Our analysis endpoints:

Stories

Download and install SDKs from here.

/* 
  View all parameters and methods here:
  https://github.com/AYLIEN/aylien_newsapi_nodejs/blob/master/docs/DefaultApi.md#listStories
*/

var AylienNewsApi = require('aylien-news-api');

var apiInstance = new AylienNewsApi.DefaultApi();

// Configure API key authorization: app_id
var app_id = apiInstance.apiClient.authentications['app_id'];
app_id.apiKey = "YOUR_APP_ID";

// Configure API key authorization: app_key
var app_key = apiInstance.apiClient.authentications['app_key'];
app_key.apiKey = "YOUR_APP_KEY";

var opts = { 
  'id': [56],
  'notId': [154211],
  'title': "startup AND (raise OR raised OR raising OR raises)",
  'body': "startup",
  'text': "startup company",
  'language': ["en", "de"],
  'notLanguage': ["es", "it"],
  'publishedAtStart': "NOW-10DAYS",
  'publishedAtEnd': "NOW",
  'categoriesTaxonomy': "iptc-subjectcode",
  'categoriesConfident': true,
  'categoriesId': ["11000000"],
  'notCategoriesId': ["04002001"],
  'categoriesLevel': [1],
  'notCategoriesLevel': [3],
  'entitiesTitleText': ["GNU/Linux"],
  'notEntitiesTitleText': ["Microsoft", "Google"],
  'entitiesTitleType': ["Software", "Organization"],
  'notEntitiesTitleType': ["Person", "Agent"],
  'entitiesTitleLinksDbpedia': ["http://dbpedia.org/resource/Linux"],
  'notEntitiesTitleLinksDbpedia': ["http://dbpedia.org/resource/Windows"],
  'entitiesBodyText': ["Free Software"],
  'notEntitiesBodyText': ["Open Source"],
  'entitiesBodyType': ["Software", "Organization"],
  'notEntitiesBodyType': ["Person", "Agent"],
  'entitiesBodyLinksDbpedia': ["http://dbpedia.org/resource/Linux"],
  'notEntitiesBodyLinksDbpedia': ["http://dbpedia.org/resource/Microsoft"],
  'sentimentTitlePolarity': "positive",
  'notSentimentTitlePolarity': "neutral",
  'sentimentBodyPolarity': "negative",
  'notSentimentBodyPolarity': "neutral",
  'mediaImagesCountMin': 1,
  'mediaImagesCountMax': 2,
  'mediaImagesWidthMin': 640,
  'mediaImagesWidthMax': 1024,
  'mediaImagesHeightMin': 480,
  'mediaImagesHeightMax': 800,
  'mediaImagesContentLengthMin': 25412,
  'mediaImagesContentLengthMax': 369521,
  'mediaImagesFormat': ['JPEG', 'BMP', 'GIF'],
  'notMediaImagesFormat': ['TIFF', 'PNG'],
  'mediaVideosCountMin': 2,
  'mediaVideosCountMax': 2,
  'authorId': [5411],
  'notAuthorId': [65211],
  'authorName': "John Doe",
  'notAuthorName': "Mike Wali",
  'sourceId': [1422],
  'notSourceId': [51],
  'sourceName': ["BBC"],
  'notSourceName': ["Fox News"],
  'sourceDomain': ["bbc.co.uk"],
  'notSourceDomain': ["foxnews.com"],
  'sourceLocationsCountry': ["US"],
  'notSourceLocationsCountry': ["IE"],
  'sourceLocationsState': ["California"],
  'notSourceLocationsState': ["Arizona"],
  'sourceLocationsCity': ["Los Angeles"],
  'notSourceLocationsCity': ["Chandler"],
  'sourceScopesCountry': ["IE"],
  'notSourceScopesCountry': ["IT"],
  'sourceScopesState': ["Co Dublin"],
  'notSourceScopesState': ["Co Wicklow"],
  'sourceScopesCity': ["Dublin City"],
  'notSourceScopesCity': ["Cork"],
  'sourceScopesLevel': ["local"],
  'notSourceScopesLevel': ["national"],
  'sourceLinksInCountMin': 254111,
  'sourceLinksInCountMax': 352541,
  'sourceRankingsAlexaRankMin': 36,
  'sourceRankingsAlexaRankMax': 500,
  'sourceRankingsAlexaCountry': ["IE"],
  'socialSharesCountFacebookMin': 3521,
  'socialSharesCountFacebookMax': 5841,
  'socialSharesCountGooglePlusMin': 2514,
  'socialSharesCountGooglePlusMax': 36521,
  'socialSharesCountLinkedinMin': 6521,
  'socialSharesCountLinkedinMax': 36521,
  'socialSharesCountRedditMin': 14125,
  'socialSharesCountRedditMax': 95412,
  'cluster': false,
  'clusterAlgorithm': "kmeans",
  '_return': ["id", "title"],
  'sortBy': "published_at",
  'sortDirection': "desc",
  'cursor': "*",
  'perPage': 10
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + JSON.stringify(data));
  }
};
apiInstance.listStories(opts, callback);
# View all parameters and methods here:
# https://github.com/AYLIEN/aylien_newsapi_python/blob/master/docs/DefaultApi.md#list_stories

import aylien_news_api
from aylien_news_api.rest import ApiException
from pprint import pprint

# Configure API key authorization: app_id
aylien_news_api.configuration.api_key['X-AYLIEN-NewsAPI-Application-ID'] = 'YOUR_APP_ID'
# Configure API key authorization: app_key
aylien_news_api.configuration.api_key['X-AYLIEN-NewsAPI-Application-Key'] = 'YOUR_APP_KEY'

# create an instance of the API class
api_instance = aylien_news_api.DefaultApi()


opts = { 
    'id': [521411],
    'not_id': [2511],
    'title': 'startup AND (raise OR raised OR raising OR raises)',
    'body': 'startup',
    'text': 'startup company',
    'language': ['en', 'it'],
    'not_language': ['es', 'pt'],
    'published_at_start': 'NOW-10DAYS',
    'published_at_end': 'NOW',
    'categories_taxonomy': 'iab-qag',
    'categories_confident': True,
    'categories_id': ['IAB15', 'IAB1-2'],
    'not_categories_id': ['IAB10', 'IAB3'],
    'categories_level': [1],
    'not_categories_level': [2],
    'entities_title_text': ['GNU/Linux'],
    'not_entities_title_text': ['Microsoft', 'Google'],
    'entities_title_type': ['Software', 'Organization'],
    'not_entities_title_type': ['Agent', 'Person'],
    'entities_title_links_dbpedia': ['http://dbpedia.org/resource/Donald_Trump'],
    'not_entities_title_links_dbpedia': ['http://dbpedia.org/resource/Windows'],
    'entities_body_text': ['GNU/Linux', 'Microsoft'],
    'not_entities_body_text': ['Windows Vista', 'Windows XP'],
    'entities_body_type': ['Software', 'Organization'],
    'not_entities_body_type': ['Agent', 'Person'],
    'entities_body_links_dbpedia': ['http://dbpedia.org/resource/Microsoft'],
    'not_entities_body_links_dbpedia': ['http://dbpedia.org/resource/Google'],
    'sentiment_title_polarity': 'positive',
    'not_sentiment_title_polarity': 'neutral',
    'sentiment_body_polarity': 'negative',
    'not_sentiment_body_polarity': 'positive',
    'media_images_count_min': 1,
    'media_images_count_max': 10,
    'media_images_width_min': 640,
    'media_images_width_max': 1024,
    'media_images_height_min': 480,
    'media_images_height_max': 800,
    'media_images_content_length_min': 25411,
    'media_images_content_length_max': 369541,
    'media_images_format': ['JPEG', 'BMP', 'GIF'],
    'not_media_images_format': ['PNG', 'TIFF'],
    'media_videos_count_min': 3,
    'media_videos_count_max': 5,
    'author_id': [352],
    'not_author_id': [541],
    'author_name': 'John Doe',
    'not_author_name': 'Mike Wally',
    'source_id': [1456],
    'not_source_id': [142],
    'source_name': ['BBC'],
    'not_source_name': ['Fox News'],
    'source_domain': ['bbc.co.uk'],
    'not_source_domain': ['foxnews.com'],
    'source_locations_country': ['US'],
    'not_source_locations_country': ['BR'],
    'source_locations_state': ['California'],
    'not_source_locations_state': ['Berkshire'],
    'source_locations_city': ['London'],
    'not_source_locations_city': ['Dublin'],
    'source_scopes_country': ['IE'],
    'not_source_scopes_country': ['IN'],
    'source_scopes_state': ['Tehran'],
    'not_source_scopes_state': ['Berkshire'],
    'source_scopes_city': ['Dublin'],
    'not_source_scopes_city': ['New York City'],
    'source_scopes_level': ['local'],
    'not_source_scopes_level': ['national'],
    'source_links_in_count_min': 401444,
    'source_links_in_count_max': 500000,
    'source_rankings_alexa_rank_min': 3,
    'source_rankings_alexa_rank_max': 100,
    'source_rankings_alexa_country': ['IE'],
    'social_shares_count_facebook_min': 3521,
    'social_shares_count_facebook_max': 2514,
    'social_shares_count_google_plus_min': 6521,
    'social_shares_count_google_plus_max': 36524,
    'social_shares_count_linkedin_min': 6528,
    'social_shares_count_linkedin_max': 952141,
    'social_shares_count_reddit_min': 14251,
    'social_shares_count_reddit_max': 95874,
    'cluster': False,
    'cluster_algorithm': 'kmeans',
    '_return': ['id', 'title'],
    'sort_by': 'published_at',
    'sort_direction': 'desc',
    'cursor': '*',
    'per_page': 10
}

try: 
    # List Stories
    api_response = api_instance.list_stories(**opts)
    pprint(api_response)
except ApiException as e:
    pprint("Exception when calling DefaultApi->list_stories: %s\n" % e)
<?php
/* 
  View all parameters and methods here:
  https://github.com/AYLIEN/aylien_newsapi_php/blob/master/docs/Api/DefaultApi.md#listStories
*/

require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: app_id
Aylien\NewsApi\Configuration::getDefaultConfiguration()->setApiKey('X-AYLIEN-NewsAPI-Application-ID', 'YOUR_APP_ID');

// Configure API key authorization: app_key
Aylien\NewsApi\Configuration::getDefaultConfiguration()->setApiKey('X-AYLIEN-NewsAPI-Application-Key', 'YOUR_APP_KEY');

$api_instance = new Aylien\NewsApi\Api\DefaultApi();


$opts = array(
    'id' => array(36521),
    'not_id' => array(36222),
    'title' => "startup AND (raise OR raised OR raising OR raises)",
    'body' => "startup",
    'text' => "startup company",
    'language' => array("en","pt"),
    'not_language' => array("es","it"),
    'published_at_start' => "NOW-10DAYS",
    'published_at_end' => "NOW",
    'categories_taxonomy' => "iptc-subjectcode",
    'categories_confident' => false,
    'categories_id' => array("11000000","11003000"),
    'not_categories_id' => array("04001001"),
    'categories_level' => array(1),
    'not_categories_level' => array(2,3),
    'entities_title_text' => array("GNU/Linux","Microsoft"),
    'not_entities_title_text' => array("Windows","Ireland"),
    'entities_title_type' => array("Software","Organization"),
    'not_entities_title_type' => array("Agent","Person"),
    'entities_title_links_dbpedia' => array("http://dbpedia.org/resource/Linux"),
    'not_entities_title_links_dbpedia' => array("http://dbpedia.org/resource/Microsoft"),
    'entities_body_text' => array("Free Software","Open Source"),
    'not_entities_body_text' => array("Proprietary Software"),
    'entities_body_type' => array("Software","Organization"),
    'not_entities_body_type' => array("Agent","Hardware"),
    'entities_body_links_dbpedia' => array("http://dbpedia.org/resource/Linux"),
    'not_entities_body_links_dbpedia' => array("http://dbpedia.org/resource/Windows"),
    'sentiment_title_polarity' => "positive",
    'not_sentiment_title_polarity' => "neutral",
    'sentiment_body_polarity' => "negative",
    'not_sentiment_body_polarity' => "positive",
    'media_images_count_min' => 1,
    'media_images_count_max' => 4,
    'media_images_width_min' => 640,
    'media_images_width_max' => 1024,
    'media_images_height_min' => 480,
    'media_images_height_max' => 800,
    'media_images_content_length_min' => 25412,
    'media_images_content_length_max' => 369541,
    'media_images_format' => array("JPEG","BMP", "GIF"),
    'not_media_images_format' => array("PNG","TIFF"),
    'media_videos_count_min' => 2,
    'media_videos_count_max' => 5,
    'author_id' => array(4155),
    'not_author_id' => array(3214),
    'author_name' => "John Doe",
    'not_author_name' => "Mike Wally",
    'source_id' => array(122),
    'not_source_id' => array(12, 34),
    'source_name' => array("BBC"),
    'not_source_name' => array("Fox News"),
    'source_domain' => array("bbc.co.uk"),
    'not_source_domain' => array("foxnews.com"),
    'source_locations_country' => array("US", "IE"),
    'not_source_locations_country' => array("IN", "NG"),
    'source_locations_state' => array("California"),
    'not_source_locations_state' => array("Arizona"),
    'source_locations_city' => array("Los Angeles"),
    'not_source_locations_city' => array("Dublin City"),
    'source_scopes_country' => array("IN", "IE"),
    'not_source_scopes_country' => array("US"),
    'source_scopes_state' => array("Wicklow"),
    'not_source_scopes_state' => array("California"),
    'source_scopes_city' => array("Dublin City"),
    'not_source_scopes_city' => array("Cork"),
    'source_scopes_level' => array("local"),
    'not_source_scopes_level' => array("international"),
    'source_links_in_count_min' => 254111,
    'source_links_in_count_max' => 587796,
    'source_rankings_alexa_rank_min' => 255,
    'source_rankings_alexa_rank_max' => 1421,
    'source_rankings_alexa_country' => array("IE"),
    'social_shares_count_facebook_min' => 3521,
    'social_shares_count_facebook_max' => 5841,
    'social_shares_count_google_plus_min' => 65241,
    'social_shares_count_google_plus_max' => 105214,
    'social_shares_count_linkedin_min' => 3254,
    'social_shares_count_linkedin_max' => 5621,
    'social_shares_count_reddit_min' => 255,
    'social_shares_count_reddit_max' => 9541,
    'cluster' => false,
    'cluster_algorithm' => "kmeans",
    'return' => array("id", "title"),
    'sort_by' => "relevance",
    'sort_direction' => "desc",
    'cursor' => "*",
    'per_page' => 8
);

try {
    $result = $api_instance->listStories($opts);
    print_r($result);
} catch (Exception $e) {
    print_r($e->getResponseObject()->getErrors());
    echo 'Exception when calling DefaultApi->listStories: ', $e->getMessage(), PHP_EOL;
}
?>
/* 
  View all parameters and methods here:
  https://github.com/AYLIEN/aylien_newsapi_java/blob/master/docs/DefaultApi.md#listStories
*/

import com.aylien.newsapi.*;
import com.aylien.newsapi.auth.*;
import com.aylien.newsapi.models.*;
import com.aylien.newsapi.parameters.*;
import com.aylien.newsapi.api.DefaultApi;

import java.util.Arrays;
import java.util.List;

public class Main {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: app_id
        ApiKeyAuth app_id = (ApiKeyAuth) defaultClient.getAuthentication("app_id");
        app_id.setApiKey("YOUR_APP_ID");

        // Configure API key authorization: app_key
        ApiKeyAuth app_key = (ApiKeyAuth) defaultClient.getAuthentication("app_key");
        app_key.setApiKey("YOUR_APP_KEY");

        DefaultApi apiInstance = new DefaultApi();

        List<Long> id = Arrays.asList(985744L);
        List<Long> notId = Arrays.asList(5241L, 4412L);
        String title = "startup AND (raise OR raised OR raising OR raises)";
        String body = "startup";
        String text = "startup company";
        List<String> language = Arrays.asList("en", "es", "es");
        List<String> notLanguage = Arrays.asList("fr", "pt", "it");
        String publishedAtStart = "NOW-3MONTHS/DAY";
        String publishedAtEnd = "NOW-10DAYS";
        String categoriesTaxonomy = "iab-qag";
        Boolean categoriesConfident = true;
        List<String> categoriesId = Arrays.asList("IAB15", "IAB13-1");
        List<String> notCategoriesId = Arrays.asList("IAB3-2");
        List<Integer> categoriesLevel = Arrays.asList(2);
        List<Integer> notCategoriesLevel = Arrays.asList(1, 3);
        List<String> entitiesTitleText = Arrays.asList("GNU/Linux", "Microsoft Windows");
        List<String> notEntitiesTitleText = Arrays.asList("Ireland", "Dublin");
        List<String> entitiesTitleType = Arrays.asList("Software", "Organization");
        List<String> notEntitiesTitleType = Arrays.asList("Agent", "Person");
        List<String> entitiesTitleLinksDbpedia = Arrays.asList("http://dbpedia.org/resource/Linux");
        List<String> notEntitiesTitleLinksDbpedia = Arrays.asList("http://dbpedia.org/resource/Windows");
        List<String> entitiesBodyText = Arrays.asList("GNU/Linux", "Microsoft Windows");
        List<String> notEntitiesBodyText = Arrays.asList("Trump");
        List<String> entitiesBodyType = Arrays.asList("Agent", "Person");
        List<String> notEntitiesBodyType = Arrays.asList("Software", "Organization");
        List<String> entitiesBodyLinksDbpedia = Arrays.asList("entitiesBodyLinksDbpedia_example");
        List<String> notEntitiesBodyLinksDbpedia = Arrays.asList("http://dbpedia.org/resource/Linux");
        String sentimentTitlePolarity = "negative";
        String notSentimentTitlePolarity = "positive";
        String sentimentBodyPolarity = "neutral";
        String notSentimentBodyPolarity = "negative";
        Integer mediaImagesCountMin = 2;
        Integer mediaImagesCountMax = 4;
        Integer mediaImagesWidthMin = 640;
        Integer mediaImagesWidthMax = 1024;
        Integer mediaImagesHeightMin = 480;
        Integer mediaImagesHeightMax = 800;
        Integer mediaImagesContentLengthMin = 25411;
        Integer mediaImagesContentLengthMax = 369541;
        List<String> mediaImagesFormat = Arrays.asList("JPEG", "BMP", "GIF");
        List<String> notMediaImagesFormat = Arrays.asList("PNG", "TIFF");
        Integer mediaVideosCountMin = 1;
        Integer mediaVideosCountMax = 2;
        List<Integer> authorId = Arrays.asList(36521);
        List<Integer> notAuthorId = Arrays.asList(2541);
        String authorName = "John Doe";
        String notAuthorName = "Mike Wally";
        List<Integer> sourceId = Arrays.asList(1411);
        List<Integer> notSourceId = Arrays.asList(251);
        List<String> sourceName = Arrays.asList("BBC");
        List<String> notSourceName = Arrays.asList("Fox News");
        List<String> sourceDomain = Arrays.asList("bbc.co.uk");
        List<String> notSourceDomain = Arrays.asList("foxnews.com");
        List<String> sourceLocationsCountry = Arrays.asList("US", "IE");
        List<String> notSourceLocationsCountry = Arrays.asList("IR");
        List<String> sourceLocationsState = Arrays.asList("California");
        List<String> notSourceLocationsState = Arrays.asList("Arizona");
        List<String> sourceLocationsCity = Arrays.asList("Los Angeles");
        List<String> notSourceLocationsCity = Arrays.asList("Dublin City");
        List<String> sourceScopesCountry = Arrays.asList("IE", "NG");
        List<String> notSourceScopesCountry = Arrays.asList("US", "GB");
        List<String> sourceScopesState = Arrays.asList("Co Dublin");
        List<String> notSourceScopesState = Arrays.asList("Co Wicklow");
        List<String> sourceScopesCity = Arrays.asList("Dublin City");
        List<String> notSourceScopesCity = Arrays.asList("Cork");
        List<String> sourceScopesLevel = Arrays.asList("national");
        List<String> notSourceScopesLevel = Arrays.asList("local");
        Integer sourceLinksInCountMin = 354211;
        Integer sourceLinksInCountMax = 587412;
        Integer sourceRankingsAlexaRankMin = 10;
        Integer sourceRankingsAlexaRankMax = 2500;
        List<String> sourceRankingsAlexaCountry = Arrays.asList("IE");
        Integer socialSharesCountFacebookMin = 3521;
        Integer socialSharesCountFacebookMax = 5841;
        Integer socialSharesCountGooglePlusMin = 2514;
        Integer socialSharesCountGooglePlusMax = 36521;
        Integer socialSharesCountLinkedinMin = 6521;
        Integer socialSharesCountLinkedinMax = 36521;
        Integer socialSharesCountRedditMin = 14125;
        Integer socialSharesCountRedditMax = 95412;
        Boolean cluster = false;
        String clusterAlgorithm = "kmeans";
        List<String> _return = Arrays.asList("id", "title");
        String sortBy = "published_at";
        String sortDirection = "desc";
        String cursor = "*";
        Integer perPage = 10;

        StoriesParams.Builder storiesBuilder = StoriesParams.newBuilder();

        storiesBuilder.setId(id);
        storiesBuilder.setNotId(notId);
        storiesBuilder.setTitle(title);
        storiesBuilder.setBody(body);
        storiesBuilder.setText(text);
        storiesBuilder.setLanguage(language);
        storiesBuilder.setNotLanguage(notLanguage);
        storiesBuilder.setPublishedAtStart(publishedAtStart);
        storiesBuilder.setPublishedAtEnd(publishedAtEnd);
        storiesBuilder.setCategoriesTaxonomy(categoriesTaxonomy);
        storiesBuilder.setCategoriesConfident(categoriesConfident);
        storiesBuilder.setCategoriesId(categoriesId);
        storiesBuilder.setNotCategoriesId(notCategoriesId);
        storiesBuilder.setCategoriesLevel(categoriesLevel);
        storiesBuilder.setNotCategoriesLevel(notCategoriesLevel);
        storiesBuilder.setEntitiesTitleText(entitiesTitleText);
        storiesBuilder.setNotEntitiesTitleText(notEntitiesTitleText);
        storiesBuilder.setEntitiesTitleType(entitiesTitleType);
        storiesBuilder.setNotEntitiesTitleType(notEntitiesTitleType);
        storiesBuilder.setEntitiesTitleLinksDbpedia(entitiesTitleLinksDbpedia);
        storiesBuilder.setNotEntitiesTitleLinksDbpedia(notEntitiesTitleLinksDbpedia);
        storiesBuilder.setEntitiesBodyText(entitiesBodyText);
        storiesBuilder.setNotEntitiesBodyText(notEntitiesBodyText);
        storiesBuilder.setEntitiesBodyType(entitiesBodyType);
        storiesBuilder.setNotEntitiesBodyType(notEntitiesBodyType);
        storiesBuilder.setEntitiesBodyLinksDbpedia(entitiesBodyLinksDbpedia);
        storiesBuilder.setNotEntitiesBodyLinksDbpedia(notEntitiesBodyLinksDbpedia);
        storiesBuilder.setSentimentTitlePolarity(sentimentTitlePolarity);
        storiesBuilder.setNotSentimentTitlePolarity(notSentimentTitlePolarity);
        storiesBuilder.setSentimentBodyPolarity(sentimentBodyPolarity);
        storiesBuilder.setNotSentimentBodyPolarity(notSentimentBodyPolarity);
        storiesBuilder.setMediaImagesCountMin(mediaImagesCountMin);
        storiesBuilder.setMediaImagesCountMax(mediaImagesCountMax);
        storiesBuilder.setMediaImagesWidthMin(mediaImagesWidthMin);
        storiesBuilder.setMediaImagesWidthMax(mediaImagesWidthMax);
        storiesBuilder.setMediaImagesHeightMin(mediaImagesHeightMin);
        storiesBuilder.setMediaImagesHeightMax(mediaImagesHeightMax);
        storiesBuilder.setMediaImagesContentLengthMin(mediaImagesContentLengthMin);
        storiesBuilder.setMediaImagesContentLengthMax(mediaImagesContentLengthMax);
        storiesBuilder.setMediaImagesFormat(mediaImagesFormat);
        storiesBuilder.setNotMediaImagesFormat(notMediaImagesFormat);
        storiesBuilder.setMediaVideosCountMin(mediaVideosCountMin);
        storiesBuilder.setMediaVideosCountMax(mediaVideosCountMax);
        storiesBuilder.setAuthorId(authorId);
        storiesBuilder.setNotAuthorId(notAuthorId);
        storiesBuilder.setAuthorName(authorName);
        storiesBuilder.setNotAuthorName(notAuthorName);
        storiesBuilder.setSourceId(sourceId);
        storiesBuilder.setNotSourceId(notSourceId);
        storiesBuilder.setSourceName(sourceName);
        storiesBuilder.setNotSourceName(notSourceName);
        storiesBuilder.setSourceDomain(sourceDomain);
        storiesBuilder.setNotSourceDomain(notSourceDomain);
        storiesBuilder.setSourceLocationsCountry(sourceLocationsCountry);
        storiesBuilder.setNotSourceLocationsCountry(notSourceLocationsCountry);
        storiesBuilder.setSourceLocationsState(sourceLocationsState);
        storiesBuilder.setNotSourceLocationsState(notSourceLocationsState);
        storiesBuilder.setSourceLocationsCity(sourceLocationsCity);
        storiesBuilder.setNotSourceLocationsCity(notSourceLocationsCity);
        storiesBuilder.setSourceScopesCountry(sourceScopesCountry);
        storiesBuilder.setNotSourceScopesCountry(notSourceScopesCountry);
        storiesBuilder.setSourceScopesState(sourceScopesState);
        storiesBuilder.setNotSourceScopesState(notSourceScopesState);
        storiesBuilder.setSourceScopesCity(sourceScopesCity);
        storiesBuilder.setNotSourceScopesCity(notSourceScopesCity);
        storiesBuilder.setSourceScopesLevel(sourceScopesLevel);
        storiesBuilder.setNotSourceScopesLevel(notSourceScopesLevel);
        storiesBuilder.setSourceLinksInCountMin(sourceLinksInCountMin);
        storiesBuilder.setSourceLinksInCountMax(sourceLinksInCountMax);
        storiesBuilder.setSourceRankingsAlexaRankMin(sourceRankingsAlexaRankMin);
        storiesBuilder.setSourceRankingsAlexaRankMax(sourceRankingsAlexaRankMax);
        storiesBuilder.setSourceRankingsAlexaCountry(sourceRankingsAlexaCountry);
        storiesBuilder.setSocialSharesCountFacebookMin(socialSharesCountFacebookMin);
        storiesBuilder.setSocialSharesCountFacebookMax(socialSharesCountFacebookMax);
        storiesBuilder.setSocialSharesCountGooglePlusMin(socialSharesCountGooglePlusMin);
        storiesBuilder.setSocialSharesCountGooglePlusMax(socialSharesCountGooglePlusMax);
        storiesBuilder.setSocialSharesCountLinkedinMin(socialSharesCountLinkedinMin);
        storiesBuilder.setSocialSharesCountLinkedinMax(socialSharesCountLinkedinMax);
        storiesBuilder.setSocialSharesCountRedditMin(socialSharesCountRedditMin);
        storiesBuilder.setSocialSharesCountRedditMax(socialSharesCountRedditMax);
        storiesBuilder.setCluster(cluster);
        storiesBuilder.setClusterAlgorithm(clusterAlgorithm);
        storiesBuilder.set_return(_return);
        storiesBuilder.setSortBy(sortBy);
        storiesBuilder.setSortDirection(sortDirection);
        storiesBuilder.setCursor(cursor);
        storiesBuilder.setPerPage(perPage);

        try {
            Stories result = apiInstance.listStories(storiesBuilder.build());
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#listStories");
            e.printStackTrace();
        }
    }
}
# View all parameters and methods here:
# https://github.com/AYLIEN/aylien_newsapi_ruby/blob/master/docs/DefaultApi.md#list_stories

# load the gem
require 'aylien_news_api'

# setup authorization
AylienNewsApi.configure do |config|
  # Configure API key authorization: app_id
  config.api_key['X-AYLIEN-NewsAPI-Application-ID'] = 'YOUR_APP_ID'

  # Configure API key authorization: app_key
  config.api_key['X-AYLIEN-NewsAPI-Application-Key'] = 'YOUR_APP_KEY'
end

api_instance = AylienNewsApi::DefaultApi.new

opts = { 
  id: [5411],
  not_id: [3625],
  title: "startup AND (raise OR raised OR raising OR raises)",
  body: "startup",
  text: "startup company",
  language: ["en", "fr"],
  not_language: ["es", "it"],
  published_at_start: "NOW-10DAYS",
  published_at_end: "NOW",
  categories_taxonomy: "iptc-subjectcode",
  categories_confident: true,
  categories_id: ["11000000", "02000000"],
  not_categories_id: ["11001000", "10000000"],
  categories_level: [3],
  not_categories_level: [1, 2],
  entities_title_text: ["GNU/Linux", "Microsoft"],
  not_entities_title_text: ["Google", "Windows"],
  entities_title_type: ["Software", "Organization"],
  not_entities_title_type: ["Agent", "Person"],
  entities_title_links_dbpedia: ["http://dbpedia.org/resource/Linux"],
  not_entities_title_links_dbpedia: ["http://dbpedia.org/resource/Windows"],
  entities_body_text: ["Free Software", "Open Source"],
  not_entities_body_text: ["Barack Obama", "Trump"],
  entities_body_type: ["Software", "Organization"],
  not_entities_body_type: ["Agent", "Person"],
  entities_body_links_dbpedia: ["http://dbpedia.org/resource/Linux"],
  not_entities_body_links_dbpedia: ["http://dbpedia.org/resource/Windows"],
  sentiment_title_polarity: "positive",
  not_sentiment_title_polarity: "neutral",
  sentiment_body_polarity: "negative",
  not_sentiment_body_polarity: "positive",
  media_images_count_min: 3,
  media_images_count_max: 3,
  media_images_width_min: 640,
  media_images_width_max: 1024,
  media_images_height_min: 480,
  media_images_height_max: 800,
  media_images_content_length_min: 25411,
  media_images_content_length_max: 369541,
  media_images_format: ["JPEG", "BMP", "GIF"],
  not_media_images_format: ["TIFF", "PNG"],
  media_videos_count_min: 1,
  media_videos_count_max: 2,
  author_id: [4155],
  not_author_id: [2541],
  author_name: "John Doe",
  not_author_name: "Mike Wally",
  source_id: [124],
  not_source_id: [54],
  source_name: ["BBC"],
  not_source_name: ["Fox News"],
  source_domain: ["bbc.co.uk"],
  not_source_domain: ["foxnews.com"],
  source_locations_country: ["US", "IE"],
  not_source_locations_country: ["JP", "GB"],
  source_locations_state: ["California"],
  not_source_locations_state: ["Arizona"],
  source_locations_city: ["Los Angeles"],
  not_source_locations_city: ["Dublin City"],
  source_scopes_country: ["GB", "IE"],
  not_source_scopes_country: ["US", "JP"],
  source_scopes_state: ["Co Dublin"],
  not_source_scopes_state: ["Co Wicklow"],
  source_scopes_city: ["Cork"],
  not_source_scopes_city: ["Galway"],
  source_scopes_level: ["local"],
  not_source_scopes_level: ["national"],
  source_links_in_count_min: 126333,
  source_links_in_count_max: 521000,
  source_rankings_alexa_rank_min: 123,
  source_rankings_alexa_rank_max: 152,
  source_rankings_alexa_country: ["IE"],
  social_shares_count_facebook_min: 3521,
  social_shares_count_facebook_max: 5841,
  social_shares_count_google_plus_min: 2541,
  social_shares_count_google_plus_max: 36541,
  social_shares_count_linkedin_min: 6521,
  social_shares_count_linkedin_max: 32541,
  social_shares_count_reddit_min: 14521,
  social_shares_count_reddit_max: 95841,
  cluster: false,
  cluster_algorithm: "kmeans",
  _return: ["id", "title"],
  sort_by: "published_at",
  sort_direction: "desc",
  cursor: "*",
  per_page: 10
}

begin
  #List Stories
  result = api_instance.list_stories(opts)
  puts result
rescue AylienNewsApi::ApiError => e
  puts "Exception when calling DefaultApi->list_stories: #{e}"
  puts e.response_body
end
/*
  View all parameters and methods here:
  https://github.com/AYLIEN/aylien_newsapi_go/blob/master/docs/DefaultApi.md#liststories
*/

package main

// Import the library
import (
  "fmt"
  newsapi "github.com/AYLIEN/aylien_newsapi_go"
)

func main() {
  api := newsapi.NewDefaultApi()

  // Configure API key authorization: app_id
  api.Configuration.APIKeyPrefix["X-AYLIEN-NewsAPI-Application-ID"] = "YOUR_APP_ID"

  // Configure API key authorization: app_key
  api.Configuration.APIKeyPrefix["X-AYLIEN-NewsAPI-Application-Key"] = "YOUR_APP_KEY"

  id := []int64{2541}
  notId := []int64{5411, 6565}
  title := "startup AND (raise OR raised OR raising OR raises)"
  body := "startup"
  text := "startup company"
  language := []string{"en", "de"}
  notLanguage := []string{"it", "es"}
  publishedAtStart := "NOW-2MONTHS"
  publishedAtEnd := "NOW"
  categoriesTaxonomy := "iptc-subjectcode"
  categoriesConfident := "true"
  categoriesId := []string{"11000000"}
  notCategoriesId := []string{"10000000", "04001000"}
  categoriesLevel := []int32{3}
  notCategoriesLevel := []int32{1, 2}
  entitiesTitleText := []string{"GNU/Linux"}
  notEntitiesTitleText := []string{"Windows", "Microsoft"}
  entitiesTitleType := []string{"Software", "Organization"}
  notEntitiesTitleType := []string{"Person", "Agent"}
  entitiesTitleLinksDbpedia := []string{"http://dbpedia.org/resource/Linux"}
  notEntitiesTitleLinksDbpedia := []string{"http://dbpedia.org/resource/Windows"}
  entitiesBodyText := []string{"Free Software"}
  notEntitiesBodyText := []string{"Open Source Software"}
  entitiesBodyType := []string{"Software", "Organization"}
  notEntitiesBodyType := []string{"Agent", "Person"}
  entitiesBodyLinksDbpedia := []string{"http://dbpedia.org/resource/Linux"}
  notEntitiesBodyLinksDbpedia := []string{"http://dbpedia.org/resource/Microsoft"}
  sentimentTitlePolarity := "positive"
  notSentimentTitlePolarity := "neutral"
  sentimentBodyPolarity := "neutral"
  notSentimentBodyPolarity := "neutral"
  mediaImagesCountMin := "3"
  mediaImagesCountMax := "4"
  mediaImagesWidthMin := "640"
  mediaImagesWidthMax := "1024"
  mediaImagesHeightMin := "480"
  mediaImagesHeightMax := "800"
  mediaImagesContentLengthMin := "25412"
  mediaImagesContentLengthMax := "369521"
  mediaImagesFormat := []string{"JPEG", "BMP", "GIF"}
  notMediaImagesFormat := []string{"PNG", "TIFF"}
  mediaVideosCountMin := "1"
  mediaVideosCountMax := "2"
  authorId := []int32{144}
  notAuthorId := []int32{142, 455}
  authorName := "John Doe"
  notAuthorName := "Mike Wally"
  sourceId := []int32{163}
  notSourceId := []int32{354, 141}
  sourceName := []string{"BBC"}
  notSourceName := []string{"Fox News"}
  sourceDomain := []string{"bbc.co.uk"}
  notSourceDomain := []string{"foxnews.com"}
  sourceLocationsCountry := []string{"US"}
  notSourceLocationsCountry := []string{"IE", "IR"}
  sourceLocationsState := []string{"California"}
  notSourceLocationsState := []string{"Arizona"}
  sourceLocationsCity := []string{"Los Angeles"}
  notSourceLocationsCity := []string{"New York City"}
  sourceScopesCountry := []string{"IE"}
  notSourceScopesCountry := []string{"IE"}
  sourceScopesState := []string{"Co Dublin"}
  notSourceScopesState := []string{"Wicklow"}
  sourceScopesCity := []string{"Dublin City"}
  notSourceScopesCity := []string{"Cork"}
  sourceScopesLevel := []string{"local"}
  notSourceScopesLevel := []string{"national"}
  sourceLinksInCountMin := int32(142221)
  sourceLinksInCountMax := int32(325000)
  sourceRankingsAlexaRankMin := int32(1)
  sourceRankingsAlexaRankMax := int32(10)
  sourceRankingsAlexaCountry := []string{"IE"}
  socialSharesCountFacebookMin := "3521"
  socialSharesCountFacebookMax := "5841"
  socialSharesCountGooglePlusMin := "2514"
  socialSharesCountGooglePlusMax := "36521"
  socialSharesCountLinkedinMin := "6521"
  socialSharesCountLinkedinMax := "36521"
  socialSharesCountRedditMin := "14125"
  socialSharesCountRedditMax := "95412"
  cluster := "true"
  clusterAlgorithm := "kmeans"
  _return := []string{"id", "title"}
  sortBy := "hotness"
  sortDirection := "desc"
  cursor := "*"
  perPage := int32(10)

  storiesParams := &newsapi.StoriesParams{
    Id:                             id,
    NotId:                          notId,
    Title:                          title,
    Body:                           body,
    Text:                           text,
    Language:                       language,
    NotLanguage:                    notLanguage,
    PublishedAtStart:               publishedAtStart,
    PublishedAtEnd:                 publishedAtEnd,
    CategoriesTaxonomy:             categoriesTaxonomy,
    CategoriesConfident:            categoriesConfident,
    CategoriesId:                   categoriesId,
    NotCategoriesId:                notCategoriesId,
    CategoriesLevel:                categoriesLevel,
    NotCategoriesLevel:             notCategoriesLevel,
    EntitiesTitleText:              entitiesTitleText,
    NotEntitiesTitleText:           notEntitiesTitleText,
    EntitiesTitleType:              entitiesTitleType,
    NotEntitiesTitleType:           notEntitiesTitleType,
    EntitiesTitleLinksDbpedia:      entitiesTitleLinksDbpedia,
    NotEntitiesTitleLinksDbpedia:   notEntitiesTitleLinksDbpedia,
    EntitiesBodyText:               entitiesBodyText,
    NotEntitiesBodyText:            notEntitiesBodyText,
    EntitiesBodyType:               entitiesBodyType,
    NotEntitiesBodyType:            notEntitiesBodyType,
    EntitiesBodyLinksDbpedia:       entitiesBodyLinksDbpedia,
    NotEntitiesBodyLinksDbpedia:    notEntitiesBodyLinksDbpedia,
    SentimentTitlePolarity:         sentimentTitlePolarity,
    NotSentimentTitlePolarity:      notSentimentTitlePolarity,
    SentimentBodyPolarity:          sentimentBodyPolarity,
    NotSentimentBodyPolarity:       notSentimentBodyPolarity,
    MediaImagesCountMin:            mediaImagesCountMin,
    MediaImagesCountMax:            mediaImagesCountMax,
    MediaImagesWidthMin:            mediaImagesWidthMin,
    MediaImagesWidthMax:            mediaImagesWidthMax,
    MediaImagesHeightMin:           mediaImagesHeightMin,
    MediaImagesHeightMax:           mediaImagesHeightMax,
    MediaImagesContentLengthMin:    mediaImagesContentLengthMin,
    MediaImagesContentLengthMax:    mediaImagesContentLengthMax,
    MediaImagesFormat:              mediaImagesFormat,
    NotMediaImagesFormat:           notMediaImagesFormat,
    MediaVideosCountMin:            mediaVideosCountMin,
    MediaVideosCountMax:            mediaVideosCountMax,
    AuthorId:                       authorId,
    NotAuthorId:                    notAuthorId,
    AuthorName:                     authorName,
    NotAuthorName:                  notAuthorName,
    SourceId:                       sourceId,
    NotSourceId:                    notSourceId,
    SourceName:                     sourceName,
    NotSourceName:                  notSourceName,
    SourceDomain:                   sourceDomain,
    NotSourceDomain:                notSourceDomain,
    SourceLocationsCountry:         sourceLocationsCountry,
    NotSourceLocationsCountry:      notSourceLocationsCountry,
    SourceLocationsState:           sourceLocationsState,
    NotSourceLocationsState:        notSourceLocationsState,
    SourceLocationsCity:            sourceLocationsCity,
    NotSourceLocationsCity:         notSourceLocationsCity,
    SourceScopesCountry:            sourceScopesCountry,
    NotSourceScopesCountry:         notSourceScopesCountry,
    SourceScopesState:              sourceScopesState,
    NotSourceScopesState:           notSourceScopesState,
    SourceScopesCity:               sourceScopesCity,
    NotSourceScopesCity:            notSourceScopesCity,
    SourceScopesLevel:              sourceScopesLevel,
    NotSourceScopesLevel:           notSourceScopesLevel,
    SourceLinksInCountMin:          sourceLinksInCountMin,
    SourceLinksInCountMax:          sourceLinksInCountMax,
    SourceRankingsAlexaRankMin:     sourceRankingsAlexaRankMin,
    SourceRankingsAlexaRankMax:     sourceRankingsAlexaRankMax,
    SourceRankingsAlexaCountry:     sourceRankingsAlexaCountry,
    SocialSharesCountFacebookMin:   socialSharesCountFacebookMin,
    SocialSharesCountFacebookMax:   socialSharesCountFacebookMax,
    SocialSharesCountGooglePlusMin: socialSharesCountGooglePlusMin,
    SocialSharesCountGooglePlusMax: socialSharesCountGooglePlusMax,
    SocialSharesCountLinkedinMin:   socialSharesCountLinkedinMin,
    SocialSharesCountLinkedinMax:   socialSharesCountLinkedinMax,
    SocialSharesCountRedditMin:     socialSharesCountRedditMin,
    SocialSharesCountRedditMax:     socialSharesCountRedditMax,
    Cluster:                        cluster,
    ClusterAlgorithm:               clusterAlgorithm,
    Return:                         _return,
    SortBy:                         sortBy,
    SortDirection:                  sortDirection,
    Cursor:                         cursor,
    PerPage:                        perPage}

  storiesResponse, res, err := api.ListStories(storiesParams)
  if err != nil {
    panic(err)
  }

  _ = res

  fmt.Println(storiesResponse)
}
/* 
  View all parameters and methods here:
  https://github.com/AYLIEN/aylien_newsapi_csharp/blob/master/docs/DefaultApi.md#liststories
*/

using System;
using System.Diagnostics;
using Aylien.NewsApi.Api;
using Aylien.NewsApi.Client;
using Aylien.NewsApi.Model;
using System.Collections.Generic;

namespace Example
{
    public class ListStoriesExample
    {
        static void Main(string[] args)
        {
            // Configure API key authorization: app_id
            Configuration.Default.ApiKey.Add("X-AYLIEN-NewsAPI-Application-ID", "YOUR_APP_ID");

            // Configure API key authorization: app_key
            Configuration.Default.ApiKey.Add("X-AYLIEN-NewsAPI-Application-Key", "YOUR_APP_KEY");

            var apiInstance = new DefaultApi();

            var id = new List<long?>() { 54121 };
            var notId = new List<long?>() { 21451 };
            var title = "startup AND (raise OR raised OR raising OR raises)";
            var body = "startup";
            var text = "startup company";
            var language = new List<string>() { "en", "it" };
            var notLanguage = new List<string>() { "es", "pt" };
            var publishedAtStart = "NOW-10DAYS";
            var publishedAtEnd = "NOW";
            var categoriesTaxonomy = "iab-qag";
            var categoriesConfident = true;
            var categoriesId = new List<string>() { "IAB15" };
            var notCategoriesId = new List<string>() { "IAB2-3" };
            var categoriesLevel = new List<int?>() { 1 };
            var notCategoriesLevel = new List<int?>() { 2 };
            var entitiesTitleText = new List<string>() { "GNU/Linux", "Microsoft" };
            var notEntitiesTitleText = new List<string>() { "Windows" };
            var entitiesTitleType = new List<string>() { "Organization", "Software" };
            var notEntitiesTitleType = new List<string>() { "Person", "Agent" };
            var entitiesTitleLinksDbpedia = new List<string>() { "http://dbpedia.org/resource/Donald_Trump" };
            var notEntitiesTitleLinksDbpedia = new List<string>() { "http://dbpedia.org/resource/Linux" };
            var entitiesBodyText = new List<string>() { "GNU/Linux", "Apple" };
            var notEntitiesBodyText = new List<string>() { "Windows" };
            var entitiesBodyType = new List<string>() { "Person", "Agent" };
            var notEntitiesBodyType = new List<string>() { "Organization", "Software" };
            var entitiesBodyLinksDbpedia = new List<string>() { "http://dbpedia.org/resource/Windows" };
            var notEntitiesBodyLinksDbpedia = new List<string>() { "http://dbpedia.org/resource/Linux" };
            var sentimentTitlePolarity = "positive";
            var notSentimentTitlePolarity = "negative";
            var sentimentBodyPolarity = "neutral";
            var notSentimentBodyPolarity = "negative";
            var mediaImagesCountMin = 2;
            var mediaImagesCountMax = 10;
            var mediaImagesWidthMin = 640;
            var mediaImagesWidthMax = 1024;
            var mediaImagesHeightMin = 480;
            var mediaImagesHeightMax = 800;
            var mediaImagesContentLengthMin = 25411;
            var mediaImagesContentLengthMax = 369541;
            var mediaImagesFormat = new List<string>() { "JPEG", "BMP", "GIF" };
            var notMediaImagesFormat = new List<string>() { "PNG", "TIFF" };
            var mediaVideosCountMin = 1;
            var mediaVideosCountMax = 4;
            var authorId = new List<int?>() { 2154 };
            var notAuthorId = new List<int?>() { 5412 };
            var authorName = "John Doe";
            var notAuthorName = "Mike Wally";
            var sourceId = new List<int?>() { 1467 };
            var notSourceId = new List<int?>() { 1524 };
            var sourceName = new List<string>() { "BBC" };
            var notSourceName = new List<string>() { "Fox News" };
            var sourceDomain = new List<string>() { "bbc.co.uk" };
            var notSourceDomain = new List<string>() { "foxnews.com" };
            var sourceLocationsCountry = new List<string>() { "US", "IE" };
            var notSourceLocationsCountry = new List<string>() { "NG" };
            var sourceLocationsState = new List<string>() { "California" };
            var notSourceLocationsState = new List<string>() { "Arizona" };
            var sourceLocationsCity = new List<string>() { "Los Angeles" };
            var notSourceLocationsCity = new List<string>() { "New York City" };
            var sourceScopesCountry = new List<string>() { "NG", "IE" };
            var notSourceScopesCountry = new List<string>() { "US", "IR" };
            var sourceScopesState = new List<string>() { "Co Dublin" };
            var notSourceScopesState = new List<string>() { "Co Wicklow" };
            var sourceScopesCity = new List<string>() { "Dublin City" };
            var notSourceScopesCity = new List<string>() { "Cork" };
            var sourceScopesLevel = new List<string>() { "local" };
            var notSourceScopesLevel = new List<string>() { "national" };
            var sourceLinksInCountMin = 5000;
            var sourceLinksInCountMax = 10000;
            var sourceRankingsAlexaRankMin = 1;
            var sourceRankingsAlexaRankMax = 2000;
            var sourceRankingsAlexaCountry = new List<string>() { "IE" };
            var socialSharesCountFacebookMin = 3521;
            var socialSharesCountFacebookMax = 5841;
            var socialSharesCountGooglePlusMin = 251;
            var socialSharesCountGooglePlusMax = 6521;
            var socialSharesCountLinkedinMin = 4125;
            var socialSharesCountLinkedinMax = 15214;
            var socialSharesCountRedditMin = 1584;
            var socialSharesCountRedditMax = 95412;
            var cluster = true;
            var clusterAlgorithm = "kmeans";
            var _return = new List<string>() { "id", "title", "entities" };
            var sortBy = "published_at";
            var sortDirection = "asc";
            var cursor = "*";
            var perPage = 25;

            try
            {
                // List Stories
                Stories result = apiInstance.ListStories(
                    id: id,
                    notId: notId,
                    title: title,
                    body: body,
                    text: text,
                    language: language,
                    notLanguage: notLanguage,
                    publishedAtStart: publishedAtStart,
                    publishedAtEnd: publishedAtEnd,
                    categoriesTaxonomy: categoriesTaxonomy,
                    categoriesConfident: categoriesConfident,
                    categoriesId: categoriesId,
                    notCategoriesId: notCategoriesId,
                    categoriesLevel: categoriesLevel,
                    notCategoriesLevel: notCategoriesLevel,
                    entitiesTitleText: entitiesTitleText,
                    notEntitiesTitleText: notEntitiesTitleText,
                    entitiesTitleType: entitiesTitleType,
                    notEntitiesTitleType: notEntitiesTitleType,
                    entitiesTitleLinksDbpedia: entitiesTitleLinksDbpedia,
                    notEntitiesTitleLinksDbpedia: notEntitiesTitleLinksDbpedia,
                    entitiesBodyText: entitiesBodyText,
                    notEntitiesBodyText: notEntitiesBodyText,
                    entitiesBodyType: entitiesBodyType,
                    notEntitiesBodyType: notEntitiesBodyType,
                    entitiesBodyLinksDbpedia: entitiesBodyLinksDbpedia,
                    notEntitiesBodyLinksDbpedia: notEntitiesBodyLinksDbpedia,
                    sentimentTitlePolarity: sentimentTitlePolarity,
                    notSentimentTitlePolarity: notSentimentTitlePolarity,
                    sentimentBodyPolarity: sentimentBodyPolarity,
                    notSentimentBodyPolarity: notSentimentBodyPolarity,
                    mediaImagesCountMin: mediaImagesCountMin,
                    mediaImagesCountMax: mediaImagesCountMax,
                    mediaImagesWidthMin: mediaImagesWidthMin,
                    mediaImagesWidthMax: mediaImagesWidthMax,
                    mediaImagesHeightMin: mediaImagesHeightMin,
                    mediaImagesHeightMax: mediaImagesHeightMax,
                    mediaImagesContentLengthMin: mediaImagesContentLengthMin,
                    mediaImagesContentLengthMax: mediaImagesContentLengthMax,
                    mediaImagesFormat: mediaImagesFormat,
                    notMediaImagesFormat: notMediaImagesFormat,
                    mediaVideosCountMin: mediaVideosCountMin,
                    mediaVideosCountMax: mediaVideosCountMax,
                    authorId: authorId,
                    notAuthorId: notAuthorId,
                    authorName: authorName,
                    notAuthorName: notAuthorName,
                    sourceId: sourceId,
                    notSourceId: notSourceId,
                    sourceName: sourceName,
                    notSourceName: notSourceName,
                    sourceDomain: sourceDomain,
                    notSourceDomain: notSourceDomain,
                    sourceLocationsCountry: sourceLocationsCountry,
                    notSourceLocationsCountry: notSourceLocationsCountry,
                    sourceLocationsState: sourceLocationsState,
                    notSourceLocationsState: notSourceLocationsState,
                    sourceLocationsCity: sourceLocationsCity,
                    notSourceLocationsCity: notSourceLocationsCity,
                    sourceScopesCountry: sourceScopesCountry,
                    notSourceScopesCountry: notSourceScopesCountry,
                    sourceScopesState: sourceScopesState,
                    notSourceScopesState: notSourceScopesState,
                    sourceScopesCity: sourceScopesCity,
                    notSourceScopesCity: notSourceScopesCity,
                    sourceScopesLevel: sourceScopesLevel,
                    notSourceScopesLevel: notSourceScopesLevel,
                    sourceLinksInCountMin: sourceLinksInCountMin,
                    sourceLinksInCountMax: sourceLinksInCountMax,
                    sourceRankingsAlexaRankMin: sourceRankingsAlexaRankMin,
                    sourceRankingsAlexaRankMax: sourceRankingsAlexaRankMax,
                    sourceRankingsAlexaCountry: sourceRankingsAlexaCountry,
                    socialSharesCountFacebookMin: socialSharesCountFacebookMin,
                    socialSharesCountFacebookMax: socialSharesCountFacebookMax,
                    socialSharesCountGooglePlusMin: socialSharesCountGooglePlusMin,
                    socialSharesCountGooglePlusMax: socialSharesCountGooglePlusMax,
                    socialSharesCountLinkedinMin: socialSharesCountLinkedinMin,
                    socialSharesCountLinkedinMax: socialSharesCountLinkedinMax,
                    socialSharesCountRedditMin: socialSharesCountRedditMin,
                    socialSharesCountRedditMax: socialSharesCountRedditMax,
                    cluster: cluster,
                    clusterAlgorithm: clusterAlgorithm,
                    _return: _return,
                    sortBy: sortBy,
                    sortDirection: sortDirection,
                    cursor: cursor,
                    perPage: perPage
                );
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DefaultApi.ListStories: " + e.Message);
            }
        }
    }
}

Stories allows you to search for news articles based on a specific set of parameters that you set in your query, such as keywords, entities or sources. The News API gathers articles in near real-time, and stores and indexes them along with metadata and enrichments, which you can search over. Below you can see all of the query parameters which you can use to specify and narrow down your query.

HTTP Request

  • GET https://api.newsapi.aylien.com/api/v1/stories

Parameters

Name Description
X-AYLIEN-NewsAPI-Application-ID *
string
(header)
x-data-threescale-name: app_ids

Your access API ID

X-AYLIEN-NewsAPI-Application-Key *
string
(header)
x-data-threescale-name: app_keys

Your access API Key

id[]
array [integer]
(query)

This parameter is used for finding stories by story id.

!id[]
array [integer]
(query)

This parameter is used for excluding stories by story id.

title
string
(query)

This parameter is used for finding stories whose title contains a specific keyword. It supports boolean operators.

body
string
(query)

This parameter is used for finding stories whose body contains a specific keyword. It supports boolean operators.

text
string
(query)

This parameter is used for finding stories whose title or body contains a specific keyword. It supports boolean operators.

language[]
array [string]
(query)

This parameter is used for finding stories whose language is the specified value. It supports ISO 639-1 language codes.

Available values: en, de, fr, it, es, pt

!language[]
array [string]
(query)

This parameter is used for excluding stories whose language is the specified value. It supports ISO 639-1 language codes.

Available values: en, de, fr, it, es, pt

published_at.start
string
(query)

This parameter is used for finding stories whose published at time is greater than the specified value. Here you can find more information about how to work with dates.

published_at.end
string
(query)

This parameter is used for finding stories whose published at time is less than the specified value. Here you can find more information about how to work with dates.

categories.taxonomy
string
(query)

This parameter is used for defining the type of the taxonomy for the rest of the categories queries. You can read more about working with categories here.

categories.confident
boolean
(query)

This parameter is used for finding stories whose categories are confident. You can read more about working with categories here.

Default value: true

categories.id[]
array [string]
(query)

This parameter is used for finding stories by categories id. You can read more about working with categories here, and find category ids here.

!categories.id[]
array [string]
(query)

This parameter is used for excluding stories by categories id. You can read more about working with categories here, and find category ids here.

categories.level[]
array [integer]
(query)

This parameter is used for finding stories by categories level. You can read more about working with categories here, and find category ids here.

!categories.level[]
array [integer]
(query)

This parameter is used for excluding stories by categories level. You can read more about working with categories here, and find category ids here.

entities.title.text[]
array [string]
(query)

This parameter is used to find stories based on the specified entities text in story titles. You can read more about working with entities here.

!entities.title.text[]
array [string]
(query)

This parameter is used to exclude stories based on the specified entities text in story titles. You can read more about working with entities here.

entities.title.type[]
array [string]
(query)

This parameter is used to find stories based on the specified entities type in story titles. You can read more about working with entities here.

!entities.title.type[]
array [string]
(query)

This parameter is used to exclude stories based on the specified entities type in story titles. You can read more about working with entities here.

entities.title.links.dbpedia[]
array [string]
(query)

This parameter is used to find stories based on the specified entities dbpedia URL in story titles. You can read more about working with entities here.

!entities.title.links.dbpedia[]
array [string]
(query)

This parameter is used to exclude stories based on the specified entities dbpedia URL in story titles. You can read more about working with entities here.

entities.body.text[]
array [string]
(query)

This parameter is used to find stories based on the specified entities text in the body of stories. You can read more about working with entities here.

!entities.body.text[]
array [string]
(query)

This parameter is used to exclude stories based on the specified entities text in the body of stories. You can read more about working with entities here.

entities.body.type[]
array [string]
(query)

This parameter is used to find stories based on the specified entities type in the body of stories. You can read more about working with entities here.

!entities.body.type[]
array [string]
(query)

This parameter is used to exclude stories based on the specified entities type in the body of stories. You can read more about working with entities here.

entities.body.links.dbpedia[]
array [string]
(query)

This parameter is used to find stories based on the specified entities dbpedia URL in the body of stories. You can read more about working with entities here.

!entities.body.links.dbpedia[]
array [string]
(query)

This parameter is used to exclude stories based on the specified entities dbpedia URL in the body of stories. You can read more about working with entities here.

sentiment.title.polarity
string
(query)

This parameter is used for finding stories whose title sentiment is the specified value.

!sentiment.title.polarity
string
(query)

This parameter is used for excluding stories whose title sentiment is the specified value.

sentiment.body.polarity
string
(query)

This parameter is used for finding stories whose body sentiment is the specified value.

!sentiment.body.polarity
string
(query)

This parameter is used for excluding stories whose body sentiment is the specified value.

media.images.count.min
integer
(query)

This parameter is used for finding stories whose number of images is greater than or equal to the specified value.

media.images.count.max
integer
(query)

This parameter is used for finding stories whose number of images is less than or equal to the specified value.

media.images.width.min
integer
(query)

This parameter is used for finding stories whose width of images are greater than or equal to the specified value.

media.images.width.max
integer
(query)

This parameter is used for finding stories whose width of images are less than or equal to the specified value.

media.images.height.min
integer
(query)

This parameter is used for finding stories whose height of images are greater than or equal to the specified value.

media.images.height.max
integer
(query)

This parameter is used for finding stories whose height of images are less than or equal to the specified value.

media.images.content_length.min
integer
(query)

This parameter is used for finding stories whose images content length are greater than or equal to the specified value.

media.images.content_length.max
integer
(query)

This parameter is used for finding stories whose images content length are less than or equal to the specified value.

media.images.format[]
array [string]
(query)

This parameter is used for finding stories whose images format are the specified value.

Available values: BMP, GIF, JPEG, PNG, TIFF, PSD, ICO, CUR, WEBP, SVG

!media.images.format[]
array [string]
(query)

This parameter is used for excluding stories whose images format are the specified value.

Available values: BMP, GIF, JPEG, PNG, TIFF, PSD, ICO, CUR, WEBP, SVG

media.videos.count.min
integer
(query)

This parameter is used for finding stories whose number of videos is greater than or equal to the specified value.

media.videos.count.max
integer
(query)

This parameter is used for finding stories whose number of videos is less than or equal to the specified value.

author.id[]
array [integer]
(query)

This parameter is used for finding stories whose author id is the specified value.

!author.id[]
array [integer]
(query)

This parameter is used for excluding stories whose author id is the specified value.

author.name
string
(query)

This parameter is used for finding stories whose author full name contains the specified value.

!author.name
string
(query)

This parameter is used for excluding stories whose author full name contains the specified value.

source.id[]
array [integer]
(query)

This parameter is used for finding stories whose source id is the specified value.

!source.id[]
array [integer]
(query)

This parameter is used for excluding stories whose source id is the specified value.

source.name[]
array [string]
(query)

This parameter is used for finding stories whose source name contains the specified value.

!source.name[]
array [string]
(query)

This parameter is used for excluding stories whose source name contains the specified value.

source.domain[]
array [string]
(query)

This parameter is used for finding stories whose source domain is the specified value.

!source.domain[]
array [string]
(query)

This parameter is used for excluding stories whose source domain is the specified value.

source.locations.country[]
array [string]
(query)

This parameter is used for finding stories whose source country is the specified value. It supports ISO 3166-1 alpha-2 country codes. Here you can find more information about how to work with locations.

!source.locations.country[]
array [string]
(query)

This parameter is used for excluding stories whose source country is the specified value. It supports ISO 3166-1 alpha-2 country codes. Here you can find more information about how to work with locations.

source.locations.state[]
array [string]
(query)

This parameter is used for finding stories whose source state/province is the specified value. Here you can find more information about how to work with locations.

!source.locations.state[]
array [string]
(query)

This parameter is used for excluding stories whose source state/province is the specified value. Here you can find more information about how to work with locations.

source.locations.city[]
array [string]
(query)

This parameter is used for finding stories whose source city is the specified value. Here you can find more information about how to work with locations.

!source.locations.city[]
array [string]
(query)

This parameter is used for excluding stories whose source city is the specified value. Here you can find more information about how to work with locations.

source.scopes.country[]
array [string]
(query)

This parameter is used for finding stories whose source scopes is the specified country value. It supports ISO 3166-1 alpha-2 country codes. Here you can find more information about how to work with locations.

!source.scopes.country[]
array [string]
(query)

This parameter is used for excluding stories whose source scopes is the specified country value. It supports ISO 3166-1 alpha-2 country codes. Here you can find more information about how to work with locations.

source.scopes.state[]
array [string]
(query)

This parameter is used for finding stories whose source scopes is the specified state/province value. Here you can find more information about how to work with locations.

!source.scopes.state[]
array [string]
(query)

This parameter is used for excluding stories whose source scopes is the specified state/province value. Here you can find more information about how to work with locations.

source.scopes.city[]
array [string]
(query)

This parameter is used for finding stories whose source scopes is the specified city value. Here you can find more information about how to work with locations.

!source.scopes.city[]
array [string]
(query)

This parameter is used for excluding stories whose source scopes is the specified city value. Here you can find more information about how to work with locations.

source.scopes.level[]
array [string]
(query)

This parameter is used for finding stories whose source scopes is the specified level value. Here you can find more information about how to work with locations.

Available values: international, national, local

!source.scopes.level[]
array [string]
(query)

This parameter is used for excluding stories whose source scopes is the specified level value. Here you can find more information about how to work with locations.

Available values: international, national, local

source.links_in_count.min
integer
(query)

This parameter is used for finding stories from sources whose Links in count is greater than or equal to the specified value. You can read more about working with Links in count here.

source.links_in_count.max
integer
(query)

This parameter is used for finding stories from sources whose Links in count is less than or equal to the specified value. You can read more about working with Links in count here.

source.rankings.alexa.rank.min
integer
(query)

This parameter is used for finding stories from sources whose Alexa rank is greater than or equal to the specified value. You can read more about working with Alexa ranks here.

source.rankings.alexa.rank.max
integer
(query)

This parameter is used for finding stories from sources whose Alexa rank is less than or equal to the specified value. You can read more about working with Alexa ranks here.

source.rankings.alexa.country[]
array [string]
(query)

This parameter is used for finding stories from sources whose Alexa rank is in the specified country value. It supports ISO 3166-1 alpha-2 country codes. You can read more about working with Alexa ranks here.

social_shares_count.facebook.min
integer
(query)

This parameter is used for finding stories whose Facebook social shares count is greater than or equal to the specified value.

social_shares_count.facebook.max
integer
(query)

This parameter is used for finding stories whose Facebook social shares count is less than or equal to the specified value.

social_shares_count.google_plus.min
integer
(query)

This parameter is used for finding stories whose Google+ social shares count is greater than or equal to the specified value.

social_shares_count.google_plus.max
integer
(query)

This parameter is used for finding stories whose Google+ social shares count is less than or equal to the specified value.

social_shares_count.linkedin.min
integer
(query)

This parameter is used for finding stories whose LinkedIn social shares count is greater than or equal to the specified value.

social_shares_count.linkedin.max
integer
(query)

This parameter is used for finding stories whose LinkedIn social shares count is less than or equal to the specified value.

social_shares_count.reddit.min
integer
(query)

This parameter is used for finding stories whose Reddit social shares count is greater than or equal to the specified value.

social_shares_count.reddit.max
integer
(query)

This parameter is used for finding stories whose Reddit social shares count is less than or equal to the specified value.

cluster
boolean
(query)

This parameter enables clustering for the returned stories. You can read more about working with clustering here.

Default value: false

cluster.algorithm
string
(query)

This parameter is used for specifying the clustering algorithm you wish to use. It supprts STC, Lingo and k-means algorithms. You can read more about working with clustering here.

Default value: lingo

return[]
array [string]
(query)

This parameter is used for specifying return fields.

Available values: id, title, body, summary, source, author, entities, keywords, hashtags, characters_count, words_count, sentences_count, paragraphs_count, categories, social_shares_count, media, sentiment, language, published_at, links

sort_by
string
(query)

This parameter is used for changing the order column of the results. You can read about sorting results here.

Default value: published_at

sort_direction
string
(query)

This parameter is used for changing the order direction of the result. You can read about sorting results here.

Default value: desc

cursor
string
(query)

This parameter is used for finding a specific page. You can read more about pagination of results here.

Default value: *

per_page
integer
(query)

This parameter is used for specifying number of items in each page You can read more about pagination of results here

Default value: 10

Response

Code Description
200

An object including an array of stories

401

Unauthorized

404

Not Found

422

Unprocessable Entity

429

Too Many Requests

  • X-RateLimit-Limit: The number of allowed requests in the current period.
  • X-RateLimit-Remaining: The number of remaining requests in the current period.
  • X-RateLimit-Reset: The remaining window before the rate limit resets in UTC epoch seconds.
500

Internal Server Error

Related Stories

Download and install an SDK from here.

/* 
  View all parameters and methods here:
  https://github.com/AYLIEN/aylien_newsapi_nodejs/blob/master/docs/DefaultApi.md#listRelatedStories
*/

var AylienNewsApi = require('aylien-news-api');

var apiInstance = new AylienNewsApi.DefaultApi();

// Configure API key authorization: app_id
var app_id = apiInstance.apiClient.authentications['app_id'];
app_id.apiKey = "YOUR_APP_ID";

// Configure API key authorization: app_key
var app_key = apiInstance.apiClient.authentications['app_key'];
app_key.apiKey = "YOUR_APP_KEY";

var opts = { 
  'id': [56],
  'notId': [154211],
  'title': "startup AND (raise OR raised OR raising OR raises)",
  'body': "startup",
  'text': "startup company",
  'language': ["en", "de"],
  'notLanguage': ["es", "it"],
  'publishedAtStart': "NOW-10DAYS",
  'publishedAtEnd': "NOW",
  'categoriesTaxonomy': "iptc-subjectcode",
  'categoriesConfident': true,
  'categoriesId': ["11000000"],
  'notCategoriesId': ["04002001"],
  'categoriesLevel': [1],
  'notCategoriesLevel': [3],
  'entitiesTitleText': ["GNU/Linux"],
  'notEntitiesTitleText': ["Microsoft", "Google"],
  'entitiesTitleType': ["Software", "Organization"],
  'notEntitiesTitleType': ["Person", "Agent"],
  'entitiesTitleLinksDbpedia': ["http://dbpedia.org/resource/Linux"],
  'notEntitiesTitleLinksDbpedia': ["http://dbpedia.org/resource/Windows"],
  'entitiesBodyText': ["Free Software"],
  'notEntitiesBodyText': ["Open Source"],
  'entitiesBodyType': ["Software", "Organization"],
  'notEntitiesBodyType': ["Person", "Agent"],
  'entitiesBodyLinksDbpedia': ["http://dbpedia.org/resource/Linux"],
  'notEntitiesBodyLinksDbpedia': ["http://dbpedia.org/resource/Microsoft"],
  'sentimentTitlePolarity': "positive",
  'notSentimentTitlePolarity': "neutral",
  'sentimentBodyPolarity': "negative",
  'notSentimentBodyPolarity': "neutral",
  'mediaImagesCountMin': 1,
  'mediaImagesCountMax': 2,
  'mediaImagesWidthMin': 640,
  'mediaImagesWidthMax': 1024,
  'mediaImagesHeightMin': 480,
  'mediaImagesHeightMax': 800,
  'mediaImagesContentLengthMin': 25412,
  'mediaImagesContentLengthMax': 369521,
  'mediaImagesFormat': ['JPEG', 'BMP', 'GIF'],
  'notMediaImagesFormat': ['TIFF', 'PNG'],
  'mediaVideosCountMin': 2,
  'mediaVideosCountMax': 2,
  'authorId': [5411],
  'notAuthorId': [65211],
  'authorName': "John Doe",
  'notAuthorName': "Mike Wali",
  'sourceId': [1422],
  'notSourceId': [51],
  'sourceName': ["BBC"],
  'notSourceName': ["Fox News"],
  'sourceDomain': ["bbc.co.uk"],
  'notSourceDomain': ["foxnews.com"],
  'sourceLocationsCountry': ["US"],
  'notSourceLocationsCountry': ["IE"],
  'sourceLocationsState': ["California"],
  'notSourceLocationsState': ["Arizona"],
  'sourceLocationsCity': ["Los Angeles"],
  'notSourceLocationsCity': ["Chandler"],
  'sourceScopesCountry': ["IE"],
  'notSourceScopesCountry': ["IT"],
  'sourceScopesState': ["Co Dublin"],
  'notSourceScopesState': ["Co Wicklow"],
  'sourceScopesCity': ["Dublin City"],
  'notSourceScopesCity': ["Cork"],
  'sourceScopesLevel': ["local"],
  'notSourceScopesLevel': ["national"],
  'sourceLinksInCountMin': 254111,
  'sourceLinksInCountMax': 352541,
  'sourceRankingsAlexaRankMin': 36,
  'sourceRankingsAlexaRankMax': 500,
  'sourceRankingsAlexaCountry': ["IE"],
  'socialSharesCountFacebookMin': 3521,
  'socialSharesCountFacebookMax': 5841,
  'socialSharesCountGooglePlusMin': 2514,
  'socialSharesCountGooglePlusMax': 36521,
  'socialSharesCountLinkedinMin': 6521,
  'socialSharesCountLinkedinMax': 36521,
  'socialSharesCountRedditMin': 14125,
  'socialSharesCountRedditMax': 95412,
  'cluster': false,
  'clusterAlgorithm': "lingo",
  '_return': ["id", "title", "body"],
  'storyId': 789,
  'storyUrl': "https://techcrunch.com/2016/04/07/aylien-launches-news-analysis-api-powered-by-its-deep-learning-tech/",
  'storyTitle': "Aylien launches news analysis API powered by its deep learning tech",
  'storyBody': "Text analysis startup Aylien, which uses deep learning ...",
  'boostBy': "recency",
  'storyLanguage': "auto",
  'perPage': 3
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + JSON.stringify(data));
  }
};
apiInstance.listRelatedStories(opts, callback);
# View all parameters and methods here:
# https://github.com/AYLIEN/aylien_newsapi_python/blob/master/docs/DefaultApi.md#list_related_stories

import aylien_news_api
from aylien_news_api.rest import ApiException
from pprint import pprint

# Configure API key authorization: app_id
aylien_news_api.configuration.api_key['X-AYLIEN-NewsAPI-Application-ID'] = 'YOUR_APP_ID'
# Configure API key authorization: app_key
aylien_news_api.configuration.api_key['X-AYLIEN-NewsAPI-Application-Key'] = 'YOUR_APP_KEY'

# create an instance of the API class
api_instance = aylien_news_api.DefaultApi()


opts = { 
    'id': [521411],
    'not_id': [2511],
    'title': 'startup AND (raise OR raised OR raising OR raises)',
    'body': 'startup',
    'text': 'startup company',
    'language': ['en', 'it'],
    'not_language': ['es', 'pt'],
    'published_at_start': 'NOW-10DAYS',
    'published_at_end': 'NOW',
    'categories_taxonomy': 'iab-qag',
    'categories_confident': True,
    'categories_id': ['IAB15', 'IAB1-2'],
    'not_categories_id': ['IAB10', 'IAB3'],
    'categories_level': [1],
    'not_categories_level': [2],
    'entities_title_text': ['GNU/Linux'],
    'not_entities_title_text': ['Microsoft', 'Google'],
    'entities_title_type': ['Software', 'Organization'],
    'not_entities_title_type': ['Agent', 'Person'],
    'entities_title_links_dbpedia': ['http://dbpedia.org/resource/Donald_Trump'],
    'not_entities_title_links_dbpedia': ['http://dbpedia.org/resource/Windows'],
    'entities_body_text': ['GNU/Linux', 'Microsoft'],
    'not_entities_body_text': ['Windows Vista', 'Windows XP'],
    'entities_body_type': ['Software', 'Organization'],
    'not_entities_body_type': ['Agent', 'Person'],
    'entities_body_links_dbpedia': ['http://dbpedia.org/resource/Microsoft'],
    'not_entities_body_links_dbpedia': ['http://dbpedia.org/resource/Google'],
    'sentiment_title_polarity': 'positive',
    'not_sentiment_title_polarity': 'neutral',
    'sentiment_body_polarity': 'negative',
    'not_sentiment_body_polarity': 'positive',
    'media_images_count_min': 1,
    'media_images_count_max': 10,
    'media_images_width_min': 640,
    'media_images_width_max': 1024,
    'media_images_height_min': 480,
    'media_images_height_max': 800,
    'media_images_content_length_min': 25411,
    'media_images_content_length_max': 369541,
    'media_images_format': ['JPEG', 'BMP', 'GIF'],
    'not_media_images_format': ['PNG', 'TIFF'],
    'media_videos_count_min': 3,
    'media_videos_count_max': 5,
    'author_id': [352],
    'not_author_id': [541],
    'author_name': 'John Doe',
    'not_author_name': 'Mike Wally',
    'source_id': [1456],
    'not_source_id': [142],
    'source_name': ['BBC'],
    'not_source_name': ['Fox News'],
    'source_domain': ['bbc.co.uk'],
    'not_source_domain': ['foxnews.com'],
    'source_locations_country': ['US'],
    'not_source_locations_country': ['BR'],
    'source_locations_state': ['California'],
    'not_source_locations_state': ['Berkshire'],
    'source_locations_city': ['London'],
    'not_source_locations_city': ['Dublin'],
    'source_scopes_country': ['IE'],
    'not_source_scopes_country': ['IN'],
    'source_scopes_state': ['Tehran'],
    'not_source_scopes_state': ['Berkshire'],
    'source_scopes_city': ['Dublin'],
    'not_source_scopes_city': ['New York City'],
    'source_scopes_level': ['local'],
    'not_source_scopes_level': ['national'],
    'source_links_in_count_min': 401444,
    'source_links_in_count_max': 500000,
    'source_rankings_alexa_rank_min': 3,
    'source_rankings_alexa_rank_max': 100,
    'source_rankings_alexa_country': ['IE'],
    'social_shares_count_facebook_min': 3521,
    'social_shares_count_facebook_max': 2514,
    'social_shares_count_google_plus_min': 6521,
    'social_shares_count_google_plus_max': 36524,
    'social_shares_count_linkedin_min': 6528,
    'social_shares_count_linkedin_max': 952141,
    'social_shares_count_reddit_min': 14251,
    'social_shares_count_reddit_max': 95874,
    'cluster': False,
    'cluster_algorithm': 'stc',
    '_return': ['id', 'title', 'body'],
    'story_id': 789,
    'story_url': 'https://techcrunch.com/2016/04/07/aylien-launches-news-analysis-api-powered-by-its-deep-learning-tech/',
    'story_title': 'Aylien launches news analysis API powered by its deep learning tech',
    'story_body': 'Text analysis startup Aylien, which uses deep learning ...',
    'boost_by': 'popularity',
    'story_language': 'auto',
    'per_page': 3
}

try: 
    # List related stories
    api_response = api_instance.list_related_stories(**opts)
    pprint(api_response)
except ApiException as e:
    pprint("Exception when calling DefaultApi->list_related_stories: %s\n" % e)
<?php
/* 
  View all parameters and methods here:
  https://github.com/AYLIEN/aylien_newsapi_php/blob/master/docs/Api/DefaultApi.md#listRelatedStories
*/

require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: app_id
Aylien\NewsApi\Configuration::getDefaultConfiguration()->setApiKey('X-AYLIEN-NewsAPI-Application-ID', 'YOUR_APP_ID');

// Configure API key authorization: app_key
Aylien\NewsApi\Configuration::getDefaultConfiguration()->setApiKey('X-AYLIEN-NewsAPI-Application-Key', 'YOUR_APP_KEY');

$api_instance = new Aylien\NewsApi\Api\DefaultApi();


$opts = array(
    'id' => array(36521),
    'not_id' => array(36222),
    'title' => "startup AND (raise OR raised OR raising OR raises)",
    'body' => "startup",
    'text' => "startup company",
    'language' => array("en","pt"),
    'not_language' => array("es","it"),
    'published_at_start' => "NOW-10DAYS",
    'published_at_end' => "NOW",
    'categories_taxonomy' => "iptc-subjectcode",
    'categories_confident' => false,
    'categories_id' => array("11000000","11003000"),
    'not_categories_id' => array("04001001"),
    'categories_level' => array(1),
    'not_categories_level' => array(2,3),
    'entities_title_text' => array("GNU/Linux","Microsoft"),
    'not_entities_title_text' => array("Windows","Ireland"),
    'entities_title_type' => array("Software","Organization"),
    'not_entities_title_type' => array("Agent","Person"),
    'entities_title_links_dbpedia' => array("http://dbpedia.org/resource/Linux"),
    'not_entities_title_links_dbpedia' => array("http://dbpedia.org/resource/Microsoft"),
    'entities_body_text' => array("Free Software","Open Source"),
    'not_entities_body_text' => array("Proprietary Software"),
    'entities_body_type' => array("Software","Organization"),
    'not_entities_body_type' => array("Agent","Hardware"),
    'entities_body_links_dbpedia' => array("http://dbpedia.org/resource/Linux"),
    'not_entities_body_links_dbpedia' => array("http://dbpedia.org/resource/Windows"),
    'sentiment_title_polarity' => "positive",
    'not_sentiment_title_polarity' => "neutral",
    'sentiment_body_polarity' => "negative",
    'not_sentiment_body_polarity' => "positive",
    'media_images_count_min' => 1,
    'media_images_count_max' => 4,
    'media_images_width_min' => 640,
    'media_images_width_max' => 1024,
    'media_images_height_min' => 480,
    'media_images_height_max' => 800,
    'media_images_content_length_min' => 25412,
    'media_images_content_length_max' => 369541,
    'media_images_format' => array("JPEG","BMP", "GIF"),
    'not_media_images_format' => array("PNG","TIFF"),
    'media_videos_count_min' => 2,
    'media_videos_count_max' => 5,
    'author_id' => array(4155),
    'not_author_id' => array(3214),
    'author_name' => "John Doe",
    'not_author_name' => "Mike Wally",
    'source_id' => array(122),
    'not_source_id' => array(12, 34),
    'source_name' => array("BBC"),
    'not_source_name' => array("Fox News"),
    'source_domain' => array("bbc.co.uk"),
    'not_source_domain' => array("foxnews.com"),
    'source_locations_country' => array("US", "IE"),
    'not_source_locations_country' => array("IN", "NG"),
    'source_locations_state' => array("California"),
    'not_source_locations_state' => array("Arizona"),
    'source_locations_city' => array("Los Angeles"),
    'not_source_locations_city' => array("Dublin City"),
    'source_scopes_country' => array("IN", "IE"),
    'not_source_scopes_country' => array("US"),
    'source_scopes_state' => array("Wicklow"),
    'not_source_scopes_state' => array("California"),
    'source_scopes_city' => array("Dublin City"),
    'not_source_scopes_city' => array("Cork"),
    'source_scopes_level' => array("local"),
    'not_source_scopes_level' => array("international"),
    'source_links_in_count_min' => 254111,
    'source_links_in_count_max' => 587796,
    'source_rankings_alexa_rank_min' => 255,
    'source_rankings_alexa_rank_max' => 1421,
    'source_rankings_alexa_country' => array("IE"),
    'social_shares_count_facebook_min' => 3521,
    'social_shares_count_facebook_max' => 5841,
    'social_shares_count_google_plus_min' => 65241,
    'social_shares_count_google_plus_max' => 105214,
    'social_shares_count_linkedin_min' => 3254,
    'social_shares_count_linkedin_max' => 5621,
    'social_shares_count_reddit_min' => 255,
    'social_shares_count_reddit_max' => 9541,
    'cluster' => false,
    'cluster_algorithm' => "kmeans",
    'return' => array("id", "title", "body", "published_at"),
    'story_id' => 789,
    'story_url' => "https://techcrunch.com/2016/04/07/aylien-launches-news-analysis-api-powered-by-its-deep-learning-tech/",
    'story_title' => "Aylien launches news analysis API powered by its deep learning tech",
    'story_body' => "Text analysis startup Aylien, which uses deep learning ...",
    'boost_by' => "recency",
    'story_language' => "auto",
    'per_page' => 3
);

try {
    $result = $api_instance->listRelatedStories($opts);
    print_r($result);
} catch (Exception $e) {
    print_r($e->getResponseObject()->getErrors());
    echo 'Exception when calling DefaultApi->listRelatedStories: ', $e->getMessage(), PHP_EOL;
}
?>
/* 
  View all parameters and methods here:
  https://github.com/AYLIEN/aylien_newsapi_java/blob/master/docs/DefaultApi.md#listRelatedStories
*/

import com.aylien.newsapi.*;
import com.aylien.newsapi.auth.*;
import com.aylien.newsapi.models.*;
import com.aylien.newsapi.parameters.*;
import com.aylien.newsapi.api.DefaultApi;

import java.util.Arrays;
import java.util.List;

public class Main {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: app_id
        ApiKeyAuth app_id = (ApiKeyAuth) defaultClient.getAuthentication("app_id");
        app_id.setApiKey("YOUR_APP_ID");

        // Configure API key authorization: app_key
        ApiKeyAuth app_key = (ApiKeyAuth) defaultClient.getAuthentication("app_key");
        app_key.setApiKey("YOUR_APP_KEY");

        DefaultApi apiInstance = new DefaultApi();

        List<Long> id = Arrays.asList(985744L);
        List<Long> notId = Arrays.asList(5241L, 4412L);
        String title = "startup AND (raise OR raised OR raising OR raises)";
        String body = "startup";
        String text = "startup company";
        List<String> language = Arrays.asList("en", "es", "es");
        List<String> notLanguage = Arrays.asList("fr", "pt", "it");
        String publishedAtStart = "NOW-3MONTHS/DAY";
        String publishedAtEnd = "NOW-10DAYS";
        String categoriesTaxonomy = "iab-qag";
        Boolean categoriesConfident = true;
        List<String> categoriesId = Arrays.asList("IAB15", "IAB13-1");
        List<String> notCategoriesId = Arrays.asList("IAB3-2");
        List<Integer> categoriesLevel = Arrays.asList(2);
        List<Integer> notCategoriesLevel = Arrays.asList(1, 3);
        List<String> entitiesTitleText = Arrays.asList("GNU/Linux", "Microsoft Windows");
        List<String> notEntitiesTitleText = Arrays.asList("Ireland", "Dublin");
        List<String> entitiesTitleType = Arrays.asList("Software", "Organization");
        List<String> notEntitiesTitleType = Arrays.asList("Agent", "Person");
        List<String> entitiesTitleLinksDbpedia = Arrays.asList("http://dbpedia.org/resource/Linux");
        List<String> notEntitiesTitleLinksDbpedia = Arrays.asList("http://dbpedia.org/resource/Windows");
        List<String> entitiesBodyText = Arrays.asList("GNU/Linux", "Microsoft Windows");
        List<String> notEntitiesBodyText = Arrays.asList("Trump");
        List<String> entitiesBodyType = Arrays.asList("Agent", "Person");
        List<String> notEntitiesBodyType = Arrays.asList("Software", "Organization");
        List<String> entitiesBodyLinksDbpedia = Arrays.asList("entitiesBodyLinksDbpedia_example");
        List<String> notEntitiesBodyLinksDbpedia = Arrays.asList("http://dbpedia.org/resource/Linux");
        String sentimentTitlePolarity = "negative";
        String notSentimentTitlePolarity = "positive";
        String sentimentBodyPolarity = "neutral";
        String notSentimentBodyPolarity = "negative";
        Integer mediaImagesCountMin = 2;
        Integer mediaImagesCountMax = 4;
        Integer mediaImagesWidthMin = 640;
        Integer mediaImagesWidthMax = 1024;
        Integer mediaImagesHeightMin = 480;
        Integer mediaImagesHeightMax = 800;
        Integer mediaImagesContentLengthMin = 25411;
        Integer mediaImagesContentLengthMax = 369541;
        List<String> mediaImagesFormat = Arrays.asList("JPEG", "BMP", "GIF");
        List<String> notMediaImagesFormat = Arrays.asList("PNG", "TIFF");
        Integer mediaVideosCountMin = 1;
        Integer mediaVideosCountMax = 2;
        List<Integer> authorId = Arrays.asList(36521);
        List<Integer> notAuthorId = Arrays.asList(2541);
        String authorName = "John Doe";
        String notAuthorName = "Mike Wally";
        List<Integer> sourceId = Arrays.asList(1411);
        List<Integer> notSourceId = Arrays.asList(251);
        List<String> sourceName = Arrays.asList("BBC");
        List<String> notSourceName = Arrays.asList("Fox News");
        List<String> sourceDomain = Arrays.asList("bbc.co.uk");
        List<String> notSourceDomain = Arrays.asList("foxnews.com");
        List<String> sourceLocationsCountry = Arrays.asList("US", "IE");
        List<String> notSourceLocationsCountry = Arrays.asList("IR");
        List<String> sourceLocationsState = Arrays.asList("California");
        List<String> notSourceLocationsState = Arrays.asList("Arizona");
        List<String> sourceLocationsCity = Arrays.asList("Los Angeles");
        List<String> notSourceLocationsCity = Arrays.asList("Dublin City");
        List<String> sourceScopesCountry = Arrays.asList("IE", "NG");
        List<String> notSourceScopesCountry = Arrays.asList("US", "GB");
        List<String> sourceScopesState = Arrays.asList("Co Dublin");
        List<String> notSourceScopesState = Arrays.asList("Co Wicklow");
        List<String> sourceScopesCity = Arrays.asList("Dublin City");
        List<String> notSourceScopesCity = Arrays.asList("Cork");
        List<String> sourceScopesLevel = Arrays.asList("national");
        List<String> notSourceScopesLevel = Arrays.asList("local");
        Integer sourceLinksInCountMin = 354211;
        Integer sourceLinksInCountMax = 587412;
        Integer sourceRankingsAlexaRankMin = 10;
        Integer sourceRankingsAlexaRankMax = 2500;
        List<String> sourceRankingsAlexaCountry = Arrays.asList("IE");
        Integer socialSharesCountFacebookMin = 3521;
        Integer socialSharesCountFacebookMax = 5841;
        Integer socialSharesCountGooglePlusMin = 2514;
        Integer socialSharesCountGooglePlusMax = 36521;
        Integer socialSharesCountLinkedinMin = 6521;
        Integer socialSharesCountLinkedinMax = 36521;
        Integer socialSharesCountRedditMin = 14125;
        Integer socialSharesCountRedditMax = 95412;
        Boolean cluster = false;
        String clusterAlgorithm = "stc";
        List<String> _return = Arrays.asList("id", "title", "body");
        Long storyId = 789L;
        String storyUrl = "https://techcrunch.com/2016/04/07/aylien-launches-news-analysis-api-powered-by-its-deep-learning-tech/";
        String storyTitle = "Aylien launches news analysis API powered by its deep learning tech";
        String storyBody = "Text analysis startup Aylien, which uses deep learning...";
        String boostBy = "recency";
        String storyLanguage = "auto";
        Integer perPage = 6;

        RelatedStoriesParams.Builder relatedStoriesBuilder = RelatedStoriesParams.newBuilder();

        relatedStoriesBuilder.setId(id);
        relatedStoriesBuilder.setNotId(notId);
        relatedStoriesBuilder.setTitle(title);
        relatedStoriesBuilder.setBody(body);
        relatedStoriesBuilder.setText(text);
        relatedStoriesBuilder.setLanguage(language);
        relatedStoriesBuilder.setNotLanguage(notLanguage);
        relatedStoriesBuilder.setPublishedAtStart(publishedAtStart);
        relatedStoriesBuilder.setPublishedAtEnd(publishedAtEnd);
        relatedStoriesBuilder.setCategoriesTaxonomy(categoriesTaxonomy);
        relatedStoriesBuilder.setCategoriesConfident(categoriesConfident);
        relatedStoriesBuilder.setCategoriesId(categoriesId);
        relatedStoriesBuilder.setNotCategoriesId(notCategoriesId);
        relatedStoriesBuilder.setCategoriesLevel(categoriesLevel);
        relatedStoriesBuilder.setNotCategoriesLevel(notCategoriesLevel);
        relatedStoriesBuilder.setEntitiesTitleText(entitiesTitleText);
        relatedStoriesBuilder.setNotEntitiesTitleText(notEntitiesTitleText);
        relatedStoriesBuilder.setEntitiesTitleType(entitiesTitleType);
        relatedStoriesBuilder.setNotEntitiesTitleType(notEntitiesTitleType);
        relatedStoriesBuilder.setEntitiesTitleLinksDbpedia(entitiesTitleLinksDbpedia);
        relatedStoriesBuilder.setNotEntitiesTitleLinksDbpedia(notEntitiesTitleLinksDbpedia);
        relatedStoriesBuilder.setEntitiesBodyText(entitiesBodyText);
        relatedStoriesBuilder.setNotEntitiesBodyText(notEntitiesBodyText);
        relatedStoriesBuilder.setEntitiesBodyType(entitiesBodyType);
        relatedStoriesBuilder.setNotEntitiesBodyType(notEntitiesBodyType);
        relatedStoriesBuilder.setEntitiesBodyLinksDbpedia(entitiesBodyLinksDbpedia);
        relatedStoriesBuilder.setNotEntitiesBodyLinksDbpedia(notEntitiesBodyLinksDbpedia);
        relatedStoriesBuilder.setSentimentTitlePolarity(sentimentTitlePolarity);
        relatedStoriesBuilder.setNotSentimentTitlePolarity(notSentimentTitlePolarity);
        relatedStoriesBuilder.setSentimentBodyPolarity(sentimentBodyPolarity);
        relatedStoriesBuilder.setNotSentimentBodyPolarity(notSentimentBodyPolarity);
        relatedStoriesBuilder.setMediaImagesCountMin(mediaImagesCountMin);
        relatedStoriesBuilder.setMediaImagesCountMax(mediaImagesCountMax);
        relatedStoriesBuilder.setMediaImagesWidthMin(mediaImagesWidthMin);
        relatedStoriesBuilder.setMediaImagesWidthMax(mediaImagesWidthMax);
        relatedStoriesBuilder.setMediaImagesHeightMin(mediaImagesHeightMin);
        relatedStoriesBuilder.setMediaImagesHeightMax(mediaImagesHeightMax);
        relatedStoriesBuilder.setMediaImagesContentLengthMin(mediaImagesContentLengthMin);
        relatedStoriesBuilder.setMediaImagesContentLengthMax(mediaImagesContentLengthMax);
        relatedStoriesBuilder.setMediaImagesFormat(mediaImagesFormat);
        relatedStoriesBuilder.setNotMediaImagesFormat(notMediaImagesFormat);
        relatedStoriesBuilder.setMediaVideosCountMin(mediaVideosCountMin);
        relatedStoriesBuilder.setMediaVideosCountMax(mediaVideosCountMax);
        relatedStoriesBuilder.setAuthorId(authorId);
        relatedStoriesBuilder.setNotAuthorId(notAuthorId);
        relatedStoriesBuilder.setAuthorName(authorName);
        relatedStoriesBuilder.setNotAuthorName(notAuthorName);
        relatedStoriesBuilder.setSourceId(sourceId);
        relatedStoriesBuilder.setNotSourceId(notSourceId);
        relatedStoriesBuilder.setSourceName(sourceName);
        relatedStoriesBuilder.setNotSourceName(notSourceName);
        relatedStoriesBuilder.setSourceDomain(sourceDomain);
        relatedStoriesBuilder.setNotSourceDomain(notSourceDomain);
        relatedStoriesBuilder.setSourceLocationsCountry(sourceLocationsCountry);
        relatedStoriesBuilder.setNotSourceLocationsCountry(notSourceLocationsCountry);
        relatedStoriesBuilder.setSourceLocationsState(sourceLocationsState);
        relatedStoriesBuilder.setNotSourceLocationsState(notSourceLocationsState);
        relatedStoriesBuilder.setSourceLocationsCity(sourceLocationsCity);
        relatedStoriesBuilder.setNotSourceLocationsCity(notSourceLocationsCity);
        relatedStoriesBuilder.setSourceScopesCountry(sourceScopesCountry);
        relatedStoriesBuilder.setNotSourceScopesCountry(notSourceScopesCountry);
        relatedStoriesBuilder.setSourceScopesState(sourceScopesState);
        relatedStoriesBuilder.setNotSourceScopesState(notSourceScopesState);
        relatedStoriesBuilder.setSourceScopesCity(sourceScopesCity);
        relatedStoriesBuilder.setNotSourceScopesCity(notSourceScopesCity);
        relatedStoriesBuilder.setSourceScopesLevel(sourceScopesLevel);
        relatedStoriesBuilder.setNotSourceScopesLevel(notSourceScopesLevel);
        relatedStoriesBuilder.setSourceLinksInCountMin(sourceLinksInCountMin);
        relatedStoriesBuilder.setSourceLinksInCountMax(sourceLinksInCountMax);
        relatedStoriesBuilder.setSourceRankingsAlexaRankMin(sourceRankingsAlexaRankMin);
        relatedStoriesBuilder.setSourceRankingsAlexaRankMax(sourceRankingsAlexaRankMax);
        relatedStoriesBuilder.setSourceRankingsAlexaCountry(sourceRankingsAlexaCountry);
        relatedStoriesBuilder.setSocialSharesCountFacebookMin(socialSharesCountFacebookMin);
        relatedStoriesBuilder.setSocialSharesCountFacebookMax(socialSharesCountFacebookMax);
        relatedStoriesBuilder.setSocialSharesCountGooglePlusMin(socialSharesCountGooglePlusMin);
        relatedStoriesBuilder.setSocialSharesCountGooglePlusMax(socialSharesCountGooglePlusMax);
        relatedStoriesBuilder.setSocialSharesCountLinkedinMin(socialSharesCountLinkedinMin);
        relatedStoriesBuilder.setSocialSharesCountLinkedinMax(socialSharesCountLinkedinMax);
        relatedStoriesBuilder.setSocialSharesCountRedditMin(socialSharesCountRedditMin);
        relatedStoriesBuilder.setSocialSharesCountRedditMax(socialSharesCountRedditMax);
        relatedStoriesBuilder.setCluster(cluster);
        relatedStoriesBuilder.setClusterAlgorithm(clusterAlgorithm);
        relatedStoriesBuilder.set_return(_return);
        relatedStoriesBuilder.setStoryId(storyId);
        relatedStoriesBuilder.setStoryUrl(storyUrl);
        relatedStoriesBuilder.setStoryTitle(storyTitle);
        relatedStoriesBuilder.setStoryBody(storyBody);
        relatedStoriesBuilder.setBoostBy(boostBy);
        relatedStoriesBuilder.setStoryLanguage(storyLanguage);
        relatedStoriesBuilder.setPerPage(perPage);

        try {
            RelatedStories result = apiInstance.listRelatedStories(relatedStoriesBuilder.build());
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#listRelatedStories");
            e.printStackTrace();
        }
    }
}
# View all parameters and methods here:
# https://github.com/AYLIEN/aylien_newsapi_ruby/blob/master/docs/DefaultApi.md#list_related_stories

# load the gem
require 'aylien_news_api'

# setup authorization
AylienNewsApi.configure do |config|
  # Configure API key authorization: app_id
  config.api_key['X-AYLIEN-NewsAPI-Application-ID'] = 'YOUR_APP_ID'

  # Configure API key authorization: app_key
  config.api_key['X-AYLIEN-NewsAPI-Application-Key'] = 'YOUR_APP_KEY'
end

api_instance = AylienNewsApi::DefaultApi.new

opts = { 
  id: [5411],
  not_id: [3625],
  title: "startup AND (raise OR raised OR raising OR raises)",
  body: "startup",
  text: "startup company",
  language: ["en", "fr"],
  not_language: ["es", "it"],
  published_at_start: "NOW-10DAYS",
  published_at_end: "NOW",
  categories_taxonomy: "iptc-subjectcode",
  categories_confident: true,
  categories_id: ["11000000", "02000000"],
  not_categories_id: ["11001000", "10000000"],
  categories_level: [3],
  not_categories_level: [1, 2],
  entities_title_text: ["GNU/Linux", "Microsoft"],
  not_entities_title_text: ["Google", "Windows"],
  entities_title_type: ["Software", "Organization"],
  not_entities_title_type: ["Agent", "Person"],
  entities_title_links_dbpedia: ["http://dbpedia.org/resource/Linux"],
  not_entities_title_links_dbpedia: ["http://dbpedia.org/resource/Windows"],
  entities_body_text: ["Free Software", "Open Source"],
  not_entities_body_text: ["Barack Obama", "Trump"],
  entities_body_type: ["Software", "Organization"],
  not_entities_body_type: ["Agent", "Person"],
  entities_body_links_dbpedia: ["http://dbpedia.org/resource/Linux"],
  not_entities_body_links_dbpedia: ["http://dbpedia.org/resource/Windows"],
  sentiment_title_polarity: "positive",
  not_sentiment_title_polarity: "neutral",
  sentiment_body_polarity: "negative",
  not_sentiment_body_polarity: "positive",
  media_images_count_min: 3,
  media_images_count_max: 3,
  media_images_width_min: 640,
  media_images_width_max: 1024,
  media_images_height_min: 480,
  media_images_height_max: 800,
  media_images_content_length_min: 25411,
  media_images_content_length_max: 369541,
  media_images_format: ["JPEG", "BMP", "GIF"],
  not_media_images_format: ["TIFF", "PNG"],
  media_videos_count_min: 1,
  media_videos_count_max: 2,
  author_id: [4155],
  not_author_id: [2541],
  author_name: "John Doe",
  not_author_name: "Mike Wally",
  source_id: [124],
  not_source_id: [54],
  source_name: ["BBC"],
  not_source_name: ["Fox News"],
  source_domain: ["bbc.co.uk"],
  not_source_domain: ["foxnews.com"],
  source_locations_country: ["US", "IE"],
  not_source_locations_country: ["JP", "GB"],
  source_locations_state: ["California"],
  not_source_locations_state: ["Arizona"],
  source_locations_city: ["Los Angeles"],
  not_source_locations_city: ["Dublin City"],
  source_scopes_country: ["GB", "IE"],
  not_source_scopes_country: ["US", "JP"],
  source_scopes_state: ["Co Dublin"],
  not_source_scopes_state: ["Co Wicklow"],
  source_scopes_city: ["Cork"],
  not_source_scopes_city: ["Galway"],
  source_scopes_level: ["local"],
  not_source_scopes_level: ["national"],
  source_links_in_count_min: 126333,
  source_links_in_count_max: 521000,
  source_rankings_alexa_rank_min: 123,
  source_rankings_alexa_rank_max: 152,
  source_rankings_alexa_country: ["IE"],
  social_shares_count_facebook_min: 3521,
  social_shares_count_facebook_max: 5841,
  social_shares_count_google_plus_min: 2541,
  social_shares_count_google_plus_max: 36541,
  social_shares_count_linkedin_min: 6521,
  social_shares_count_linkedin_max: 32541,
  social_shares_count_reddit_min: 14521,
  social_shares_count_reddit_max: 95841,
  cluster: false,
  cluster_algorithm: "kmeans",
  _return: ["id", "title", "body", "published_at"],
  story_id: 789,
  story_url: "https://techcrunch.com/2016/04/07/aylien-launches-news-analysis-api-powered-by-its-deep-learning-tech/",
  story_title: "Aylien launches news analysis API powered by its deep learning tech",
  story_body: "Text analysis startup Aylien, which uses deep learning ...",
  boost_by: "recency",
  story_language: "auto",
  per_page: 3
}

begin
  #List related stories
  result = api_instance.list_related_stories(opts)
  puts result
rescue AylienNewsApi::ApiError => e
  puts "Exception when calling DefaultApi->list_related_stories: #{e}"
  puts e.response_body
end
/*
  View all parameters and methods here:
  https://github.com/AYLIEN/aylien_newsapi_go/blob/master/docs/DefaultApi.md#listrelatedstories
*/

package main

// Import the library
import (
  "fmt"
  newsapi "github.com/AYLIEN/aylien_newsapi_go"
)

func main() {
  api := newsapi.NewDefaultApi()

  // Configure API key authorization: app_id
  api.Configuration.APIKeyPrefix["X-AYLIEN-NewsAPI-Application-ID"] = "YOUR_APP_ID"

  // Configure API key authorization: app_key
  api.Configuration.APIKeyPrefix["X-AYLIEN-NewsAPI-Application-Key"] = "YOUR_APP_KEY"

  id := []int64{2541}
  notId := []int64{5411, 6565}
  title := "startup AND (raise OR raised OR raising OR raises)"
  body := "startup"
  text := "startup company"
  language := []string{"en", "de"}
  notLanguage := []string{"it", "es"}
  publishedAtStart := "NOW-2MONTHS"
  publishedAtEnd := "NOW"
  categoriesTaxonomy := "iptc-subjectcode"
  categoriesConfident := "true"
  categoriesId := []string{"11000000"}
  notCategoriesId := []string{"10000000", "04001000"}
  categoriesLevel := []int32{3}
  notCategoriesLevel := []int32{1, 2}
  entitiesTitleText := []string{"GNU/Linux"}
  notEntitiesTitleText := []string{"Windows", "Microsoft"}
  entitiesTitleType := []string{"Software", "Organization"}
  notEntitiesTitleType := []string{"Person", "Agent"}
  entitiesTitleLinksDbpedia := []string{"http://dbpedia.org/resource/Linux"}
  notEntitiesTitleLinksDbpedia := []string{"http://dbpedia.org/resource/Windows"}
  entitiesBodyText := []string{"Free Software"}
  notEntitiesBodyText := []string{"Open Source Software"}
  entitiesBodyType := []string{"Software", "Organization"}
  notEntitiesBodyType := []string{"Agent", "Person"}
  entitiesBodyLinksDbpedia := []string{"http://dbpedia.org/resource/Linux"}
  notEntitiesBodyLinksDbpedia := []string{"http://dbpedia.org/resource/Microsoft"}
  sentimentTitlePolarity := "positive"
  notSentimentTitlePolarity := "neutral"
  sentimentBodyPolarity := "neutral"
  notSentimentBodyPolarity := "neutral"
  mediaImagesCountMin := "3"
  mediaImagesCountMax := "4"
  mediaImagesWidthMin := "640"
  mediaImagesWidthMax := "1024"
  mediaImagesHeightMin := "480"
  mediaImagesHeightMax := "800"
  mediaImagesContentLengthMin := "25412"
  mediaImagesContentLengthMax := "369521"
  mediaImagesFormat := []string{"JPEG", "BMP", "GIF"}
  notMediaImagesFormat := []string{"PNG", "TIFF"}
  mediaVideosCountMin := "1"
  mediaVideosCountMax := "2"
  authorId := []int32{144}
  notAuthorId := []int32{142, 455}
  authorName := "John Doe"
  notAuthorName := "Mike Wally"
  sourceId := []int32{163}
  notSourceId := []int32{354, 141}
  sourceName := []string{"BBC"}
  notSourceName := []string{"Fox News"}
  sourceDomain := []string{"bbc.co.uk"}
  notSourceDomain := []string{"foxnews.com"}
  sourceLocationsCountry := []string{"US"}
  notSourceLocationsCountry := []string{"IE", "IR"}
  sourceLocationsState := []string{"California"}
  notSourceLocationsState := []string{"Arizona"}
  sourceLocationsCity := []string{"Los Angeles"}
  notSourceLocationsCity := []string{"New York City"}
  sourceScopesCountry := []string{"IE"}
  notSourceScopesCountry := []string{"IE"}
  sourceScopesState := []string{"Co Dublin"}
  notSourceScopesState := []string{"Wicklow"}
  sourceScopesCity := []string{"Dublin City"}
  notSourceScopesCity := []string{"Cork"}
  sourceScopesLevel := []string{"local"}
  notSourceScopesLevel := []string{"national"}
  sourceLinksInCountMin := int32(142221)
  sourceLinksInCountMax := int32(325000)
  sourceRankingsAlexaRankMin := int32(1)
  sourceRankingsAlexaRankMax := int32(10)
  sourceRankingsAlexaCountry := []string{"IE"}
  socialSharesCountFacebookMin := "3521"
  socialSharesCountFacebookMax := "5841"
  socialSharesCountGooglePlusMin := "2514"
  socialSharesCountGooglePlusMax := "36521"
  socialSharesCountLinkedinMin := "6521"
  socialSharesCountLinkedinMax := "36521"
  socialSharesCountRedditMin := "14125"
  socialSharesCountRedditMax := "95412"
  cluster := "true"
  clusterAlgorithm := "stc"
  _return := []string{"id", "title", "body", "published_at"}
  storyId := int64(789)
  storyUrl := "https://techcrunch.com/2016/04/07/aylien-launches-news-analysis-api-powered-by-its-deep-learning-tech/"
  storyTitle := "Aylien launches news analysis API powered by its deep learning tech"
  storyBody := "Text analysis startup Aylien, which uses deep learning ..."
  boostBy := "recency"
  storyLanguage := "auto"
  perPage := int32(3)

  relatedStoriesParams := &newsapi.RelatedStoriesParams{
    Id:                             id,
    NotId:                          notId,
    Title:                          title,
    Body:                           body,
    Text:                           text,
    Language:                       language,
    NotLanguage:                    notLanguage,
    PublishedAtStart:               publishedAtStart,
    PublishedAtEnd:                 publishedAtEnd,
    CategoriesTaxonomy:             categoriesTaxonomy,
    CategoriesConfident:            categoriesConfident,
    CategoriesId:                   categoriesId,
    NotCategoriesId:                notCategoriesId,
    CategoriesLevel:                categoriesLevel,
    NotCategoriesLevel:             notCategoriesLevel,
    EntitiesTitleText:              entitiesTitleText,
    NotEntitiesTitleText:           notEntitiesTitleText,
    EntitiesTitleType:              entitiesTitleType,
    NotEntitiesTitleType:           notEntitiesTitleType,
    EntitiesTitleLinksDbpedia:      entitiesTitleLinksDbpedia,
    NotEntitiesTitleLinksDbpedia:   notEntitiesTitleLinksDbpedia,
    EntitiesBodyText:               entitiesBodyText,
    NotEntitiesBodyText:            notEntitiesBodyText,
    EntitiesBodyType:               entitiesBodyType,
    NotEntitiesBodyType:            notEntitiesBodyType,
    EntitiesBodyLinksDbpedia:       entitiesBodyLinksDbpedia,
    NotEntitiesBodyLinksDbpedia:    notEntitiesBodyLinksDbpedia,
    SentimentTitlePolarity:         sentimentTitlePolarity,
    NotSentimentTitlePolarity:      notSentimentTitlePolarity,
    SentimentBodyPolarity:          sentimentBodyPolarity,
    NotSentimentBodyPolarity:       notSentimentBodyPolarity,
    MediaImagesCountMin:            mediaImagesCountMin,
    MediaImagesCountMax:            mediaImagesCountMax,
    MediaImagesWidthMin:            mediaImagesWidthMin,
    MediaImagesWidthMax:            mediaImagesWidthMax,
    MediaImagesHeightMin:           mediaImagesHeightMin,
    MediaImagesHeightMax:           mediaImagesHeightMax,
    MediaImagesContentLengthMin:    mediaImagesContentLengthMin,
    MediaImagesContentLengthMax:    mediaImagesContentLengthMax,
    MediaImagesFormat:              mediaImagesFormat,
    NotMediaImagesFormat:           notMediaImagesFormat,
    MediaVideosCountMin:            mediaVideosCountMin,
    MediaVideosCountMax:            mediaVideosCountMax,
    AuthorId:                       authorId,
    NotAuthorId:                    notAuthorId,
    AuthorName:                     authorName,
    NotAuthorName:                  notAuthorName,
    SourceId:                       sourceId,
    NotSourceId:                    notSourceId,
    SourceName:                     sourceName,
    NotSourceName:                  notSourceName,
    SourceDomain:                   sourceDomain,
    NotSourceDomain:                notSourceDomain,
    SourceLocationsCountry:         sourceLocationsCountry,
    NotSourceLocationsCountry:      notSourceLocationsCountry,
    SourceLocationsState:           sourceLocationsState,
    NotSourceLocationsState:        notSourceLocationsState,
    SourceLocationsCity:            sourceLocationsCity,
    NotSourceLocationsCity:         notSourceLocationsCity,
    SourceScopesCountry:            sourceScopesCountry,
    NotSourceScopesCountry:         notSourceScopesCountry,
    SourceScopesState:              sourceScopesState,
    NotSourceScopesState:           notSourceScopesState,
    SourceScopesCity:               sourceScopesCity,
    NotSourceScopesCity:            notSourceScopesCity,
    SourceScopesLevel:              sourceScopesLevel,
    NotSourceScopesLevel:           notSourceScopesLevel,
    SourceLinksInCountMin:          sourceLinksInCountMin,
    SourceLinksInCountMax:          sourceLinksInCountMax,
    SourceRankingsAlexaRankMin:     sourceRankingsAlexaRankMin,
    SourceRankingsAlexaRankMax:     sourceRankingsAlexaRankMax,
    SourceRankingsAlexaCountry:     sourceRankingsAlexaCountry,
    SocialSharesCountFacebookMin:   socialSharesCountFacebookMin,
    SocialSharesCountFacebookMax:   socialSharesCountFacebookMax,
    SocialSharesCountGooglePlusMin: socialSharesCountGooglePlusMin,
    SocialSharesCountGooglePlusMax: socialSharesCountGooglePlusMax,
    SocialSharesCountLinkedinMin:   socialSharesCountLinkedinMin,
    SocialSharesCountLinkedinMax:   socialSharesCountLinkedinMax,
    SocialSharesCountRedditMin:     socialSharesCountRedditMin,
    SocialSharesCountRedditMax:     socialSharesCountRedditMax,
    Cluster:                        cluster,
    ClusterAlgorithm:               clusterAlgorithm,
    Return:                         _return,
    StoryId:                        storyId,
    StoryUrl:                       storyUrl,
    StoryTitle:                     storyTitle,
    StoryBody:                      storyBody,
    BoostBy:                        boostBy,
    StoryLanguage:                  storyLanguage,
    PerPage:                        perPage}

  relatedStoriesResponse, res, err := api.ListRelatedStories(relatedStoriesParams)
  if err != nil {
    panic(err)
  }

  _ = res

  fmt.Println(relatedStoriesResponse)
}
/* 
  View all parameters and methods here:
  https://github.com/AYLIEN/aylien_newsapi_csharp/blob/master/docs/DefaultApi.md#listrelatedstories
*/

using System;
using System.Diagnostics;
using Aylien.NewsApi.Api;
using Aylien.NewsApi.Client;
using Aylien.NewsApi.Model;
using System.Collections.Generic;

namespace Example
{
    public class ListRelatedStoriesExample
    {
        static void Main(string[] args)
        {
            // Configure API key authorization: app_id
            Configuration.Default.ApiKey.Add("X-AYLIEN-NewsAPI-Application-ID", "YOUR_APP_ID");

            // Configure API key authorization: app_key
            Configuration.Default.ApiKey.Add("X-AYLIEN-NewsAPI-Application-Key", "YOUR_APP_KEY");

            var apiInstance = new DefaultApi();

            var id = new List<long?>() { 54121 };
            var notId = new List<long?>() { 21451 };
            var title = "startup AND (raise OR raised OR raising OR raises)";
            var body = "startup";
            var text = "startup company";
            var language = new List<string>() { "en", "it" };
            var notLanguage = new List<string>() { "es", "pt" };
            var publishedAtStart = "NOW-10DAYS";
            var publishedAtEnd = "NOW";
            var categoriesTaxonomy = "iab-qag";
            var categoriesConfident = true;
            var categoriesId = new List<string>() { "IAB15" };
            var notCategoriesId = new List<string>() { "IAB2-3" };
            var categoriesLevel = new List<int?>() { 1 };
            var notCategoriesLevel = new List<int?>() { 2 };
            var entitiesTitleText = new List<string>() { "GNU/Linux", "Microsoft" };
            var notEntitiesTitleText = new List<string>() { "Windows" };
            var entitiesTitleType = new List<string>() { "Organization", "Software" };
            var notEntitiesTitleType = new List<string>() { "Person", "Agent" };
            var entitiesTitleLinksDbpedia = new List<string>() { "http://dbpedia.org/resource/Donald_Trump" };
            var notEntitiesTitleLinksDbpedia = new List<string>() { "http://dbpedia.org/resource/Linux" };
            var entitiesBodyText = new List<string>() { "GNU/Linux", "Apple" };
            var notEntitiesBodyText = new List<string>() { "Windows" };
            var entitiesBodyType = new List<string>() { "Person", "Agent" };
            var notEntitiesBodyType = new List<string>() { "Organization", "Software" };
            var entitiesBodyLinksDbpedia = new List<string>() { "http://dbpedia.org/resource/Windows" };
            var notEntitiesBodyLinksDbpedia = new List<string>() { "http://dbpedia.org/resource/Linux" };
            var sentimentTitlePolarity = "positive";
            var notSentimentTitlePolarity = "negative";
            var sentimentBodyPolarity = "neutral";
            var notSentimentBodyPolarity = "negative";
            var mediaImagesCountMin = 2;
            var mediaImagesCountMax = 10;
            var mediaImagesWidthMin = 640;
            var mediaImagesWidthMax = 1024;
            var mediaImagesHeightMin = 480;
            var mediaImagesHeightMax = 800;
            var mediaImagesContentLengthMin = 25411;
            var mediaImagesContentLengthMax = 369541;
            var mediaImagesFormat = new List<string>() { "JPEG", "BMP", "GIF" };
            var notMediaImagesFormat = new List<string>() { "PNG", "TIFF" };
            var mediaVideosCountMin = 1;
            var mediaVideosCountMax = 4;
            var authorId = new List<int?>() { 2154 };
            var notAuthorId = new List<int?>() { 5412 };
            var authorName = "John Doe";
            var notAuthorName = "Mike Wally";
            var sourceId = new List<int?>() { 1467 };
            var notSourceId = new List<int?>() { 1524 };
            var sourceName = new List<string>() { "BBC" };
            var notSourceName = new List<string>() { "Fox News" };
            var sourceDomain = new List<string>() { "bbc.co.uk" };
            var notSourceDomain = new List<string>() { "foxnews.com" };
            var sourceLocationsCountry = new List<string>() { "US", "IE" };
            var notSourceLocationsCountry = new List<string>() { "NG" };
            var sourceLocationsState = new List<string>() { "California" };
            var notSourceLocationsState = new List<string>() { "Arizona" };
            var sourceLocationsCity = new List<string>() { "Los Angeles" };
            var notSourceLocationsCity = new List<string>() { "New York City" };
            var sourceScopesCountry = new List<string>() { "NG", "IE" };
            var notSourceScopesCountry = new List<string>() { "US", "IR" };
            var sourceScopesState = new List<string>() { "Co Dublin" };
            var notSourceScopesState = new List<string>() { "Co Wicklow" };
            var sourceScopesCity = new List<string>() { "Dublin City" };
            var notSourceScopesCity = new List<string>() { "Cork" };
            var sourceScopesLevel = new List<string>() { "local" };
            var notSourceScopesLevel = new List<string>() { "national" };
            var sourceLinksInCountMin = 5000;
            var sourceLinksInCountMax = 10000;
            var sourceRankingsAlexaRankMin = 1;
            var sourceRankingsAlexaRankMax = 2000;
            var sourceRankingsAlexaCountry = new List<string>() { "IE" };
            var socialSharesCountFacebookMin = 3521;
            var socialSharesCountFacebookMax = 5841;
            var socialSharesCountGooglePlusMin = 251;
            var socialSharesCountGooglePlusMax = 6521;
            var socialSharesCountLinkedinMin = 4125;
            var socialSharesCountLinkedinMax = 15214;
            var socialSharesCountRedditMin = 1584;
            var socialSharesCountRedditMax = 95412;
            var cluster = true;
            var clusterAlgorithm = "kmeans";
            var _return = new List<string>() { "id", "title", "entities" };
            var storyId = 789;
            var storyUrl = "https://techcrunch.com/2016/04/07/aylien-launches-news-analysis-api-powered-by-its-deep-learning-tech/";
            var storyTitle = "Aylien launches news analysis API powered by its deep learning tech";
            var storyBody = "Text analysis startup Aylien...";
            var boostBy = "recency";
            var storyLanguage = "en";
            var perPage = 10;

            try
            {
                // List related stories
                RelatedStories result = apiInstance.ListRelatedStories(
                    id: id,
                    notId: notId,
                    title: title,
                    body: body,
                    text: text,
                    language: language,
                    notLanguage: notLanguage,
                    publishedAtStart: publishedAtStart,
                    publishedAtEnd: publishedAtEnd,
                    categoriesTaxonomy: categoriesTaxonomy,
                    categoriesConfident: categoriesConfident,
                    categoriesId: categoriesId,
                    notCategoriesId: notCategoriesId,
                    categoriesLevel: categoriesLevel,
                    notCategoriesLevel: notCategoriesLevel,
                    entitiesTitleText: entitiesTitleText,
                    notEntitiesTitleText: notEntitiesTitleText,
                    entitiesTitleType: entitiesTitleType,
                    notEntitiesTitleType: notEntitiesTitleType,
                    entitiesTitleLinksDbpedia: entitiesTitleLinksDbpedia,
                    notEntitiesTitleLinksDbpedia: notEntitiesTitleLinksDbpedia,
                    entitiesBodyText: entitiesBodyText,
                    notEntitiesBodyText: notEntitiesBodyText,
                    entitiesBodyType: entitiesBodyType,
                    notEntitiesBodyType: notEntitiesBodyType,
                    entitiesBodyLinksDbpedia: entitiesBodyLinksDbpedia,
                    notEntitiesBodyLinksDbpedia: notEntitiesBodyLinksDbpedia,
                    sentimentTitlePolarity: sentimentTitlePolarity,
                    notSentimentTitlePolarity: notSentimentTitlePolarity,
                    sentimentBodyPolarity: sentimentBodyPolarity,
                    notSentimentBodyPolarity: notSentimentBodyPolarity,
                    mediaImagesCountMin: mediaImagesCountMin,
                    mediaImagesCountMax: mediaImagesCountMax,
                    mediaImagesWidthMin: mediaImagesWidthMin,
                    mediaImagesWidthMax: mediaImagesWidthMax,
                    mediaImagesHeightMin: mediaImagesHeightMin,
                    mediaImagesHeightMax: mediaImagesHeightMax,
                    mediaImagesContentLengthMin: mediaImagesContentLengthMin,
                    mediaImagesContentLengthMax: mediaImagesContentLengthMax,
                    mediaImagesFormat: mediaImagesFormat,
                    notMediaImagesFormat: notMediaImagesFormat,
                    mediaVideosCountMin: mediaVideosCountMin,
                    mediaVideosCountMax: mediaVideosCountMax,
                    authorId: authorId,
                    notAuthorId: notAuthorId,
                    authorName: authorName,
                    notAuthorName: notAuthorName,
                    sourceId: sourceId,
                    notSourceId: notSourceId,
                    sourceName: sourceName,
                    notSourceName: notSourceName,
                    sourceDomain: sourceDomain,
                    notSourceDomain: notSourceDomain,
                    sourceLocationsCountry: sourceLocationsCountry,
                    notSourceLocationsCountry: notSourceLocationsCountry,
                    sourceLocationsState: sourceLocationsState,
                    notSourceLocationsState: notSourceLocationsState,
                    sourceLocationsCity: sourceLocationsCity,
                    notSourceLocationsCity: notSourceLocationsCity,
                    sourceScopesCountry: sourceScopesCountry,
                    notSourceScopesCountry: notSourceScopesCountry,
                    sourceScopesState: sourceScopesState,
                    notSourceScopesState: notSourceScopesState,
                    sourceScopesCity: sourceScopesCity,
                    notSourceScopesCity: notSourceScopesCity,
                    sourceScopesLevel: sourceScopesLevel,
                    notSourceScopesLevel: notSourceScopesLevel,
                    sourceLinksInCountMin: sourceLinksInCountMin,
                    sourceLinksInCountMax: sourceLinksInCountMax,
                    sourceRankingsAlexaRankMin: sourceRankingsAlexaRankMin,
                    sourceRankingsAlexaRankMax: sourceRankingsAlexaRankMax,
                    sourceRankingsAlexaCountry: sourceRankingsAlexaCountry,
                    socialSharesCountFacebookMin: socialSharesCountFacebookMin,
                    socialSharesCountFacebookMax: socialSharesCountFacebookMax,
                    socialSharesCountGooglePlusMin: socialSharesCountGooglePlusMin,
                    socialSharesCountGooglePlusMax: socialSharesCountGooglePlusMax,
                    socialSharesCountLinkedinMin: socialSharesCountLinkedinMin,
                    socialSharesCountLinkedinMax: socialSharesCountLinkedinMax,
                    socialSharesCountRedditMin: socialSharesCountRedditMin,
                    socialSharesCountRedditMax: socialSharesCountRedditMax,
                    cluster: cluster,
                    clusterAlgorithm: clusterAlgorithm,
                    _return: _return,
                    storyId: storyId,
                    storyUrl: storyUrl,
                    storyTitle: storyTitle,
                    storyBody: storyBody,
                    boostBy: boostBy,
                    storyLanguage: storyLanguage,
                    perPage: perPage
                );
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DefaultApi.ListRelatedStories: " + e.Message);
            }
        }
    }
}

Related Stories returns semantically similar stories for an input article, or any free-form text. For example, if you want to find stories similar to a tweet, you can supply the text of the tweet, and Related Stories will analyze it to extract topics and entities from it, and find stories with similar topical distribution and entities. You can use the standard filtering options to set additional filters, for example to retrieve stories that are related to an input story, but from a particular source, or with a particular sentiment.

HTTP Request

  • GET https://api.newsapi.aylien.com/api/v1/related_stories
  • POST https://api.newsapi.aylien.com/api/v1/related_stories

Parameters

Name Description
X-AYLIEN-NewsAPI-Application-ID *
string
(header)
x-data-threescale-name: app_ids

Your access API ID

X-AYLIEN-NewsAPI-Application-Key *
string
(header)
x-data-threescale-name: app_keys

Your access API Key

id[]
array [integer]
(query)

This parameter is used for finding stories by story id.

!id[]
array [integer]
(query)

This parameter is used for excluding stories by story id.

title
string
(query)

This parameter is used for finding stories whose title contains a specific keyword. It supports boolean operators.

body
string
(query)

This parameter is used for finding stories whose body contains a specific keyword. It supports boolean operators.

text
string
(query)

This parameter is used for finding stories whose title or body contains a specific keyword. It supports boolean operators.

language[]
array [string]
(query)

This parameter is used for finding stories whose language is the specified value. It supports ISO 639-1 language codes.

Available values: en, de, fr, it, es, pt

!language[]
array [string]
(query)

This parameter is used for excluding stories whose language is the specified value. It supports ISO 639-1 language codes.

Available values: en, de, fr, it, es, pt

published_at.start
string
(query)

This parameter is used for finding stories whose published at time is greater than the specified value. Here you can find more information about how to work with dates.

published_at.end
string
(query)

This parameter is used for finding stories whose published at time is less than the specified value. Here you can find more information about how to work with dates.

categories.taxonomy
string
(query)

This parameter is used for defining the type of the taxonomy for the rest of the categories queries. You can read more about working with categories here.

categories.confident
boolean
(query)

This parameter is used for finding stories whose categories are confident. You can read more about working with categories here.

Default value: true

categories.id[]
array [string]
(query)

This parameter is used for finding stories by categories id. You can read more about working with categories here, and find category ids here.

!categories.id[]
array [string]
(query)

This parameter is used for excluding stories by categories id. You can read more about working with categories here, and find category ids here.

categories.level[]
array [integer]
(query)

This parameter is used for finding stories by categories level. You can read more about working with categories here, and find category ids here.

!categories.level[]
array [integer]
(query)

This parameter is used for excluding stories by categories level. You can read more about working with categories here, and find category ids here.

entities.title.text[]
array [string]
(query)

This parameter is used to find stories based on the specified entities text in story titles. You can read more about working with entities here.

!entities.title.text[]
array [string]
(query)

This parameter is used to exclude stories based on the specified entities text in story titles. You can read more about working with entities here.

entities.title.type[]
array [string]
(query)

This parameter is used to find stories based on the specified entities type in story titles. You can read more about working with entities here.

!entities.title.type[]
array [string]
(query)

This parameter is used to exclude stories based on the specified entities type in story titles. You can read more about working with entities here.

entities.title.links.dbpedia[]
array [string]
(query)

This parameter is used to find stories based on the specified entities dbpedia URL in story titles. You can read more about working with entities here.

!entities.title.links.dbpedia[]
array [string]
(query)

This parameter is used to exclude stories based on the specified entities dbpedia URL in story titles. You can read more about working with entities here.

entities.body.text[]
array [string]
(query)

This parameter is used to find stories based on the specified entities text in the body of stories. You can read more about working with entities here.

!entities.body.text[]
array [string]
(query)

This parameter is used to exclude stories based on the specified entities text in the body of stories. You can read more about working with entities here.

entities.body.type[]
array [string]
(query)

This parameter is used to find stories based on the specified entities type in the body of stories. You can read more about working with entities here.

!entities.body.type[]
array [string]
(query)

This parameter is used to exclude stories based on the specified entities type in the body of stories. You can read more about working with entities here.

entities.body.links.dbpedia[]
array [string]
(query)

This parameter is used to find stories based on the specified entities dbpedia URL in the body of stories. You can read more about working with entities here.

!entities.body.links.dbpedia[]
array [string]
(query)

This parameter is used to exclude stories based on the specified entities dbpedia URL in the body of stories. You can read more about working with entities here.

sentiment.title.polarity
string
(query)

This parameter is used for finding stories whose title sentiment is the specified value.

!sentiment.title.polarity
string
(query)

This parameter is used for excluding stories whose title sentiment is the specified value.

sentiment.body.polarity
string
(query)

This parameter is used for finding stories whose body sentiment is the specified value.

!sentiment.body.polarity
string
(query)

This parameter is used for excluding stories whose body sentiment is the specified value.

media.images.count.min
integer
(query)

This parameter is used for finding stories whose number of images is greater than or equal to the specified value.

media.images.count.max
integer
(query)

This parameter is used for finding stories whose number of images is less than or equal to the specified value.

media.images.width.min
integer
(query)

This parameter is used for finding stories whose width of images are greater than or equal to the specified value.

media.images.width.max
integer
(query)

This parameter is used for finding stories whose width of images are less than or equal to the specified value.

media.images.height.min
integer
(query)

This parameter is used for finding stories whose height of images are greater than or equal to the specified value.

media.images.height.max
integer
(query)

This parameter is used for finding stories whose height of images are less than or equal to the specified value.

media.images.content_length.min
integer
(query)

This parameter is used for finding stories whose images content length are greater than or equal to the specified value.

media.images.content_length.max
integer
(query)

This parameter is used for finding stories whose images content length are less than or equal to the specified value.

media.images.format[]
array [string]
(query)

This parameter is used for finding stories whose images format are the specified value.

Available values: BMP, GIF, JPEG, PNG, TIFF, PSD, ICO, CUR, WEBP, SVG

!media.images.format[]
array [string]
(query)

This parameter is used for excluding stories whose images format are the specified value.

Available values: BMP, GIF, JPEG, PNG, TIFF, PSD, ICO, CUR, WEBP, SVG

media.videos.count.min
integer
(query)

This parameter is used for finding stories whose number of videos is greater than or equal to the specified value.

media.videos.count.max
integer
(query)

This parameter is used for finding stories whose number of videos is less than or equal to the specified value.

author.id[]
array [integer]
(query)

This parameter is used for finding stories whose author id is the specified value.

!author.id[]
array [integer]
(query)

This parameter is used for excluding stories whose author id is the specified value.

author.name
string
(query)

This parameter is used for finding stories whose author full name contains the specified value.

!author.name
string
(query)

This parameter is used for excluding stories whose author full name contains the specified value.

source.id[]
array [integer]
(query)

This parameter is used for finding stories whose source id is the specified value.

!source.id[]
array [integer]
(query)

This parameter is used for excluding stories whose source id is the specified value.

source.name[]
array [string]
(query)

This parameter is used for finding stories whose source name contains the specified value.

!source.name[]
array [string]
(query)

This parameter is used for excluding stories whose source name contains the specified value.

source.domain[]
array [string]
(query)

This parameter is used for finding stories whose source domain is the specified value.

!source.domain[]
array [string]
(query)

This parameter is used for excluding stories whose source domain is the specified value.

source.locations.country[]
array [string]
(query)

This parameter is used for finding stories whose source country is the specified value. It supports ISO 3166-1 alpha-2 country codes. Here you can find more information about how to work with locations.

!source.locations.country[]
array [string]
(query)

This parameter is used for excluding stories whose source country is the specified value. It supports ISO 3166-1 alpha-2 country codes. Here you can find more information about how to work with locations.

source.locations.state[]
array [string]
(query)

This parameter is used for finding stories whose source state/province is the specified value. Here you can find more information about how to work with locations.

!source.locations.state[]
array [string]
(query)

This parameter is used for excluding stories whose source state/province is the specified value. Here you can find more information about how to work with locations.

source.locations.city[]
array [string]
(query)

This parameter is used for finding stories whose source city is the specified value. Here you can find more information about how to work with locations.

!source.locations.city[]
array [string]
(query)

This parameter is used for excluding stories whose source city is the specified value. Here you can find more information about how to work with locations.

source.scopes.country[]
array [string]
(query)

This parameter is used for finding stories whose source scopes is the specified country value. It supports ISO 3166-1 alpha-2 country codes. Here you can find more information about how to work with locations.

!source.scopes.country[]
array [string]
(query)

This parameter is used for excluding stories whose source scopes is the specified country value. It supports ISO 3166-1 alpha-2 country codes. Here you can find more information about how to work with locations.

source.scopes.state[]
array [string]
(query)

This parameter is used for finding stories whose source scopes is the specified state/province value. Here you can find more information about how to work with locations.

!source.scopes.state[]
array [string]
(query)

This parameter is used for excluding stories whose source scopes is the specified state/province value. Here you can find more information about how to work with locations.

source.scopes.city[]
array [string]
(query)

This parameter is used for finding stories whose source scopes is the specified city value. Here you can find more information about how to work with locations.

!source.scopes.city[]
array [string]
(query)

This parameter is used for excluding stories whose source scopes is the specified city value. Here you can find more information about how to work with locations.

source.scopes.level[]
array [string]
(query)

This parameter is used for finding stories whose source scopes is the specified level value. Here you can find more information about how to work with locations.

Available values: international, national, local

!source.scopes.level[]
array [string]
(query)

This parameter is used for excluding stories whose source scopes is the specified level value. Here you can find more information about how to work with locations.

Available values: international, national, local

source.links_in_count.min
integer
(query)

This parameter is used for finding stories from sources whose Links in count is greater than or equal to the specified value. You can read more about working with Links in count here.

source.links_in_count.max
integer
(query)

This parameter is used for finding stories from sources whose Links in count is less than or equal to the specified value. You can read more about working with Links in count here.

source.rankings.alexa.rank.min
integer
(query)

This parameter is used for finding stories from sources whose Alexa rank is greater than or equal to the specified value. You can read more about working with Alexa ranks here.

source.rankings.alexa.rank.max
integer
(query)

This parameter is used for finding stories from sources whose Alexa rank is less than or equal to the specified value. You can read more about working with Alexa ranks here.

source.rankings.alexa.country[]
array [string]
(query)

This parameter is used for finding stories from sources whose Alexa rank is in the specified country value. It supports ISO 3166-1 alpha-2 country codes. You can read more about working with Alexa ranks here.

social_shares_count.facebook.min
integer
(query)

This parameter is used for finding stories whose Facebook social shares count is greater than or equal to the specified value.

social_shares_count.facebook.max
integer
(query)

This parameter is used for finding stories whose Facebook social shares count is less than or equal to the specified value.

social_shares_count.google_plus.min
integer
(query)

This parameter is used for finding stories whose Google+ social shares count is greater than or equal to the specified value.

social_shares_count.google_plus.max
integer
(query)

This parameter is used for finding stories whose Google+ social shares count is less than or equal to the specified value.

social_shares_count.linkedin.min
integer
(query)

This parameter is used for finding stories whose LinkedIn social shares count is greater than or equal to the specified value.

social_shares_count.linkedin.max
integer
(query)

This parameter is used for finding stories whose LinkedIn social shares count is less than or equal to the specified value.

social_shares_count.reddit.min
integer
(query)

This parameter is used for finding stories whose Reddit social shares count is greater than or equal to the specified value.

social_shares_count.reddit.max
integer
(query)

This parameter is used for finding stories whose Reddit social shares count is less than or equal to the specified value.

cluster
boolean
(query)

This parameter enables clustering for the returned stories. You can read more about working with clustering here.

Default value: false

cluster.algorithm
string
(query)

This parameter is used for specifying the clustering algorithm you wish to use. It supprts STC, Lingo and k-means algorithms. You can read more about working with clustering here.

Default value: lingo

return[]
array [string]
(query)

This parameter is used for specifying return fields.

Available values: id, title, body, summary, source, author, entities, keywords, hashtags, characters_count, words_count, sentences_count, paragraphs_count, categories, social_shares_count, media, sentiment, language, published_at, links

story_id
integer
(query)

A story id

story_url
string
(query)

An article or webpage

story_title
string
(query)

Title of the article

story_body
string
(query)

Body of the article

boost_by
string
(query)

This parameter is used for boosting the result by the specified value.

story_language
string
(query)

This parameter is used for setting the language of the story. It supports ISO 639-1 language codes.

Default value: auto

per_page
integer
(query)

This parameter is used for specifying number of items in each page.

Default value: 3

Response

Code Description
200

An object including an array of related stories

401

Unauthorized

404

Not Found

422

Unprocessable Entity

429

Too Many Requests

  • X-RateLimit-Limit: The number of allowed requests in the current period.
  • X-RateLimit-Remaining: The number of remaining requests in the current period.
  • X-RateLimit-Reset: The remaining window before the rate limit resets in UTC epoch seconds.
500

Internal Server Error

Coverages

Download and install an SDK from here.

/* 
  View all parameters and methods here:
  https://github.com/AYLIEN/aylien_newsapi_nodejs/blob/master/docs/DefaultApi.md#listCoverages
*/

var AylienNewsApi = require('aylien-news-api');

var apiInstance = new AylienNewsApi.DefaultApi();

// Configure API key authorization: app_id
var app_id = apiInstance.apiClient.authentications['app_id'];
app_id.apiKey = "YOUR_APP_ID";

// Configure API key authorization: app_key
var app_key = apiInstance.apiClient.authentications['app_key'];
app_key.apiKey = "YOUR_APP_KEY";

var opts = { 
  'id': [56],
  'notId': [154211],
  'title': "startup AND (raise OR raised OR raising OR raises)",
  'body': "startup",
  'text': "startup company",
  'language': ["en", "de"],
  'notLanguage': ["es", "it"],
  'publishedAtStart': "NOW-10DAYS",
  'publishedAtEnd': "NOW",
  'categoriesTaxonomy': "iptc-subjectcode",
  'categoriesConfident': true,
  'categoriesId': ["11000000"],
  'notCategoriesId': ["04002001"],
  'categoriesLevel': [1],
  'notCategoriesLevel': [3],
  'entitiesTitleText': ["GNU/Linux"],
  'notEntitiesTitleText': ["Microsoft", "Google"],
  'entitiesTitleType': ["Software", "Organization"],
  'notEntitiesTitleType': ["Person", "Agent"],
  'entitiesTitleLinksDbpedia': ["http://dbpedia.org/resource/Linux"],
  'notEntitiesTitleLinksDbpedia': ["http://dbpedia.org/resource/Windows"],
  'entitiesBodyText': ["Free Software"],
  'notEntitiesBodyText': ["Open Source"],
  'entitiesBodyType': ["Software", "Organization"],
  'notEntitiesBodyType': ["Person", "Agent"],
  'entitiesBodyLinksDbpedia': ["http://dbpedia.org/resource/Linux"],
  'notEntitiesBodyLinksDbpedia': ["http://dbpedia.org/resource/Microsoft"],
  'sentimentTitlePolarity': "positive",
  'notSentimentTitlePolarity': "neutral",
  'sentimentBodyPolarity': "negative",
  'notSentimentBodyPolarity': "neutral",
  'mediaImagesCountMin': 1,
  'mediaImagesCountMax': 2,
  'mediaImagesWidthMin': 640,
  'mediaImagesWidthMax': 1024,
  'mediaImagesHeightMin': 480,
  'mediaImagesHeightMax': 800,
  'mediaImagesContentLengthMin': 25412,
  'mediaImagesContentLengthMax': 369521,
  'mediaImagesFormat': ['JPEG', 'BMP', 'GIF'],
  'notMediaImagesFormat': ['TIFF', 'PNG'],
  'mediaVideosCountMin': 2,
  'mediaVideosCountMax': 2,
  'authorId': [5411],
  'notAuthorId': [65211],
  'authorName': "John Doe",
  'notAuthorName': "Mike Wali",
  'sourceId': [1422],
  'notSourceId': [51],
  'sourceName': ["BBC"],
  'notSourceName': ["Fox News"],
  'sourceDomain': ["bbc.co.uk"],
  'notSourceDomain': ["foxnews.com"],
  'sourceLocationsCountry': ["US"],
  'notSourceLocationsCountry': ["IE"],
  'sourceLocationsState': ["California"],
  'notSourceLocationsState': ["Arizona"],
  'sourceLocationsCity': ["Los Angeles"],
  'notSourceLocationsCity': ["Chandler"],
  'sourceScopesCountry': ["IE"],
  'notSourceScopesCountry': ["IT"],
  'sourceScopesState': ["Co Dublin"],
  'notSourceScopesState': ["Co Wicklow"],
  'sourceScopesCity': ["Dublin City"],
  'notSourceScopesCity': ["Cork"],
  'sourceScopesLevel': ["local"],
  'notSourceScopesLevel': ["national"],
  'sourceLinksInCountMin': 254111,
  'sourceLinksInCountMax': 352541,
  'sourceRankingsAlexaRankMin': 36,
  'sourceRankingsAlexaRankMax': 500,
  'sourceRankingsAlexaCountry': ["IE"],
  'socialSharesCountFacebookMin': 3521,
  'socialSharesCountFacebookMax': 5841,
  'socialSharesCountGooglePlusMin': 2514,
  'socialSharesCountGooglePlusMax': 36521,
  'socialSharesCountLinkedinMin': 6521,
  'socialSharesCountLinkedinMax': 36521,
  'socialSharesCountRedditMin': 14125,
  'socialSharesCountRedditMax': 95412,
  'cluster': false,
  'clusterAlgorithm': "lingo",
  '_return': ["id", "title", "body", "published_at"],
  'storyId': 789,
  'storyUrl': "https://techcrunch.com/2016/04/07/aylien-launches-news-analysis-api-powered-by-its-deep-learning-tech/",
  'storyTitle': "Aylien launches news analysis API powered by its deep learning tech",
  'storyBody': "Text analysis startup Aylien, which uses deep learning ...",
  'storyPublishedAt': new Date("2013-10-20T19:20:30Z"),
  'storyLanguage': "auto",
  'perPage': 3
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + JSON.stringify(data));
  }
};
apiInstance.listCoverages(opts, callback);
# View all parameters and methods here:
# https://github.com/AYLIEN/aylien_newsapi_python/blob/master/docs/DefaultApi.md#list_coverages

import aylien_news_api
from aylien_news_api.rest import ApiException
from datetime import datetime
from pprint import pprint

# Configure API key authorization: app_id
aylien_news_api.configuration.api_key['X-AYLIEN-NewsAPI-Application-ID'] = 'YOUR_APP_ID'
# Configure API key authorization: app_key
aylien_news_api.configuration.api_key['X-AYLIEN-NewsAPI-Application-Key'] = 'YOUR_APP_KEY'

# create an instance of the API class
api_instance = aylien_news_api.DefaultApi()


opts = { 
    'id': [521411],
    'not_id': [2511],
    'title': 'startup AND (raise OR raised OR raising OR raises)',
    'body': 'startup',
    'text': 'startup company',
    'language': ['en', 'it'],
    'not_language': ['es', 'pt'],
    'published_at_start': 'NOW-10DAYS',
    'published_at_end': 'NOW',
    'categories_taxonomy': 'iab-qag',
    'categories_confident': True,
    'categories_id': ['IAB15', 'IAB1-2'],
    'not_categories_id': ['IAB10', 'IAB3'],
    'categories_level': [1],
    'not_categories_level': [2],
    'entities_title_text': ['GNU/Linux'],
    'not_entities_title_text': ['Microsoft', 'Google'],
    'entities_title_type': ['Software', 'Organization'],
    'not_entities_title_type': ['Agent', 'Person'],
    'entities_title_links_dbpedia': ['http://dbpedia.org/resource/Donald_Trump'],
    'not_entities_title_links_dbpedia': ['http://dbpedia.org/resource/Windows'],
    'entities_body_text': ['GNU/Linux', 'Microsoft'],
    'not_entities_body_text': ['Windows Vista', 'Windows XP'],
    'entities_body_type': ['Software', 'Organization'],
    'not_entities_body_type': ['Agent', 'Person'],
    'entities_body_links_dbpedia': ['http://dbpedia.org/resource/Microsoft'],
    'not_entities_body_links_dbpedia': ['http://dbpedia.org/resource/Google'],
    'sentiment_title_polarity': 'positive',
    'not_sentiment_title_polarity': 'neutral',
    'sentiment_body_polarity': 'negative',
    'not_sentiment_body_polarity': 'positive',
    'media_images_count_min': 1,
    'media_images_count_max': 10,
    'media_images_width_min': 640,
    'media_images_width_max': 1024,
    'media_images_height_min': 480,
    'media_images_height_max': 800,
    'media_images_content_length_min': 25411,
    'media_images_content_length_max': 369541,
    'media_images_format': ['JPEG', 'BMP', 'GIF'],
    'not_media_images_format': ['PNG', 'TIFF'],
    'media_videos_count_min': 3,
    'media_videos_count_max': 5,
    'author_id': [352],
    'not_author_id': [541],
    'author_name': 'John Doe',
    'not_author_name': 'Mike Wally',
    'source_id': [1456],
    'not_source_id': [142],
    'source_name': ['BBC'],
    'not_source_name': ['Fox News'],
    'source_domain': ['bbc.co.uk'],
    'not_source_domain': ['foxnews.com'],
    'source_locations_country': ['US'],
    'not_source_locations_country': ['BR'],
    'source_locations_state': ['California'],
    'not_source_locations_state': ['Berkshire'],
    'source_locations_city': ['London'],
    'not_source_locations_city': ['Dublin'],
    'source_scopes_country': ['IE'],
    'not_source_scopes_country': ['IN'],
    'source_scopes_state': ['Tehran'],
    'not_source_scopes_state': ['Berkshire'],
    'source_scopes_city': ['Dublin'],
    'not_source_scopes_city': ['New York City'],
    'source_scopes_level': ['local'],
    'not_source_scopes_level': ['national'],
    'source_links_in_count_min': 401444,
    'source_links_in_count_max': 500000,
    'source_rankings_alexa_rank_min': 3,
    'source_rankings_alexa_rank_max': 100,
    'source_rankings_alexa_country': ['IE'],
    'social_shares_count_facebook_min': 3521,
    'social_shares_count_facebook_max': 2514,
    'social_shares_count_google_plus_min': 6521,
    'social_shares_count_google_plus_max': 36524,
    'social_shares_count_linkedin_min': 6528,
    'social_shares_count_linkedin_max': 952141,
    'social_shares_count_reddit_min': 14251,
    'social_shares_count_reddit_max': 95874,
    'cluster': False,
    'cluster_algorithm': 'kmeans',
    '_return': ['id', 'title'],
    'story_id': 789,
    'story_url': 'https://techcrunch.com/2016/04/07/aylien-launches-news-analysis-api-powered-by-its-deep-learning-tech/',
    'story_title': 'Aylien launches news analysis API powered by its deep learning tech',
    'story_body': 'Text analysis startup Aylien...',
    'story_published_at': datetime.utcnow(),
    'story_language': 'auto',
    'per_page': 3
}

try: 
    # List coverages
    api_response = api_instance.list_coverages(**opts)
    pprint(api_response)
except ApiException as e:
    pprint("Exception when calling DefaultApi->list_coverages: %s\n" % e)
<?php
/* 
  View all parameters and methods here:
  https://github.com/AYLIEN/aylien_newsapi_php/blob/master/docs/Api/DefaultApi.md#listCoverages
*/

require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: app_id
Aylien\NewsApi\Configuration::getDefaultConfiguration()->setApiKey('X-AYLIEN-NewsAPI-Application-ID', 'YOUR_APP_ID');

// Configure API key authorization: app_key
Aylien\NewsApi\Configuration::getDefaultConfiguration()->setApiKey('X-AYLIEN-NewsAPI-Application-Key', 'YOUR_APP_KEY');

$api_instance = new Aylien\NewsApi\Api\DefaultApi();


$opts = array(
    'id' => array(36521),
    'not_id' => array(36222),
    'title' => "startup AND (raise OR raised OR raising OR raises)",
    'body' => "startup",
    'text' => "startup company",
    'language' => array("en","pt"),
    'not_language' => array("es","it"),
    'published_at_start' => "NOW-10DAYS",
    'published_at_end' => "NOW",
    'categories_taxonomy' => "iptc-subjectcode",
    'categories_confident' => false,
    'categories_id' => array("11000000","11003000"),
    'not_categories_id' => array("04001001"),
    'categories_level' => array(1),
    'not_categories_level' => array(2,3),
    'entities_title_text' => array("GNU/Linux","Microsoft"),
    'not_entities_title_text' => array("Windows","Ireland"),
    'entities_title_type' => array("Software","Organization"),
    'not_entities_title_type' => array("Agent","Person"),
    'entities_title_links_dbpedia' => array("http://dbpedia.org/resource/Linux"),
    'not_entities_title_links_dbpedia' => array("http://dbpedia.org/resource/Microsoft"),
    'entities_body_text' => array("Free Software","Open Source"),
    'not_entities_body_text' => array("Proprietary Software"),
    'entities_body_type' => array("Software","Organization"),
    'not_entities_body_type' => array("Agent","Hardware"),
    'entities_body_links_dbpedia' => array("http://dbpedia.org/resource/Linux"),
    'not_entities_body_links_dbpedia' => array("http://dbpedia.org/resource/Windows"),
    'sentiment_title_polarity' => "positive",
    'not_sentiment_title_polarity' => "neutral",
    'sentiment_body_polarity' => "negative",
    'not_sentiment_body_polarity' => "positive",
    'media_images_count_min' => 1,
    'media_images_count_max' => 4,
    'media_images_width_min' => 640,
    'media_images_width_max' => 1024,
    'media_images_height_min' => 480,
    'media_images_height_max' => 800,
    'media_images_content_length_min' => 25412,
    'media_images_content_length_max' => 369541,
    'media_images_format' => array("JPEG","BMP", "GIF"),
    'not_media_images_format' => array("PNG","TIFF"),
    'media_videos_count_min' => 2,
    'media_videos_count_max' => 5,
    'author_id' => array(4155),
    'not_author_id' => array(3214),
    'author_name' => "John Doe",
    'not_author_name' => "Mike Wally",
    'source_id' => array(122),
    'not_source_id' => array(12, 34),
    'source_name' => array("BBC"),
    'not_source_name' => array("Fox News"),
    'source_domain' => array("bbc.co.uk"),
    'not_source_domain' => array("foxnews.com"),
    'source_locations_country' => array("US", "IE"),
    'not_source_locations_country' => array("IN", "NG"),
    'source_locations_state' => array("California"),
    'not_source_locations_state' => array("Arizona"),
    'source_locations_city' => array("Los Angeles"),
    'not_source_locations_city' => array("Dublin City"),
    'source_scopes_country' => array("IN", "IE"),
    'not_source_scopes_country' => array("US"),
    'source_scopes_state' => array("Wicklow"),
    'not_source_scopes_state' => array("California"),
    'source_scopes_city' => array("Dublin City"),
    'not_source_scopes_city' => array("Cork"),
    'source_scopes_level' => array("local"),
    'not_source_scopes_level' => array("international"),
    'source_links_in_count_min' => 254111,
    'source_links_in_count_max' => 587796,
    'source_rankings_alexa_rank_min' => 255,
    'source_rankings_alexa_rank_max' => 1421,
    'source_rankings_alexa_country' => array("IE"),
    'social_shares_count_facebook_min' => 3521,
    'social_shares_count_facebook_max' => 5841,
    'social_shares_count_google_plus_min' => 65241,
    'social_shares_count_google_plus_max' => 105214,
    'social_shares_count_linkedin_min' => 3254,
    'social_shares_count_linkedin_max' => 5621,
    'social_shares_count_reddit_min' => 255,
    'social_shares_count_reddit_max' => 9541,
    'cluster' => false,
    'cluster_algorithm' => "kmeans",
    'return' => array("id", "title", "published_at"),
    'story_id' => 789,
    'story_url' => "https://techcrunch.com/2016/04/07/aylien-launches-news-analysis-api-powered-by-its-deep-learning-tech/",
    'story_title' => "Aylien launches news analysis API powered by its deep learning tech",
    'story_body' => "Text analysis startup Aylien, which uses deep learning ...",
    'story_published_at' => new \DateTime(),
    'story_language' => "auto",
    'per_page' => 3
);

try {
    $result = $api_instance->listCoverages($opts);
    print_r($result);
} catch (Exception $e) {
    print_r($e->getResponseObject()->getErrors());
    echo 'Exception when calling DefaultApi->listCoverages: ', $e->getMessage(), PHP_EOL;
}
?>
/* 
  View all parameters and methods here:
  https://github.com/AYLIEN/aylien_newsapi_java/blob/master/docs/DefaultApi.md#listCoverages
*/

import com.aylien.newsapi.*;
import com.aylien.newsapi.auth.*;
import com.aylien.newsapi.models.*;
import com.aylien.newsapi.parameters.*;
import com.aylien.newsapi.api.DefaultApi;

import org.joda.time.DateTime;
import java.util.Arrays;
import java.util.List;

public class Main {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: app_id
        ApiKeyAuth app_id = (ApiKeyAuth) defaultClient.getAuthentication("app_id");
        app_id.setApiKey("YOUR_APP_ID");

        // Configure API key authorization: app_key
        ApiKeyAuth app_key = (ApiKeyAuth) defaultClient.getAuthentication("app_key");
        app_key.setApiKey("YOUR_APP_KEY");

        DefaultApi apiInstance = new DefaultApi();

        List<Long> id = Arrays.asList(985744L);
        List<Long> notId = Arrays.asList(5241L, 4412L);
        String title = "startup AND (raise OR raised OR raising OR raises)";
        String body = "startup";
        String text = "startup company";
        List<String> language = Arrays.asList("en", "es", "es");
        List<String> notLanguage = Arrays.asList("fr", "pt", "it");
        String publishedAtStart = "NOW-3MONTHS/DAY";
        String publishedAtEnd = "NOW-10DAYS";
        String categoriesTaxonomy = "iab-qag";
        Boolean categoriesConfident = true;
        List<String> categoriesId = Arrays.asList("IAB15", "IAB13-1");
        List<String> notCategoriesId = Arrays.asList("IAB3-2");
        List<Integer> categoriesLevel = Arrays.asList(2);
        List<Integer> notCategoriesLevel = Arrays.asList(1, 3);
        List<String> entitiesTitleText = Arrays.asList("GNU/Linux", "Microsoft Windows");
        List<String> notEntitiesTitleText = Arrays.asList("Ireland", "Dublin");
        List<String> entitiesTitleType = Arrays.asList("Software", "Organization");
        List<String> notEntitiesTitleType = Arrays.asList("Agent", "Person");
        List<String> entitiesTitleLinksDbpedia = Arrays.asList("http://dbpedia.org/resource/Linux");
        List<String> notEntitiesTitleLinksDbpedia = Arrays.asList("http://dbpedia.org/resource/Windows");
        List<String> entitiesBodyText = Arrays.asList("GNU/Linux", "Microsoft Windows");
        List<String> notEntitiesBodyText = Arrays.asList("Trump");
        List<String> entitiesBodyType = Arrays.asList("Agent", "Person");
        List<String> notEntitiesBodyType = Arrays.asList("Software", "Organization");
        List<String> entitiesBodyLinksDbpedia = Arrays.asList("entitiesBodyLinksDbpedia_example");
        List<String> notEntitiesBodyLinksDbpedia = Arrays.asList("http://dbpedia.org/resource/Linux");
        String sentimentTitlePolarity = "negative";
        String notSentimentTitlePolarity = "positive";
        String sentimentBodyPolarity = "neutral";
        String notSentimentBodyPolarity = "negative";
        Integer mediaImagesCountMin = 2;
        Integer mediaImagesCountMax = 4;
        Integer mediaImagesWidthMin = 640;
        Integer mediaImagesWidthMax = 1024;
        Integer mediaImagesHeightMin = 480;
        Integer mediaImagesHeightMax = 800;
        Integer mediaImagesContentLengthMin = 25411;
        Integer mediaImagesContentLengthMax = 369541;
        List<String> mediaImagesFormat = Arrays.asList("JPEG", "BMP", "GIF");
        List<String> notMediaImagesFormat = Arrays.asList("PNG", "TIFF");
        Integer mediaVideosCountMin = 1;
        Integer mediaVideosCountMax = 2;
        List<Integer> authorId = Arrays.asList(36521);
        List<Integer> notAuthorId = Arrays.asList(2541);
        String authorName = "John Doe";
        String notAuthorName = "Mike Wally";
        List<Integer> sourceId = Arrays.asList(1411);
        List<Integer> notSourceId = Arrays.asList(251);
        List<String> sourceName = Arrays.asList("BBC");
        List<String> notSourceName = Arrays.asList("Fox News");
        List<String> sourceDomain = Arrays.asList("bbc.co.uk");
        List<String> notSourceDomain = Arrays.asList("foxnews.com");
        List<String> sourceLocationsCountry = Arrays.asList("US", "IE");
        List<String> notSourceLocationsCountry = Arrays.asList("IR");
        List<String> sourceLocationsState = Arrays.asList("California");
        List<String> notSourceLocationsState = Arrays.asList("Arizona");
        List<String> sourceLocationsCity = Arrays.asList("Los Angeles");
        List<String> notSourceLocationsCity = Arrays.asList("Dublin City");
        List<String> sourceScopesCountry = Arrays.asList("IE", "NG");
        List<String> notSourceScopesCountry = Arrays.asList("US", "GB");
        List<String> sourceScopesState = Arrays.asList("Co Dublin");
        List<String> notSourceScopesState = Arrays.asList("Co Wicklow");
        List<String> sourceScopesCity = Arrays.asList("Dublin City");
        List<String> notSourceScopesCity = Arrays.asList("Cork");
        List<String> sourceScopesLevel = Arrays.asList("national");
        List<String> notSourceScopesLevel = Arrays.asList("local");
        Integer sourceLinksInCountMin = 354211;
        Integer sourceLinksInCountMax = 587412;
        Integer sourceRankingsAlexaRankMin = 10;
        Integer sourceRankingsAlexaRankMax = 2500;
        List<String> sourceRankingsAlexaCountry = Arrays.asList("IE");
        Integer socialSharesCountFacebookMin = 3521;
        Integer socialSharesCountFacebookMax = 5841;
        Integer socialSharesCountGooglePlusMin = 2514;
        Integer socialSharesCountGooglePlusMax = 36521;
        Integer socialSharesCountLinkedinMin = 6521;
        Integer socialSharesCountLinkedinMax = 36521;
        Integer socialSharesCountRedditMin = 14125;
        Integer socialSharesCountRedditMax = 95412;
        Boolean cluster = false;
        String clusterAlgorithm = "kmeans";
        List<String> _return = Arrays.asList("id", "title", "body");
        Long storyId = 789L;
        String storyUrl = "https://techcrunch.com/2016/04/07/aylien-launches-news-analysis-api-powered-by-its-deep-learning-tech/";
        String storyTitle = "Aylien launches news analysis API powered by its deep learning tech";
        String storyBody = "Text analysis startup Aylien, which uses deep learning ...";
        DateTime storyPublishedAt = new DateTime("2013-10-20T19:20:30Z");
        String storyLanguage = "auto";
        Integer perPage = 9;

        CoveragesParams.Builder coveragesBuilder = CoveragesParams.newBuilder();

        coveragesBuilder.setId(id);
        coveragesBuilder.setNotId(notId);
        coveragesBuilder.setTitle(title);
        coveragesBuilder.setBody(body);
        coveragesBuilder.setText(text);
        coveragesBuilder.setLanguage(language);
        coveragesBuilder.setNotLanguage(notLanguage);
        coveragesBuilder.setPublishedAtStart(publishedAtStart);
        coveragesBuilder.setPublishedAtEnd(publishedAtEnd);
        coveragesBuilder.setCategoriesTaxonomy(categoriesTaxonomy);
        coveragesBuilder.setCategoriesConfident(categoriesConfident);
        coveragesBuilder.setCategoriesId(categoriesId);
        coveragesBuilder.setNotCategoriesId(notCategoriesId);
        coveragesBuilder.setCategoriesLevel(categoriesLevel);
        coveragesBuilder.setNotCategoriesLevel(notCategoriesLevel);
        coveragesBuilder.setEntitiesTitleText(entitiesTitleText);
        coveragesBuilder.setNotEntitiesTitleText(notEntitiesTitleText);
        coveragesBuilder.setEntitiesTitleType(entitiesTitleType);
        coveragesBuilder.setNotEntitiesTitleType(notEntitiesTitleType);
        coveragesBuilder.setEntitiesTitleLinksDbpedia(entitiesTitleLinksDbpedia);
        coveragesBuilder.setNotEntitiesTitleLinksDbpedia(notEntitiesTitleLinksDbpedia);
        coveragesBuilder.setEntitiesBodyText(entitiesBodyText);
        coveragesBuilder.setNotEntitiesBodyText(notEntitiesBodyText);
        coveragesBuilder.setEntitiesBodyType(entitiesBodyType);
        coveragesBuilder.setNotEntitiesBodyType(notEntitiesBodyType);
        coveragesBuilder.setEntitiesBodyLinksDbpedia(entitiesBodyLinksDbpedia);
        coveragesBuilder.setNotEntitiesBodyLinksDbpedia(notEntitiesBodyLinksDbpedia);
        coveragesBuilder.setSentimentTitlePolarity(sentimentTitlePolarity);
        coveragesBuilder.setNotSentimentTitlePolarity(notSentimentTitlePolarity);
        coveragesBuilder.setSentimentBodyPolarity(sentimentBodyPolarity);
        coveragesBuilder.setNotSentimentBodyPolarity(notSentimentBodyPolarity);
        coveragesBuilder.setMediaImagesCountMin(mediaImagesCountMin);
        coveragesBuilder.setMediaImagesCountMax(mediaImagesCountMax);
        coveragesBuilder.setMediaImagesWidthMin(mediaImagesWidthMin);
        coveragesBuilder.setMediaImagesWidthMax(mediaImagesWidthMax);
        coveragesBuilder.setMediaImagesHeightMin(mediaImagesHeightMin);
        coveragesBuilder.setMediaImagesHeightMax(mediaImagesHeightMax);
        coveragesBuilder.setMediaImagesContentLengthMin(mediaImagesContentLengthMin);
        coveragesBuilder.setMediaImagesContentLengthMax(mediaImagesContentLengthMax);
        coveragesBuilder.setMediaImagesFormat(mediaImagesFormat);
        coveragesBuilder.setNotMediaImagesFormat(notMediaImagesFormat);
        coveragesBuilder.setMediaVideosCountMin(mediaVideosCountMin);
        coveragesBuilder.setMediaVideosCountMax(mediaVideosCountMax);
        coveragesBuilder.setAuthorId(authorId);
        coveragesBuilder.setNotAuthorId(notAuthorId);
        coveragesBuilder.setAuthorName(authorName);
        coveragesBuilder.setNotAuthorName(notAuthorName);
        coveragesBuilder.setSourceId(sourceId);
        coveragesBuilder.setNotSourceId(notSourceId);
        coveragesBuilder.setSourceName(sourceName);
        coveragesBuilder.setNotSourceName(notSourceName);
        coveragesBuilder.setSourceDomain(sourceDomain);
        coveragesBuilder.setNotSourceDomain(notSourceDomain);
        coveragesBuilder.setSourceLocationsCountry(sourceLocationsCountry);
        coveragesBuilder.setNotSourceLocationsCountry(notSourceLocationsCountry);
        coveragesBuilder.setSourceLocationsState(sourceLocationsState);
        coveragesBuilder.setNotSourceLocationsState(notSourceLocationsState);
        coveragesBuilder.setSourceLocationsCity(sourceLocationsCity);
        coveragesBuilder.setNotSourceLocationsCity(notSourceLocationsCity);
        coveragesBuilder.setSourceScopesCountry(sourceScopesCountry);
        coveragesBuilder.setNotSourceScopesCountry(notSourceScopesCountry);
        coveragesBuilder.setSourceScopesState(sourceScopesState);
        coveragesBuilder.setNotSourceScopesState(notSourceScopesState);
        coveragesBuilder.setSourceScopesCity(sourceScopesCity);
        coveragesBuilder.setNotSourceScopesCity(notSourceScopesCity);
        coveragesBuilder.setSourceScopesLevel(sourceScopesLevel);
        coveragesBuilder.setNotSourceScopesLevel(notSourceScopesLevel);
        coveragesBuilder.setSourceLinksInCountMin(sourceLinksInCountMin);
        coveragesBuilder.setSourceLinksInCountMax(sourceLinksInCountMax);
        coveragesBuilder.setSourceRankingsAlexaRankMin(sourceRankingsAlexaRankMin);
        coveragesBuilder.setSourceRankingsAlexaRankMax(sourceRankingsAlexaRankMax);
        coveragesBuilder.setSourceRankingsAlexaCountry(sourceRankingsAlexaCountry);
        coveragesBuilder.setSocialSharesCountFacebookMin(socialSharesCountFacebookMin);
        coveragesBuilder.setSocialSharesCountFacebookMax(socialSharesCountFacebookMax);
        coveragesBuilder.setSocialSharesCountGooglePlusMin(socialSharesCountGooglePlusMin);
        coveragesBuilder.setSocialSharesCountGooglePlusMax(socialSharesCountGooglePlusMax);
        coveragesBuilder.setSocialSharesCountLinkedinMin(socialSharesCountLinkedinMin);
        coveragesBuilder.setSocialSharesCountLinkedinMax(socialSharesCountLinkedinMax);
        coveragesBuilder.setSocialSharesCountRedditMin(socialSharesCountRedditMin);
        coveragesBuilder.setSocialSharesCountRedditMax(socialSharesCountRedditMax);
        coveragesBuilder.setCluster(cluster);
        coveragesBuilder.setClusterAlgorithm(clusterAlgorithm);
        coveragesBuilder.set_return(_return);
        coveragesBuilder.setStoryId(storyId);
        coveragesBuilder.setStoryUrl(storyUrl);
        coveragesBuilder.setStoryTitle(storyTitle);
        coveragesBuilder.setStoryBody(storyBody);
        coveragesBuilder.setStoryPublishedAt(storyPublishedAt);
        coveragesBuilder.setStoryLanguage(storyLanguage);
        coveragesBuilder.setPerPage(perPage);

        try {
            Coverages result = apiInstance.listCoverages(coveragesBuilder.build());
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#listCoverages");
            e.printStackTrace();
        }
    }
}
# View all parameters and methods here:
# https://github.com/AYLIEN/aylien_newsapi_ruby/blob/master/docs/DefaultApi.md#list_coverages

# load the gem
require 'aylien_news_api'

# setup authorization
AylienNewsApi.configure do |config|
  # Configure API key authorization: app_id
  config.api_key['X-AYLIEN-NewsAPI-Application-ID'] = 'YOUR_APP_ID'

  # Configure API key authorization: app_key
  config.api_key['X-AYLIEN-NewsAPI-Application-Key'] = 'YOUR_APP_KEY'
end

api_instance = AylienNewsApi::DefaultApi.new

opts = {
  id: [5411],
  not_id: [3625],
  title: "startup AND (raise OR raised OR raising OR raises)",
  body: "startup",
  text: "startup company",
  language: ["en", "fr"],
  not_language: ["es", "it"],
  published_at_start: "NOW-10DAYS",
  published_at_end: "NOW",
  categories_taxonomy: "iptc-subjectcode",
  categories_confident: true,
  categories_id: ["11000000", "02000000"],
  not_categories_id: ["11001000", "10000000"],
  categories_level: [3],
  not_categories_level: [1, 2],
  entities_title_text: ["GNU/Linux", "Microsoft"],
  not_entities_title_text: ["Google", "Windows"],
  entities_title_type: ["Software", "Organization"],
  not_entities_title_type: ["Agent", "Person"],
  entities_title_links_dbpedia: ["http://dbpedia.org/resource/Linux"],
  not_entities_title_links_dbpedia: ["http://dbpedia.org/resource/Windows"],
  entities_body_text: ["Free Software", "Open Source"],
  not_entities_body_text: ["Barack Obama", "Trump"],
  entities_body_type: ["Software", "Organization"],
  not_entities_body_type: ["Agent", "Person"],
  entities_body_links_dbpedia: ["http://dbpedia.org/resource/Linux"],
  not_entities_body_links_dbpedia: ["http://dbpedia.org/resource/Windows"],
  sentiment_title_polarity: "positive",
  not_sentiment_title_polarity: "neutral",
  sentiment_body_polarity: "negative",
  not_sentiment_body_polarity: "positive",
  media_images_count_min: 3,
  media_images_count_max: 3,
  media_images_width_min: 640,
  media_images_width_max: 1024,
  media_images_height_min: 480,
  media_images_height_max: 800,
  media_images_content_length_min: 25411,
  media_images_content_length_max: 369541,
  media_images_format: ["JPEG", "BMP", "GIF"],
  not_media_images_format: ["TIFF", "PNG"],
  media_videos_count_min: 1,
  media_videos_count_max: 2,
  author_id: [4155],
  not_author_id: [2541],
  author_name: "John Doe",
  not_author_name: "Mike Wally",
  source_id: [124],
  not_source_id: [54],
  source_name: ["BBC"],
  not_source_name: ["Fox News"],
  source_domain: ["bbc.co.uk"],
  not_source_domain: ["foxnews.com"],
  source_locations_country: ["US", "IE"],
  not_source_locations_country: ["JP", "GB"],
  source_locations_state: ["California"],
  not_source_locations_state: ["Arizona"],
  source_locations_city: ["Los Angeles"],
  not_source_locations_city: ["Dublin City"],
  source_scopes_country: ["GB", "IE"],
  not_source_scopes_country: ["US", "JP"],
  source_scopes_state: ["Co Dublin"],
  not_source_scopes_state: ["Co Wicklow"],
  source_scopes_city: ["Cork"],
  not_source_scopes_city: ["Galway"],
  source_scopes_level: ["local"],
  not_source_scopes_level: ["national"],
  source_links_in_count_min: 126333,
  source_links_in_count_max: 521000,
  source_rankings_alexa_rank_min: 123,
  source_rankings_alexa_rank_max: 152,
  source_rankings_alexa_country: ["IE"],
  social_shares_count_facebook_min: 3521,
  social_shares_count_facebook_max: 5841,
  social_shares_count_google_plus_min: 2541,
  social_shares_count_google_plus_max: 36541,
  social_shares_count_linkedin_min: 6521,
  social_shares_count_linkedin_max: 32541,
  social_shares_count_reddit_min: 14521,
  social_shares_count_reddit_max: 95841,
  cluster: false,
  cluster_algorithm: "kmeans",
  _return: ["id", "title", "keywords", "links"],
  story_id: 789,
  story_url: "https://techcrunch.com/2016/04/07/aylien-launches-news-analysis-api-powered-by-its-deep-learning-tech/",
  story_title: "Aylien launches news analysis API powered by its deep learning tech",
  story_body: "Text analysis startup Aylien, which uses deep learning ...",
  story_published_at: DateTime.parse("2013-10-20T19:20:30+01:00"),
  story_language: "auto",
  per_page: 3
}

begin
  #List coverages
  result = api_instance.list_coverages(opts)
  puts result
rescue AylienNewsApi::ApiError => e
  puts "Exception when calling DefaultApi->list_coverages: #{e}"
  puts e.response_body
end
/*
  View all parameters and methods here:
  https://github.com/AYLIEN/aylien_newsapi_go/blob/master/docs/DefaultApi.md#listcoverages
*/

package main

// Import the library
import (
  "fmt"
  newsapi "github.com/AYLIEN/aylien_newsapi_go"
  "time"
)

func main() {
  api := newsapi.NewDefaultApi()

  // Configure API key authorization: app_id
  api.Configuration.APIKeyPrefix["X-AYLIEN-NewsAPI-Application-ID"] = "YOUR_APP_ID"

  // Configure API key authorization: app_key
  api.Configuration.APIKeyPrefix["X-AYLIEN-NewsAPI-Application-Key"] = "YOUR_APP_KEY"

  id := []int64{2541}
  notId := []int64{5411, 6565}
  title := "startup AND (raise OR raised OR raising OR raises)"
  body := "startup"
  text := "startup company"
  language := []string{"en", "de"}
  notLanguage := []string{"it", "es"}
  publishedAtStart := "NOW-2MONTHS"
  publishedAtEnd := "NOW"
  categoriesTaxonomy := "iptc-subjectcode"
  categoriesConfident := "true"
  categoriesId := []string{"11000000"}
  notCategoriesId := []string{"10000000", "04001000"}
  categoriesLevel := []int32{3}
  notCategoriesLevel := []int32{1, 2}
  entitiesTitleText := []string{"GNU/Linux"}
  notEntitiesTitleText := []string{"Windows", "Microsoft"}
  entitiesTitleType := []string{"Software", "Organization"}
  notEntitiesTitleType := []string{"Person", "Agent"}
  entitiesTitleLinksDbpedia := []string{"http://dbpedia.org/resource/Linux"}
  notEntitiesTitleLinksDbpedia := []string{"http://dbpedia.org/resource/Windows"}
  entitiesBodyText := []string{"Free Software"}
  notEntitiesBodyText := []string{"Open Source Software"}
  entitiesBodyType := []string{"Software", "Organization"}
  notEntitiesBodyType := []string{"Agent", "Person"}
  entitiesBodyLinksDbpedia := []string{"http://dbpedia.org/resource/Linux"}
  notEntitiesBodyLinksDbpedia := []string{"http://dbpedia.org/resource/Microsoft"}
  sentimentTitlePolarity := "positive"
  notSentimentTitlePolarity := "neutral"
  sentimentBodyPolarity := "neutral"
  notSentimentBodyPolarity := "neutral"
  mediaImagesCountMin := "3"
  mediaImagesCountMax := "4"
  mediaImagesWidthMin := "640"
  mediaImagesWidthMax := "1024"
  mediaImagesHeightMin := "480"
  mediaImagesHeightMax := "800"
  mediaImagesContentLengthMin := "25412"
  mediaImagesContentLengthMax := "369521"
  mediaImagesFormat := []string{"JPEG", "BMP", "GIF"}
  notMediaImagesFormat := []string{"PNG", "TIFF"}
  mediaVideosCountMin := "1"
  mediaVideosCountMax := "2"
  authorId := []int32{144}
  notAuthorId := []int32{142, 455}
  authorName := "John Doe"
  notAuthorName := "Mike Wally"
  sourceId := []int32{163}
  notSourceId := []int32{354, 141}
  sourceName := []string{"BBC"}
  notSourceName := []string{"Fox News"}
  sourceDomain := []string{"bbc.co.uk"}
  notSourceDomain := []string{"foxnews.com"}
  sourceLocationsCountry := []string{"US"}
  notSourceLocationsCountry := []string{"IE", "IR"}
  sourceLocationsState := []string{"California"}
  notSourceLocationsState := []string{"Arizona"}
  sourceLocationsCity := []string{"Los Angeles"}
  notSourceLocationsCity := []string{"New York City"}
  sourceScopesCountry := []string{"IE"}
  notSourceScopesCountry := []string{"IE"}
  sourceScopesState := []string{"Co Dublin"}
  notSourceScopesState := []string{"Wicklow"}
  sourceScopesCity := []string{"Dublin City"}
  notSourceScopesCity := []string{"Cork"}
  sourceScopesLevel := []string{"local"}
  notSourceScopesLevel := []string{"national"}
  sourceLinksInCountMin := int32(142221)
  sourceLinksInCountMax := int32(325000)
  sourceRankingsAlexaRankMin := int32(1)
  sourceRankingsAlexaRankMax := int32(10)
  sourceRankingsAlexaCountry := []string{"IE"}
  socialSharesCountFacebookMin := "3521"
  socialSharesCountFacebookMax := "5841"
  socialSharesCountGooglePlusMin := "2514"
  socialSharesCountGooglePlusMax := "36521"
  socialSharesCountLinkedinMin := "6521"
  socialSharesCountLinkedinMax := "36521"
  socialSharesCountRedditMin := "14125"
  socialSharesCountRedditMax := "95412"
  cluster := "true"
  clusterAlgorithm := "kmeans"
  _return := []string{"id", "title", "author", "links"}
  storyId := int64(789)
  storyUrl := "https://techcrunch.com/2016/04/07/aylien-launches-news-analysis-api-powered-by-its-deep-learning-tech/"
  storyTitle := "Aylien launches news analysis API powered by its deep learning tech"
  storyBody := "Text analysis startup Aylien, which uses deep learning..."
  storyPublishedAt := time.Now()
  storyLanguage := "auto"
  perPage := int32(5)

  coveragesParams := &newsapi.CoveragesParams{
    Id:                             id,
    NotId:                          notId,
    Title:                          title,
    Body:                           body,
    Text:                           text,
    Language:                       language,
    NotLanguage:                    notLanguage,
    PublishedAtStart:               publishedAtStart,
    PublishedAtEnd:                 publishedAtEnd,
    CategoriesTaxonomy:             categoriesTaxonomy,
    CategoriesConfident:            categoriesConfident,
    CategoriesId:                   categoriesId,
    NotCategoriesId:                notCategoriesId,
    CategoriesLevel:                categoriesLevel,
    NotCategoriesLevel:             notCategoriesLevel,
    EntitiesTitleText:              entitiesTitleText,
    NotEntitiesTitleText:           notEntitiesTitleText,
    EntitiesTitleType:              entitiesTitleType,
    NotEntitiesTitleType:           notEntitiesTitleType,
    EntitiesTitleLinksDbpedia:      entitiesTitleLinksDbpedia,
    NotEntitiesTitleLinksDbpedia:   notEntitiesTitleLinksDbpedia,
    EntitiesBodyText:               entitiesBodyText,
    NotEntitiesBodyText:            notEntitiesBodyText,
    EntitiesBodyType:               entitiesBodyType,
    NotEntitiesBodyType:            notEntitiesBodyType,
    EntitiesBodyLinksDbpedia:       entitiesBodyLinksDbpedia,
    NotEntitiesBodyLinksDbpedia:    notEntitiesBodyLinksDbpedia,
    SentimentTitlePolarity:         sentimentTitlePolarity,
    NotSentimentTitlePolarity:      notSentimentTitlePolarity,
    SentimentBodyPolarity:          sentimentBodyPolarity,
    NotSentimentBodyPolarity:       notSentimentBodyPolarity,
    MediaImagesCountMin:            mediaImagesCountMin,
    MediaImagesCountMax:            mediaImagesCountMax,
    MediaImagesWidthMin:            mediaImagesWidthMin,
    MediaImagesWidthMax:            mediaImagesWidthMax,
    MediaImagesHeightMin:           mediaImagesHeightMin,
    MediaImagesHeightMax:           mediaImagesHeightMax,
    MediaImagesContentLengthMin:    mediaImagesContentLengthMin,
    MediaImagesContentLengthMax:    mediaImagesContentLengthMax,
    MediaImagesFormat:              mediaImagesFormat,
    NotMediaImagesFormat:           notMediaImagesFormat,
    MediaVideosCountMin:            mediaVideosCountMin,
    MediaVideosCountMax:            mediaVideosCountMax,
    AuthorId:                       authorId,
    NotAuthorId:                    notAuthorId,
    AuthorName:                     authorName,
    NotAuthorName:                  notAuthorName,
    SourceId:                       sourceId,
    NotSourceId:                    notSourceId,
    SourceName:                     sourceName,
    NotSourceName:                  notSourceName,
    SourceDomain:                   sourceDomain,
    NotSourceDomain:                notSourceDomain,
    SourceLocationsCountry:         sourceLocationsCountry,
    NotSourceLocationsCountry:      notSourceLocationsCountry,
    SourceLocationsState:           sourceLocationsState,
    NotSourceLocationsState:        notSourceLocationsState,
    SourceLocationsCity:            sourceLocationsCity,
    NotSourceLocationsCity:         notSourceLocationsCity,
    SourceScopesCountry:            sourceScopesCountry,
    NotSourceScopesCountry:         notSourceScopesCountry,
    SourceScopesState:              sourceScopesState,
    NotSourceScopesState:           notSourceScopesState,
    SourceScopesCity:               sourceScopesCity,
    NotSourceScopesCity:            notSourceScopesCity,
    SourceScopesLevel:              sourceScopesLevel,
    NotSourceScopesLevel:           notSourceScopesLevel,
    SourceLinksInCountMin:          sourceLinksInCountMin,
    SourceLinksInCountMax:          sourceLinksInCountMax,
    SourceRankingsAlexaRankMin:     sourceRankingsAlexaRankMin,
    SourceRankingsAlexaRankMax:     sourceRankingsAlexaRankMax,
    SourceRankingsAlexaCountry:     sourceRankingsAlexaCountry,
    SocialSharesCountFacebookMin:   socialSharesCountFacebookMin,
    SocialSharesCountFacebookMax:   socialSharesCountFacebookMax,
    SocialSharesCountGooglePlusMin: socialSharesCountGooglePlusMin,
    SocialSharesCountGooglePlusMax: socialSharesCountGooglePlusMax,
    SocialSharesCountLinkedinMin:   socialSharesCountLinkedinMin,
    SocialSharesCountLinkedinMax:   socialSharesCountLinkedinMax,
    SocialSharesCountRedditMin:     socialSharesCountRedditMin,
    SocialSharesCountRedditMax:     socialSharesCountRedditMax,
    Cluster:                        cluster,
    ClusterAlgorithm:               clusterAlgorithm,
    Return:                         _return,
    StoryId:                        storyId,
    StoryUrl:                       storyUrl,
    StoryTitle:                     storyTitle,
    StoryBody:                      storyBody,
    StoryPublishedAt:               storyPublishedAt,
    StoryLanguage:                  storyLanguage,
    PerPage:                        perPage}

  coveragesResponse, res, err := api.ListCoverages(coveragesParams)
  if err != nil {
    panic(err)
  }
  _ = res

  fmt.Println(coveragesResponse)
}
/* 
  View all parameters and methods here:
  https://github.com/AYLIEN/aylien_newsapi_csharp/blob/master/docs/DefaultApi.md#listcoverages
*/

using System;
using System.Diagnostics;
using Aylien.NewsApi.Api;
using Aylien.NewsApi.Client;
using Aylien.NewsApi.Model;
using System.Collections.Generic;

namespace Example
{
    class ListCoveragesExample
    {
        static void Main(string[] args)
        {
            // Configure API key authorization: app_id
            Configuration.Default.ApiKey.Add("X-AYLIEN-NewsAPI-Application-ID", "YOUR_APP_ID");

            // Configure API key authorization: app_key
            Configuration.Default.ApiKey.Add("X-AYLIEN-NewsAPI-Application-Key", "YOUR_APP_KEY");

            var apiInstance = new DefaultApi();

            var id = new List<long?>() { 54121 };
            var notId = new List<long?>() { 21451 };
            var title = "startup AND (raise OR raised OR raising OR raises)";
            var body = "startup";
            var text = "startup company";
            var language = new List<string>() { "en", "it" };
            var notLanguage = new List<string>() { "es", "pt" };
            var publishedAtStart = "NOW-10DAYS";
            var publishedAtEnd = "NOW";
            var categoriesTaxonomy = "iab-qag";
            var categoriesConfident = true;
            var categoriesId = new List<string>() { "IAB15" };
            var notCategoriesId = new List<string>() { "IAB2-3" };
            var categoriesLevel = new List<int?>() { 1 };
            var notCategoriesLevel = new List<int?>() { 2 };
            var entitiesTitleText = new List<string>() { "GNU/Linux", "Microsoft" };
            var notEntitiesTitleText = new List<string>() { "Windows" };
            var entitiesTitleType = new List<string>() { "Organization", "Software" };
            var notEntitiesTitleType = new List<string>() { "Person", "Agent" };
            var entitiesTitleLinksDbpedia = new List<string>() { "http://dbpedia.org/resource/Donald_Trump" };
            var notEntitiesTitleLinksDbpedia = new List<string>() { "http://dbpedia.org/resource/Linux" };
            var entitiesBodyText = new List<string>() { "GNU/Linux", "Apple" };
            var notEntitiesBodyText = new List<string>() { "Windows" };
            var entitiesBodyType = new List<string>() { "Person", "Agent" };
            var notEntitiesBodyType = new List<string>() { "Organization", "Software" };
            var entitiesBodyLinksDbpedia = new List<string>() { "http://dbpedia.org/resource/Windows" };
            var notEntitiesBodyLinksDbpedia = new List<string>() { "http://dbpedia.org/resource/Linux" };
            var sentimentTitlePolarity = "positive";
            var notSentimentTitlePolarity = "negative";
            var sentimentBodyPolarity = "neutral";
            var notSentimentBodyPolarity = "negative";
            var mediaImagesCountMin = 2;
            var mediaImagesCountMax = 10;
            var mediaImagesWidthMin = 640;
            var mediaImagesWidthMax = 1024;
            var mediaImagesHeightMin = 480;
            var mediaImagesHeightMax = 800;
            var mediaImagesContentLengthMin = 25411;
            var mediaImagesContentLengthMax = 369541;
            var mediaImagesFormat = new List<string>() { "JPEG", "BMP", "GIF" };
            var notMediaImagesFormat = new List<string>() { "PNG", "TIFF" };
            var mediaVideosCountMin = 1;
            var mediaVideosCountMax = 4;
            var authorId = new List<int?>() { 2154 };
            var notAuthorId = new List<int?>() { 5412 };
            var authorName = "John Doe";
            var notAuthorName = "Mike Wally";
            var sourceId = new List<int?>() { 1467 };
            var notSourceId = new List<int?>() { 1524 };
            var sourceName = new List<string>() { "BBC" };
            var notSourceName = new List<string>() { "Fox News" };
            var sourceDomain = new List<string>() { "bbc.co.uk" };
            var notSourceDomain = new List<string>() { "foxnews.com" };
            var sourceLocationsCountry = new List<string>() { "US", "IE" };
            var notSourceLocationsCountry = new List<string>() { "NG" };
            var sourceLocationsState = new List<string>() { "California" };
            var notSourceLocationsState = new List<string>() { "Arizona" };
            var sourceLocationsCity = new List<string>() { "Los Angeles" };
            var notSourceLocationsCity = new List<string>() { "New York City" };
            var sourceScopesCountry = new List<string>() { "NG", "IE" };
            var notSourceScopesCountry = new List<string>() { "US", "IR" };
            var sourceScopesState = new List<string>() { "Co Dublin" };
            var notSourceScopesState = new List<string>() { "Co Wicklow" };
            var sourceScopesCity = new List<string>() { "Dublin City" };
            var notSourceScopesCity = new List<string>() { "Cork" };
            var sourceScopesLevel = new List<string>() { "local" };
            var notSourceScopesLevel = new List<string>() { "national" };
            var sourceLinksInCountMin = 5000;
            var sourceLinksInCountMax = 10000;
            var sourceRankingsAlexaRankMin = 1;
            var sourceRankingsAlexaRankMax = 2000;
            var sourceRankingsAlexaCountry = new List<string>() { "IE" };
            var socialSharesCountFacebookMin = 3521;
            var socialSharesCountFacebookMax = 5841;
            var socialSharesCountGooglePlusMin = 251;
            var socialSharesCountGooglePlusMax = 6521;
            var socialSharesCountLinkedinMin = 4125;
            var socialSharesCountLinkedinMax = 15214;
            var socialSharesCountRedditMin = 1584;
            var socialSharesCountRedditMax = 95412;
            var cluster = true;
            var clusterAlgorithm = "kmeans";
            var _return = new List<string>() { "id", "title", "entities" };
            var storyId = 789;
            var storyUrl = "https://techcrunch.com/2016/04/07/aylien-launches-news-analysis-api-powered-by-its-deep-learning-tech/";
            var storyTitle = "Aylien launches news analysis API powered by its deep learning tech";
            var storyBody = "Text analysis startup Aylien...";
            var storyPublishedAt = DateTime.Now;
            var storyLanguage = "auto";
            var perPage = 10;

            try
            {
                // List coverages
                Coverages result = apiInstance.ListCoverages(
                    id: id,
                    notId: notId,
                    title: title,
                    body: body,
                    text: text,
                    language: language,
                    notLanguage: notLanguage,
                    publishedAtStart: publishedAtStart,
                    publishedAtEnd: publishedAtEnd,
                    categoriesTaxonomy: categoriesTaxonomy,
                    categoriesConfident: categoriesConfident,
                    categoriesId: categoriesId,
                    notCategoriesId: notCategoriesId,
                    categoriesLevel: categoriesLevel,
                    notCategoriesLevel: notCategoriesLevel,
                    entitiesTitleText: entitiesTitleText,
                    notEntitiesTitleText: notEntitiesTitleText,
                    entitiesTitleType: entitiesTitleType,
                    notEntitiesTitleType: notEntitiesTitleType,
                    entitiesTitleLinksDbpedia: entitiesTitleLinksDbpedia,
                    notEntitiesTitleLinksDbpedia: notEntitiesTitleLinksDbpedia,
                    entitiesBodyText: entitiesBodyText,
                    notEntitiesBodyText: notEntitiesBodyText,
                    entitiesBodyType: entitiesBodyType,
                    notEntitiesBodyType: notEntitiesBodyType,
                    entitiesBodyLinksDbpedia: entitiesBodyLinksDbpedia,
                    notEntitiesBodyLinksDbpedia: notEntitiesBodyLinksDbpedia,
                    sentimentTitlePolarity: sentimentTitlePolarity,
                    notSentimentTitlePolarity: notSentimentTitlePolarity,
                    sentimentBodyPolarity: sentimentBodyPolarity,
                    notSentimentBodyPolarity: notSentimentBodyPolarity,
                    mediaImagesCountMin: mediaImagesCountMin,
                    mediaImagesCountMax: mediaImagesCountMax,
                    mediaImagesWidthMin: mediaImagesWidthMin,
                    mediaImagesWidthMax: mediaImagesWidthMax,
                    mediaImagesHeightMin: mediaImagesHeightMin,
                    mediaImagesHeightMax: mediaImagesHeightMax,
                    mediaImagesContentLengthMin: mediaImagesContentLengthMin,
                    mediaImagesContentLengthMax: mediaImagesContentLengthMax,
                    mediaImagesFormat: mediaImagesFormat,
                    notMediaImagesFormat: notMediaImagesFormat,
                    mediaVideosCountMin: mediaVideosCountMin,
                    mediaVideosCountMax: mediaVideosCountMax,
                    authorId: authorId,
                    notAuthorId: notAuthorId,
                    authorName: authorName,
                    notAuthorName: notAuthorName,
                    sourceId: sourceId,
                    notSourceId: notSourceId,
                    sourceName: sourceName,
                    notSourceName: notSourceName,
                    sourceDomain: sourceDomain,
                    notSourceDomain: notSourceDomain,
                    sourceLocationsCountry: sourceLocationsCountry,
                    notSourceLocationsCountry: notSourceLocationsCountry,
                    sourceLocationsState: sourceLocationsState,
                    notSourceLocationsState: notSourceLocationsState,
                    sourceLocationsCity: sourceLocationsCity,
                    notSourceLocationsCity: notSourceLocationsCity,
                    sourceScopesCountry: sourceScopesCountry,
                    notSourceScopesCountry: notSourceScopesCountry,
                    sourceScopesState: sourceScopesState,
                    notSourceScopesState: notSourceScopesState,
                    sourceScopesCity: sourceScopesCity,
                    notSourceScopesCity: notSourceScopesCity,
                    sourceScopesLevel: sourceScopesLevel,
                    notSourceScopesLevel: notSourceScopesLevel,
                    sourceLinksInCountMin: sourceLinksInCountMin,
                    sourceLinksInCountMax: sourceLinksInCountMax,
                    sourceRankingsAlexaRankMin: sourceRankingsAlexaRankMin,
                    sourceRankingsAlexaRankMax: sourceRankingsAlexaRankMax,
                    sourceRankingsAlexaCountry: sourceRankingsAlexaCountry,
                    socialSharesCountFacebookMin: socialSharesCountFacebookMin,
                    socialSharesCountFacebookMax: socialSharesCountFacebookMax,
                    socialSharesCountGooglePlusMin: socialSharesCountGooglePlusMin,
                    socialSharesCountGooglePlusMax: socialSharesCountGooglePlusMax,
                    socialSharesCountLinkedinMin: socialSharesCountLinkedinMin,
                    socialSharesCountLinkedinMax: socialSharesCountLinkedinMax,
                    socialSharesCountRedditMin: socialSharesCountRedditMin,
                    socialSharesCountRedditMax: socialSharesCountRedditMax,
                    cluster: cluster,
                    clusterAlgorithm: clusterAlgorithm,
                    _return: _return,
                    storyId: storyId,
                    storyUrl: storyUrl,
                    storyTitle: storyTitle,
                    storyBody: storyBody,
                    storyPublishedAt: storyPublishedAt,
                    storyLanguage: storyLanguage,
                    perPage: perPage
                );
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DefaultApi.ListCoverages: " + e.Message);
            }
        }
    }
}

Coverages works similarly to Related Stories in that it tries to find stories that are similar or related to an input article. However, in addition to that, Coverages enforces stricter similarity rules to capture articles that are coverages of the same topics or events as the source article. This allows you to understand the reach a story has had in the media. For example, you can track the coverage of a press release in various outlets using Coverages.

HTTP Request

  • GET https://api.newsapi.aylien.com/api/v1/coverages
  • POST https://api.newsapi.aylien.com/api/v1/coverages

Parameters

Name Description
X-AYLIEN-NewsAPI-Application-ID *
string
(header)
x-data-threescale-name: app_ids

Your access API ID

X-AYLIEN-NewsAPI-Application-Key *
string
(header)
x-data-threescale-name: app_keys

Your access API Key

id[]
array [integer]
(query)

This parameter is used for finding stories by story id.

!id[]
array [integer]
(query)

This parameter is used for excluding stories by story id.

title
string
(query)

This parameter is used for finding stories whose title contains a specific keyword. It supports boolean operators.

body
string
(query)

This parameter is used for finding stories whose body contains a specific keyword. It supports boolean operators.

text
string
(query)

This parameter is used for finding stories whose title or body contains a specific keyword. It supports boolean operators.

language[]
array [string]
(query)

This parameter is used for finding stories whose language is the specified value. It supports ISO 639-1 language codes.

Available values: en, de, fr, it, es, pt

!language[]
array [string]
(query)

This parameter is used for excluding stories whose language is the specified value. It supports ISO 639-1 language codes.

Available values: en, de, fr, it, es, pt

published_at.start
string
(query)

This parameter is used for finding stories whose published at time is greater than the specified value. Here you can find more information about how to work with dates.

published_at.end
string
(query)

This parameter is used for finding stories whose published at time is less than the specified value. Here you can find more information about how to work with dates.

categories.taxonomy
string
(query)

This parameter is used for defining the type of the taxonomy for the rest of the categories queries. You can read more about working with categories here.

categories.confident
boolean
(query)

This parameter is used for finding stories whose categories are confident. You can read more about working with categories here.

Default value: true

categories.id[]
array [string]
(query)

This parameter is used for finding stories by categories id. You can read more about working with categories here, and find category ids here.

!categories.id[]
array [string]
(query)

This parameter is used for excluding stories by categories id. You can read more about working with categories here.

categories.level[]
array [integer]
(query)

This parameter is used for finding stories by categories level. You can read more about working with categories here, and find category ids here.

!categories.level[]
array [integer]
(query)

This parameter is used for excluding stories by categories level. You can read more about working with categories here, and find category ids here.

entities.title.text[]
array [string]
(query)

This parameter is used to find stories based on the specified entities text in story titles. You can read more about working with entities here.

!entities.title.text[]
array [string]
(query)

This parameter is used to exclude stories based on the specified entities text in story titles. You can read more about working with entities here.

entities.title.type[]
array [string]
(query)

This parameter is used to find stories based on the specified entities type in story titles. You can read more about working with entities here.

!entities.title.type[]
array [string]
(query)

This parameter is used to exclude stories based on the specified entities type in story titles. You can read more about working with entities here.

entities.title.links.dbpedia[]
array [string]
(query)

This parameter is used to find stories based on the specified entities dbpedia URL in story titles. You can read more about working with entities here.

!entities.title.links.dbpedia[]
array [string]
(query)

This parameter is used to exclude stories based on the specified entities dbpedia URL in story titles. You can read more about working with entities here.

entities.body.text[]
array [string]
(query)

This parameter is used to find stories based on the specified entities text in the body of stories. You can read more about working with entities here.

!entities.body.text[]
array [string]
(query)

This parameter is used to exclude stories based on the specified entities text in the body of stories. You can read more about working with entities here.

entities.body.type[]
array [string]
(query)

This parameter is used to find stories based on the specified entities type in the body of stories. You can read more about working with entities here.

!entities.body.type[]
array [string]
(query)

This parameter is used to exclude stories based on the specified entities type in the body of stories. You can read more about working with entities here.

entities.body.links.dbpedia[]
array [string]
(query)

This parameter is used to find stories based on the specified entities dbpedia URL in the body of stories. You can read more about working with entities here.

!entities.body.links.dbpedia[]
array [string]
(query)

This parameter is used to exclude stories based on the specified entities dbpedia URL in the body of stories. You can read more about working with entities here.

sentiment.title.polarity
string
(query)

This parameter is used for finding stories whose title sentiment is the specified value.

!sentiment.title.polarity
string
(query)

This parameter is used for excluding stories whose title sentiment is the specified value.

sentiment.body.polarity
string
(query)

This parameter is used for finding stories whose body sentiment is the specified value.

!sentiment.body.polarity
string
(query)

This parameter is used for excluding stories whose body sentiment is the specified value.

media.images.count.min
integer
(query)

This parameter is used for finding stories whose number of images is greater than or equal to the specified value.

media.images.count.max
integer
(query)

This parameter is used for finding stories whose number of images is less than or equal to the specified value.

media.images.width.min
integer
(query)

This parameter is used for finding stories whose width of images are greater than or equal to the specified value.

media.images.width.max
integer
(query)

This parameter is used for finding stories whose width of images are less than or equal to the specified value.

media.images.height.min
integer
(query)

This parameter is used for finding stories whose height of images are greater than or equal to the specified value.

media.images.height.max
integer
(query)

This parameter is used for finding stories whose height of images are less than or equal to the specified value.

media.images.content_length.min
integer
(query)

This parameter is used for finding stories whose images content length are greater than or equal to the specified value.

media.images.content_length.max
integer
(query)

This parameter is used for finding stories whose images content length are less than or equal to the specified value.

media.images.format[]
array [string]
(query)

This parameter is used for finding stories whose images format are the specified value.

Available values: BMP, GIF, JPEG, PNG, TIFF, PSD, ICO, CUR, WEBP, SVG

!media.images.format[]
array [string]
(query)

This parameter is used for excluding stories whose images format are the specified value.

Available values: BMP, GIF, JPEG, PNG, TIFF, PSD, ICO, CUR, WEBP, SVG

media.videos.count.min
integer
(query)

This parameter is used for finding stories whose number of videos is greater than or equal to the specified value.

media.videos.count.max
integer
(query)

This parameter is used for finding stories whose number of videos is less than or equal to the specified value.

author.id[]
array [integer]
(query)

This parameter is used for finding stories whose author id is the specified value.

!author.id[]
array [integer]
(query)

This parameter is used for excluding stories whose author id is the specified value.

author.name
string
(query)

This parameter is used for finding stories whose author full name contains the specified value.

!author.name
string
(query)

This parameter is used for excluding stories whose author full name contains the specified value.

source.id[]
array [integer]
(query)

This parameter is used for finding stories whose source id is the specified value.

!source.id[]
array [integer]
(query)

This parameter is used for excluding stories whose source id is the specified value.

source.name[]
array [string]
(query)

This parameter is used for finding stories whose source name contains the specified value.

!source.name[]
array [string]
(query)

This parameter is used for excluding stories whose source name contains the specified value.

source.domain[]
array [string]
(query)

This parameter is used for finding stories whose source domain is the specified value.

!source.domain[]
array [string]
(query)

This parameter is used for excluding stories whose source domain is the specified value.

source.locations.country[]
array [string]
(query)

This parameter is used for finding stories whose source country is the specified value. It supports ISO 3166-1 alpha-2 country codes. Here you can find more information about how to work with locations.

!source.locations.country[]
array [string]
(query)

This parameter is used for excluding stories whose source country is the specified value. It supports ISO 3166-1 alpha-2 country codes. Here you can find more information about how to work with locations.

source.locations.state[]
array [string]
(query)

This parameter is used for finding stories whose source state/province is the specified value. Here you can find more information about how to work with locations.

!source.locations.state[]
array [string]
(query)

This parameter is used for excluding stories whose source state/province is the specified value. Here you can find more information about how to work with locations.

source.locations.city[]
array [string]
(query)

This parameter is used for finding stories whose source city is the specified value. Here you can find more information about how to work with locations.

!source.locations.city[]
array [string]
(query)

This parameter is used for excluding stories whose source city is the specified value. Here you can find more information about how to work with locations.

source.scopes.country[]
array [string]
(query)

This parameter is used for finding stories whose source scopes is the specified country value. It supports ISO 3166-1 alpha-2 country codes. Here you can find more information about how to work with locations.

!source.scopes.country[]
array [string]
(query)

This parameter is used for excluding stories whose source scopes is the specified country value. It supports ISO 3166-1 alpha-2 country codes. Here you can find more information about how to work with locations.

source.scopes.state[]
array [string]
(query)

This parameter is used for finding stories whose source scopes is the specified state/province value. Here you can find more information about how to work with locations.

!source.scopes.state[]
array [string]
(query)

This parameter is used for excluding stories whose source scopes is the specified state/province value. Here you can find more information about how to work with locations.

source.scopes.city[]
array [string]
(query)

This parameter is used for finding stories whose source scopes is the specified city value. Here you can find more information about how to work with locations.

!source.scopes.city[]
array [string]
(query)

This parameter is used for excluding stories whose source scopes is the specified city value. Here you can find more information about how to work with locations.

source.scopes.level[]
array [string]
(query)

This parameter is used for finding stories whose source scopes is the specified level value. Here you can find more information about how to work with locations.

Available values: international, national, local

!source.scopes.level[]
array [string]
(query)

This parameter is used for excluding stories whose source scopes is the specified level value. Here you can find more information about how to work with locations.

Available values: international, national, local

source.links_in_count.min
integer
(query)

This parameter is used for finding stories from sources whose Links in count is greater than or equal to the specified value. You can read more about working with Links in count here.

source.links_in_count.max
integer
(query)

This parameter is used for finding stories from sources whose Links in count is less than or equal to the specified value. You can read more about working with Links in count here.

source.rankings.alexa.rank.min
integer
(query)

This parameter is used for finding stories from sources whose Alexa rank is greater than or equal to the specified value. You can read more about working with Alexa ranks here.

source.rankings.alexa.rank.max
integer
(query)

This parameter is used for finding stories from sources whose Alexa rank is less than or equal to the specified value. You can read more about working with Alexa ranks here.

source.rankings.alexa.country[]
array [string]
(query)

This parameter is used for finding stories from sources whose Alexa rank is in the specified country value. It supports ISO 3166-1 alpha-2 country codes. You can read more about working with Alexa ranks here.

social_shares_count.facebook.min
integer
(query)

This parameter is used for finding stories whose Facebook social shares count is greater than or equal to the specified value.

social_shares_count.facebook.max
integer
(query)

This parameter is used for finding stories whose Facebook social shares count is less than or equal to the specified value.

social_shares_count.google_plus.min
integer
(query)

This parameter is used for finding stories whose Google+ social shares count is greater than or equal to the specified value.

social_shares_count.google_plus.max
integer
(query)

This parameter is used for finding stories whose Google+ social shares count is less than or equal to the specified value.

social_shares_count.linkedin.min
integer
(query)

This parameter is used for finding stories whose LinkedIn social shares count is greater than or equal to the specified value.

social_shares_count.linkedin.max
integer
(query)

This parameter is used for finding stories whose LinkedIn social shares count is less than or equal to the specified value.

social_shares_count.reddit.min
integer
(query)

This parameter is used for finding stories whose Reddit social shares count is greater than or equal to the specified value.

social_shares_count.reddit.max
integer
(query)

This parameter is used for finding stories whose Reddit social shares count is less than or equal to the specified value.

cluster
boolean
(query)

This parameter enables clustering for the returned stories. You can read more about working with clustering here.

Default value: false

cluster.algorithm
string
(query)

This parameter is used for specifying the clustering algorithm you wish to use. It supprts STC, Lingo and k-means algorithms. You can read more about working with clustering here.

Default value: lingo

return[]
array [string]
(query)

This parameter is used for specifying return fields.

Available values: id, title, body, summary, source, author, entities, keywords, hashtags, characters_count, words_count, sentences_count, paragraphs_count, categories, social_shares_count, media, sentiment, language, published_at, links

story_id
integer
(query)

A story id

story_url
string
(query)

An article or webpage

story_title
string
(query)

Title of the article

story_body
string
(query)

Body of the article

story_published_at
string
(query)

Publish date of the article. If you use a url or title and body of an article for getting coverages, this parameter is required. The format used is a restricted form of the canonical representation of dateTime in the XML Schema specification (ISO 8601).

story_language
string
(query)

This parameter is used for setting the language of the story. It supports ISO 639-1 language codes.

Default value: auto

per_page
integer
(query)

This parameter is used for specifying number of items in each page.

Default value: 3

Response

Code Description
200

An object including an array of coverages

401

Unauthorized

404

Not Found

422

Unprocessable Entity

429

Too Many Requests

  • X-RateLimit-Limit: The number of allowed requests in the current period.
  • X-RateLimit-Remaining: The number of remaining requests in the current period.
  • X-RateLimit-Reset: The remaining window before the rate limit resets in UTC epoch seconds.
500

Internal Server Error

Autocompletes

Download and install an SDK from here.

/* 
  View all parameters and methods here:
  https://github.com/AYLIEN/aylien_newsapi_nodejs/blob/master/docs/DefaultApi.md#listAutocompletes
*/

var AylienNewsApi = require('aylien-news-api');

var apiInstance = new AylienNewsApi.DefaultApi();

// Configure API key authorization: app_id
var app_id = apiInstance.apiClient.authentications['app_id'];
app_id.apiKey = "YOUR_APP_ID";

// Configure API key authorization: app_key
var app_key = apiInstance.apiClient.authentications['app_key'];
app_key.apiKey = "YOUR_APP_KEY";

var type = "dbpedia_resources";
var term = "obam";
var opts = { 
  'language': "en",
  'perPage': 3
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + JSON.stringify(data));
  }
};
apiInstance.listAutocompletes(type, term, opts, callback);
# View all parameters and methods here:
# https://github.com/AYLIEN/aylien_newsapi_python/blob/master/docs/DefaultApi.md#list_autocompletes

import aylien_news_api
from aylien_news_api.rest import ApiException
from pprint import pprint

# Configure API key authorization: app_id
aylien_news_api.configuration.api_key['X-AYLIEN-NewsAPI-Application-ID'] = 'YOUR_APP_ID'
# Configure API key authorization: app_key
aylien_news_api.configuration.api_key['X-AYLIEN-NewsAPI-Application-Key'] = 'YOUR_APP_KEY'

# create an instance of the API class
api_instance = aylien_news_api.DefaultApi()

type = 'dbpedia_resources'
term = 'obam'

opts = {
    'language': 'en',
    'per_page': 3
}

try:
    # List autocompletes
    api_response = api_instance.list_autocompletes(type, term, **opts)
    pprint(api_response)
except ApiException as e:
    pprint("Exception when calling DefaultApi->list_autocompletes: %s\n" % e)
<?php
/* 
  View all parameters and methods here:
  https://github.com/AYLIEN/aylien_newsapi_php/blob/master/docs/Api/DefaultApi.md#listAutocompletes
*/

require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: app_id
Aylien\NewsApi\Configuration::getDefaultConfiguration()->setApiKey('X-AYLIEN-NewsAPI-Application-ID', 'YOUR_APP_ID');

// Configure API key authorization: app_key
Aylien\NewsApi\Configuration::getDefaultConfiguration()->setApiKey('X-AYLIEN-NewsAPI-Application-Key', 'YOUR_APP_KEY');

$api_instance = new Aylien\NewsApi\Api\DefaultApi();

$type = "dbpedia_resources";
$term = "obam";

$opts = array(
    'language' => "en", 
    'per_page' => 3
);

try {
    $result = $api_instance->listAutocompletes($type, $term, $opts);
    print_r($result);
} catch (Exception $e) {
    print_r($e->getResponseObject()->getErrors());
    echo 'Exception when calling DefaultApi->listAutocompletes: ', $e->getMessage(), PHP_EOL;
}
?>
/* 
  View all parameters and methods here:
  https://github.com/AYLIEN/aylien_newsapi_java/blob/master/docs/DefaultApi.md#listAutocompletes
*/

import com.aylien.newsapi.*;
import com.aylien.newsapi.auth.*;
import com.aylien.newsapi.models.*;
import com.aylien.newsapi.parameters.*;
import com.aylien.newsapi.api.DefaultApi;

public class Main {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: app_id
        ApiKeyAuth app_id = (ApiKeyAuth) defaultClient.getAuthentication("app_id");
        app_id.setApiKey("YOUR_APP_ID");

        // Configure API key authorization: app_key
        ApiKeyAuth app_key = (ApiKeyAuth) defaultClient.getAuthentication("app_key");
        app_key.setApiKey("YOUR_APP_KEY");

        DefaultApi apiInstance = new DefaultApi();

        String type = "dbpedia_resources";
        String term = "obam";
        String language = "en";
        Integer perPage = 10;

        AutocompletesParams.Builder autocompletesBuilder = AutocompletesParams.newBuilder();

        autocompletesBuilder.setType(type);
        autocompletesBuilder.setTerm(term);
        autocompletesBuilder.setLanguage(language);
        autocompletesBuilder.setPerPage(perPage);

        try {
            Autocompletes result = apiInstance.listAutocompletes(autocompletesBuilder.build());
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#listAutocompletes");
            e.printStackTrace();
        }
    }
}
# View all parameters and methods here:
# https://github.com/AYLIEN/aylien_newsapi_ruby/blob/master/docs/DefaultApi.md#list_autocompletes

# load the gem
require 'aylien_news_api'

# setup authorization
AylienNewsApi.configure do |config|
  # Configure API key authorization: app_id
  config.api_key['X-AYLIEN-NewsAPI-Application-ID'] = 'YOUR_APP_ID'

  # Configure API key authorization: app_key
  config.api_key['X-AYLIEN-NewsAPI-Application-Key'] = 'YOUR_APP_KEY'
end

api_instance = AylienNewsApi::DefaultApi.new

type = "dbpedia_resources"
term = "obam"

opts = { 
  language: "en",
  per_page: 3
}

begin
  #List autocompletes
  result = api_instance.list_autocompletes(type, term, opts)
  puts result
rescue AylienNewsApi::ApiError => e
  puts "Exception when calling DefaultApi->list_autocompletes: #{e}"
end
/*
  View all parameters and methods here:
  https://github.com/AYLIEN/aylien_newsapi_go/blob/master/docs/DefaultApi.md#listautocompletes
*/

package main

// Import the library
import (
  "fmt"
  newsapi "github.com/AYLIEN/aylien_newsapi_go"
)

func main() {
  api := newsapi.NewDefaultApi()

  // Configure API key authorization: app_id
  api.Configuration.APIKeyPrefix["X-AYLIEN-NewsAPI-Application-ID"] = "YOUR_APP_ID"

  // Configure API key authorization: app_key
  api.Configuration.APIKeyPrefix["X-AYLIEN-NewsAPI-Application-Key"] = "YOUR_APP_KEY"

  autocompleteType := "dbpedia_resources"
  term := "obam"
  language := "en"
  perPage := int32(5)

  autocompletesParams := &newsapi.AutocompletesParams{
    Type:     autocompleteType,
    Term:     term,
    Language: language,
    PerPage:  perPage}

  autocompletesResponse, res, err := api.ListAutocompletes(autocompletesParams)
  if err != nil {
    panic(err)
  }
  _ = res

  fmt.Println(autocompletesResponse)
}

/* 
  View all parameters and methods here:
  https://github.com/AYLIEN/aylien_newsapi_csharp/blob/master/docs/DefaultApi.md#listautocompletes
*/

using System;
using System.Diagnostics;
using Aylien.NewsApi.Api;
using Aylien.NewsApi.Client;
using Aylien.NewsApi.Model;

namespace Example
{
    public class ListAutocompletesExample
    {
        public void main()
        {
            // Configure API key authorization: app_id
            Configuration.Default.ApiKey.Add("X-AYLIEN-NewsAPI-Application-ID", "YOUR_APP_ID");

            // Configure API key authorization: app_key
            Configuration.Default.ApiKey.Add("X-AYLIEN-NewsAPI-Application-Key", "YOUR_APP_KEY");

            var apiInstance = new DefaultApi();

            var type = "dbpedia_resources";
            var term = "obam";
            var language = "en";
            var perPage = 7;

            try
            {
                // List autocompletes
                Autocompletes result = apiInstance.ListAutocompletes(
                    type: type,
                    term: term,
                    language: language,
                    perPage: perPage
                );
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DefaultApi.ListAutocompletes: " + e.Message );
            }
        }
    }
}

Autocompletes is a helper endpoint that takes a string of characters and an entity type (such as sources, or DBpedia entities) and returns matching entities of the specified type along with additional metadata. For example, if you provide the Autocompletes endpoint with the term "New York C" and select the type dbpedia_resources, the API will return links to the DBpedia resources such as New_York_City, New_York_City_Subway, New_York_City_Police_Department, and so on.

HTTP Request

  • GET https://api.newsapi.aylien.com/api/v1/autocompletes

Parameters

Name Description
X-AYLIEN-NewsAPI-Application-ID *
string
(header)
x-data-threescale-name: app_ids

Your access API ID

X-AYLIEN-NewsAPI-Application-Key *
string
(header)
x-data-threescale-name: app_keys

Your access API Key

type *
string
(query)

This parameter is used for defining the type of autocompletes.

term *
string
(query)

This parameter is used for finding autocomplete objects that contain the specified value.

language
string
(query)

This parameter is used for autocompletes whose language is the specified value. It supports ISO 639-1 language codes.

Default value: en

per_page
integer
(query)

This parameter is used for specifying number of items in each page.

Default value: 3

Response

Code Description
200

An object including an array of autocompletes

401

Unauthorized

404

Not Found

422

Unprocessable Entity

429

Too Many Requests

  • X-RateLimit-Limit: The number of allowed requests in the current period.
  • X-RateLimit-Remaining: The number of remaining requests in the current period.
  • X-RateLimit-Reset: The remaining window before the rate limit resets in UTC epoch seconds.
500

Internal Server Error

Time Series

Download and install an SDK from here.

/* 
  View all parameters and methods here:
  https://github.com/AYLIEN/aylien_newsapi_nodejs/blob/master/docs/DefaultApi.md#listTimeSeries
*/

var AylienNewsApi = require('aylien-news-api');

var apiInstance = new AylienNewsApi.DefaultApi();

// Configure API key authorization: app_id
var app_id = apiInstance.apiClient.authentications['app_id'];
app_id.apiKey = "YOUR_APP_ID";

// Configure API key authorization: app_key
var app_key = apiInstance.apiClient.authentications['app_key'];
app_key.apiKey = "YOUR_APP_KEY";

var opts = { 
  'id': [56],
  'notId': [154211],
  'title': "startup AND (raise OR raised OR raising OR raises)",
  'body': "startup",
  'text': "startup company",
  'language': ["en", "de"],
  'notLanguage': ["es", "it"],
  'categoriesTaxonomy': "iptc-subjectcode",
  'categoriesConfident': true,
  'categoriesId': ["11000000"],
  'notCategoriesId': ["04002001"],
  'categoriesLevel': [1],
  'notCategoriesLevel': [3],
  'entitiesTitleText': ["GNU/Linux"],
  'notEntitiesTitleText': ["Microsoft", "Google"],
  'entitiesTitleType': ["Software", "Organization"],
  'notEntitiesTitleType': ["Person", "Agent"],
  'entitiesTitleLinksDbpedia': ["http://dbpedia.org/resource/Linux"],
  'notEntitiesTitleLinksDbpedia': ["http://dbpedia.org/resource/Windows"],
  'entitiesBodyText': ["Free Software"],
  'notEntitiesBodyText': ["Open Source"],
  'entitiesBodyType': ["Software", "Organization"],
  'notEntitiesBodyType': ["Person", "Agent"],
  'entitiesBodyLinksDbpedia': ["http://dbpedia.org/resource/Linux"],
  'notEntitiesBodyLinksDbpedia': ["http://dbpedia.org/resource/Microsoft"],
  'sentimentTitlePolarity': "positive",
  'notSentimentTitlePolarity': "neutral",
  'sentimentBodyPolarity': "negative",
  'notSentimentBodyPolarity': "neutral",
  'mediaImagesCountMin': 1,
  'mediaImagesCountMax': 2,
  'mediaImagesWidthMin': 640,
  'mediaImagesWidthMax': 1024,
  'mediaImagesHeightMin': 480,
  'mediaImagesHeightMax': 800,
  'mediaImagesContentLengthMin': 25412,
  'mediaImagesContentLengthMax': 369521,
  'mediaImagesFormat': ['JPEG', 'BMP', 'GIF'],
  'notMediaImagesFormat': ['TIFF', 'PNG'],
  'mediaVideosCountMin': 2,
  'mediaVideosCountMax': 2,
  'authorId': [5411],
  'notAuthorId': [65211],
  'authorName': "John Doe",
  'notAuthorName': "Mike Wali",
  'sourceId': [1422],
  'notSourceId': [51],
  'sourceName': ["BBC"],
  'notSourceName': ["Fox News"],
  'sourceDomain': ["bbc.co.uk"],
  'notSourceDomain': ["foxnews.com"],
  'sourceLocationsCountry': ["US"],
  'notSourceLocationsCountry': ["IE"],
  'sourceLocationsState': ["California"],
  'notSourceLocationsState': ["Arizona"],
  'sourceLocationsCity': ["Los Angeles"],
  'notSourceLocationsCity': ["Chandler"],
  'sourceScopesCountry': ["IE"],
  'notSourceScopesCountry': ["IT"],
  'sourceScopesState': ["Co Dublin"],
  'notSourceScopesState': ["Co Wicklow"],
  'sourceScopesCity': ["Dublin City"],
  'notSourceScopesCity': ["Cork"],
  'sourceScopesLevel': ["local"],
  'notSourceScopesLevel': ["national"],
  'sourceLinksInCountMin': 254111,
  'sourceLinksInCountMax': 352541,
  'sourceRankingsAlexaRankMin': 36,
  'sourceRankingsAlexaRankMax': 500,
  'sourceRankingsAlexaCountry': ["IE"],
  'socialSharesCountFacebookMin': 3521,
  'socialSharesCountFacebookMax': 5841,
  'socialSharesCountGooglePlusMin': 2514,
  'socialSharesCountGooglePlusMax': 36521,
  'socialSharesCountLinkedinMin': 6521,
  'socialSharesCountLinkedinMax': 36521,
  'socialSharesCountRedditMin': 14125,
  'socialSharesCountRedditMax': 95412,
  'publishedAtStart': "NOW-7DAYS/DAY",
  'publishedAtEnd': "NOW/DAY",
  'period': "+1DAY"
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + JSON.stringify(data));
  }
};
apiInstance.listTimeSeries(opts, callback);
# View all parameters and methods here:
# https://github.com/AYLIEN/aylien_newsapi_python/blob/master/docs/DefaultApi.md#list_time_series

import aylien_news_api
from aylien_news_api.rest import ApiException
from pprint import pprint

# Configure API key authorization: app_id
aylien_news_api.configuration.api_key['X-AYLIEN-NewsAPI-Application-ID'] = 'YOUR_APP_ID'
# Configure API key authorization: app_key
aylien_news_api.configuration.api_key['X-AYLIEN-NewsAPI-Application-Key'] = 'YOUR_APP_KEY'

# create an instance of the API class
api_instance = aylien_news_api.DefaultApi()


opts = { 
    'id': [521411],
    'not_id': [2511],
    'title': 'startup AND (raise OR raised OR raising OR raises)',
    'body': 'startup',
    'text': 'startup company',
    'language': ['en', 'it'],
    'not_language': ['es', 'pt'],
    'categories_taxonomy': 'iab-qag',
    'categories_confident': True,
    'categories_id': ['IAB15', 'IAB1-2'],
    'not_categories_id': ['IAB10', 'IAB3'],
    'categories_level': [1],
    'not_categories_level': [2],
    'entities_title_text': ['GNU/Linux'],
    'not_entities_title_text': ['Microsoft', 'Google'],
    'entities_title_type': ['Software', 'Organization'],
    'not_entities_title_type': ['Agent', 'Person'],
    'entities_title_links_dbpedia': ['http://dbpedia.org/resource/Donald_Trump'],
    'not_entities_title_links_dbpedia': ['http://dbpedia.org/resource/Windows'],
    'entities_body_text': ['GNU/Linux', 'Microsoft'],
    'not_entities_body_text': ['Windows Vista', 'Windows XP'],
    'entities_body_type': ['Software', 'Organization'],
    'not_entities_body_type': ['Agent', 'Person'],
    'entities_body_links_dbpedia': ['http://dbpedia.org/resource/Microsoft'],
    'not_entities_body_links_dbpedia': ['http://dbpedia.org/resource/Google'],
    'sentiment_title_polarity': 'positive',
    'not_sentiment_title_polarity': 'neutral',
    'sentiment_body_polarity': 'negative',
    'not_sentiment_body_polarity': 'positive',
    'media_images_count_min': 1,
    'media_images_count_max': 10,
    'media_images_width_min': 640,
    'media_images_width_max': 1024,
    'media_images_height_min': 480,
    'media_images_height_max': 800,
    'media_images_content_length_min': 25411,
    'media_images_content_length_max': 369541,
    'media_images_format': ['JPEG', 'BMP', 'GIF'],
    'not_media_images_format': ['PNG', 'TIFF'],
    'media_videos_count_min': 3,
    'media_videos_count_max': 5,
    'author_id': [352],
    'not_author_id': [541],
    'author_name': 'John Doe',
    'not_author_name': 'Mike Wally',
    'source_id': [1456],
    'not_source_id': [142],
    'source_name': ['BBC'],
    'not_source_name': ['Fox News'],
    'source_domain': ['bbc.co.uk'],
    'not_source_domain': ['foxnews.com'],
    'source_locations_country': ['US'],
    'not_source_locations_country': ['BR'],
    'source_locations_state': ['California'],
    'not_source_locations_state': ['Berkshire'],
    'source_locations_city': ['London'],
    'not_source_locations_city': ['Dublin'],
    'source_scopes_country': ['IE'],
    'not_source_scopes_country': ['IN'],
    'source_scopes_state': ['Tehran'],
    'not_source_scopes_state': ['Berkshire'],
    'source_scopes_city': ['Dublin'],
    'not_source_scopes_city': ['New York City'],
    'source_scopes_level': ['local'],
    'not_source_scopes_level': ['national'],
    'source_links_in_count_min': 401444,
    'source_links_in_count_max': 500000,
    'source_rankings_alexa_rank_min': 3,
    'source_rankings_alexa_rank_max': 100,
    'source_rankings_alexa_country': ['IE'],
    'social_shares_count_facebook_min': 3521,
    'social_shares_count_facebook_max': 2514,
    'social_shares_count_google_plus_min': 6521,
    'social_shares_count_google_plus_max': 36524,
    'social_shares_count_linkedin_min': 6528,
    'social_shares_count_linkedin_max': 952141,
    'social_shares_count_reddit_min': 14251,
    'social_shares_count_reddit_max': 95874,
    'published_at_start': 'NOW-7DAYS/DAY',
    'published_at_end': 'NOW/DAY',
    'period': '+1DAY'
}

try: 
    # List time series
    api_response = api_instance.list_time_series(**opts)
    pprint(api_response)
except ApiException as e:
    pprint("Exception when calling DefaultApi->list_time_series: %s\n" % e)
<?php
/* 
  View all parameters and methods here:
  https://github.com/AYLIEN/aylien_newsapi_php/blob/master/docs/Api/DefaultApi.md#listTimeSeries
*/

require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: app_id
Aylien\NewsApi\Configuration::getDefaultConfiguration()->setApiKey('X-AYLIEN-NewsAPI-Application-ID', 'YOUR_APP_ID');

// Configure API key authorization: app_key
Aylien\NewsApi\Configuration::getDefaultConfiguration()->setApiKey('X-AYLIEN-NewsAPI-Application-Key', 'YOUR_APP_KEY');

$api_instance = new Aylien\NewsApi\Api\DefaultApi();


$opts = array(
    'id' => array(36521),
    'not_id' => array(36222),
    'title' => "startup AND (raise OR raised OR raising OR raises)",
    'body' => "startup",
    'text' => "startup company",
    'language' => array("en","pt"),
    'not_language' => array("es","it"),
    'categories_taxonomy' => "iptc-subjectcode",
    'categories_confident' => false,
    'categories_id' => array("11000000","11003000"),
    'not_categories_id' => array("04001001"),
    'categories_level' => array(1),
    'not_categories_level' => array(2,3),
    'entities_title_text' => array("GNU/Linux","Microsoft"),
    'not_entities_title_text' => array("Windows","Ireland"),
    'entities_title_type' => array("Software","Organization"),
    'not_entities_title_type' => array("Agent","Person"),
    'entities_title_links_dbpedia' => array("http://dbpedia.org/resource/Linux"),
    'not_entities_title_links_dbpedia' => array("http://dbpedia.org/resource/Microsoft"),
    'entities_body_text' => array("Free Software","Open Source"),
    'not_entities_body_text' => array("Proprietary Software"),
    'entities_body_type' => array("Software","Organization"),
    'not_entities_body_type' => array("Agent","Hardware"),
    'entities_body_links_dbpedia' => array("http://dbpedia.org/resource/Linux"),
    'not_entities_body_links_dbpedia' => array("http://dbpedia.org/resource/Windows"),
    'sentiment_title_polarity' => "positive",
    'not_sentiment_title_polarity' => "neutral",
    'sentiment_body_polarity' => "negative",
    'not_sentiment_body_polarity' => "positive",
    'media_images_count_min' => 1,
    'media_images_count_max' => 4,
    'media_images_width_min' => 640,
    'media_images_width_max' => 1024,
    'media_images_height_min' => 480,
    'media_images_height_max' => 800,
    'media_images_content_length_min' => 25412,
    'media_images_content_length_max' => 369541,
    'media_images_format' => array("JPEG","BMP", "GIF"),
    'not_media_images_format' => array("PNG","TIFF"),
    'media_videos_count_min' => 2,
    'media_videos_count_max' => 5,
    'author_id' => array(4155),
    'not_author_id' => array(3214),
    'author_name' => "John Doe",
    'not_author_name' => "Mike Wally",
    'source_id' => array(122),
    'not_source_id' => array(12, 34),
    'source_name' => array("BBC"),
    'not_source_name' => array("Fox News"),
    'source_domain' => array("bbc.co.uk"),
    'not_source_domain' => array("foxnews.com"),
    'source_locations_country' => array("US", "IE"),
    'not_source_locations_country' => array("IN", "NG"),
    'source_locations_state' => array("California"),
    'not_source_locations_state' => array("Arizona"),
    'source_locations_city' => array("Los Angeles"),
    'not_source_locations_city' => array("Dublin City"),
    'source_scopes_country' => array("IN", "IE"),
    'not_source_scopes_country' => array("US"),
    'source_scopes_state' => array("Wicklow"),
    'not_source_scopes_state' => array("California"),
    'source_scopes_city' => array("Dublin City"),
    'not_source_scopes_city' => array("Cork"),
    'source_scopes_level' => array("local"),
    'not_source_scopes_level' => array("international"),
    'source_links_in_count_min' => 254111,
    'source_links_in_count_max' => 587796,
    'source_rankings_alexa_rank_min' => 255,
    'source_rankings_alexa_rank_max' => 1421,
    'source_rankings_alexa_country' => array("IE"),
    'social_shares_count_facebook_min' => 3521,
    'social_shares_count_facebook_max' => 5841,
    'social_shares_count_google_plus_min' => 65241,
    'social_shares_count_google_plus_max' => 105214,
    'social_shares_count_linkedin_min' => 3254,
    'social_shares_count_linkedin_max' => 5621,
    'social_shares_count_reddit_min' => 255,
    'social_shares_count_reddit_max' => 9541,
    'published_at_start' => "NOW-7DAYS/DAY",
    'published_at_end' => "NOW/DAY",
    'period' => "+1DAY"
);

try {
    $result = $api_instance->listTimeSeries($opts);
    print_r($result);
} catch (Exception $e) {
    print_r($e->getResponseObject()->getErrors());
    echo 'Exception when calling DefaultApi->listTimeSeries: ', $e->getMessage(), PHP_EOL;
}
?>
/* 
  View all parameters and methods here:
  https://github.com/AYLIEN/aylien_newsapi_java/blob/master/docs/DefaultApi.md#listTimeSeries
*/

import com.aylien.newsapi.*;
import com.aylien.newsapi.auth.*;
import com.aylien.newsapi.models.*;
import com.aylien.newsapi.parameters.*;
import com.aylien.newsapi.api.DefaultApi;

import java.util.Arrays;
import java.util.List;

public class Main {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: app_id
        ApiKeyAuth app_id = (ApiKeyAuth) defaultClient.getAuthentication("app_id");
        app_id.setApiKey("YOUR_APP_ID");

        // Configure API key authorization: app_key
        ApiKeyAuth app_key = (ApiKeyAuth) defaultClient.getAuthentication("app_key");
        app_key.setApiKey("YOUR_APP_KEY");

        DefaultApi apiInstance = new DefaultApi();

        List<Long> id = Arrays.asList(985744L);
        List<Long> notId = Arrays.asList(5241L, 4412L);
        String title = "startup AND (raise OR raised OR raising OR raises)";
        String body = "startup";
        String text = "startup company";
        List<String> language = Arrays.asList("en", "es", "es");
        List<String> notLanguage = Arrays.asList("fr", "pt", "it");
        String categoriesTaxonomy = "iab-qag";
        Boolean categoriesConfident = true;
        List<String> categoriesId = Arrays.asList("IAB15", "IAB13-1");
        List<String> notCategoriesId = Arrays.asList("IAB3-2");
        List<Integer> categoriesLevel = Arrays.asList(2);
        List<Integer> notCategoriesLevel = Arrays.asList(1, 3);
        List<String> entitiesTitleText = Arrays.asList("GNU/Linux", "Microsoft Windows");
        List<String> notEntitiesTitleText = Arrays.asList("Ireland", "Dublin");
        List<String> entitiesTitleType = Arrays.asList("Software", "Organization");
        List<String> notEntitiesTitleType = Arrays.asList("Agent", "Person");
        List<String> entitiesTitleLinksDbpedia = Arrays.asList("http://dbpedia.org/resource/Linux");
        List<String> notEntitiesTitleLinksDbpedia = Arrays.asList("http://dbpedia.org/resource/Windows");
        List<String> entitiesBodyText = Arrays.asList("GNU/Linux", "Microsoft Windows");
        List<String> notEntitiesBodyText = Arrays.asList("Trump");
        List<String> entitiesBodyType = Arrays.asList("Agent", "Person");
        List<String> notEntitiesBodyType = Arrays.asList("Software", "Organization");
        List<String> entitiesBodyLinksDbpedia = Arrays.asList("entitiesBodyLinksDbpedia_example");
        List<String> notEntitiesBodyLinksDbpedia = Arrays.asList("http://dbpedia.org/resource/Linux");
        String sentimentTitlePolarity = "negative";
        String notSentimentTitlePolarity = "positive";
        String sentimentBodyPolarity = "neutral";
        String notSentimentBodyPolarity = "negative";
        Integer mediaImagesCountMin = 2;
        Integer mediaImagesCountMax = 4;
        Integer mediaImagesWidthMin = 640;
        Integer mediaImagesWidthMax = 1024;
        Integer mediaImagesHeightMin = 480;
        Integer mediaImagesHeightMax = 800;
        Integer mediaImagesContentLengthMin = 25411;
        Integer mediaImagesContentLengthMax = 369541;
        List<String> mediaImagesFormat = Arrays.asList("JPEG", "BMP", "GIF");
        List<String> notMediaImagesFormat = Arrays.asList("PNG", "TIFF");
        Integer mediaVideosCountMin = 1;
        Integer mediaVideosCountMax = 2;
        List<Integer> authorId = Arrays.asList(36521);
        List<Integer> notAuthorId = Arrays.asList(2541);
        String authorName = "John Doe";
        String notAuthorName = "Mike Wally";
        List<Integer> sourceId = Arrays.asList(1411);
        List<Integer> notSourceId = Arrays.asList(251);
        List<String> sourceName = Arrays.asList("BBC");
        List<String> notSourceName = Arrays.asList("Fox News");
        List<String> sourceDomain = Arrays.asList("bbc.co.uk");
        List<String> notSourceDomain = Arrays.asList("foxnews.com");
        List<String> sourceLocationsCountry = Arrays.asList("US", "IE");
        List<String> notSourceLocationsCountry = Arrays.asList("IR");
        List<String> sourceLocationsState = Arrays.asList("California");
        List<String> notSourceLocationsState = Arrays.asList("Arizona");
        List<String> sourceLocationsCity = Arrays.asList("Los Angeles");
        List<String> notSourceLocationsCity = Arrays.asList("Dublin City");
        List<String> sourceScopesCountry = Arrays.asList("IE", "NG");
        List<String> notSourceScopesCountry = Arrays.asList("US", "GB");
        List<String> sourceScopesState = Arrays.asList("Co Dublin");
        List<String> notSourceScopesState = Arrays.asList("Co Wicklow");
        List<String> sourceScopesCity = Arrays.asList("Dublin City");
        List<String> notSourceScopesCity = Arrays.asList("Cork");
        List<String> sourceScopesLevel = Arrays.asList("national");
        List<String> notSourceScopesLevel = Arrays.asList("local");
        Integer sourceLinksInCountMin = 354211;
        Integer sourceLinksInCountMax = 587412;
        Integer sourceRankingsAlexaRankMin = 10;
        Integer sourceRankingsAlexaRankMax = 2500;
        List<String> sourceRankingsAlexaCountry = Arrays.asList("IE");
        Integer socialSharesCountFacebookMin = 3521;
        Integer socialSharesCountFacebookMax = 5841;
        Integer socialSharesCountGooglePlusMin = 2514;
        Integer socialSharesCountGooglePlusMax = 36521;
        Integer socialSharesCountLinkedinMin = 6521;
        Integer socialSharesCountLinkedinMax = 36521;
        Integer socialSharesCountRedditMin = 14125;
        Integer socialSharesCountRedditMax = 95412;
        String publishedAtStart = "NOW-7DAYS/DAY";
        String publishedAtEnd = "NOW/DAY";
        String period = "+1DAY";

        TimeSeriesParams.Builder timeSeriesBuilder = TimeSeriesParams.newBuilder();

        timeSeriesBuilder.setId(id);
        timeSeriesBuilder.setNotId(notId);
        timeSeriesBuilder.setTitle(title);
        timeSeriesBuilder.setBody(body);
        timeSeriesBuilder.setText(text);
        timeSeriesBuilder.setLanguage(language);
        timeSeriesBuilder.setNotLanguage(notLanguage);
        timeSeriesBuilder.setCategoriesTaxonomy(categoriesTaxonomy);
        timeSeriesBuilder.setCategoriesConfident(categoriesConfident);
        timeSeriesBuilder.setCategoriesId(categoriesId);
        timeSeriesBuilder.setNotCategoriesId(notCategoriesId);
        timeSeriesBuilder.setCategoriesLevel(categoriesLevel);
        timeSeriesBuilder.setNotCategoriesLevel(notCategoriesLevel);
        timeSeriesBuilder.setEntitiesTitleText(entitiesTitleText);
        timeSeriesBuilder.setNotEntitiesTitleText(notEntitiesTitleText);
        timeSeriesBuilder.setEntitiesTitleType(entitiesTitleType);
        timeSeriesBuilder.setNotEntitiesTitleType(notEntitiesTitleType);
        timeSeriesBuilder.setEntitiesTitleLinksDbpedia(entitiesTitleLinksDbpedia);
        timeSeriesBuilder.setNotEntitiesTitleLinksDbpedia(notEntitiesTitleLinksDbpedia);
        timeSeriesBuilder.setEntitiesBodyText(entitiesBodyText);
        timeSeriesBuilder.setNotEntitiesBodyText(notEntitiesBodyText);
        timeSeriesBuilder.setEntitiesBodyType(entitiesBodyType);
        timeSeriesBuilder.setNotEntitiesBodyType(notEntitiesBodyType);
        timeSeriesBuilder.setEntitiesBodyLinksDbpedia(entitiesBodyLinksDbpedia);
        timeSeriesBuilder.setNotEntitiesBodyLinksDbpedia(notEntitiesBodyLinksDbpedia);
        timeSeriesBuilder.setSentimentTitlePolarity(sentimentTitlePolarity);
        timeSeriesBuilder.setNotSentimentTitlePolarity(notSentimentTitlePolarity);
        timeSeriesBuilder.setSentimentBodyPolarity(sentimentBodyPolarity);
        timeSeriesBuilder.setNotSentimentBodyPolarity(notSentimentBodyPolarity);
        timeSeriesBuilder.setMediaImagesCountMin(mediaImagesCountMin);
        timeSeriesBuilder.setMediaImagesCountMax(mediaImagesCountMax);
        timeSeriesBuilder.setMediaImagesWidthMin(mediaImagesWidthMin);
        timeSeriesBuilder.setMediaImagesWidthMax(mediaImagesWidthMax);
        timeSeriesBuilder.setMediaImagesHeightMin(mediaImagesHeightMin);
        timeSeriesBuilder.setMediaImagesHeightMax(mediaImagesHeightMax);
        timeSeriesBuilder.setMediaImagesContentLengthMin(mediaImagesContentLengthMin);
        timeSeriesBuilder.setMediaImagesContentLengthMax(mediaImagesContentLengthMax);
        timeSeriesBuilder.setMediaImagesFormat(mediaImagesFormat);
        timeSeriesBuilder.setNotMediaImagesFormat(notMediaImagesFormat);
        timeSeriesBuilder.setMediaVideosCountMin(mediaVideosCountMin);
        timeSeriesBuilder.setMediaVideosCountMax(mediaVideosCountMax);
        timeSeriesBuilder.setAuthorId(authorId);
        timeSeriesBuilder.setNotAuthorId(notAuthorId);
        timeSeriesBuilder.setAuthorName(authorName);
        timeSeriesBuilder.setNotAuthorName(notAuthorName);
        timeSeriesBuilder.setSourceId(sourceId);
        timeSeriesBuilder.setNotSourceId(notSourceId);
        timeSeriesBuilder.setSourceName(sourceName);
        timeSeriesBuilder.setNotSourceName(notSourceName);
        timeSeriesBuilder.setSourceDomain(sourceDomain);
        timeSeriesBuilder.setNotSourceDomain(notSourceDomain);
        timeSeriesBuilder.setSourceLocationsCountry(sourceLocationsCountry);
        timeSeriesBuilder.setNotSourceLocationsCountry(notSourceLocationsCountry);
        timeSeriesBuilder.setSourceLocationsState(sourceLocationsState);
        timeSeriesBuilder.setNotSourceLocationsState(notSourceLocationsState);
        timeSeriesBuilder.setSourceLocationsCity(sourceLocationsCity);
        timeSeriesBuilder.setNotSourceLocationsCity(notSourceLocationsCity);
        timeSeriesBuilder.setSourceScopesCountry(sourceScopesCountry);
        timeSeriesBuilder.setNotSourceScopesCountry(notSourceScopesCountry);
        timeSeriesBuilder.setSourceScopesState(sourceScopesState);
        timeSeriesBuilder.setNotSourceScopesState(notSourceScopesState);
        timeSeriesBuilder.setSourceScopesCity(sourceScopesCity);
        timeSeriesBuilder.setNotSourceScopesCity(notSourceScopesCity);
        timeSeriesBuilder.setSourceScopesLevel(sourceScopesLevel);
        timeSeriesBuilder.setNotSourceScopesLevel(notSourceScopesLevel);
        timeSeriesBuilder.setSourceLinksInCountMin(sourceLinksInCountMin);
        timeSeriesBuilder.setSourceLinksInCountMax(sourceLinksInCountMax);
        timeSeriesBuilder.setSourceRankingsAlexaRankMin(sourceRankingsAlexaRankMin);
        timeSeriesBuilder.setSourceRankingsAlexaRankMax(sourceRankingsAlexaRankMax);
        timeSeriesBuilder.setSourceRankingsAlexaCountry(sourceRankingsAlexaCountry);
        timeSeriesBuilder.setSocialSharesCountFacebookMin(socialSharesCountFacebookMin);
        timeSeriesBuilder.setSocialSharesCountFacebookMax(socialSharesCountFacebookMax);
        timeSeriesBuilder.setSocialSharesCountGooglePlusMin(socialSharesCountGooglePlusMin);
        timeSeriesBuilder.setSocialSharesCountGooglePlusMax(socialSharesCountGooglePlusMax);
        timeSeriesBuilder.setSocialSharesCountLinkedinMin(socialSharesCountLinkedinMin);
        timeSeriesBuilder.setSocialSharesCountLinkedinMax(socialSharesCountLinkedinMax);
        timeSeriesBuilder.setSocialSharesCountRedditMin(socialSharesCountRedditMin);
        timeSeriesBuilder.setSocialSharesCountRedditMax(socialSharesCountRedditMax);
        timeSeriesBuilder.setPublishedAtStart(publishedAtStart);
        timeSeriesBuilder.setPublishedAtEnd(publishedAtEnd);
        timeSeriesBuilder.setPeriod(period);

        try {
            TimeSeriesList result = apiInstance.listTimeSeries(timeSeriesBuilder.build());
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#listTimeSeries");
            e.printStackTrace();
        }
    }
}
# View all parameters and methods here:
# https://github.com/AYLIEN/aylien_newsapi_ruby/blob/master/docs/DefaultApi.md#list_time_series

# load the gem
require 'aylien_news_api'

# setup authorization
AylienNewsApi.configure do |config|
  # Configure API key authorization: app_id
  config.api_key['X-AYLIEN-NewsAPI-Application-ID'] = 'YOUR_APP_ID'

  # Configure API key authorization: app_key
  config.api_key['X-AYLIEN-NewsAPI-Application-Key'] = 'YOUR_APP_KEY'
end

api_instance = AylienNewsApi::DefaultApi.new

opts = { 
  id: [5411],
  not_id: [3625],
  title: "startup AND (raise OR raised OR raising OR raises)",
  body: "startup",
  text: "startup company",
  language: ["en", "fr"],
  not_language: ["es", "it"],
  categories_taxonomy: "iptc-subjectcode",
  categories_confident: true,
  categories_id: ["11000000", "02000000"],
  not_categories_id: ["11001000", "10000000"],
  categories_level: [3],
  not_categories_level: [1, 2],
  entities_title_text: ["GNU/Linux", "Microsoft"],
  not_entities_title_text: ["Google", "Windows"],
  entities_title_type: ["Software", "Organization"],
  not_entities_title_type: ["Agent", "Person"],
  entities_title_links_dbpedia: ["http://dbpedia.org/resource/Linux"],
  not_entities_title_links_dbpedia: ["http://dbpedia.org/resource/Windows"],
  entities_body_text: ["Free Software", "Open Source"],
  not_entities_body_text: ["Barack Obama", "Trump"],
  entities_body_type: ["Software", "Organization"],
  not_entities_body_type: ["Agent", "Person"],
  entities_body_links_dbpedia: ["http://dbpedia.org/resource/Linux"],
  not_entities_body_links_dbpedia: ["http://dbpedia.org/resource/Windows"],
  sentiment_title_polarity: "positive",
  not_sentiment_title_polarity: "neutral",
  sentiment_body_polarity: "negative",
  not_sentiment_body_polarity: "positive",
  media_images_count_min: 3,
  media_images_count_max: 3,
  media_images_width_min: 640,
  media_images_width_max: 1024,
  media_images_height_min: 480,
  media_images_height_max: 800,
  media_images_content_length_min: 25411,
  media_images_content_length_max: 369541,
  media_images_format: ["JPEG", "BMP", "GIF"],
  not_media_images_format: ["TIFF", "PNG"],
  media_videos_count_min: 1,
  media_videos_count_max: 2,
  author_id: [4155],
  not_author_id: [2541],
  author_name: "John Doe",
  not_author_name: "Mike Wally",
  source_id: [124],
  not_source_id: [54],
  source_name: ["BBC"],
  not_source_name: ["Fox News"],
  source_domain: ["bbc.co.uk"],
  not_source_domain: ["foxnews.com"],
  source_locations_country: ["US", "IE"],
  not_source_locations_country: ["JP", "GB"],
  source_locations_state: ["California"],
  not_source_locations_state: ["Arizona"],
  source_locations_city: ["Los Angeles"],
  not_source_locations_city: ["Dublin City"],
  source_scopes_country: ["GB", "IE"],
  not_source_scopes_country: ["US", "JP"],
  source_scopes_state: ["Co Dublin"],
  not_source_scopes_state: ["Co Wicklow"],
  source_scopes_city: ["Cork"],
  not_source_scopes_city: ["Galway"],
  source_scopes_level: ["local"],
  not_source_scopes_level: ["national"],
  source_links_in_count_min: 126333,
  source_links_in_count_max: 521000,
  source_rankings_alexa_rank_min: 123,
  source_rankings_alexa_rank_max: 152,
  source_rankings_alexa_country: ["IE"],
  social_shares_count_facebook_min: 3521,
  social_shares_count_facebook_max: 5841,
  social_shares_count_google_plus_min: 2541,
  social_shares_count_google_plus_max: 36541,
  social_shares_count_linkedin_min: 6521,
  social_shares_count_linkedin_max: 32541,
  social_shares_count_reddit_min: 14521,
  social_shares_count_reddit_max: 95841,
  published_at_start: "NOW-7DAYS/DAY",
  published_at_end: "NOW/DAY",
  period: "+1DAY"
}

begin
  #List time series
  result = api_instance.list_time_series(opts)
  puts result
rescue AylienNewsApi::ApiError => e
  puts "Exception when calling DefaultApi->list_time_series: #{e}"
  puts e.response_body
end
/*
  View all parameters and methods here:
  https://github.com/AYLIEN/aylien_newsapi_go/blob/master/docs/DefaultApi.md#listtimeseries
*/

package main

// Import the library
import (
  "fmt"
  newsapi "github.com/AYLIEN/aylien_newsapi_go"
)

func main() {
  api := newsapi.NewDefaultApi()

  // Configure API key authorization: app_id
  api.Configuration.APIKeyPrefix["X-AYLIEN-NewsAPI-Application-ID"] = "YOUR_APP_ID"

  // Configure API key authorization: app_key
  api.Configuration.APIKeyPrefix["X-AYLIEN-NewsAPI-Application-Key"] = "YOUR_APP_KEY"

  id := []int64{2541}
  notId := []int64{5411, 6565}
  title := "startup AND (raise OR raised OR raising OR raises)"
  body := "startup"
  text := "startup company"
  language := []string{"en", "de"}
  notLanguage := []string{"it", "es"}
  categoriesTaxonomy := "iptc-subjectcode"
  categoriesConfident := "true"
  categoriesId := []string{"11000000"}
  notCategoriesId := []string{"10000000", "04001000"}
  categoriesLevel := []int32{3}
  notCategoriesLevel := []int32{1, 2}
  entitiesTitleText := []string{"GNU/Linux"}
  notEntitiesTitleText := []string{"Windows", "Microsoft"}
  entitiesTitleType := []string{"Software", "Organization"}
  notEntitiesTitleType := []string{"Person", "Agent"}
  entitiesTitleLinksDbpedia := []string{"http://dbpedia.org/resource/Linux"}
  notEntitiesTitleLinksDbpedia := []string{"http://dbpedia.org/resource/Windows"}
  entitiesBodyText := []string{"Free Software"}
  notEntitiesBodyText := []string{"Open Source Software"}
  entitiesBodyType := []string{"Software", "Organization"}
  notEntitiesBodyType := []string{"Agent", "Person"}
  entitiesBodyLinksDbpedia := []string{"http://dbpedia.org/resource/Linux"}
  notEntitiesBodyLinksDbpedia := []string{"http://dbpedia.org/resource/Microsoft"}
  sentimentTitlePolarity := "positive"
  notSentimentTitlePolarity := "neutral"
  sentimentBodyPolarity := "neutral"
  notSentimentBodyPolarity := "neutral"
  mediaImagesCountMin := "3"
  mediaImagesCountMax := "