# Internet News

### Endpoint

```
POST /v1/news/google_news
```

[**Try it out in API Playground →**](https://api.orbitfin.ai/docs#/default/query_google_news_v1_news_google_news_post)

### Request

#### Headers

| Name           | Type   | Required | Description        |
| -------------- | ------ | -------- | ------------------ |
| `Content-Type` | string | Yes      | `application/json` |
| `X-API-KEY`    | string | Yes      | your-api-key       |

#### Request Body Parameters

| Parameter    | Type   | Required | Description                                                                              |
| ------------ | ------ | -------- | ---------------------------------------------------------------------------------------- |
| `keywords`   | string | Yes      | Comma-separated keywords to filter news articles (e.g., "revenue,growth,latest quarter") |
| `start_date` | string | Yes      | Start date for news search in `YYYY-MM-DD` format (e.g., "2024-12-01")                   |
| `end_date`   | string | Yes      | End date for news search in `YYYY-MM-DD` format (e.g., "2024-12-08")                     |
| `language`   | string | Yes      | ISO 639-1 language code for news content (default: "en")                                 |

#### Example Request

```bash
curl -X 'POST' \
  'https://api.orbitfin.ai/v1/news/google_news' \
  -H 'accept: application/json' \
  -H 'X-API-KEY: orbitfin_xxx' \
  -H 'Content-Type: application/json' \
  -d '{
  "start_date": "2025-05-13",
  "end_date": "2025-05-20",
  "keywords": "revenue,growth,latest quarter",
  "language": "en"
}'
```

### Response

#### Response Fields

**Top-Level Fields**

| Field         | Type        | Description                                |
| ------------- | ----------- | ------------------------------------------ |
| `status_code` | integer     | HTTP status code (200 for success)         |
| `data`        | array       | Array of news article objects              |
| `detail`      | string/null | Additional error details (null on success) |
| `message`     | string      | Response status message                    |

**News Article Object (`data[]`)**

| Field       | Type        | Description                                                     |
| ----------- | ----------- | --------------------------------------------------------------- |
| `date`      | string      | Publication date of the news article (format: "Month DD, YYYY") |
| `link`      | string      | Direct URL to the original news article                         |
| `title`     | string      | Headline or title of the news article                           |
| `source`    | string/null | News source or publisher name (null if unavailable)             |
| `snippet`   | string      | Brief excerpt or summary of the article content                 |
| `position`  | integer     | Ranking position in search results (1-based index)              |
| `thumbnail` | string      | URL to the article's thumbnail image                            |

#### Example Response

```json
{
  "status_code": 200,
  "data": [
    {
      "date": "May 20, 2025",
      "link": "https://ir.homedepot.com/news-releases/2025/05-20-2025-110127912",
      "title": "The Home Depot Announces First Quarter Fiscal 2025 Results; Reaffirms Fiscal 2025 Guidance",
      "source": "Home Depot Investor Relations",
      "snippet": "The Home Depot, the world's largest home improvement retailer, today reported sales of $39.9 billion for the first quarter of fiscal 2025, an increase of 9.4%...",
      "position": 1,
      "thumbnail": "https://ot-cdn.s3.us-west-2.amazonaws.com/google_news_history_chat/20250513_None_tnHZflkS.png"
    },
    {
      "date": "May 19, 2025",
      "link": "https://example.com/tech-earnings-report",
      "title": "Tech Sector Shows Strong Revenue Growth in Q1",
      "source": "Financial Times",
      "snippet": "Major technology companies reported robust revenue growth in the latest quarter, exceeding analyst expectations...",
      "position": 2,
      "thumbnail": "https://ot-cdn.s3.us-west-2.amazonaws.com/google_news_history_chat/20250513_None_xyz123.png"
    }
  ],
  "detail": null,
  "message": "success"
}
```

### Error Handling

All endpoints in this section follow the standard error response format. When an error occurs, the API returns an appropriate HTTP status code along with a structured error response.

For detailed information about error codes, response formats, and troubleshooting guidelines, please refer to **Appendix A: Error Codes and Messages**.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.orbitfin.ai/orbit-api-reference/api/internet-news.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
