BBC News API Documentation

Welcome to the BBC News API documentation. This API provides access to news content from various BBC language services, allowing developers to integrate BBC's trusted news content into their applications.

Key Features

Multi-language Support

Access news content from multiple BBC language services including English, Bengali, Hindi, and more.

Real-time Updates

Get the latest news articles as soon as they are published.

Easy Integration

Simple REST API with clear documentation and code examples in multiple languages.

Getting Started

To start using the API, you'll need to make HTTP requests to our endpoints. The API supports both news and latest content retrieval.

Base URL: https://bbc-news-api.vercel.app

Authentication

Currently, the API is open and doesn't require authentication for most endpoints. However, some endpoints may require specific parameters for access control.

Best Practices

  • Always handle API errors gracefully in your application
  • Cache responses when appropriate to reduce API calls
  • Use appropriate language codes for your target audience

Support

For support, please visit our GitHub repository or join our community discussions. We're here to help you integrate and use the API effectively.

How to use?

The BBC News API can be used with any programming language that supports HTTP requests. Here are some quick examples in the most popular languages:

Supported Languages

The BBC News API supports multiple languages, allowing you to access news content from various BBC language services. Below is a list of all supported languages:

Available Languages

News Endpoint

Retrieve news content from BBC's various language services. This endpoint provides access to the latest news articles with their titles, summaries, and links.

Endpoint Details

URL: /news

Method: GET

Parameters

  • lang Required

    String

    The language code for the news content you want to retrieve. This parameter determines which BBC language service to fetch news from.

    Example: english, bengali, hindi

Response Format

{
    "status": 200,
    "latest": [
        {
            "title": "News Title",
            "summary": "News Summary",
            "image_link": "https://...",
            "news_link": "https://..."
        }
    ],
    "elapsed time": "0.123s",
    "timestamp": 1234567890
}

Error Codes

400

Bad Request - Language parameter is missing or invalid

503

Service Unavailable - Failed to retrieve content from BBC website

500

Internal Server Error - An unexpected error occurred

GET /news?lang=

Latest Endpoint

Get the most recent news updates from BBC's various language services.

Endpoint Details

URL: /latest

Method: GET

Parameters

  • lang Required

    String

    The language code for the latest news content. This parameter determines which BBC language service to fetch the most recent news from.

    Example: english, bengali, hindi

Response Format

{
    "status": 200,
    "Section Title": [
        {
            "title": "News Title",
            "summary": "News Summary",
            "image_link": "https://...",
            "news_link": "https://..."
        }
    ],
    "elapsed time": "0.123s",
    "timestamp": 1234567890
}

Error Codes

400

Bad Request - Language parameter is missing or invalid

503

Service Unavailable - Failed to retrieve content from BBC website

500

Internal Server Error - An unexpected error occurred

GET /latest?lang=

Languages Endpoint

Get a list of all supported languages and their corresponding BBC News URLs.

Endpoint Details

URL: /languages

Method: GET

Parameters

This endpoint does not require any parameters.

Response Format

{
    "status": 200,
    "languages": [
        {
            "code": "english",
            "name": "English",
            "url": "https://bbc.com",
            "description": "BBC News in English"
        },
        {
            "code": "bengali",
            "name": "Bengali",
            "url": "https://bbc.com/bengali",
            "description": "BBC News in Bengali"
        }
    ]
}

Error Codes

500

Internal Server Error - An unexpected error occurred

GET /languages