0

I am using the /events route in the API and it returns all events from Stack Overflow.

But I want to filter based on event_type. Is there any way to do that?

1

There is currently no method to filter events by event_type.

For now, just load all the events and filter through the event_type values afterwards. Since the /events route only covers the last 15 minutes, it will only take 2 to 10 pages to get all the unfiltered results on Stack Overflow (the busiest site).


However, your options increase depending on what you want to filter for.
If you are interested in the question_posted, answer_posted, comment_posted, or user_created event types; merely call the:

route(s), respectively, but:

  1. Sort by creation, desc.
  2. Specify a fromdate that is 15 minutes in the past. (fromdate is really a date plus time, to the nearest second.)

Unfortunately, if you want to filter for post_edited events, you are out of luck. There's not really a good way to work around that (yet).

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .