Article

Apple News API Tutorial

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

Overview

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 and PHP. To get the code for all three, download the Apple-News-API-Tutorial-Example-Code.zip file.

Requirements

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.

Topics

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.

What's New in the Apple News API

Check out new features and enhancements.