Pre-Black Friday: 20% off, for as long as you stayEARLYBFon Solo and AgencyEnds Nov 28Start free

How-to guide

How to Find a LinkedIn URL From a Website (5 Methods + Step-by-Step Extraction)

Five routes from a domain to a LinkedIn company page or a person's profile. Each one is a command you can run.

Get your free API key →Free to start. No credit card. 1,000 records to spend whenever you like.

You can get a LinkedIn URL from a website in five ways: read the page, scrape the page, parse its structured data, look the domain up in an API, or search people at that domain. The first three are free but only find what the site publishes. The last two work when the site says nothing.

"LinkedIn URL" means two things here. A company page looks like linkedin.com/company/acme. A person's profile looks like linkedin.com/in/jane-doe. Methods 1 to 4 find the company page. Method 5 finds people.

TL;DR

  • Free methods (read, scrape, JSON-LD) take a minute per site and only work if the site links its LinkedIn page.
  • The API methods work from the domain alone. A company lookup costs 1 record. A people pull costs 1 record per person returned.
  • The full walkthrough on one domain takes about 15 minutes and spends about 6 records. The Free plan has 1,000, for life.

Prerequisites

  • curl, jq and grep. Python 3 for the optional script in Step 3.
  • A LeadOcean API key in $LEADOCEAN_API_KEY. Get one free at app.leadocean.io. No card.
  • A target domain. The examples use acme.com as a placeholder.

Step 1: Read the page

Open the site and check the footer and the contact page first. Most companies link their LinkedIn page there as a small icon. Hover the icon and read the URL.

From a terminal, the same check is one command. This pulls every link on the homepage that points to LinkedIn.

bash
curl -sL https://acme.com \
  | grep -oE 'https?://([a-z]{2,3}\.)?linkedin\.com/(company|in|school)/[^"'"'"' <>?#]+' \
  | sort -u

Expected output is one or more URLs, or nothing. Nothing means the link is injected by JavaScript, sits on another page, or does not exist. Move to Step 2.

Step 2: Crawl a few likely pages

Footers repeat across the site, but some sites only show social links on /about, /contact or /team. Run the same pattern over those pages.

bash
for p in "" /about /contact /team /company; do
  curl -sL "https://acme.com$p" \
    | grep -oE 'https?://([a-z]{2,3}\.)?linkedin\.com/(company|in|school)/[^"'"'"' <>?#]+'
done | sort | uniq -c | sort -rn

The count column helps. A company URL that appears on every page is the company page. Profile URLs on /team are people the site chose to show.

Two limits. Pages rendered in the browser by JavaScript return an empty shell to curl. And a share link such as linkedin.com/sharing/share-offsite is not a profile, so filter to /company/, /in/ and /school/ as above.

Step 3: Parse structured data

Many sites describe themselves in JSON-LD, a script tag of type application/ld+json. The sameAs list in an Organization block often holds the LinkedIn page.

bash
curl -sL https://acme.com \
  | python3 -c '
import sys, re, json
html = sys.stdin.read()
for block in re.findall(r"<script[^>]*ld\+json[^>]*>(.*?)</script>", html, re.S):
    try:
        data = json.loads(block)
    except ValueError:
        continue
    for item in (data if isinstance(data, list) else [data]):
        for url in item.get("sameAs", []) if isinstance(item, dict) else []:
            if "linkedin.com" in url:
                print(url)
'

This is the cleanest free method because the URL is declared, not guessed from a link. It still depends on the site publishing it.

Step 4: Look the domain up with the company API

When the site publishes nothing, ask a database. POST /v1/companies/enrich takes a domain and returns the company record, including its social links. A hit costs 1 record. A miss is a 404 and costs nothing.

bash
curl -s -X POST https://api.leadocean.io/v1/companies/enrich \
  -H "x-api-key: $LEADOCEAN_API_KEY" \
  -H "content-type: application/json" \
  -d '{"domain":"acme.com"}' \
  | jq '.data.company_data.company_social_links.linkedin.url'

For a list, loop over a file of domains and skip 404s. Keep to your plan's rate limit: 5 requests a second on Free, 200 on Agency.

bash
while read -r d; do
  url=$(curl -s -X POST https://api.leadocean.io/v1/companies/enrich \
    -H "x-api-key: $LEADOCEAN_API_KEY" -H "content-type: application/json" \
    -d "{\"domain\":\"$d\"}" | jq -r '.data.company_data.company_social_links.linkedin.url // empty')
  echo "$d,$url"
  sleep 0.25
