API ReferenceEvents & Series
Stateless event filter over caller-supplied event objects. Router only.
const url = 'https://data.predictefy.com/api/router/filterEvents';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"args":[[{"eventId":"polymarket:evt-123","title":"Example event"}],{"text":"Example","searchIn":["title"]}]}'};
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://data.predictefy.com/api/router/filterEvents \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "args": [ [ { "eventId": "polymarket:evt-123", "title": "Example event" } ], { "text": "Example", "searchIn": [ "title" ] } ] }'Pure stateless filter helper. The request body is { args: [events, criteria] }; reads filters the caller-supplied array and echoes matching event objects unchanged. This is not a catalog query and does not fetch events. Unknown criteria fields and the non-serializable function/lambda form answer 400. Router-only; non-router exchanges answer 400.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Must be router for this cross-venue operation. Market anchors must use the canonical venue:marketId form; event anchors must use the canonical venue:eventId form.
Request Bodyrequired
Section titled “Request Bodyrequired”object
Example
[ [ { "eventId": "polymarket:evt-123", "title": "Example event" } ], { "text": "Example", "searchIn": [ "title" ] }]Responses
Section titled “Responses”The filtered subset of the supplied event objects.
object
object
Examplegenerated
{ "success": true, "data": [ {} ]}VALIDATION_ERROR (non-router, bad args, bad criteria)
object
object
Always present on errors; quote this id when reporting a failed request.
Present only when a venue error is attributed to a specific exchange.
Example
{ "success": false, "error": { "code": "VALIDATION_ERROR" }}UNAUTHORIZED — platform lane (READS_ENABLE_AUTH)
object
object
Always present on errors; quote this id when reporting a failed request.
Present only when a venue error is attributed to a specific exchange.
Example
{ "success": false, "error": { "code": "VALIDATION_ERROR" }}INSUFFICIENT_CREDITS — endpoint-weighted credits
object
object
Always present on errors; quote this id when reporting a failed request.
Present only when a venue error is attributed to a specific exchange.
Example
{ "success": false, "error": { "code": "VALIDATION_ERROR" }}SCOPE_MISSING — API key lacks the route's required scope (RBAC v1)
object
object
Always present on errors; quote this id when reporting a failed request.
Present only when a venue error is attributed to a specific exchange.
Example
{ "success": false, "error": { "code": "VALIDATION_ERROR" }}ROUTE_NOT_FOUND when READS_ENABLE_FILTER is off
object
object
Always present on errors; quote this id when reporting a failed request.
Present only when a venue error is attributed to a specific exchange.
Example
{ "success": false, "error": { "code": "VALIDATION_ERROR" }}RATE_LIMITED — per-key rps limit
object
object
Always present on errors; quote this id when reporting a failed request.
Present only when a venue error is attributed to a specific exchange.
Example
{ "success": false, "error": { "code": "VALIDATION_ERROR" }}Unexpected internal error. Retryable; error.requestId identifies the failure.
object
object
Always present on errors; quote this id when reporting a failed request.
Present only when a venue error is attributed to a specific exchange.
Example
{ "success": false, "error": { "code": "VALIDATION_ERROR" }}