Bing自定义搜索引擎

| 我应该使用什么参数才能使用bing 2.0 API仅从说abcd.com的网站获取搜索结果?我正在尝试以JSON格式获取结果。有人可以帮忙吗?     
已邀请:
给群众的新守则
            $query = array
        (
            \'AppId\' => <API_KEY>,
            \'sources\' => \'Web\',
            \'query\' => \'site:www.tipografix.ro \'.$keywords,
            \'Version\' => \'2.0\',
            \'Options\' => \'EnableHighlighting\',
            \'Web.Count\' => $per_page,
            \'Web.Offset\' => $page_num,
            \'Web.Options\' => \'DisableHostCollapsing DisableQueryAlterations\'
        );

        $request = \'http://api.bing.net/json.aspx?\'.http_build_query($query);

        $response  = file_get_contents($request);
        $jsonobj  = json_decode($response);
    
不确定API的JSON格式如何工作,但是在查询参数中输入\“ site:abcd.com bacon \”,其中bacon是您的原始查询。 我使用的是XML格式,因此如果我将请求发送至:
http://api.search.live.net/xml.aspx?Appid=________&query=site%3Aabcd.com+bacon&sources=web&web.count=5&web.offset=0
    

要回复问题请先登录注册