Apple News API Tutorial

Request channel data and publish an article using the Apple News API.


In this tutorial, you'll use Python to request channel data and publish an article to your channel. The tutorial assumes you are familiar with basic Python programming constructs and techniques. Beginning programmers should be able to follow along and run this tutorial.

Alternative Tutorial Code Languages

In addition to Python, the tutorial code is also available in Java, C#, and PHP. To get the code for all four, download the file.


Before beginning the tutorial, make sure you have the following information and installed software:

If you are not familiar with Apple News API endpoints, see Apple News API before you get started.


Apple News API Python Tutorial

Making an HTTP Request to the Apple News API

Create the URL, set the method, and send the request.

Signing the HTTP Request

Sign the canonical request and send the custom authorization header to the Apple News API.

Publishing an Article

Build a URL and article body for the publish-article request.

See Also

Article Publication and Management

Apple News API

Publish and manage Apple News Format articles.