Skip to content
AllEventsAllEventsDevelopers

Events in Batch

Returns all upcoming events in your coverage, a batch at a time. Use it to sync a local copy of the catalog.

GET | POST/v1/events/batch

Parameters

  • next_cursorstring

    The next_cursor from your last response, exactly as you got it Default: Start.

  • countinteger

    Events per call, 1 to 1000. A larger value becomes 1000; 0, a negative or a non-whole number answers 400. Default: 1000.

  • updated_afterUnix timestamp

    Only events updated after this time (compare updated_at)

  • min_scorenumber

    Only events with at least this internal ranking score. The score itself isn't returned.

  • cachedboolean

    false fetches fresh data. See Cached answers. Default: true.

How to sync

  1. Call without next_cursor.
  2. Save the next_cursor from each response, and send it on the next call.
  3. Stop when message is END_OF_RESULTS (has_more is then false). That answer's next_cursor is empty: keep the cursor you sent.
  4. Later, call again with the last cursor you saved to pick up newly published events, and use updated_after for changes.

next_cursor is an opaque string of about 50 characters (base64url). It changes on every response, even for the same position, so don't parse or compare it: store it and send it back untouched. Cursors from before 24 November 2026 (c<number>) answer 400 next_cursor is not valid.: start again without next_cursor.

A call can return fewer events than count, or none, while the cursor moves on. If result_count is 0 and message isn't END_OF_RESULTS, continue with the new cursor. With narrow coverage, message can be NO_COVERED_EVENTS_YET (error is 0): this stretch of the catalog had none of your events. It costs 0 credits; continue with next_cursor, which moves forward every time.

cursor=""while true; do  body=$(curl -sf -G "$AE_BASE_URL/events/batch" \    -H "X-API-Key: $AE_API_KEY" \    --data-urlencode "next_cursor=$cursor" \    -d "count=1000") || exit 1  next=$(printf '%s' "$body" | jq -r '.next_cursor')  [ -n "$next" ] && cursor=$next # empty at END_OF_RESULTS: keep the last one  # save the event here  printf '%s' "$body" | jq -r '.data[] | "\(.event_id) \(.eventname)"'  if [ "$(printf '%s' "$body" | jq -r '.message')" = "END_OF_RESULTS" ]; then    break # save cursor to continue from here next time  fidone

Errors

StatusmessageCause
200END_OF_RESULTSNo more events for now. error is 1, data is empty, next_cursor is "" and description says to try again later. Retry later with the cursor you sent.
200NO_COVERED_EVENTS_YETNone of this stretch of the catalog is in your coverage. data is empty and it costs 0 credits. Continue with next_cursor.
400count must be between 1 and 1000.count is 0, negative or not a whole number. 0 credits. Leave it out for 1000.
400next_cursor is not valid.The cursor isn't one this API returned, was changed, or is an old c<number> cursor. Start again without next_cursor.
503Something went wrong. Try again shortly.Temporary failure, 0 credits. Retry with the same cursor.

All APIs on one page