Who has worked with Al Pacino the most times?

No, it’s not Robert De Niro.

Name Coappearances
John Cazale 6
James Bulleit 6
Robert De Niro 5
Richard Bright 5
James Tolkan 5
Diane Keaton 4
James Caan 4
Sofia Coppola 4
Charles Durning 4
Talia Shire 4

Here’s the source.

library(rvest)
library(tidyverse)

count_coactors <- function(actor_id) {
  title_ids <- actor_id %>%
    paste0("https://www.imdb.com/name/", .) %>%
    read_html() %>%
    html_nodes(".filmo-row") %>%
    html_attr("id") %>%
    enframe(name = NULL) %>%
    filter(str_detect(value, "actor")) %>%
    mutate(value = str_extract(value, "tt.*")) %>%
    pull(value)
  get_coactors <- function(title_id) {
    title_id %>%
      paste0("https://www.imdb.com/title/", ., "/fullcredits") %>%
      read_html() %>%
      html_nodes(".cast_list") %>%
      html_nodes("a") %>%
      {tibble(href = html_attr(., "href"), coactor_name = html_text(.))} %>%
      filter(str_detect(href, "name.*t\\d+$")) %>%
      separate(href, c("blank", "name", "coactor_id", "counter"), sep = "/") %>%
      mutate(coactor_name = str_trim(coactor_name)) %>%
      distinct(coactor_id, coactor_name)
  }
  map_df(title_ids, get_coactors) %>%
    filter(coactor_id != actor_id) %>%
    count(coactor_id, coactor_name, sort = TRUE) %>%
    select(-coactor_id)
}

count_coactors("nm0000199")