## 笑话大全 >[danger]### 免费接口,每日100次免费调用,会员可不限次数调用,购买[API会员](https://market.topthink.com/product/210) ![](https://img.kancloud.cn/a1/2b/a12bb96c7ee2d8a11e0fd95d87a844ea_231x203.png =120x) > 搜集网络幽默、搞笑、内涵段子,不间断更新,包含三个接口:按更新时间查询笑话、获取最新笑话和随机获取笑话。 ## 接口调用([调用须知](https://docs.topthink.com/think-api/1835086)) ## 接口1:按更新时间查询笑话 根据时间戳返回该时间点前或后的笑话列表 ### 请求地址 ``` GET https://api.topthink.com/joke/query ``` ### 请求参数 | 名称 | 必填 | 类型 | 说明 | | --- | --- | --- | --- | | appCode| 是| string|用户授权码,参考[API调用](https://docs.topthink.com/think-api/1835086) | |  sort | 是 | string | 类型,desc:指定时间之前发布的,asc:指定时间之后发布的 | | page | 否 | int | 当前页数,默认1,最大20 | |  pagesize | 否 | int | 每次返回条数,默认1,最大20 | |  time | 是 | string | 时间戳(10位),如:1418816972 | ### SDK调用 ``` $client = new Client("YourAppCode"); $result = $client->jokeQuery() ->withTime('时间戳') ->withPage(1) ->withPagesize(10) ->request(); dump($result); ``` ## 接口2:获取最新笑话 获取最新的笑话 ### 请求地址 ``` https://api.topthink.com/joke/latest ``` ### 请求参数 | 名称 | 必填 | 类型 | 说明 | | --- | --- | --- | --- | | page | 否 | int | 当前页数,默认1,最大20 | |  pagesize | 否 | int | 每次返回条数,默认1,最大20 | ### SDK调用 ``` $client = new Client("YourAppCode"); $result = $client->jokeLatest() ->withPage(1) ->withPagesize(10) ->request(); dump($result); ``` ## 接口3:随机获取笑话 随机获取笑话 ### 请求地址 ``` https://api.topthink.com/joke/rand ``` ### 请求参数(无) ### SDK调用 ``` $client = new Client("YourAppCode"); $result = $client->jokeRand() ->request(); dump($result); ```