Robot Events API Filtering

I’m new to web development and am trying to make a pretty simple project of getting information from the Robot Events API. Using this URL in my get request to find information of all teams works fine: https://www.robotevents.com/api/v2/teams
but when i try to use a url for anything more specific i get no information back.

For example. I used the try it out feature on the documentation to filter by country, using this url:

https://www.robotevents.com/api/v2/teams?country%5B%5D=United%20States

The data i got back was empty. I don’t know if the URL im using is wrong, or something else. This might be a very stupid question.

1 Like

Use the 2-letter country code (i.e. US as opposed to United States)

$ curl -H "Authorization: Bearer [RE TOKEN]" "https://www.robotevents.com/api/v2/teams?country%5B%5D=US" | jq
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  6561  100  6561    0     0   3041      0  0:00:02  0:00:02 --:--:--  3041
{
  "meta": {
    "current_page": 1,
    "first_page_url": "https://www.robotevents.com/api/v2/teams?page=1",
    "from": 1,
    "last_page": 3855,
    "last_page_url": "https://www.robotevents.com/api/v2/teams?page=3855",
    "next_page_url": "https://www.robotevents.com/api/v2/teams?page=2",
    "path": "https://www.robotevents.com/api/v2/teams",
    "per_page": 15,
    "prev_page_url": null,
    "to": 15,
    "total": 57812
  },
  "data": [
    {
      "id": 67381,
      "number": "AAAA1",
      "team_name": "Ytown heroes",
      "robot_name": "Wreck it Ralph",
      "organization": "IEEE YSU student chapter",
      "location": {
        "venue": null,
        "address_1": "",
        "address_2": null,
        "city": "Youngstown",
        "region": "Ohio",
        "postcode": "44555",
        "country": "United States",
        "coordinates": {
          "lat": 41.1,
          "lon": -80.6
        }
      },
      "registered": false,
      "program": {
        "id": 4,
        "name": "VEX U",
        "code": "VEXU"
      },
      "grade": "College"
    },
[...]```
7 Likes

Thanks, how would I do this with a region. for example, https://www.robotevents.com/api/v2/teams?region%5B%5D=NY, (for New York) also does not seem to work


Doesn’t appear you can filter by region using the RE API at first glance.

3 Likes

You can narrow it down by pulling registered VRC teams.
https://www.robotevents.com/api/v2/teams?registered=true&program[]=1&myTeams=false

Interesting, the country JSON shows United States but the result set was empty. If you use US then it seems to work. Edit: I just reread the posts above and credit goes to @8349P

https://www.robotevents.com/api/v2/teams?registered=true&program[]=1&country[]=US&myTeams=false

1 Like

Overall, the RobotEvents API is nice but…quirky. One can definitely not do the same things with it (server side) that the website does.

2 Likes

I have submitted requests for a few enhancements like registration dates, fee, and multiple locations / date for leagues.

2 Likes

To say nothing of bringing the game-specific scoring breakdown like TheBlueAlliance does. Granted, RobotEvents works for competition formats beyond VRC, but this is all stuff that is possible.

2 Likes