Bulk product check
POST
/batch
const url = 'https://patchstack.com/database/api/beta/batch';const options = { method: 'POST', headers: {PSKey: '<PSKey>', 'Content-Type': 'application/json'}, body: '[{"type":"npm","name":"axios","version":"0.21.4","exists":false},{"type":"plugin","name":"tutor","version":"1.5.2","exists":true},{"type":"wordpress","name":"wordpress","version":"6.0.0","exists":true}]'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://patchstack.com/database/api/beta/batch \ --header 'Content-Type: application/json' \ --header 'PSKey: <PSKey>' \ --data '[ { "type": "npm", "name": "axios", "version": "0.21.4", "exists": false }, { "type": "plugin", "name": "tutor", "version": "1.5.2", "exists": true }, { "type": "wordpress", "name": "wordpress", "version": "6.0.0", "exists": true } ]'Check up to 50 products in a single request. Mirrors the format
documented for the Extended tier’s /batch endpoint.
The payload is a raw JSON array (not wrapped in an object). Each item
is { "type", "name", "version", "exists"? } — when exists: true
the result for that item is boolean-only; otherwise it’s the full
advisory list for the product.
Authorizations
Section titled “Authorizations ”Request Body required
Section titled “Request Body required ” Media type application/json
Array<object>
object
type
required
string
name
required
string
version
required
string
exists
When true, return a boolean-only result for this item.
boolean
Example
[ { "type": "npm", "name": "axios", "version": "0.21.4", "exists": false }, { "type": "plugin", "name": "tutor", "version": "1.5.2", "exists": true }, { "type": "wordpress", "name": "wordpress", "version": "6.0.0", "exists": true }]Responses
Section titled “ Responses ”Per-item results, in request order.
Media type application/json
Array<object>
object
Example generated
[ {}]Missing or invalid PSKey header.
API key not authorised for the requested endpoint.
Invalid parameter combination (e.g. cursor + page), invalid platform, or per_page > 500.
Rate limit exceeded.