## 全国加油站查询 ![](https://img.kancloud.cn/cd/df/cddf57da115e6caa9110762ca9ed3b07_163x157.png) > 全国加油站、周边加油站,以及参考油价查询 ## 接口费用( [点击购买](https://market.topthink.com/product/352)) > 最低 0.01元/次 ## 接口调用([调用须知](https://docs.topthink.com/think-api/1835086)) ## 接口1:按城市检索加油站 ### 请求地址 ``` GET https://api.topthink.com/car/region ``` ### 请求参数 | 名称 | 必填 | 类型 | 说明 | | --- | --- | --- | --- | | appCode| 是| string|用户授权码,参考[API调用](https://docs.topthink.com/think-api/1835086) | | city | 是 | string | 城市名urlencode utf8; | | keywords | 否 | string | 关键字urlencode utf8; | | page | 否 | int | 页数,默认1 | | format | 否 | int | 价格返回格式 1或2,默认1 | ### 返回`data`参数 | 名称 | 类型 | 说明 | | --- | --- | --- | |   name | string | 加油站名称 | |   area | string | 城市邮编 | |   areaname | string | 城市区域 | |   address | string | 加油站地址 | |   brandname | string | 运营商类型 | |   type | string | 加油站类型 | |   discount | string | 是否打折加油站 | |   exhaust | string | 尾气排放标准 | |   position | string | 谷歌地图坐标 | |   lat | double | 百度地图纬度 | |   lon | double | 百度地图经度 | |   price | string | 省控基准油价,E90对应89(90)号汽油,E93对应92(93)号汽油,E97对应95(97)号汽油,E0对应0号 | |   fwlsmc | string | 加油卡信息 | ## SDK调用 ``` $client = new Client("YourAppCode"); $result = $client->carRegion() ->withCity('北京') ->withFormat(2) ->request(); dump($result); ``` 返回示例 ``` { "code": 0, "message": "成功", "data":{ "data": [ { "id": "34299", "name": "中油燕宾北邮加油站‎(办卡优惠)", "area": "chongwen", "areaname": "北京市 崇文区", "address": "北京市崇文区天坛路12号,与东市场东街路交叉西南角(天坛北门往西一公里路南)。", "brandname": "中石油", "type": "加盟店", "discount": "打折加油站", "exhaust": "京Ⅴ", "position": "116.401654,39.886973", "lon": "116.40804671453", "lat": "39.893324983272", "price": [ { "type": "E90", "price": "7.31" }, { "type": "E93", "price": "6.92" }, { "type": "E97", "price": "7.36" }, { "type": "E0", "price": "6.84" } ], "fwlsmc": "银联卡,信用卡支付" }, { "id": "34316", "name": "中油北汽宣武门加油站(办卡优惠)", "area": "xuanwu", "areaname": "北京市 宣武区", "address": "北京市宣武区宣武门西大街28院宣武门地铁西南出口辅路。", "brandname": "中石油", "type": "加盟店", "discount": "打折加油站", "exhaust": "京Ⅴ", "position": "116.373169,39.899263", "lon": "116.37964995964", "lat": "39.905320913583", "price": [ { "type": "E90", "price": "7.31" }, { "type": "E93", "price": "6.92" }, { "type": "E97", "price": "7.36" }, { "type": "E0", "price": "6.84" } ], "fwlsmc": "银联卡,信用卡支付,加油卡,便利店,洗车服务" } ] } } ``` ## 接口2:查询周边加油站 ### 请求地址 ``` GET https://api.topthink.com/car/nearby ``` ### 请求参数 | 名称 | 必填 | 类型 | 说明 | | --- | --- | --- | --- | | appCode| 是| string|用户授权码,参考[API调用](https://docs.topthink.com/think-api/1835086) | | lon | 是 | double | 经纬(如:121.538123) | | lat | 是 | double | 纬度(如:31.677132) | | r | 否 | int | 搜索范围,单位M,默认3000,最大10000 | | page | 否 | int | 页数,默认1 | | format | 否 | int | 价格返回格式 1或2,默认1 | ### 返回`data`参数 | 名称 | 类型 | 说明 | | --- | --- | --- | |   name | string | 加油站名称 | |   area | string | 城市邮编 | |   areaname | string | 城市区域 | |   address | string | 加油站地址 | |   brandname | string | 运营商类型 | |   type | string | 加油站类型 | |   discount | string | 是否打折加油站 | |   exhaust | string | 尾气排放标准 | |   position | string | 谷歌地图坐标 | |   lat | double | 百度地图纬度 | |   lon | double | 百度地图经度 | |   price | string | 省控基准油价,E90对应89(90)号汽油,E93对应92(93)号汽油,E97对应95(97)号汽油,E0对应0号 | |   fwlsmc | string | 加油卡信息 | |   distance | string | 与坐标的距离,单位M  | ## SDK调用 ``` $client = new Client("YourAppCode"); $result = $client->carNearby() ->withLon('116.403119') ->withLat('39.916042') ->withR(3000) ->request(); dump($result); ``` 返回结果示例: ``` { "code": 0, "message": "成功", "data": { "data": [ { "id": "34299", "name": "中油燕宾北邮加油站‎(办卡优惠)", "area": "chongwen", "areaname": "北京市 崇文区", "address": "北京市崇文区天坛路12号,与东市场东街路交叉西南角(天坛北门往西一公里路南)。", "brandname": "中石油", "type": "加盟店", "discount": "打折加油站", "exhaust": "京Ⅴ", "position": "116.401654,39.886973", "lon": "116.40804671453", "lat": "39.893324983272", "price": [ { "type": "E90", "price": "7.31" }, { "type": "E93", "price": "6.92" }, { "type": "E97", "price": "7.36" }, { "type": "E0", "price": "6.84" } ], "fwlsmc": "银联卡,信用卡支付", "distance": 2564 }, { "id": "34316", "name": "中油北汽宣武门加油站(办卡优惠)", "area": "xuanwu", "areaname": "北京市 宣武区", "address": "北京市宣武区宣武门西大街28院宣武门地铁西南出口辅路。", "brandname": "中石油", "type": "加盟店", "discount": "打折加油站", "exhaust": "京Ⅴ", "position": "116.373169,39.899263", "lon": "116.37964995964", "lat": "39.905320913583", "price": [ { "type": "E90", "price": "7.31" }, { "type": "E93", "price": "6.92" }, { "type": "E97", "price": "7.36" }, { "type": "E0", "price": "6.84" } ], "fwlsmc": "银联卡,信用卡支付,加油卡,便利店,洗车服务", "distance": 2332 } ] } } ```