The AYLIEN News API is the most powerful way of sourcing, searching and syndicating analyzed and enriched news content. It is accessed by sending HTTP requests to our server, which returns information to your client.
This Python package is automatically generated by the OpenAPI Generator project:
- API version: 3.0
- Package version: 3.0.0
- Build package: org.openapitools.codegen.languages.PythonClientCodegen For more information, please visit https://newsapi.aylien.com/
Python 2.7 and 3.4+
If the python package is hosted on Github, you can install directly from Github
pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git
(you may need to run pip
with root permission: sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git
)
Then import the package:
import aylien_news_api
Install via Setuptools.
python setup.py install --user
(or sudo python setup.py install
to install the package for all users)
Then import the package:
import aylien_news_api
Please follow the installation procedure and then run the following:
from __future__ import print_function
import os
import aylien_news_api
from aylien_news_api.rest import ApiException
from pprint import pprint
configuration = aylien_news_api.Configuration()
configuration.api_key['X-AYLIEN-NewsAPI-Application-ID'] = os.environ.get('NEWSAPI_APP_ID')
configuration.api_key['X-AYLIEN-NewsAPI-Application-Key'] = os.environ.get('NEWSAPI_APP_KEY')
client = aylien_news_api.ApiClient(configuration)
api_instance = aylien_news_api.DefaultApi(client)
try:
api_response = api_instance.list_stories(
title='startup',
published_at_start='NOW-7DAYS',
published_at_end='NOW',
not_language=['en']
)
pprint(api_response)
except ApiException as e:
print("Exception when calling DefaultApi->list_stories: %s\n" % e)
All URIs are relative to https://api.aylien.com/news
Class | Method | HTTP request | Description |
---|---|---|---|
DefaultApi | list_autocompletes | GET /autocompletes | List autocompletes |
DefaultApi | list_clusters | GET /clusters | List Clusters |
DefaultApi | list_coverages | GET /coverages | List coverages |
DefaultApi | list_histograms | GET /histograms | List histograms |
DefaultApi | list_related_stories | GET /related_stories | List related stories |
DefaultApi | list_stories | GET /stories | List Stories |
DefaultApi | list_time_series | GET /time_series | List time series |
DefaultApi | list_trends | GET /trends | List trends |
- Author
- Autocomplete
- Autocompletes
- Category
- CategoryLinks
- Cluster
- Clusters
- Coverages
- Entities
- Entity
- EntityLinks
- Error
- ErrorLinks
- Errors
- HistogramInterval
- Histograms
- Location
- Media
- Rank
- Rankings
- RelatedStories
- RepresentativeStory
- Scope
- Sentiment
- Sentiments
- ShareCount
- ShareCounts
- Source
- Stories
- Story
- StoryCluster
- StoryLinks
- StoryTranslations
- StoryTranslationsEn
- Summary
- TimeSeries
- TimeSeriesList
- Trend
- Trends
- Type: API key
- API key parameter name: X-AYLIEN-NewsAPI-Application-ID
- Location: HTTP header
- Type: API key
- API key parameter name: X-AYLIEN-NewsAPI-Application-Key
- Location: HTTP header