
Quoting
CCP 1161.2
1161.2. (a) The clerk may allow access to limited civil case records filed under this chapter, including the court file, index, and register of actions, only as follows:
(1) To a party to the action, including a party's attorney.
(2) To any person who provides the clerk with the names of at least one plaintiff and one defendant and the address of the premises, including the apartment or unit number, if any.
(3) To a resident of the premises who provides the clerk with the name of one of the parties or the case number and shows proof of residency. (4) To any person by order of the court, which may be granted ex parte, on a showing of good cause.
(5) Except as provided in paragraph (6), to any other person 60 days after the complaint has been filed, unless a defendant prevails in the action within 60 days of the filing of the complaint, in which case the clerk may not allow access to any court records in the action, except as provided in paragraphs (1) to (4), inclusive.
(6) In the case of a complaint involving residential property based on Section 1161a as indicated in the caption of the complaint, as required in subdivision (c) of Section 1166, to any other person, if 60 days have elapsed since the complaint was filed with the court, and, as of that date, judgment against all defendants has been entered for the plaintiff, after a trial. If judgment is not entered under the conditions described in this paragraph, the clerk shall not allow access to any court records in the action, except as provided in paragraphs (1) to (4), inclusive.