AskNews Logo Dark

🔍 Web Search

The AskNews Web Search endpoint lets you reach out beyond news to find relevant information across the web. Not only will you get your search results back, you also get a fully structured LLM distillation of the content, as well as a prompt-optimized string, ready to inject into any LLM prompt.

You can even batch your queries, getting back hundreds of distilled web search results in seconds.

The API reference provides the most detailed information

Searching the web

The web search endpoint takes your query, which would be similar to any typical Google search:

1from asknews_sdk import AskNewsSDK 2ask = AskNewsSDK() 3graph = ask.chat.live_web_search( 4 queries=["Eagles vs Falcons"] 5)

Your response object includes the LLM distillation for each of your queries, as well as the

{
    "as_string": "<web_doc>\nTitle: Falcons vs. Eagles (Sep 16, 2024) Live Score - ESPN\nSource: ESPN\nPublished: Unknown\n['The NFL game between the Atlanta Falcons and Philadelphia Eagles is scheduled for September 16, 2024, at 8:15 PM.', 'The Eagles currently have a record of 1-0, while the Falcons are 0-1.', 'The game will take place at Lincoln Financial Field.', 'The Eagles are favored to win with a spread of -5.5.', 'The over/under for the game is set at 45.5 points.', 'Injury reports indicate key players for both teams are out or questionable for the game.']\n<web_doc>\n\n<web_doc>\nTitle: Falcons Vs Eagles Odds and Betting Tips - September 16, 2024 | Lines\nSource: Lines.com\nPublished: Unknown\n['The Atlanta Falcons will play against the Philadelphia Eagles on September 16, 2024, at 7:15 PM at Lincoln Financial Field.', 'The Falcons have a record of 0-1 while the Eagles are 1-0 going into this matchup.', 'Current betting odds show the Eagles favored by 5.5 points over the Falcons.', 'The over/under for total points scored in the game is set at 46.0.', \"Injury reports indicate that key players from both teams may impact the game's outcome.\"]\n<web_doc>\n\n<web_doc>\nTitle: Falcons vs. Eagles (Sep 16, 2024) Pregame - ESPN\nSource: ESPN\nPublished: Unknown\n[\"Eagles coach Nick Sirianni plans to manage Saquon Barkley's touches to keep him fresh for the season.\", 'Barkley had a strong opener with 109 rushing yards and three touchdowns, but may see fewer than 26 total touches against Atlanta.', \"Falcons' quarterback Kirk Cousins struggled in his debut, throwing two interceptions and only completing 16 of 26 passes for 155 yards.\", \"The Falcons' defense performed well against the Steelers, but will face a tougher challenge against the Eagles' offense led by Jalen Hurts and Barkley.\", \"Eagles' defensive end Brandon Graham continues to play effectively in his 15th season, contributing to the team's defense.\", \"Atlanta's Grady Jarrett returned strong from injury, recording 1.5 sacks in his first game back.\"]\n<web_doc>\n\n",
    "as_dicts": [
        {
            "title": "Falcons vs. Eagles (Sep 16, 2024) Live Score - ESPN",
            "url": "https://www.espn.com/nfl/game/_/gameId/401671691/falcons-eagles",
            "source": "ESPN",
            "published": "Unknown",
            "key_points": [
                "The NFL game between the Atlanta Falcons and Philadelphia Eagles is scheduled for September 16, 2024, at 8:15 PM.",
                "The Eagles currently have a record of 1-0, while the Falcons are 0-1.",
                "The game will take place at Lincoln Financial Field.",
                "The Eagles are favored to win with a spread of -5.5.",
                "The over/under for the game is set at 45.5 points.",
                "Injury reports indicate key players for both teams are out or questionable for the game."
            ],
            "raw_text": "<web doc>\n[2]\nPublished: Unknown\nTitle: Falcons vs. Eagles (Sep 16, 2024) Live Score - ESPN\nContent: Falcons vs. Eagles (Sep 16, 2024) Live Score - ESPN\n===============\n\n!\n\nSkip to main contentSkip to navigation\n\n\n\n*   \n\n*   \n\n*   \n\n*   \n\n*   \n\n*   \n\n*   \n\n*   ](https://www.espn.com/espnplus/?om-navmethod=topnav)\n\n*   ](https://espnbet.app.link/V424mquT4Eb?$3p=a_espn)\n\n*   \n\n*   \n\n*   \n\n*   \n\n!\n\n](https://www.espn.com/nfl/team/_/name/atl/atlanta-falcons)\n\n\n\n0-1, 0-0 away\n\nESPN\n\n9/16\n\n!\n\n](https://www.espn.com/nfl/team/_/name/phi/philadelphia-eagles)\n\n\n\n1-0, 1-0 home\n\n*   \n\n*   \n\n*   \n\n*   \n\nGame Odds\n\nOdds by\n\n!\n\n8:15 PMOpenSpreadTotalML\n\n\n\n(0-1)\n\n(0-1, 0-0 Away)\n\no48.5\n\n\\-105\n\n\n\n\n\n(1-0)\n\n(1-0, 1-0 Home)\n\n\\-4\n\n\\-110\n\n\n\n\n\n### Matchup Predictor\n\n!\n\n!\n\n35.7\n\n%\n\n64.0\n\n%\n\n\n\nFacebookTwitter\n\n### Game Information\n\nLincoln Financial Field\n\n!\n\n8:15 PM, September 16, 2024Coverage: ESPN\n\n\n\nLine: PHI -5.5\n\nOver/Under:
            ...
            <truncated for brevity>"
        },
    ]
}

Batching your queries

1from asknews_sdk import AskNewsSDK 2ask = AskNewsSDK() 3graph = ask.chat.live_web_search( 4 queries=["Eagles vs Falcons", "weather in philadelphia"] 5)

Parameters may evolve, the most updated reference is always the API reference.

Availability

The websearch endpoint costs 5 Fast API calls, for details on how many calls are included in your plan, please head to the pricing page.

    We use cookies

    We use cookies to ensure you get the best experience on our website. Some of these cookies are provided by third parties. You are free to decide which categories you would like to permit and can withdraw this consent at any time (via cookie preferences link on the footer).

    By accepting the necessary cookies, you agree to our privacy policy and terms of service, both located in the footer of the website.
    Learn more on our terms of service and privacy policy.