NOTE: The You.com news API is currently available to exclusive early access partners.To express interest in early access, please reach out via email to api@you.com.
ATTENTION: The correct cURL code to use in your API call is in the playground. Click on Try it in the bar above to open the playground.
Description
This endpoint retrieves responses from news media websites that are relevant to the user’s query.Errors
The endpoint returns as a structured JSON object withstatus
, code
, title
, and detail
fields:
HTTP | Code | When it happens |
---|---|---|
401 | bad_request | This can happen for a missing API key: {"detail": "API key is required"} , an invalid/expired API key: {"detail": "Invalid or expired API key"} or for other auth parsing errors: {"detail": "<error message>"} |
403 | forbidden | API key lacks scope for the path (e.g., /livenews ): {"detail": "Missing required scopes"} |
500 | Internal Server Error (auth/authorization middleware) | This can happen in the case of authentication failure: {"detail": "Internal authentication error"} or authorization failure: {"detail": "Internal authorization error"} |
Authorizations
The unique API Key required to authorize API access. Learn how to get yours in the “Get your API key” section of the documentation.
Query Parameters
Search query used to retrieve relevant news from the web.
Example:
"Your query about news"
Specifies the maximum number of news results to return.
Required range:
1 <= x <= 40
Response
A JSON object containing news results.