This topic describes how to call the enhanced generic search API (GenericAdvancedSearch) using the Alibaba Cloud OpenAPI software development kit (SDK) and explains its parameters. Compared with GenericSearch, GenericAdvancedSearch provides better retrieval of authoritative and diverse web pages and returns a larger number of pages. The number of web pages returned for each query ranges from 20 to 80, with an average of 50 pages.
GenericAdvancedSearch is coming soon.
API calls
Request parameters
Parameter | Type | Nullable | Description | Constraints |
| String | This field is required. | The search query. | Length: >=1 and <=100 |
| String | This can be left empty. | The time range for the query. | Optional values:
|
| String | Nullable | Specifies an industry for the search. If you specify this parameter, only search results from sites within that industry are returned. To specify multiple industries, separate them with commas. | Supported values:
|
Install the SDK
Java SDK
Prerequisites
Make sure that Java 8 or later is installed.
Maven dependency
<dependency>
<groupId>com.aliyun</groupId>
<artifactId>iqs20241111</artifactId>
<version>1.1.6</version>
</dependency>Sample code
package com.aliyun.iqs.example;
import com.alibaba.fastjson.JSON;
import com.aliyun.iqs20241111.Client;
import com.aliyun.iqs20241111.models.GenericAdvancedSearchRequest;
import com.aliyun.iqs20241111.models.GenericAdvancedSearchResponse;
import com.aliyun.iqs20241111.models.GenericSearchResult;
import com.aliyun.teaopenapi.models.Config;
import darabonba.core.exception.TeaException;
public class GenericAdvancedSearchMain {
public static void main(String[] args) throws Exception {
Client client = initClient();
invoke(client,"Wittgenstein", "NoLimit");
}
private static Client initClient() throws Exception {
// TODO: Replace with your AccessKey ID and AccessKey secret.
String accessKeyId = "YOUR_ACCESS_KEY";
String accessKeySecret = "YOUR_ACCESS_SECRET";
// TODO: Or, load from environment variables (recommended).
// String accessKeyId = System.getenv("ACCESS_KEY");
// String accessKeySecret = System.getenv("ACCESS_SECRET");
Config config = new Config()
.setAccessKeyId(accessKeyId)
.setAccessKeySecret(accessKeySecret);
config.setEndpoint("iqs.cn-zhangjiakou.aliyuncs.com");
return new Client(config);
}
private static void invoke(Client client, String query, String timeRange) {
GenericAdvancedSearchRequest request = new GenericAdvancedSearchRequest();
request.setQuery(query);
request.setTimeRange(timeRange);
try {
GenericAdvancedSearchResponse response = client.genericAdvancedSearch(request);
GenericSearchResult result = response.getBody();
System.out.println(JSON.toJSONString(result));
} catch (TeaException e) {
e.printStackTrace();
System.out.println(e.getMessage());
}catch (Exception e) {
e.printStackTrace();
System.out.println(e.getMessage());
}
}
}
Python SDK
Prerequisites
Make sure that Python 3.8 or later is installed.
Install the SDK
pip3 install alibabacloud_iqs20241111==1.1.6Sample code
import os
import uuid
from Tea.exceptions import TeaException
from alibabacloud_iqs20241111 import models
from alibabacloud_iqs20241111.client import Client
from alibabacloud_tea_openapi import models as open_api_models
class Sample:
def __init__(self):
pass
@staticmethod
def create_client() -> Client:
config = open_api_models.Config(
# TODO: Replace with your AccessKey ID and AccessKey secret.
access_key_id='YOUR_ACCESS_KEY',
access_key_secret='YOUR_ACCESS_SECRET'
# TODO: Or, load from environment variables (recommended).
# access_key_id=os.environ.get('ACCESS_KEY'),
# access_key_secret=os.environ.get('ACCESS_SECRET')
)
config.endpoint = f'iqs.cn-zhangjiakou.aliyuncs.com'
return Client(config)
@staticmethod
def main() -> None:
client = Sample.create_client()
run_instances_request = models.GenericAdvancedSearchRequest(
query='Hangzhou food',
time_range="NoLimit",
session_id=str(uuid.uuid4())
)
try:
response = client.generic_advanced_search(run_instances_request)
print(f"api success, requestId:{response.body.request_id}, size :{len(response.body.page_items)}")
except TeaException as e:
code = e.code
request_id = e.data.get("requestId")
message = e.data.get("message")
print(f"api exception, requestId:{request_id}, code:{code}, message:{message}")
if __name__ == '__main__':
Sample.main()
Go SDK
Prerequisites
Make sure that Go 1.10.x or later is installed.
Install the SDK
require (
github.com/alibabacloud-go/iqs-20241111 v1.1.6
github.com/alibabacloud-go/darabonba-openapi/v2 v2.0.10
)
Sample code
package main
import (
"fmt"
"log"
"os"
openapi "github.com/alibabacloud-go/darabonba-openapi/v2/client"
iqs20241111 "github.com/alibabacloud-go/iqs-20241111/client"
util "github.com/alibabacloud-go/tea-utils/v2/service"
"github.com/alibabacloud-go/tea/tea"
)
const endpointURL = "iqs.cn-zhangjiakou.aliyuncs.com"
func createClient() (*iqs20241111.Client, error) {
// TODO: Replace with your AccessKey ID and AccessKey secret.
accessKeyID := "YOUR_ACCESS_KEY"
accessKeySecret := "YOUR_ACCESS_SECRET"
// TODO: Or, load from environment variables (recommended).
//accessKeyID := os.Getenv("ACCESS_KEY")
//accessKeySecret := os.Getenv("ACCESS_SECRET")
if accessKeyID == "" || accessKeySecret == "" {
return nil, fmt.Errorf("ACCESS_KEY or ACCESS_SECRET environment variable is not set")
}
config := &openapi.Config{
AccessKeyId: tea.String(accessKeyID),
AccessKeySecret: tea.String(accessKeySecret),
Endpoint: tea.String(endpointURL),
}
return iqs20241111.NewClient(config)
}
func runGenericSearch(client *iqs20241111.Client) error {
request := &iqs20241111.GenericAdvancedSearchRequest{
Query: tea.String("Hangzhou food"),
TimeRange: tea.String("NoLimit"),
}
runtime := &util.RuntimeOptions{}
resp, err := client.GenericAdvancedSearchWithOptions(request, nil, runtime)
if err != nil {
return fmt.Errorf("generic advanced search failed: %w", err)
}
fmt.Printf("[%s] response: %s\n", *resp.Body.RequestId, resp.Body)
return nil
}
func main() {
client, err := createClient()
if err != nil {
log.Fatalf("Failed to create client: %v", err)
}
if err := runGenericSearch(client); err != nil {
log.Fatalf("Error running generic search: %v", err)
}
}
C++ SDK
Prerequisites
A C++ 11 environment is required. For Windows, use Visual Studio 2015 or later. For Linux, use GCC 4.9 or later.
CMake 3.0 or later.
Installation
Download the core library code: `git clone https://github.com/aliyun/aliyun-openapi-cpp-sdk.git`.
Replace the content of `/aliyun-openapi-cpp-sdk/core/src/CommonClient.cc` with the following code.
/*
* Copyright 1999-2019 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <algorithm>
#include <alibabacloud/core/AlibabaCloud.h>
#include <alibabacloud/core/CommonClient.h>
#include <alibabacloud/core/SimpleCredentialsProvider.h>
#include <alibabacloud/core/location/LocationClient.h>
#include <ctime>
#include <iomanip>
#include <sstream>
#include <alibabacloud/core/Utils.h>
namespace AlibabaCloud {
namespace {
const std::string SERVICE_NAME = "Common";
}
CommonClient::CommonClient(const Credentials &credentials,
const ClientConfiguration &configuration)
: CoreClient(SERVICE_NAME, configuration),
credentialsProvider_(
std::make_shared<SimpleCredentialsProvider>(credentials)),
signer_(std::make_shared<HmacSha1Signer>()) {}
CommonClient::CommonClient(
const std::shared_ptr<CredentialsProvider> &credentialsProvider,
const ClientConfiguration &configuration)
: CoreClient(SERVICE_NAME, configuration),
credentialsProvider_(credentialsProvider),
signer_(std::make_shared<HmacSha1Signer>()) {}
CommonClient::CommonClient(const std::string &accessKeyId,
const std::string &accessKeySecret,
const ClientConfiguration &configuration)
: CoreClient(SERVICE_NAME, configuration),
credentialsProvider_(std::make_shared<SimpleCredentialsProvider>(
accessKeyId, accessKeySecret)),
signer_(std::make_shared<HmacSha1Signer>()) {}
CommonClient::~CommonClient() {}
CommonClient::JsonOutcome
CommonClient::makeRequest(const std::string &endpoint, const CommonRequest &msg,
HttpRequest::Method method) const {
auto outcome = AttemptRequest(endpoint, msg, method);
if (outcome.isSuccess())
return JsonOutcome(
std::string(outcome.result().body(), outcome.result().bodySize()));
else
return JsonOutcome(outcome.error());
}
CommonClient::CommonResponseOutcome
CommonClient::commonResponse(const CommonRequest &request) const {
auto outcome = makeRequest(request.domain(), request, request.httpMethod());
if (outcome.isSuccess())
return CommonResponseOutcome(CommonResponse(outcome.result()));
else
return CommonResponseOutcome(Error(outcome.error()));
}
void CommonClient::commonResponseAsync(
const CommonRequest &request, const CommonResponseAsyncHandler &handler,
const std::shared_ptr<const AsyncCallerContext> &context) const {
auto fn = [this, request, handler, context]() {
handler(this, request, commonResponse(request), context);
};
asyncExecute(new Runnable(fn));
}
CommonClient::CommonResponseOutcomeCallable
CommonClient::commonResponseCallable(const CommonRequest &request) const {
auto task = std::make_shared<std::packaged_task<CommonResponseOutcome()>>(
[this, request]() { return this->commonResponse(request); });
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
HttpRequest CommonClient::buildHttpRequest(const std::string &endpoint,
const ServiceRequest &msg,
HttpRequest::Method method) const {
return buildHttpRequest(endpoint, dynamic_cast<const CommonRequest &>(msg),
method);
}
HttpRequest CommonClient::buildHttpRequest(const std::string &endpoint,
const CommonRequest &msg,
HttpRequest::Method method) const {
if (msg.requestPattern() == CommonRequest::RpcPattern)
return buildRpcHttpRequest(endpoint, msg, method);
else
return buildRoaHttpRequest(endpoint, msg, method);
}
std::string url_encode(const std::string &value) {
std::ostringstream escaped;
escaped.fill('0');
escaped << std::hex;
for (char c : value) {
if (isalnum(c) || c == '-' || c == '_' || c == '.' || c == '~') {
escaped << c;
} else {
escaped << '%' << std::setw(2) << int((unsigned char) c);
}
}
return escaped.str();
}
HttpRequest
CommonClient::buildRoaHttpRequest(const std::string &endpoint,
const CommonRequest &msg,
HttpRequest::Method method) const {
const Credentials credentials = credentialsProvider_->getCredentials();
Url url;
if (msg.scheme().empty()) {
url.setScheme("https");
} else {
url.setScheme(msg.scheme());
}
url.setHost(endpoint);
url.setPath(msg.resourcePath());
auto params = msg.queryParameters();
std::map<std::string, std::string> queryParams;
for (const auto &p : params) {
if (!p.second.empty())
queryParams[p.first] = p.second;
}
if (!queryParams.empty()) {
std::stringstream queryString;
for (const auto &p : queryParams) {
if (p.second.empty())
queryString << "&" << p.first;
else
queryString << "&" << p.first << "=" << url_encode(p.second);
}
url.setQuery(queryString.str().substr(1));
}
HttpRequest request(url);
request.setMethod(method);
if (msg.connectTimeout() != kInvalidTimeout) {
request.setConnectTimeout(msg.connectTimeout());
} else {
request.setConnectTimeout(configuration().connectTimeout());
}
if (msg.readTimeout() != kInvalidTimeout) {
request.setReadTimeout(msg.readTimeout());
} else {
request.setReadTimeout(configuration().readTimeout());
}
if (msg.headerParameter("Accept").empty()) {
request.setHeader("Accept", "application/json");
} else {
request.setHeader("Accept", msg.headerParameter("Accept"));
}
std::stringstream ss;
ss << msg.contentSize();
request.setHeader("Content-Length", ss.str());
if (msg.headerParameter("Content-Type").empty()) {
request.setHeader("Content-Type", "application/octet-stream");
} else {
request.setHeader("Content-Type", msg.headerParameter("Content-Type"));
}
request.setHeader("Content-MD5",
ComputeContentMD5(msg.content(), msg.contentSize()));
request.setBody(msg.content(), msg.contentSize());
std::time_t t = std::time(nullptr);
std::stringstream date;
#if defined(__GNUG__) && __GNUC__ < 5
char tmbuff[26];
strftime(tmbuff, 26, "%a, %d %b %Y %T", std::gmtime(&t));
date << tmbuff << " GMT";
#else
date << std::put_time(std::gmtime(&t), "%a, %d %b %Y %T GMT");
#endif
request.setHeader("Date", date.str());
request.setHeader("Host", url.host());
request.setHeader("x-sdk-client",
std::string("CPP/").append(ALIBABACLOUD_VERSION_STR));
request.setHeader("x-acs-region-id", configuration().regionId());
if (!credentials.sessionToken().empty())
request.setHeader("x-acs-security-token", credentials.sessionToken());
request.setHeader("x-acs-signature-method", signer_->name());
request.setHeader("x-acs-signature-nonce", GenerateUuid());
request.setHeader("x-acs-signature-version", signer_->version());
request.setHeader("x-acs-version", msg.version());
std::stringstream plaintext;
plaintext << HttpMethodToString(method) << "\n"
<< request.header("Accept") << "\n"
<< request.header("Content-MD5") << "\n"
<< request.header("Content-Type") << "\n"
<< request.header("Date") << "\n"
<< canonicalizedHeaders(request.headers());
if (!queryParams.empty()) {
std::stringstream queryString;
for (const auto &p : queryParams) {
if (p.second.empty())
queryString << "&" << p.first;
else
queryString << "&" << p.first << "=" << p.second;
}
url.setQuery(queryString.str().substr(1));
}
if (!url.hasQuery())
plaintext << url.path();
else
plaintext << url.path() << "?" << url.query();
std::stringstream sign;
sign << "acs " << credentials.accessKeyId() << ":"
<< signer_->generate(plaintext.str(), credentials.accessKeySecret());
request.setHeader("Authorization", sign.str());
return request;
}
HttpRequest
CommonClient::buildRpcHttpRequest(const std::string &endpoint,
const CommonRequest &msg,
HttpRequest::Method method) const {
const Credentials credentials = credentialsProvider_->getCredentials();
Url url;
if (msg.scheme().empty()) {
url.setScheme("https");
} else {
url.setScheme(msg.scheme());
}
url.setHost(endpoint);
url.setPath(msg.resourcePath());
auto params = msg.queryParameters();
std::map<std::string, std::string> queryParams;
for (const auto &p : params) {
if (!p.second.empty())
queryParams[p.first] = p.second;
}
queryParams["AccessKeyId"] = credentials.accessKeyId();
queryParams["Format"] = "JSON";
queryParams["RegionId"] = configuration().regionId();
queryParams["SecurityToken"] = credentials.sessionToken();
queryParams["SignatureMethod"] = signer_->name();
queryParams["SignatureNonce"] = GenerateUuid();
queryParams["SignatureVersion"] = signer_->version();
std::time_t t = std::time(nullptr);
std::stringstream ss;
#if defined(__GNUG__) && __GNUC__ < 5
char tmbuff[26];
strftime(tmbuff, 26, "%FT%TZ", std::gmtime(&t));
ss << tmbuff;
#else
ss << std::put_time(std::gmtime(&t), "%FT%TZ");
#endif
queryParams["Timestamp"] = ss.str();
queryParams["Version"] = msg.version();
std::string bodyParamString;
auto signParams = queryParams;
auto bodyParams = msg.bodyParameters();
for (const auto &p : bodyParams) {
bodyParamString += "&";
bodyParamString += (p.first + "=" + UrlEncode(p.second));
signParams[p.first] = p.second;
}
std::stringstream plaintext;
plaintext << HttpMethodToString(method) << "&" << UrlEncode(url.path()) << "&"
<< UrlEncode(canonicalizedQuery(signParams));
queryParams["Signature"] =
signer_->generate(plaintext.str(), credentials.accessKeySecret() + "&");
std::stringstream queryString;
for (const auto &p : queryParams)
queryString << "&" << p.first << "=" << UrlEncode(p.second);
url.setQuery(queryString.str().substr(1));
HttpRequest request(url);
if (msg.connectTimeout() != kInvalidTimeout) {
request.setConnectTimeout(msg.connectTimeout());
} else {
request.setConnectTimeout(configuration().connectTimeout());
}
if (msg.readTimeout() != kInvalidTimeout) {
request.setReadTimeout(msg.readTimeout());
} else {
request.setReadTimeout(configuration().readTimeout());
}
request.setMethod(method);
request.setHeader("Host", url.host());
request.setHeader("x-sdk-client",
std::string("CPP/").append(ALIBABACLOUD_VERSION_STR));
if (!bodyParamString.empty()) {
request.setBody(bodyParamString.c_str() + 1, bodyParamString.size() - 1);
}
return request;
}
} // namespace AlibabaCloud
On Linux, install the required external libraries: libcurl, libopenssl, libuuid, and libjsoncpp.
You can install these packages on Red Hat or Fedora systems.
# use yum
yum install jsoncpp-devel openssl-devel libuuid-devel libcurl-devel
# use dnf
sudo dnf install libcurl-devel openssl-devel libuuid-devel libjsoncpp-develOn Debian or Ubuntu systems:
sudo apt-get install libcurl4-openssl-dev libssl-dev uuid-dev libjsoncpp-devCompile the core dependency library. In the SDK root directory (aliyun-openapi-cpp-sdk), run the `sudo sh easyinstall.sh core` command.
Sample code
#include <cstdlib>
#include <iostream>
#include <string>
#include <alibabacloud/core/AlibabaCloud.h>
#include <alibabacloud/core/CommonRequest.h>
#include <alibabacloud/core/CommonClient.h>
#include <alibabacloud/core/CommonResponse.h>
using namespace std;
using namespace AlibabaCloud;
int main(int argc, char** argv)
{
AlibabaCloud::ClientConfiguration configuration("cn-zhangjiakou");
// specify timeout when create client.
configuration.setConnectTimeout(10000);
configuration.setReadTimeout(10000);
AlibabaCloud::Credentials credential("your ak", "your sk" );
AlibabaCloud::CommonClient client(credential, configuration);
AlibabaCloud::CommonRequest request(AlibabaCloud::CommonRequest::RequestPattern::RoaPattern);
request.setHttpMethod(AlibabaCloud::HttpRequest::Method::Get);
request.setDomain("iqs.cn-zhangjiakou.aliyuncs.com");
request.setVersion("2024-11-11");
request.setQueryParameter("query", "Black Myth");
request.setQueryParameter("timeRange", "NoLimit");
request.setResourcePath("/linked-retrieval/linked-retrieval-entry/v2/linkedRetrieval/commands/genericAdvancedSearch");
request.setRequestPattern(AlibabaCloud::CommonRequest::RequestPattern::RoaPattern);
request.setHeaderParameter("Content-Type", "application/json");
auto response = client.commonResponse(request);
if (response.isSuccess()) {
printf("request success.\n");
printf("result: %s\n", response.result().payload().c_str());
}
else {
printf("error: %s\n", response.error().detail().c_str());
}
AlibabaCloud::ShutdownSdk();
return 0;
}Return Structure
Field | Field type | Nullable | Description | Example | ||
requestId | string | This field is required. | The request ID. Provide this ID for troubleshooting. | |||
pageItems[] | cardType | string | This field is required. | The card type. Valid values:
| structure_web_info | |
title | string | A value is required. | The website title. | 2024 May Day Holiday and Workday Adjustment Schedule (with Calendar) | ||
htmlTitle | string | This field is required. | Website title and HTML content | <em>2024 May Day</em> Holiday and <em>Workday</em> Adjustment <em>Schedule</em> (with Calendar) - Bendibao | ||
link | string | Optional | The website URL. This can be empty for a small number of search cards. | http://m.sh.bendibao.com/tour/278811.html | ||
displayLink | string | Optional | The readable website URL. This can be empty for a small number of search cards. | m.sh.bendibao.com | ||
snippet | string | This field cannot be empty. | A dynamic summary of the web page in plain text format, containing content that matches the keywords. | 2024 May Day holiday schedule: May 1 to May 5 is a 5-day holiday with adjusted workdays. April 28 (Sunday) and May 11 (Saturday) are workdays. | ||
htmlSnippet | string | This field is required. | A dynamic summary of the web page in HTML format, containing content that matches the keywords. The maximum length is 250 characters. Note This field can be used as the retrieval context for retrieval-augmented generation (RAG) scenarios. For the complete body text of the webpage, use the mainText parameter. | <em>2024 May Day</em> <em>holiday schedule</em>: May 1 to May 5 is a <em>holiday</em> with adjusted workdays, for a total of 5 days. April 28 (Sunday) and May 11 (Saturday) are workdays. | ||
publishTime | int64 | A value is required. | The publication time in milliseconds. For websites without a publication time, the default value is 0. | 1714123620000 | ||
score | double | This field is required. | The relevance score. | |||
mainText | string | This field is optional. | The body text of the web page. By default, the first 500 characters are returned. To get longer body text (up to the first 3,000 characters), contact your Alibaba Cloud account manager to enable this feature. Important Body text parsing is currently supported for high-frequency retrieval results such as structure_web_info and news_uchq. | Notice on the Arrangement of Some Holidays\nState Council General Office Official Telegram [2023] No. 7\nTo the people's governments of all provinces, autonomous regions, and municipalities directly under the Central Government, and all ministries and commissions of the State Council and their directly affiliated institutions:\nWith the approval of the State Council, the specific arrangements for the New Year's Day, Spring Festival, Qingming Festival, Labor Day, Dragon Boat Festival, Mid-Autumn Festival, and National Day holidays and adjusted workdays in 2024 are hereby notified as follows.\nI. New Year's Day: Holiday on January 1, connected with the weekend.\nII. Spring Festival: Holiday from February 10 to 17, for a total of 8 days. February 4 (Sunday) and February 18 (Sunday) are workdays. All units are encouraged to arrange for employees to rest on New Year's Eve (February 9) by combining paid annual leave and other systems.\nIII. Qingming Festival: Holiday from April 4 to 6, for a total of 3 days. April 7 (Sunday) is a workday.\nIV. Labor Day: Holiday from May 1 to 5, for a total of 5 days. April 28 (Sunday) and May 11 (Saturday) are workdays.\nV. Dragon Boat Festival: Holiday on June 10, connected with the weekend.\nVI. Mid-Autumn Festival: Holiday from September 15 to 17, for a total of 3 days. September 14 (Saturday) is a workday.\nVII. National Day: Holiday from October 1 to 7, for a total of 7 days. September 29 (Sunday) and October 12 (Saturday) are workdays.\nDuring the holidays, all regions and departments must properly arrange for duty, security, safety, and epidemic prevention and control work. In case of major emergencies, they must report and handle them in a timely manner according to regulations to ensure that the people have a peaceful and safe holiday.\nGeneral Office of the State Council\nOctober 25, 2023 | ||
markdownText | string | This can be left empty. | The web page content in Markdown format. | # Notice from the General Office of the State Council on the Arrangement of Some Holidays in 2024_State Council Documents_Chinese Government Website\n\nurl: https://www.gov.cn/govweb/zhengce/zhengceku/202310/content_6911528.htm\n\narticle_title: \n\ntime: \n\n---\n\n<table>\n<tbody>\n<tr>\n<td>\n<table>\n<tbody>\n<tr>\n<td><b>Index Number:</b></td>\n<td>000014349/2023-00063</td>\n<td><b>Subject Classification:</b></td>\n<td>Comprehensive Government Affairs\\Other</td>\n</tr>\n<tr>\n<td><b>Issuing Authority:</b></td>\n<td>General Office of the State Council</td>\n<td><b>Date of Issue:</b></td>\n<td>October 25, 2023</td>\n</tr>\n<tr>\n<td><b>Title:</b></td>\n<td colspan=\"3\">Notice from the General Office of the State Council on the Arrangement of Some Holidays in 2024</td>\n</tr>\n<tr>\n<td><b>Document Number:</b></td>\n<td>State Council General Office Official Telegram [2023] No. 7</td>\n<td><b>Publication Date:</b></td>\n<td>October 25, 2023</td>\n</tr>\n</tbody>\n</table>\n</td>\n</tr>\n</tbody>\n</table>\n\n<table>\n<tbody>\n<tr>\n<td>\n<table>\n<tbody>\n<tr>\n<td>\n<div>\n<div>\n<p><strong>Notice from the General Office of the State Council on the Arrangement of</strong></p>\n<p><strong>Some Holidays in 2024</strong></p>\n<p><span>State Council General Office Official Telegram [2023] No. 7</span></p>\n<p>To the people's governments of all provinces, autonomous regions, and municipalities directly under the Central Government, and all ministries and commissions of the State Council and their directly affiliated institutions:</p>\n<p>With the approval of the State Council, the specific arrangements for the New Year's Day, Spring Festival, Qingming Festival, Labor Day, Dragon Boat Festival, Mid-Autumn Festival, and National Day holidays and adjusted workdays in 2024 are hereby notified as follows.</p>\n<p><strong>I. New Year's Day:</strong>Holiday on January 1, connected with the weekend.</p>\n<p><strong>II. Spring Festival:</strong>Holiday from February 10 to 17, for a total of 8 days. February 4 (Sunday) and February 18 (Sunday) are workdays. All units are encouraged to arrange for employees to rest on New Year's Eve (February 9) by combining paid annual leave and other systems.</p>\n<p><strong>III. Qingming Festival:</strong>Holiday from April 4 to 6, for a total of 3 days. April 7 (Sunday) is a workday.</p>\n<p><strong>IV. Labor Day:</strong>Holiday from May 1 to 5, for a total of 5 days. April 28 (Sunday) and May 11 (Saturday) are workdays.</p>\n<p><strong>V. Dragon Boat Festival:</strong>Holiday on June 10, connected with the weekend.</p>\n<p><strong>VI. Mid-Autumn Festival:</strong>Holiday from September 15 to 17, for a total of 3 days. September 14 (Saturday) is a workday.</p>\n<p><strong>VII. National Day:</strong>Holiday from October 1 to 7, for a total of 7 days. September 29 (Sunday) and October 12 (Saturday) are workdays.</p>\n<p>During the holidays, all regions and departments must properly arrange for duty, security, safety, and epidemic prevention and control work. In case of major emergencies, they must report and handle them in a timely manner according to regulations to ensure that the people have a peaceful and safe holiday.</p>\n<p>General Office of the State Council</p>\n<p>October 25, 2023</p>\n</div>\n</div>\n</td>\n</tr>\n</tbody>\n</table>\n</td>\n</tr>\n</tbody>\n</table> | ||
images[] | imageLink | string | Nullable | The image URL. | https://imgbdb4.bendibao.com/shbdb/news/202310/26/20231026112304_25716.jpg | |
width | int32 | Nullable | The width in pixels. | 864 | ||
height | int32 | Nullable | The height in pixels. | 1704 | ||
pageMap | htmlSnippetTruncate | string | Nullable | Indicates whether the dynamic web page summary was truncated because it exceeded the length limit.
| 0 | |
mainTextTruncate | string | This field is optional. | Indicates whether the web page body text was truncated because it exceeded the length limit.
| 1 | ||
hostname | string | Nullable | The site name. | Xinhua Net | ||
hostLogo | string | This parameter is optional. | The site logo. | |||
siteLabel | string | Nullable | The site label. Valid values:
Note This field can help determine the authoritativeness of a source. It is used for government-recognized media, so the recall rate is not high. | Authoritative Media | ||
sceneItems[] Nullable | type | string | This field is required. | The type. For more information about supported types, see Overview of SceneItem for scenario-based calls. | time | |
detail | string | This field is required. | The detailed information. For more information about the structure, see Overview of SceneItem for scenario-based calls. | { "title": "Tokyo Time", "targetTimeZone": "Asia/Tokyo", "targetTimeMillisecond": "1733999009797", "targetTime": "2024-12-12 18:23:29", "beijingTimeZone": "PRC", "beijingTimeMillisecond": "1733995409797" | ||
queryContext | originalQuery | query | string | This field is required. | The original request: query. | How are BYD's recent sales? |
timeRange | string | Optional. | The original request: timeRange. | NoLimit | ||
industry | string | Nullable | The original request: industry. | |||
page | string | This can be left empty. | The original request: page. | 1 | ||
rewrite | enabled | boolean | This field is required. | Indicates whether rewriting was enabled for this request. Rewriting is automatically enabled if the customer-level rewrite ratio is greater than 5%. | true | |
timeRange | string | Nullable | The rewritten timeRange. This is returned only if the rewritten value is different from the original timeRange. Important If you specify a value for timeRange other than NoLimit, timeRange rewriting is disabled. | OneMonth | ||
searchInformation | total | int64 | This field cannot be left empty. | The total number of entries. | 8230595 | |
searchTime | int64 | The value cannot be empty. | The search duration. | 1441 | ||
Error codes
API error codes
Status | Error code | Error message | Solution |
404 | InvalidAccessKeyId.NotFound | Specified access key is not found. | Check and make sure your AccessKey ID and AccessKey secret are correct. |
403 | Retrieval.NotActivate | Please activate AI search service | Place an order or contact your account manager to activate the service. |
403 | Retrieval.Arrears | Please recharge first. | Your account balance is insufficient. Add funds to your account. |
403 | Retrieval.NotAuthorised | Please authorize the AliyunIQSFullAccess privilege to the sub-account. | The RAM user is not authorized. For more information, see Create a RAM user and grant permissions. |
403 | Retrieval.TestUserPeriodExpired | The test period has expired. | The trial period has expired (valid for 15 days after placing the order). Contact your Alibaba Cloud account manager to switch to a paid plan. |
429 | Retrieval.Throttling.User | Request was denied due to user flow control. | The request rate has exceeded the limit. Contact your Alibaba Cloud account manager to upgrade your plan. |
429 | Retrieval.TestUserQueryPerDayExceeded | The query per day exceed the limit. | The daily query limit for the trial has been exceeded (1,000 queries/day). Contact your Alibaba Cloud account manager to switch to a paid plan. |
403 | Retrieval.AdvancedSearchAccessDenied | Access to the GenericAdvancedSearch API is not authorized. | Access to GenericAdvancedSearch must be enabled separately. Contact your Alibaba Cloud account manager. |