☰
websearch free api
2026/10/6 16:51:09 网站建设 项目流程

https://github.com/langsearch-ai/langsearch

import requests import json url = "https://api.langsearch.com/v1/web-search" ''' 参数说明: Parameter Type Required Description query String Yes The user's search query. freshness String No Specifies the time range for search results. Possible values: - oneDay: Results from the past 24 hours. - oneWeek: Results from the past week. - oneMonth: Results from the past month. - oneYear: Results from the past year. - noLimit: No time filter (default). summary Boolean No Whether to show long text summaries for results. Possible values: - true: Show summaries. - false: Do not show summaries (default). count Integer No The number of results to return. Possible range: 1-10 (default is 10). ''' payload = json.dumps({ "query": "2024年苹果ESG报告亮点", "freshness": "noLimit", "summary": True, "count": 10 }) headers = { 'Authorization': 'sk-0df7fa57cb5d45d3b864eb57a6400081', 'Content-Type': 'application/json' } response = requests.request("POST", url, headers=headers, data=payload) print(response.text)

需要专业的网站建设服务?

联系我们获取免费的网站建设咨询和方案报价,让我们帮助您实现业务目标

立即咨询