宠物新闻
宠物及相关产业新闻资讯

接口地址: https://58.linkpc.net/doc/petnews.html

返回格式: JSON

请求方式: GET

请求示例: https://58.linkpc.net/api/petnews?num=10

请求参数说明:

名称 必填 类型 说明
num int 返回数量1-50,默认10
page int 翻页
rand int 随机获取
word String 检索关键词

返回参数说明:

名称 类型 说明
curpage int 当前页
allnum int 结果数
id String 新闻唯一ID
ctime Date 发布时间
title String 文章标题
description String 文章描述
source String 文章来源
picUrl String 封面图片
url String 文章地址

返回示例:

{
"code": 200,
"msg": "success",
"data": {
"curpage": 1,
"allnum": 10,
"newslist": [
{
"id": "6b198a22f173e596d0aeacc7cd74fa02",
"ctime": "2024-07-08 20:00",
"title": "“金字塔之巅”大展:“喵星人”如何入馆参观?",
"description": "中新网上海7月8日电(记者王笈)上海博物馆“金字塔之巅:古埃及文明大展”8日召开展前新闻发布会,上海博物馆馆长褚晓波对网友关心的“如何带宠物猫看展”进行了回应。",
"source": "中新宠物",
"picUrl": "",
"url": "http:\/\/www.chinanews.com.cn\/cul\/2024\/07-08\/10247995.shtml"
},
{
"id": "4877eec40374590ce584ed5215ee3e31",
"ctime": "2024-07-05 21:00",
"title": "探访西安出港航班携带宠物进客舱服务 旅客:方便带着宠物去看世界",
"description": "随着宠物经济的发展,越来越多旅客有带着自家宠物远行的需求。为此,天津航空...",
"source": "中新宠物",
"picUrl": "",
"url": "http:\/\/www.chinanews.com.cn\/cj\/shipin\/cns\/2024\/07-05\/news994157.shtml"
},
{
"id": "ad09cd12d03519183dc2a9e9eebe9e13",
"ctime": "2024-07-03 14:00",
"title": "遇上“加长版雨季” “防雨神器”热销网络",
"description": "近苏浙地区入梅后的频繁下雨,让更多“防雨神器”在电商平台上卖爆,这些新式雨具迎合年轻人的各种需求,不仅仅把出行人防护得严严实实,甚至连车子和宠物都照顾到了",
"source": "中新宠物",
"picUrl": "",
"url": "http:\/\/www.chinanews.com.cn\/cj\/2024\/07-03\/10245016.shtml"
},
{
"id": "3490c47360a3d896a025c6c744dda7b5",
"ctime": "2024-07-02 17:00",
"title": "4人违规携带宠物入园 被终身禁入卧龙大熊猫苑神树坪基地",
"description": "某(男,39岁),王某某(男,41岁),张某某(女,52岁)一行4人,2024年7月1日在卧龙中华大熊猫苑神树坪基地参观时,明知园区不准携带宠物",
"source": "中新宠物",
"picUrl": "",
"url": "http:\/\/www.chinanews.com.cn\/sh\/2024\/07-02\/10244502.shtml"
},
{
"id": "afd1303931a1faeb6a9fc2ea6c28d187",
"ctime": "2024-07-02 17:00",
"title": "湖南首届“内外贸交易会”7月12日至14日将在长沙举行",
"description": "本次活动以“助力双循环、拓展新市场、促进新消费”为主题,展览面积共4万平方米,主要展示户外运动及露营装备、国际宠物用品、电子消费品、家居用品、办公文具和礼品工艺品等特色优质外贸产品和符合当下消费趋势的时尚潮品",
"source": "中新宠物",
"picUrl": "",
"url": "http:\/\/www.chinanews.com.cn\/cj\/2024\/07-02\/10244511.shtml"
},
{
"id": "fe149582a6afa85b315628c27718832a",
"ctime": "2024-07-01 18:00",
"title": "腾讯搜狗输入法AI功能全面升级 独家上线AI对话和AI宠物",
"description": "近日,腾讯搜狗输入法发布全新版本,升级了AI帮写、AI对话功能,同时推出快捷问答、AI宠物、AI自拍表情等多种新玩法。",
"source": "中新宠物",
"picUrl": "",
"url": "http:\/\/www.chinanews.com.cn\/cj\/2024\/07-01\/10243811.shtml"
},
{
"id": "0db653fbed4c522d5255ba1a3263f554",
"ctime": "2024-07-01 14:00",
"title": "两夫妻小县城卖早餐月入3万,如何做到的?",
"description": "一开始也有很多问题:肉炖糊了,四五百块钱的肉就都送了朋友喂宠物;3点40分起床,夫妻二人也是在干了一年半之后才逐渐适应。每天早晨眼皮都粘在一起很难睁开,俩人都有过...",
"source": "中新宠物",
"picUrl": "",
"url": "http:\/\/www.chinanews.com.cn\/gsztc\/2024\/07-01\/10243628.shtml"
},
{
"id": "f3d7e0b8e9a70c09f1355ee86921256a",
"ctime": "2024-06-29 18:00",
"title": "履职在一线 新疆基层人大代表为群众排忧解难",
"description": "71岁的居民李付芝说:“我参加过《宠物管理条例》《物业管理条例》等条例草案的意见征集,我的意见也被采用了。这种民主参与的方式让我作为一个公...",
"source": "中新宠物",
"picUrl": "",
"url": "http:\/\/www.chinanews.com.cn\/sh\/2024\/06-29\/10242925.shtml"
},
{
"id": "6be7760ee0c04691b714bab11c1646ec",
"ctime": "2024-06-29 15:00",
"title": "消费市场回升向好 激活经济高质量发展新引擎",
"description": "生鲜行业直播贡献的GMV(商品交易总额)增速高达261%,榴莲、酒水直播尤为火爆;在服饰领域,618期间淘宝平台60%的皮草成交来自直播;在宠物行业,店铺直播也拉动了宠物商家的成交量,超150个直播间同比增速...",
"source": "中新宠物",
"picUrl": "",
"url": "http:\/\/www.chinanews.com.cn\/cj\/2024\/06-29\/10242851.shtml"
},
{
"id": "439a41e3553a168fc2feea5d88607280",
"ctime": "2024-06-28 23:00",
"title": "中疾控:洪涝灾害后,预防肠道传染病要防止病从口入",
"description": "国璇摄“发生洪涝灾害时,含有大量微生物的垃圾、粪便甚至一些禽畜宠物等动物的尸体都会进入洪水中。人一旦接触到洪水及其污染的环境,患传染病尤其是肠道传染病的风险会显著增加...",
"source": "中新宠物",
"picUrl": "",
"url": "http:\/\/www.chinanews.com.cn\/life\/2024\/06-28\/10242520.shtml"
}
]
}
}

错误码格式说明:

名称 类型 说明

代码示例:

<?php
header('Content-type: application/json; charset=utf-8');
date_default_timezone_set('PRC');
$url = 'https://58.linkpc.net/api/petnews';
$type = isset($_GET['type']) ? $_GET['type'] : '';
if ($type == 'json' || $type == 'JSON') {
$result = file_get_contents($url . '?type=json');
echo htmlspecialchars($result);
} else {
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
$contentType = curl_getinfo($ch, CURLINFO_CONTENT_TYPE);
curl_close($ch);