done < domains.txt > domain_to_linkedin.csv

From an AI agent, the same lookup is the leadocean_get_company MCP tool with a domain. Try the prompt "Look up acme.com and give me its LinkedIn company page."

Step 5: Find people at the domain

A company page is rarely the goal. Usually you want the people. POST /v1/people/search takes a flat JSON body with the domain filter, and each row carries profile_data.profile_url.

Size the list first. The count is free: send count=true as a query parameter with limit 1.

bash
curl -s -X POST "https://api.leadocean.io/v1/people/search?count=true" \
  -H "x-api-key: $LEADOCEAN_API_KEY" \
  -H "content-type: application/json" \
  -d '{"domain":["acme.com"],"jobLevel":["C-Team"],"limit":1}' \
  | jq '.meta | {total, countOnly}'

Then pull a small page and keep only the URL and the name. Five rows cost 5 records.

bash
curl -s -X POST https://api.leadocean.io/v1/people/search \
  -H "x-api-key: $LEADOCEAN_API_KEY" \
  -H "content-type: application/json" \
  -d '{"domain":["acme.com"],"jobLevel":["C-Team"],"limit":5}' \
  | jq -r '.data[] | [.profile_data.profile_full_name, .profile_data.profile_url] | @csv'

For the whole roster at one domain, GET /v1/companies/{domain}/people pages by cursor and stops at 10,000 rows. About one person in five has no LinkedIn URL on file, so expect some blank cells. Those rows still carry a person_id, which POST /v1/people/enrich accepts. Next steps: find an email from a LinkedIn profile or find key decision makers from just a website URL.

What you get

The count below is a live run of the free leadocean_count_leads MCP tool on 2026-10-21, with domain set to the placeholder acme.com and jobLevel set to C-Team. It spent 0 records.

json
{
  "total": 7,
  "totalIsExact": true,
  "totalAll": 160,
  "distinctCompanies": 2,
  "credits": 0
}

total counts only people with a mailable email (verified, catch_all_valid or catch_all), which is the tool's default. totalAll is the same filters with no email condition. The mailable count is the smaller one, so a LinkedIn-only list is larger than total suggests. distinctCompanies is 2: the matched people span two employer records, so check the company name on each row.

A search row, as response shape from the API reference, with placeholder values:

json
{
  "success": true,
  "data": [
    {
      "profile_data": {
        "profile_full_name": "Jane Doe",
        "profile_headline": "Chief Executive Officer at Acme",
        "profile_url": "https://www.linkedin.com/in/jane-doe"
      },
      "contact_data": { "has_email": true, "email_status": "verified" }
    }
  ],
  "meta": { "credits": 5, "limit": 5 }
}

Troubleshooting

ErrorCauseFix
Steps 1 to 3 print nothingThe site renders links with JavaScript, or does not link LinkedInGo to Step 4. Do not scrape harder.
401Missing or wrong x-api-keyCheck echo $LEADOCEAN_API_KEY and that the key has the search and enrich scopes.
404 on company enrichNo company on file for that domainCosts nothing. Try the bare domain without www. or a subdomain.
429Requests above the plan's rate limit (5 a second on Free, 200 on Agency)Honor Retry-After, or add a sleep as in Step 4.
402The 1,000 free records are spentUpgrade on pricing. Counts and 404s stay free.
Search returns 0 rowsEnum value typed wrong, for example c-team instead of C-TeamRun leadocean_list_enum_values or GET /v1/enums and copy the exact string.

FAQ

Which method should I start with?

Start with Step 3 and Step 1, because they are free and exact when they work. Use Step 4 for anything they miss. Use Step 5 only when you need people.

Can I find a LinkedIn URL from a company name instead?

Company enrich has no name lookup. It takes a domain or a LinkedIn URL. For a name, use company search to find the domain, then run Step 4. The reverse direction is covered in find lookalike profiles from any LinkedIn URL.

Is scraping LinkedIn pages part of this?

No. Every method here reads the company's own website or LeadOcean's database. None of them loads LinkedIn.

Does a company lookup cost a record if it finds nothing?

No. A 404 is free. A hit costs 1 record. Counts, the filter list and the enum list are also free.

For pricing by plan, see pricing. More recipes live in the blog hub.

Turn a domain list into LinkedIn URLs, free

Free to start. No credit card. 1,000 records to spend whenever you like.

Get your free API key →