{
  "name": "Movie Ratings Grabber",
  "description": "Get a movie's ratings (IMDb, Rotten Tomatoes, Metacritic, TMDB) from free APIs. Every result is saved and can be listed later.",
  "base_url": "https://movie-ratings-grabber-given.lab.ziggiai.com",
  "endpoints": [
    {
      "method": "GET",
      "path": "/api/ratings",
      "params": {
        "title": "movie title (required)",
        "year": "release year (optional)",
        "refresh": "1 to skip the saved copy and fetch fresh"
      },
      "returns": "title, year, imdb_rating, imdb_votes, rotten_tomatoes, metacritic, tmdb_rating, sources, say",
      "example": "https://movie-ratings-grabber-given.lab.ziggiai.com/api/ratings?title=Clayface"
    },
    {
      "method": "POST",
      "path": "/api/jobs",
      "body": {
        "title": "string",
        "year": "optional",
        "refresh": "optional bool"
      },
      "returns": "job id; poll GET /api/jobs/<id> until status is done or error"
    },
    {
      "method": "GET",
      "path": "/api/jobs/<id>",
      "returns": "job status, result, say"
    },
    {
      "method": "GET",
      "path": "/api/saved",
      "params": {
        "q": "optional text filter on title"
      },
      "returns": "all saved ratings, newest first"
    }
  ]
}