# Find Contacts' Phone Numbers from Website

## **Use case**

Find phone numbers of CRM contacts on their company website

<details>

<summary><strong>Prompt</strong></summary>

Goal → return the **direct mobile number** for <mark style="color:red;background-color:orange;">**Contact**</mark>

If none is found, output exactly:

"No direct mobile phone found for <mark style="color:red;background-color:orange;">**Contact**</mark>"

**STEPS (follow in order)**

**1. Search the website**&#x20;

a. **Derive domain** → take everything after “@” in <mark style="color:red;background-color:orange;">**Email**</mark> to derive the {domain}

Root URL = https\://{domain}

b. **Locate profile pages** → crawl or query for URLs containing

team, people, about, staff, leadership, partners, contact, vcard.

Limit crawl depth to 2 and max 3 pages.

c. **Match the person** → fuzzy-match <mark style="color:red;background-color:orange;">**Contact**</mark> (ignore case, middle initials).

If several matches, prefer one whose surrounding text:

• contains a loose match to <mark style="color:red;background-color:orange;">**Title**</mark>, **or**

• shows an email local-part that matches before “@”.

d. **Extract mobiles** → within ± 30 lines of the name, grab numbers that match the same mobile regex above; prioritise ones beginning 07 or +44 7

e. **Pick the closest** to the name

**2. Validate & Return**&#x20;

• Return **only** the phone number string (no labels, no extra text).

• If nothing found after step 2e, output the fallback line verbatim.

</details>

<figure><img src="https://2426440268-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMzaYbOuCLt8zV0pNIILp%2Fuploads%2F0hBh2cTmoKHr5dvDG66m%2Fimage.png?alt=media&#x26;token=c9a64b97-5cb0-4d2d-b5db-d6f5e7810fee" alt=""><figcaption></figcaption></figure>

<figure><img src="https://2426440268-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMzaYbOuCLt8zV0pNIILp%2Fuploads%2F8o5mI20ksdKqyhjSRYeI%2Fimage.png?alt=media&#x26;token=47e8b874-e037-4c6d-b049-1b77a4a44fb8" alt=""><figcaption></figcaption></figure>
