Skip to main content
Familiar with v1 or v2? The date-based versions map to: v1 = 2022-01-01, v2 = 2024-01-01, v3 = 2026-05-25. This guide uses both naming schemes.

Version comparison

Migrating from v1 to v2

What changed

  • Response envelope: { success, total, data } → { success, totalHits, articles }
  • Pagination: total → totalHits, pageSize, totalPages
  • Article fields: Added thumbnail, description, keywords

Before (v1)

After (v2)

Code changes

Before (v1):
After (v2):

Migrating from v2 to v3

What changed

  • Response envelope: { success, totalHits, articles } → { metadata, parameters, news_articles }
  • Article type discriminator: Added type field to distinguish articles, stories, storylines, social posts
  • Error format: { success: false, code } → { metadata, errors }
  • Pagination: totalHits → total_hits, pageSize → hits_per_page

Before (v2)

After (v3)

Code changes

Before (v2):
After (v3):

Migrating from v1 to v3 (skip v2)

If you’re on v1 and want to go directly to v3, combine both migrations:
  1. Update response parsing: { success, total, data } → { metadata, parameters, news_articles }
  2. Handle new type discriminator on news_articles items
  3. Update error handling: { success: false, code } → { metadata, errors }
  4. Update pagination: total → total_hits

Testing checklist

After migrating, verify:
  • Requests include the api-version header with the target version
  • Response parsing uses the new envelope structure
  • Article field names match the new schema
  • Error handling uses the new error format
  • Pagination uses the new field names
  • New type discriminator on news_articles is handled correctly

Need help?

If you run into issues during migration, check the API versions page for more details or reach out to support.