cve-search / cve-search

cve-search - a tool to perform local searches for known vulnerabilities

Home Page:https://www.cve-search.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Retrieve information for multiple CVEIDs in one API request

niall-san opened this issue · comments

Looking through the API documentation, there does not appear to be a way to bulk query multiple CVEs in one request, meaning that many requests are required to look up a large amount of CVEs. Is there currently a way to do this through the API or could it be implemented?

commented

From the gui you are correct; for the API have a look at the query endpoint; looking at the PostBodyRequest model you'll find the dict_filter field which can be used to query multiple CVE's. If you are looking for a CLI way; have a look at cve-search/CveXplore repo

Thanks for the reply. I managed to query multiple CVEs at once through the API using the /api/query endpoint that you mentioned. It does put each returned CVE inside a nested array, which isn't ideal but can be worked with.

POST /api/query?format=json

[
{ "retrieve": "cves", "dict_filter": { "id": "CVE-2020-15168" } },
{ "retrieve": "cves", "dict_filter": { "id": "CVE-2016-3333" } },
{ "retrieve": "cves", "dict_filter": { "id": "CVE-2023-3611" } }
]