NewsAPI is a news aggregation service that indexes articles from 150,000 plus global publishers. It allows developers to search and retrieve headlines, full articles, and sources by keyword, category, country, and language in real time.
MoEngage <> NewsAPI
The MoEngage <> NewsAPI integration allows you to dynamically pull live headlines and articles into your campaigns at send time via Content APIs. MoEngage calls the NewsAPI endpoint with a keyword or category relevant to the user or campaign, retrieves current articles, and inserts the data directly into your message across email, push, SMS, in-app, and WhatsApp.
Common use cases include surfacing breaking industry news in B2B email campaigns, personalising newsletters with headlines matching a user's stated interests, or triggering push notifications when news matching a topic appears.
Integration
| library_add_check |
Prerequisites Ensure you have a NewsAPI account with an active API key. Keys are free for development use and available at newsapi.org/register. Production use requires a paid plan. |
Step 1: Get your NewsAPI key
- Navigate to newsapi.org/register and create an account.
- Once registered, your API key is displayed immediately on your account dashboard. Copy it.
- Review the NewsAPI pricing page to confirm your plan supports the call volume your campaign sends will require. The free Developer plan allows 100 requests per day and restricts responses to articles published within the last month.
Step 2: Set up the Content API on MoEngage
- Navigate to Dashboard > Settings > APIs and open the Content API tab.
- Click Add Content API.
- Fill in the details using the table below as a reference.
| Key | Value | ||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Name | Choose a descriptive name, for example NewsAPI Top Headlines. |
||||||||||||||||||
| Method | GET | ||||||||||||||||||
| API URL |
Use |
||||||||||||||||||
| Key Value Parameters |
|
- Click Validate to confirm the platform returns a response, then click Save.
Once saved, refer to the MoEngage documentation on using Content APIs in campaigns to learn how to reference response fields inside your campaign templates.
Understanding the API response
The NewsAPI response contains an articles array. Each object in that array represents one article. The fields most commonly referenced in campaign templates are shown below.
| Response field | Template variable example | Description |
|---|---|---|
articles[0].title |
{{ContentApi.articles[0].title}} |
The article headline. |
articles[0].description |
{{ContentApi.articles[0].description}} |
A short summary of the article. |
articles[0].url |
{{ContentApi.articles[0].url}} |
The full URL to the article, use as a CTA link. |
articles[0].urlToImage |
{{ContentApi.articles[0].urlToImage}} |
A thumbnail image URL for the article, usable in email or in-app campaigns. |
articles[0].source.name |
{{ContentApi.articles[0].source.name}} |
The name of the publication, for example "BBC News". |
articles[0].publishedAt |
{{ContentApi.articles[0].publishedAt}} |
The publication timestamp in ISO 8601 format. |