HomeGuidesAPI Reference
Submit Documentation FeedbackJoin Developer CommunityOptimizely GitHubOptimizely NuGetLog In

Feed API

This is Version 2 of the Feed API.

The Feed API V2 is the way you will retrieve article content from system feeds. This document details the use of feeds and parameters with examples of how to interact with the feed and parse published urls back in order for uninterrupted posting of social posts that promote article content. 

Your Implementation Consultant will give you the id of the feed or feeds that you will interact with, during onboarding.  These may also be found in the settings menu, under ‘Website, CMS & Feeds’ and is accessible to Administrator accounts only. 

Calling the feed

The platform allows you to create an arbitrary amount of “feeds” which can be retrieved via HTTPS GET requests. Using CMP workflows, you can publish articles to the top of one or more of these feeds. Then, by calling your feed endpoints regularly, you can check for new content, and where it exists, create a new article in your CMS database by mapping fields (article headline, body, author, source, metadata, etc) to their respective elements in your CMS.  You will be given your feed in a structure similar to below

https://api.newscred.com/v2/feed/0569f69ed223720c699936eddbc7tyxP8d3

By default, accessing the url will return up to 200 records in atom format. In order to work with the feed, you may want to make use of the provided parameter options

Feed Parameters

There are a limited number of parameters that can be used when calling the feed, as below

Parameter

Type

Values

Default

Explanation

Format

string

json,

atom

atom

The Feed API supports both atom and json. Based on how you plan to integrate, choose your preferred format.

pagesize

integer

 

200

This parameter tells our API how many pieces of content you want to retrieve

offset

integer

 

0

An offset can be applied in order to call articles in batches, when used in conjunction with pagesize and determines where you want to start. To retrieve the second page of content, increment the offset by the page size.

sort_by

string

Position,

modified_at

Position (no value passed) or modified_at (other value passed) 

Sorting of articles within the feed

Updating and Deletion of content

  • We recommend setting a batch task, paginating through full feeds 
  • We recommend utilizing a Deleted Feed. The user can move an article to the Deleted Feed in the NewsCred Platform. Your integration can then be set-up to recognize when an article has been moved and trigger the 'delete' action when the feed is called from your CMS.
  • Of course, you can also delete the content in the CMS, but we recommend against allowing inconsistencies to develop between the feed and the CMS to avoid unexpected behavior. 

Sample API request(JSON)

cURL: https://api.newscred.com/v2/feed/0569f69ed223720c699936eddbc7tyxP8d3

Sample Output(JSON)

