# Google News Search

## Try it in the Widget Center

Click this [url](https://app.myshell.ai/robot-workshop/widget/1781994285478154240) to try this widget and copy the Pro Config template.

## Usage

By default, this widget will use a crawler to get the content inside each searched link. However, if the `follow_links` is unset, it will return the links of the news only.

**Input Parameters**

<table><thead><tr><th>Name</th><th>Type</th><th>Description</th><th>Default</th><th data-type="checkbox">Required</th></tr></thead><tbody><tr><td>query</td><td><code>string</code></td><td>The search query string that specifies what the search should be about.</td><td></td><td>true</td></tr><tr><td>num_results</td><td><code>integer</code></td><td>The number of search results to return.</td><td>10</td><td>false</td></tr><tr><td>length_per_result</td><td><code>integer</code></td><td>the maximum token of each search result text.</td><td>300</td><td>false</td></tr><tr><td>follow_links</td><td><code>boolean</code></td><td>A flag indicating whether to follow links within the search results for more detailed information.</td><td>True</td><td>false</td></tr></tbody></table>

**Output Parameters**

| Name            | Type    | Description                                                                                  | File Type |
| --------------- | ------- | -------------------------------------------------------------------------------------------- | --------- |
| search\_results | `array` | The result of google news search, containing the links, titles, and other useful information |           |

**Output Example**

{% tabs %}
{% tab title="success" %}
{% code fullWidth="false" %}

```json
{
  "search_results": [
    {
      "content": "# Warner Bros. Reveals $115 Million Investment In Harry Potter Attraction\n## Link\nhttps://www.forbes.com/sites/carolinereid/2024/04/20/warner-bros-reveals-115-million-investment-in-harry-potter-attraction/\n## Content\nWarner Bros. Reveals $115 Million Investment In Harry Potter AttractionBETAThis is a BETA experience. You may opt-out by clicking hereMore From ForbesApr 22, 2024,06:20pm EDTNetflix’s ‘Beef’ And ‘Baby Reindeer’ Both Tackle Life-Changing Soul TiesApr 22, 2024,06:12pm EDTHow ‘Deadpool \u0026 Wolverine’s’ R-Rated Trailer Leaves PG-13 MCU In The DustApr 22, 2024,04:54pm EDTWill There Be A ‘Shogun’ Season 2? Here’s The Disappointing NewsApr 22, 2024,04:00pm EDTTomorrow X Together Blows Past Seventeen On A Billboard RankingApr 22, 2024,03:17pm EDTTaylor Swift’s ‘Tortured Poets Department’ Has Blood On The TracksApr 22, 2024,03:00pm EDTBlackpink Singer Jennie Passes BTS’ Jung Kook With Her Radio SmashApr 22, 2024,01:58pm EDTMediaCo Buys Estrella Media Content Operations, Hernández Named Interim CEOApr 22, 2024,01:45pm EDT‘Dune: Part 2’ On Course For $700 Million Worldwide Box Office FinishEdit StoryForbesBusinessHollywood \u0026 EntertainmentWarner Bros. Reveals $115 Million Investment In...",
      "date": "04/21/2024, 12:00 AM, +0000 UTC",
      "link": "https://www.forbes.com/sites/carolinereid/2024/04/20/warner-bros-reveals-115-million-investment-in-harry-potter-attraction/",
      "title": "Warner Bros. Reveals $115 Million Investment In Harry Potter Attraction"
    },
    {
      "content": "# 'Harry Potter Film Concert Series' to open 'Chamber of Secrets' in OKC: What to know\n## Link\nhttps://www.oklahoman.com/story/entertainment/2024/04/21/harry-potter-chamber-of-secrets-concert-civic-center-music-hall-okc/73342973007/\n## Content\nThe Oklahoman Subscription Offers, Specials, and DiscountsGet unlimited access with a subscriptionEssential Digital$1 for 6 monthsSubscribe NowWhat's includedUnlimited access to and our apps.The eNewspaper: a digital replica of the newspaper.Share your subscription.Essential Digital$65 for 1 yearSubscribe NowWhat's includedUnlimited access to and our apps.The eNewspaper: a digital replica of the newspaper.Share your subscription.Print DeliveryAs low as 92¢Subscribe NowWhat's includedAll the features of Essential DigitalPrint delivery of USA TODAY CrosswordNo commitment required. Cancel anytime.*Offer available to new customers only. All savings based off the regular rate. Read the full Subscription Terms and Conditions.© 2024 www.oklahoman.com...",
      "date": "04/21/2024, 11:04 AM, +0000 UTC",
      "link": "https://www.oklahoman.com/story/entertainment/2024/04/21/harry-potter-chamber-of-secrets-concert-civic-center-music-hall-okc/73342973007/",
      "title": "'Harry Potter Film Concert Series' to open 'Chamber of Secrets' in OKC: What to know"
    },
    {
      "content": null,
      "date": "04/20/2024, 11:35 PM, +0000 UTC",
      "link": "https://screenrant.com/harry-potter-movies-deleted-scene-sassy-hbo-remake-struggle/",
      "title": "A Deleted Harry Potter Movie Scene Proves Another Way HBO's TV Remake Will Struggle To Match The Books"
    },
    {
      "content": null,
      "date": "04/19/2024, 11:13 PM, +0000 UTC",
      "link": "https://www.courttv.com/title/chad-daybell-texts-compares-his-life-to-harry-potter-under-the-stairs/",
      "title": "Chad Daybell Texts: Compares His Life to Harry Potter Under the Stairs"
    }
  ]
}
```

{% endcode %}
{% endtab %}
{% endtabs %}


---

# 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.myshell.ai/ko/create/pro-config-mode/api-reference/widgets/18-google-news-search.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.
