SearchNews

Updated at:

Searches for news based on your input. This feature is currently limited to web search.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.
    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.
  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

aimiaobi:SearchNews

list

*All Resource

*

NoneNone

Request parameters

Parameter

Type

Required

Description

Example

AgentKey

string

Yes

The unique ID of the workspace. For more information, see AgentKey.

xxxxx_p_efm

SearchSources

array

No

A list of search sources.

string

No

The code of the search source. This parameter is optional. Currently, only `QuarkCommonNews` is supported.

QuarkCommonNews

Query

string

No

The search query.

Search query

PageSize

integer

No

The number of records to return on each page. The default value is 10.

10

Page

integer

No

The page number. The default value is 1.

1

IncludeContent

boolean

No

Specifies whether to include the full text of the article.

false

FilterNotNull

boolean

No

Specifies whether to filter out results with empty content.

false

Response elements

Element

Type

Description

Example

object

PageResult

Code

string

The status code.

successful

Current

integer

The current page number.

1

Data

array<object>

The data returned.

object

The result returned.

Author

string

The author of the article. This parameter may not be returned for some articles.

Author

Content

string

The content of the article. This parameter is always returned.

Article content

DocUuid

string

The unique ID of the internal document. This parameter is always returned.

9a598b44c6444da5907b8ea68a5f82c4

ImageUrls

array

The URLs of the images. This parameter is deprecated and is no longer returned. Do not use it.

string

The URL of a news image.

https://www.example.com/aaaa.jpg

PubTime

string

The time when the article was published. This parameter is always returned.

2024-01-18 06:46:22

SearchSource

string

The ID of the internal search source. This parameter is always returned.

QuarkCommonNews

SearchSourceName

string

The name of the internal search source. This parameter is always returned.

Quark search

Source

string

The source of the article. This parameter may not be returned for some articles.

CCTV.com

Summary

string

The summary of the article. This parameter may not be returned for some articles.

Article summary

Tag

string

The tag of the article. This parameter may not be returned for some articles.

Article tag

Title

string

The title of the article. This parameter is always returned.

Article title

UpdateTime

string

The time when the system was updated. This parameter is deprecated and is no longer returned. Do not use it.

2024-01-18 06:46:22

Url

string

The URL of the article. This parameter is always returned.

Article URL

HttpStatusCode

integer

The HTTP status code.

200

Message

string

The error message.

successful

RequestId

string

The unique ID of the request.

1813ceee-7fe5-41b4-87e5-982a4d18cca5

Size

integer

The number of records on each page.

10

Success

boolean

Indicates whether the request was successful. A value of `true` indicates success and a value of `false` indicates failure.

true

Total

integer

The total number of records.

100

Examples

Success response

JSON format

{
  "Code": "successful",
  "Current": 1,
  "Data": [
    {
      "Author": "作者",
      "Content": "文章内容",
      "DocUuid": "9a598b44c6444da5907b8ea68a5f82c4",
      "ImageUrls": [
        "https://www.example.com/aaaa.jpg"
      ],
      "PubTime": "2024-01-18 06:46:22",
      "SearchSource": "QuarkCommonNews",
      "SearchSourceName": "夸克检索",
      "Source": "央视网",
      "Summary": "文章摘要",
      "Tag": "文章标签",
      "Title": "文章标题",
      "UpdateTime": "2024-01-18 06:46:22",
      "Url": "文章URL"
    }
  ],
  "HttpStatusCode": 200,
  "Message": "successful",
  "RequestId": "1813ceee-7fe5-41b4-87e5-982a4d18cca5",
  "Size": 10,
  "Success": true,
  "Total": 100
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.