我可以获得包含实体或关键字的 Alchemy Data News 结果,但不能同时包含两者

I can get Alchemy Data News results with entities or keywords, but not both

我正在尝试搜索和检索有关 Alchemy Data News 的新闻文章。我可以使用实体获得结果:

https://access.alchemyapi.com/calls/data/GetNews?apikey=[redacted]&outputMode=json&start=now-60d&end=now-0d&maxResults=10&return=enriched.url.title,enriched.url.url,enriched.url.entities,enriched.url.concepts&q.enriched.url.entities.entity=|text=Neil%20Tyson,type=Person|

并且我可以使用关键字获得结果:

https://access.alchemyapi.com/calls/data/GetNews?apikey=[redacted]&outputMode=json&start=now-60d&end=now-0d&maxResults=10&return=enriched.url.title,enriched.url.url,enriched.url.entities,enriched.url.concepts&q.enriched.url.enrichedTitle.keywords.keyword.text=solar%20System

但是如果我将两者结合起来,我得到的结果就是 "OK":

https://access.alchemyapi.com/calls/data/GetNews?apikey=[redacted]&outputMode=json&start=now-60d&end=now-0d&maxResults=10&return=enriched.url.title,enriched.url.url,enriched.url.entities,enriched.url.concepts&q.enriched.url.enrichedTitle.keywords.keyword.text=solar%20System&q.enriched.url.entities.entity=|text=Neil%20Tyson,type=Person|

{
"status": "OK",
"usage": "By accessing AlchemyAPI or using information generated by AlchemyAPI, you are agreeing to be bound by the AlchemyAPI Terms of Use: http://www.alchemyapi.com/company/terms.html",
"totalTransactions": "4320",
"result": {
    "status": "OK"
}

没有文档。这应该有效,还是我找错树了?

问题是您创建了一个包含 0 个结果的查询。如果您删除查询的 &return 部分,则响应将仅包含一个计数。您还可以添加 &timeSlice 以按时间段查看结果(更多关于计数和时间片 here)。 运行 您的组合查询与每月时间片 (&timeSlice=1M) returns:

"status": "OK",
"totalTransactions": "4322",
"result": {
    "count": 0,
    "slices": [
        0,
        0
    ],
    "status": "OK"
    }

将实体和概念与许多 recent/topical 响应(至少在 2016 年 2 月)相结合的一个例子是用 B.o.B:

替换太阳系
https://access.alchemyapi.com/calls/data/GetNews?outputMode=json&start=now-60d&end=now-0d&maxResults=10&return=enriched.url.title&enriched.url.url&enriched.url.entities&enriched.url.concepts&q.enriched.url.entities.entity.text=Neil+Tyson&type=Person&q.enriched.url.enrichedTitle.keywords.keyword.text=B.o.B&apikey=<YOUR API  KEY>

这就是该服务的重点所在,查询并帮助确定近期新闻的趋势。