{
"title": "NM Feed Sample",
"modified_at": "2025-07-24T12:01:44Z",
"entries": [
{
"content": {
"guid": "151a3f3ccda517geab6db0aF5f9be72d9",
"group_id": "151a3f3ccdaxe751Bu91eab6db0ad4f9be72d9",
"meta_title": "Feed Article Sample",
"meta_description": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.",
"meta_url": "/",
"meta_keywords": [],
"images": [
{
"caption": "mango.png",
"attribution_text": "",
"description": "",
"height": "512",
"width": "369",
"thumbnail": "https://img.newscred.com/Zz0yNWU2MzMzNWNkfgYTUxMWV5hOD7QzYzBhMDY3NTYwZjM5Nw==?width=75&height=75",
"url": "https://img.newscred.com/Zz0yNWU2MzMzNgfWNkYTUxMWV5hOD7QzYzBhMDY3NTYwZjM5Nw==/mango.png",
"mimetype": "image/png",
"source": {
"name": "Martin's Test Group"
}
}
],
"videos": [],
"authors": null,
"topics": [],
"title": "Feed Article Sample",
"description": "<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>\n<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>\n<img src=\"https://pixel.newscred.com/px.gif?key=YXJ0aWNsZT0xNTFhM2YzY2NkYTUxMWVhYjZkYjBhZDRmOWJlNzJkOQ==\" alt=\"\" height=\"1\" width=\"1\" class=\"nc_pixel\"/>",
"created_at": "2025-07-24T11:59:10Z",
"modified_at": "2025-07-24T12:01:43Z",
"published_at": "2025-07-24T12:01:43Z",
"link": null,
"pixel_key": "YXJ0aWNsZThg0xNTFhM2YzY2NkYTUYZxMWVhYjZkYjBhZDRmOWJlNzJkOQ==",
"customer_canonical_link": null,
"source": {
"guid": "5bc5e258e9cb54e3f865b6g2fa98dc4324",
"name": "Instance"
},
"lang_code": "en",
"custom_fields": [
{
"label": "Ad Date",
"values": [
"2025-07-24T11:00:00.000Z"
]
},
"content_pillar": [
{
"label": "BLOG:Social Impact"
}
],
"content_format": [],
"custom_label_set": [
{
"label": "Short",
"type": "Article Length"
}
],
"target_audience": [
{
"label": "Parents"
}
],
"journey_stage": [
{
"label": "Top of the Funnel"
}
]
}
}
]
}

Sample API Response (JSON) with Sort Parameter 

cURL: https://api.newscred.com/v2/feed/f29434f4ad757c32b966019d956c0e4c?format=json&sort\_by=modified\_at

Sample Output(JSON) - Top 3 results, all other fields stripped (sort by = modified_at)

{
 "title": "Analytics Related Picks",
 "modified_at": "2025-11-06T09:48:36Z",
 "entries": [
{
 "content": {
    "created_at": "2025-01-24T18:56:05Z",
    "modified_at": "2025-11-06T09:48:36Z"
 },
   "created_at": "2013-12-09T15:47:29Z",
   "modified_at": "2025-11-06T09:12:57Z"
 },
   "created_at": "2025-02-10T14:00:17Z",
   "modified_at": "2025-11-06T08:37:55Z"
 }
}

cURL: https://api.newscred.com/v2/feed/f29434f4ad757c32b966019d956c0e4c?format=json&sort\_by=position

Sample output(JSON) - Top 3 results, all other fields stripped (sort by = position)

{
 "title": "Analytics Related Picks",
 "modified_at": "2025-11-06T09:48:36Z",
 "entries": [
{
 "content": {
   "created_at": "2025-08-21T15:44:22Z",
   "modified_at": "2025-08-21T15:56:03Z"
 },
   "created_at": "2025-04-17T19:56:41Z",
   "modified_at": "2025-11-05T09:00:28Z"
 },
   "created_at": "2025-02-10T14:00:17Z",
  "modified_at": "2025-11-06T08:37:55Z"
 }
}

Invalid Feed GUID

With a feed GUID that does not exist the server will respond with HTTPS status code.404

cURL: https://api.newscred.com/v2/feed/
HTTPS/1.1 404 NOT FOUND

Content-Length: 121

X-Request-ID:c384254ec33011e58a070242ac110002

{
  "error": {
    "code": "404",
    "message": "Collection with guid 0569f69ed223720c699936eddbc5b123 not found"
  }
}

How to set-up an integration with a third-party CMS

By attaching custom fields or labels to your CMP workflow, you can easily send additional structured data to your CMS. In the CMP these can be populated with a dropdown, radio button, checkbox, free text or date interface and retrieved from the “custom_fields” node in the feed. A best practice is to always create custom fields for meta tags such as 'Meta Title' and 'Meta Descriptions' to enhance on-page SEO. Ensure that the custom fields are then mapped onto the CMS during ingestion accurately.

Ensuring that the content delivered from the Content Marketing Platform is consistent with the website’s style

All licensed content and by default, all custom content is delivered in purely semantic HTML. This means that while you will still be able to take advantage of h tags etc, they will be interpreted by your website’s global style. The text editor does allow the use of inline styles through raw HTML editing in cases where that is needed, but the standard interface is designed to prioritize the use of semantic HTML only.

Updating and Deletion of content

  • Using the fields parameter, you can retrieve only the GUID and modified_at elements of the feed. By calling the feeds with pagesize=999 and these fields only to minimize response size, you can determine if an article has been deleted (GUID of an existing article is no longer present) or updated (GUID matches and modified_at has been updated since last poll time)
  • We recommend setting this as a batch task, paginating through full feeds, that can be instigated by an editorial user.
  • We recommend utilizing a Deleted Feed. The user can move an article to the Deleted Feed in the NewsCred Platform. Your integration can then be set-up to recognize when an article has been moved and trigger the 'delete' action when the feed is called from your CMS.
  • Of course, you can also delete the content in the CMS, but we recommend against allowing inconsistencies to develop between the feed and the CMS to avoid unexpected behavior. 

Feed and Social Publishing

In order to post article content to a social channel, the canonical link of that article needs to be available in the content body. Clients who rely on feed publishing, need to be able to publish to a feed and any social channel from the CMP within a single task. In order for the social post to be sent without error, the published url needs to be sent back to the platform once published.

This API that receives the tracking pixel and the canonical link of the article, finds out which article it points to and accordingly updates the article with the canonical link in order to allow a social post to be sent.

Once the article is updated, the CMP is made aware of this change, and if there are pending social publishes dependent on the article post, it proceeds with the publishing at that point or by the user-determined schedule.

A CMS specific plugin will call our API service with the required data whenever an article is published in the hub. Feed clients will need to handle this in their integration app, as below

Update Canonical Link Endpoint

The following api endpoint is used to register the article url to newscred assets

GET https://js-snippets.newscred.com/customer\_canonical\_link

Property

Format

Description

Example

canonical_link

String

The url encoded link to the article page

https://cmc-wp-test.newscred.com/index.php/2017/11/22/puretech-health-to-present-at-piper-jaffray-2017-healthcare-conference/ 

tracking_pixel_key

String

This is the newscred unique id for the article. Usually found in the feed through the pixel_key property.

YXJ0aWNsZT0xNjcxOGNiNmZlZWEyNTM2OWZmMzZlZDBmZmJiZTJkOA==

Dynamically Resizing Images from the NewsCred API

The NewsCred API passes raw images that can be rendered onto your site, iOS app, newsletter, or wherever you're displaying the content. 

The images can also be sized by our server so that they fit your design specs. You won't worry about having to resize images client-side if you include the fitting height and width parameters. If you need to change both the height and the width, we've got you covered. The image won't get skewed or lose the integrity of its aspect ratio. Instead, the server will either crop the image or letterbox it to make sure it always looks like the original. 

The following parameters can be attached to the end of the URL:

  • height - Change the height of the image
  • width - Change the width of the image
  • center_height - Define center height position for cropping
  • center_width - Define center width position for cropping

When your system parses the feed, you can programmatically add the URLs: 

large: "https://images-cdn.newscred.com/Zz01ZTIzZmM5OGNkYzg4OTdkMjRiZDc1ZGIwODQ3MDFhMw=="

You can take that image URL and append it with this: ?width=600&height=600

For example, the following image is set to a width and height of 500:

https://images-cdn.newscred.com/Zz01ZTIzZmM5OGNkYzg4OTdkMjRiZDc1ZGIwODQ3MDFhMw==?width=500&height=500


Did this page help you?