How to Extract Publicly Listed Profile Data
Professional directories and public-facing profile pages contain publicly listed information — names, job titles, locations, and professional summaries — that businesses use for market research and lead generation.
Step-by-Step Guide
Target public directory pages only
Focus on publicly accessible directory listings — pages that appear in Google search results and require no login to view. Avoid platforms with explicit scraping restrictions.
Review terms of service
Check the target directory's terms of service before scraping. Some directories explicitly permit non-commercial data collection; others restrict it. Always comply with the platform's stated policies.
Fetch directory listing pages
Send the directory search result pages to AlterLab. Use filters to narrow results by industry, location, or job title.
Extract profile data
Parse name, title, company, and location from each profile card. Avoid extracting personal contact details not intended for public business use.
Code Example
import requests
from bs4 import BeautifulSoup
def extract_profiles(directory_url: str, api_key: str) -> list[dict]:
response = requests.post(
"https://alterlab.io/api/v1/scrape",
headers={"X-API-Key": api_key, "Content-Type": "application/json"},
json={"url": directory_url, "render_js": True},
)
html = response.json().get("html", "")
soup = BeautifulSoup(html, "html.parser")
profiles = []
for card in soup.select(".profile-card"):
profiles.append({
"name": card.select_one(".name")?.get_text(strip=True),
"title": card.select_one(".job-title")?.get_text(strip=True),
"company": card.select_one(".company")?.get_text(strip=True),
"location": card.select_one(".location")?.get_text(strip=True),
})
return profilesReplace YOUR_API_KEY with your key from the dashboard. No credit card required.
Ready to try it?
Run this tutorial on live websites with AlterLab's API. Start free — no credit card required.
Frequently Asked Questions
Responsible Use
AlterLab is designed for extracting publicly available data. Always review the terms of service for any website you access, respect robots.txt directives, and ensure your use case complies with applicable laws in your jurisdiction.
More tutorials
Browse all how-to guides for web scraping — from beginner extractions to advanced multi-page pipelines.
Your first scrape.
Sixty seconds.
$1 free balance. No credit card. No SDK.
Just a POST request.
No credit card required · Up to 5,000 free scrapes · Balance never expire