Queens County Assistant District Attorneys Scott Evan Kessler and Keshia Espinal appeal from Judge Gleeson’s denial of absolute immunity in an action brought under, inter alia, 42 U.S.C. § 1983. Karla Giraldo, the plaintiff-appellee, alleged in her complaint that appellants’ interrogation of her following the arrest of her boyfriend, former New York State Senator Hiram Monserrate, violated her civil rights.1 We vacate and remand.
*164BACKGROUND
We view the facts alleged in the complaint in the light most favorable to appellee. See Warney v. Monroe County, 587 F.3d 113, 116 (2d Cir.2009). We also take judicial notice of relevant matters of public record. See, e.g., Shmueli v. City of New York, 424 F.3d 231, 233 (2d Cir.2005); Fed.R.Evid. 201(b) (permitting judicial notice of facts “not subject to reasonable dispute”).
On December 19, 2008, appellee suffered a laceration above her left eye requiring twenty stitches to close. Monserrate brought her to a hospital emergency room for treatment. There, she was seen by defendants Dr. Kort and Dr. Frogel. Appellee told them that she was injured as a result of an “accident” that occurred when her boyfriend brought her a glass of water that broke, causing shards to fly and cut her forehead. Doctors Kort and Frogel suspected domestic abuse and contacted the New York City Police Department. Appellee also told Nurse Susan Cabibbo that she was not in need of protection and that she was not involved in an altercation. The nurse nevertheless contacted the police and informed them that appellee was a victim of domestic violence.
Soon afterward, Police Officer Fitzgerald and another unidentified officer arrived at the hospital and interviewed Monserrate and appellee separately. Officer Fitzgerald then arrested Monserrate. After the completion of appellee’s treatment, Kort and Frogel did not allow appellee to leave and had her transported to the 105th Precinct where she was kept for more than five hours. At the precinct, Detective Ward interrogated appellee regarding her injury, and she consistently responded that it was the result of an accident. Detective Ward then “ordered” appellee to sign a statement accusing Monserrate of assaulting her, but she refused. Appellee continued to be interrogated by police personnel.
After the police interrogation, appellee was taken against her will to the Queens District Attorney’s office, where she was interviewed by appellants. Appellee states she told appellants that she did not want to talk, but that they nevertheless continued to interrogate her. After two hours of interrogation by appellants, appellee was released.
Meanwhile, on the day of the injury and arrest, Monserrate was arraigned and bail was posted. See People v. Hiram Monserrate, Docket Number 2008QN067420 (felony complaint filed and dated December 19, 2008, charging two counts of felony assault in the second degree and one count of misdemeanor criminal possession of a weapon in the fourth degree; Monserrate posted bail on December 19, 2008); see also Shmueli, 424 F.3d at 233 (“The New York State ... prosecution of Shmueli is a matter of public record, of which we take judicial notice.”); cf. Warney, 587 F.3d at 118 (taking judicial notice of federal habeas corpus petition on appeal).2
Appellants moved to dismiss the complaint on various grounds, including absolute immunity. The district court denied the motion. On the merits, the court held that appellee’s allegations of being “unlawfully detained, held against her will and maliciously interrogated” by appellants in violation of her right to be free from unreasonable seizures stated plausible Section 1983 claims. The court also held that appellee could bring claims against appel*165lants in their individual capacities, but that she could not proceed against them in their official capacities because doing so would constitute an impermissible action against the Queens District Attorney’s office. Finally, on the issue before us, the court rejected appellants’ argument that absolute immunity shielded them from liability, finding that their “conduct in this case [was] more closely linked to the prosecutor[s’] investigative duties [rather] than to [their] role as government litigators] .... ”
This appeal followed.
DISCUSSION
This is, of course, an interlocutory appeal. However, because prosecutorial immunity is intended to shield prosecutors from legal proceedings, as well as liability, a denial of immunity is final as to the need to proceed with the action and, at least as to matters of law, is reviewable under the collateral order doctrine. See, e.g., Hill v. City of New York, 45 F.3d 653, 659-60 (2d Cir.1995); Kaminsky v. Rosenblum, 929 F.2d 922, 925-26 (2d Cir.1991); see also Nixon v. Fitzgerald, 457 U.S. 731, 742-43, 102 S.Ct. 2690, 73 L.Ed.2d 349 (1982) (jurisdiction to review denial of absolute immunity under the collateral order doctrine if the denial involves only a question of law). We review such issues of law de novo. See Warney, 587 F.3d at 120.
Absolute immunity bars a civil suit against a prosecutor for advocatory conduct that is “intimately associated with the judicial phase of the criminal process.” Imbler v. Pachtman, 424 U.S. 409, 430, 96 S.Ct. 984, 47 L.Ed.2d 128 (1976). This immunity attaches to conduct in court, as well as conduct “preliminary to the initiation of a prosecution and actions apart from the courtroom.” Id. at 431 n. 33, 96 S.Ct. 984.
An official claiming immunity bears the burden of showing that the particular immunity claimed applies. See Burns v. Reed, 500 U.S. 478, 486-87, 111 S.Ct. 1934, 114 L.Ed.2d 547 (1991). In determining whether absolute prosecutorial immunity attaches, we apply a “functional approach.” Hill, 45 F.3d at 660. “Prosecutorial immunity from § 1983 liability is broadly defined, covering ‘virtually all acts, regardless of motivation, associated with [the prosecutor’s] function as an advocate.’ ” Id. at 661 (quoting Dory v. Ryan, 25 F.3d 81, 83 (2d Cir.1994)). The Supreme Court has explained that a prosecutor’s functions preliminary to the initiation of proceedings include “whether to present a case to a grand jury, whether to file an information, whether and when to prosecute, whether to dismiss an indictment against particular defendants, which witnesses to call, and what other evidence to present.” Imbler, 424 U.S. at 431 n. 33, 96 S.Ct. 984.
Analysis of a claim of immunity requires us to view the relevant circumstances as would a reasonable official in the claimant’s position.3 See Hill, 45 F.3d at 662 (“[T]he ‘functional’ test for absolute immunity is an objective one; it does not depend upon the state actor’s subjective intent.”); Dory, 25 F.3d at 83; see also Bums, 500 U.S. at 487-88, 111 S.Ct. 1934 (allegations that prosecutor “deliberately misled the Court” during preliminary hearing were deemed irrelevant where the prosecutor’s objective act — presenting evidence at the hearing — enjoyed absolute *166immunity). The relevant question, therefore, is whether a reasonable prosecutor would view the acts challenged by the complaint as reasonably within the functions of a prosecutor. If the generic acts are within those functions, absolute immunity applies to protect the prosecutor even in the face of a complaint’s allegations of malicious or corrupt intent behind the acts. See id. at 489-90, 111 S.Ct. 1934. Otherwise, the absolute immunity would not be absolute.
Under a functional approach, actions are not shielded by absolute immunity merely because they are performed by a prosecutor. “A prosecutor’s administrative duties and those investigatory functions that do not relate to an advocate’s preparation for the initiation of a prosecution or for judicial proceedings are not entitled to absolute immunity.” Buckley v. Fitzsimmons, 509 U.S. 259, 273, 113 S.Ct. 2606, 125 L.Ed.2d 209 (1993). In Buckley, the plaintiff sought damages from prosecutors for, inter alia, allegedly “fabricating evidence during the preliminary investigation of a crime.” Id. at 261, 113 S.Ct. 2606. In holding that the prosecutors were not entitled to absolute immunity, the Court stated that a prosecutor “neither is, nor should consider himself to be, an advocate before he has probable cause to have anyone arrested.” Id. at 274, 113 S.Ct. 2606.
“[Ajetions taken as an investigator enjoy only qualified immunity.” Zahrey v. Coffey, 221 F.3d 342, 346 (2d Cir.2000). “Although all investigative activity could be considered in some sense to be ‘preparation] for the initiation of judicial proceedings,’ the Supreme Court has sought to draw a line between those preparatory steps that a prosecutor takes to be an effective advocate of a case already assembled and those investigative steps taken to gather evidence.” Smith v. Garretto, 147 F.3d 91, 94 (2d Cir.1998) (quoting Buckley, 509 U.S. at 273, 113 S.Ct. 2606). The Supreme Court “has identified ‘evaluating evidence and interviewing witnesses’ as falling on the' absolute immunity side of the line, leaving ‘searching for the clues and corroboration’ that might lead to a recommendation for an arrest on the qualified immunity side.” Id. at 94 (quoting Buckley, 509 U.S. at 273, 113 S.Ct. 2606).
Therefore, not every interview, interrogation, or other act by a prosecutor with the potential of revealing new information is an investigative act entitled to only qualified immunity. See Warney, 587 F.3d at 124 (prosecutors’ actions to deal with post-trial initiatives challenging a criminal conviction, even though they could be seen as investigative and administrative, were “also integral to the overarching advocacy function”). Good prosecutors may — usually should — perform acts reasonably characterized as investigative at all phases of a criminal proceeding. The investigative acts that are entitled to only qualified immunity are those undertaken in the phase of law enforcement that involves the gathering and piecing together of evidence for indications of criminal activities and determination of the perpetrators. Smith, 147 F.3d at 94.
In contrast, investigative acts reasonably related to decisions whether or not to begin or to carry on a particular criminal prosecution, or to defend a conviction, are shielded by absolute immunity when done by prosecutors. To be sure, as the Supreme Court cautioned in Buckley, even the presence of probable cause “does not guarantee a prosecutor absolute immunity from liability for all actions taken after-wards.” 509 U.S. at 274 n. 5, 113 S.Ct. 2606. Such acts are shielded by absolute immunity only when they are of a kind reasonably related to the ordinary func*167tions of a prosecutor with such probable cause.
Viewed through the eyes of a reasonable prosecutor, appellants’ acts in the present case were well within their legitimate functions as prosecutors. Monserrate had been arrested prior to appellants’ interview of appellee. Once the arrest took place, legal decisions at the core of the prosecutorial function — pursuit of the charges, arraignment, bail, etc. — had to be made by appellants and made quickly. The interview of appellee was clearly in a “pending or in preparation [of] a court proceeding in which the prosecutor acts as an advocate.” Wamey, 587 F.3d at 123.
Appellee was obviously an important witness with regard to the proceeding against Monserrate. That she claimed her injuries resulted from an accident hardly weighed against interviewing her. . Viewing the circumstances objectively, her claim that her injuries were the result of an accident might well cause a reasonable prosecutor to believe that interrogation was even more necessary than would have been the case in more common circumstances. A reasonable prosecutor easily could — should—have viewed a first-hand interview and personal weighing of the credibility of appellee’s self-propelled-shattering-glass story as necessary. While questioning an important witness may accurately be described as investigative, appellants’ interview was an integral part of appellants’ advocatory function as prosecutors protected by absolute immunity. See, e.g., Imbler, 424 U.S. at 430, 96 S.Ct. 984.
Because the objective circumstances triggered absolute immunity, appellee’s allegations that the interview was in furtherance of a conspiracy to “create statements that would falsely implicate [Monserrate] of a crime and falsely state comments that were allegedly made by [appellee]” are irrelevant. See, e.g., Hill, 45 F.3d at 662.
CONCLUSION ■
For the foregoing reasons, the order of the district court dated May 27, 2011, denying absolute immunity to the appellants is vacated and remanded for proceedings consistent with this opinion.
. Although appellee did not identify her "boyfriend” by name in the complaint, the district court took judicial notice that the references are to Monserrate. No party disputes the truth of that conclusion.
. We may also take notice of the fact that Monserrate was convicted of third-degree assault in connection with the incident. See People v. Monserrate, 90 A.D.3d 785, 785-86, 934 N.Y.S.2d 485, 487-88 (2d Dep't 2011), lv. denied, 18 N.Y.3d 996, 945 N.Y.S.2d 651, 968 N.E.2d 1007 (2012).
. In many cases, of course, the underlying circumstances may be in dispute. See, e.g., Grp. Health Inc. v. Blue Cross Ass'n, 793 F.2d 491, 497 (2d Cir.1986) (dismissing defendant's claim of absolute immunity on appeal where questions of fact were at issue). However, the allegations of the complaint here are sufficient to resolve the issues in this case.