Contents

Search Articles in a Channel

See a list of all articles in a channel that match the specified search criteria.

URL

GET https://news-api.apple.com/channels/{channelId}/articles

Path Parameters

NameTypeDescription
channelId Requiredstring

The UUID of the channel to search.

Query Parameters

NameTypeDescription
fromDate Optionalstring

If specified, the server only returns articles with a createdAt date later than fromDate.

pageSize Optionalinteger

The number of articles to return on each page. This value must be an integer between 1 and 100 (inclusive).

pageToken Optionalstring

An opaque token that specifies the page to view. The server returns links with the URL in each response. It also includes the pageToken for the next page.

sortDir Optionalstring

Indicates whether to return oldest articles first (ASC) or newest articles first (DESC).

toDate Optionalstring

If specified, the server only returns articles with a createdAt date earlier than toDate.

Response Codes

StatusReasonTypeDescription
200OK
Content-Type: application/json
SearchResponse

The request was successful.

400Bad Request
Content-Type: application/json
Error

  • INVALID. The pageToken parameter isn’t a valid token returned in a next link or nextPageToken field. Key path: pageToken

  • INVALID. The sortDir parameter is not ASC or DESC. Key path: sortDir

  • INVALID. The fromDate parameter isn’t in ISO 8601 date format. Key path: fromDate

  • INVALID.The toDate parameter isn’t in ISO 8601 date format. Key path: toDate

  • INVALID. The pageSize parameter isn’t an integer in the range 1 to 100, inclusive. Key path: pageSize

  • INVALID_TYPE. The value specified for channelId is not of the correct type for that field. Key path: channelId

  • MISSING. You didn’t include the Channel UUID field in the request. Key path: *

401Unauthorized
Content-Type: application/json
Error

You didn’t include the Authorization header. Key path: N/A

403Forbidden
Content-Type: application/json
Error

You tried to access a channel your API key doesn’t have permission to access. Key path: N/A

404Not Found
Content-Type: application/json
Error

  • The endpoint you tried to access doesn’t exist. Key path: N/A

  • The channel you tried to access to search for the article doesn’t exist. Key path: channelId.

429Too Many Requests
Content-Type: application/json
Error

You exceeded the number of articles that you can search for in a channel within the specific time window. The response header <Retry-After: delay-seconds> indicates the time in seconds you need to wait before sending a new search request.

Discussion

A Search Articles request returns a list of all articles in a channel that were created between fromDate and toDate. The results of this call are paginated, with a maximum page size of 100. Each response contains a link to the next page of results.

Example

See Also

Articles