Proff.no Lead Scraper [2.0] avatar

Proff.no Lead Scraper [2.0]

Under maintenance

Pricing

from $3.00 / 1,000 results

Go to Apify Store
Proff.no Lead Scraper [2.0]

Proff.no Lead Scraper [2.0]

Under maintenance

Retrieve leads on proff.no, the easy way. This actor will retrieve the business' name, address, email addresses, phone numbers and social links.

Pricing

from $3.00 / 1,000 results

Rating

5.0

(1)

Developer

slash.nu

slash.nu

Maintained by Community

Actor stats

5

Bookmarked

28

Total users

0

Monthly active users

25 days ago

Last modified

Features

Full permissions

Share

Proff.no Lead Scraper (Beta)

An Apify Actor that:

  1. Starts from one or more Proff.no bransjesøk (listing) URLs.
  2. Extracts company detail URLs (/selskap/...) from listing pages and follows pagination via ?page= up to a configurable depth.
  3. Reads company name, industry, and location hint from each detail page.
  4. Searches for the company's website using the Tavily Search API.
  5. In website_search mode, validates the selected website, then crawls a bounded number of pages for phone, address, email, and social links.
  6. In proff_only mode, returns contact fields published on the Proff profile without calling Tavily or crawling a company website; Proff publisher emails are excluded.
  7. Cleans and deduplicates emails from the selected contact source before saving the record.
  8. Reuses a per-host website crawl cache and shares in-flight crawls so companies on the same hostname do not trigger duplicate work.
  9. Uses async HTTP with concurrency limits and timeouts to scrape Proff and external sites efficiently while staying reasonably stable.

Configured for Norwegian company searches and company websites.

Access requirement: Use Proff data only with written permission. Website discovery uses Tavily's API; respect the selected company's website policies and robots.txt when crawling.


Current Data Flow

Proff supplies the company name, industry labels, and a location hint from the detail URL in both modes. website_search searches Tavily for a matching company website, rejects directories/social sites and weak name matches, then crawls the selected site for contacts. proff_only skips Tavily and returns phone, address, and non-Proff emails published on the profile; website/social fields remain "n/a" unless directly identified by the profile.

enrichment_mode defaults to website_search. Set tavily_api_key in the Actor input for that mode; it is an encrypted secret field and is never written to the dataset or logs. proff_only does not require the key. Tavily's Search API is used for one query per company.

Historical Changes (2025-11-14)

The initial release introduced Proff listing pagination and business-detail parsing. Website discovery and contact extraction now follow the selected enrichment_mode described above.


Input

{
"start_urls": [
{
"url": "https://www.proff.no/bransjesøk?q=Restauranter%20og%20kafeer&region=Østlandet&county=Innlandet"
}
],
"enrichment_mode": "website_search",
"max_depth": 1,
"max_results": 200,
"site_email_max_pages": 3,
"timeout_seconds": 30,
"concurrency": 5,
"tavily_api_key": "YOUR_TAVILY_API_KEY"
}

The API key is a secret input in Apify. The example value is only a placeholder; do not commit a real key.

Parameters

KeyTypeDefaultDescription
start_urlsarray[object]See aboveList of starting listing URLs, each object with a url field. Typically Proff bransjesøk result pages.
max_depthinteger1Maximum number of additional listing pages to follow per start URL. 0 processes only the start page.
enrichment_modestringwebsite_searchwebsite_search finds/crawls the company website; proff_only returns fields published on the Proff profile.
max_resultsinteger25Global hard cap on successfully pushed records. 0 means no result cap; pagination is still bounded by max_depth.
tavily_api_keysecret stringOptionalEncrypted Tavily Search API key. Required only in website_search mode.
site_email_max_pagesinteger3Maximum number of robots-allowed HTML pages to crawl per discovered company website for contacts.
timeout_secondsinteger30Read timeout for HTTP responses (also influences overall HTTP timeout via httpx.Timeout).
concurrencyinteger5Number of worker coroutines fetching from the Proff request queue in parallel.
headersobjectDefault headersOptional HTTP headers override. The default uses a Norwegian desktop UA and Accept-Language.
Default headers

When you do not provide headers, the actor uses:

{
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36",
"Accept-Language": "nb-NO,nb;q=0.9,no;q=0.8,sv;q=0.7,en;q=0.6"
}

You can override these if you need a different UA or language profile, but the defaults are tuned for Norway / Nordic sites.


Output

Each dataset item is a JSON object like:

{
"source_url": "https://www.proff.no/selskap/eksempel-restaurant-as/oslo/123456789/",
"name": "Eksempel Restaurant AS",
"categories": "Restauranter, Serveringssteder",
"phone": "22 00 00 00",
"address": "Eksempelveien 12, 0123 Oslo",
"website": "https://eksempelrestaurant.no",
"website_details": "ok",
"email1": "post@eksempelrestaurant.no",
"email2": "booking@eksempelrestaurant.no",
"email3": "eksempelrestaurant@gmail.com",
"social_facebook": "https://www.facebook.com/eksempelrestaurant",
"social_instagram": "https://www.instagram.com/eksempelrestaurant",
"social_linkedin": "n/a",
"social_x": "n/a",
"social_youtube": "n/a",
"social_tiktok": "n/a",
"social_pinterest": "n/a"
}

Field notes

  • source_url The company detail URL on Proff that was scraped. This is the primary identifier and is always present.

  • name Business name, usually from <h1>, og:title, or the <title> tag.

  • categories Industry labels extracted from the “Bransjer og Søkeord” section of the Proff profile.

  • phone In website_search mode, taken from the company website. In proff_only mode, taken from the Proff profile.

  • address In website_search mode, taken from the company website. In proff_only mode, taken from the Proff profile; missing values are "n/a".

  • website In website_search mode, the best matching Tavily result; in proff_only mode, a direct company website link from the profile if present. Proff/Forvalt directories and social sites are excluded.

  • website_details Status of the website check in website_search mode. It is "n/a" in proff_only mode because that mode does not fetch the site.

    • "ok" – HTTP 2xx/3xx.
    • "404" – site returns 404.
    • "unavailable" – persistent errors / non-OK status.
    • "banned" – site is in the ban list.
    • "robots_disallowed" – the website's robots.txt disallows crawling.
    • "n/a" – no website to check.
  • Emails (email1 through email5)

    • In website_search mode, emails are collected from the discovered company website and its same-host pages. In proff_only mode, emails come from the Proff profile, with @proff.no publisher addresses filtered out.
    • At least one field will be present (email1), and if no emails are found at all, email1 is set to "n/a".
    • Up to five distinct valid addresses are emitted to match the output schema.
    • Missing name, category, phone, address, website, status, email, and social values are emitted as "n/a" rather than null.
  • Social fields

    • social_facebook, social_instagram, social_linkedin, social_x, social_youtube, social_tiktok, social_pinterest.
    • Each field is either a cleaned canonical URL (tracking params removed) or "n/a" when not found.

How it works

1. Request queue setup

  • Reads start_urls from actor input.

  • For each entry with a url, enqueues a listing request with:

    • user_data = {'depth': 0, 'type': 'listing'}
    • unique_key = url for deduplication.

2. Listing handling

For each listing request:

  1. Fetches the Proff listing page.
  2. Parses HTML with BeautifulSoup.
  3. Extracts detail links:
  • <a> links with href containing "/selskap/" on the same Proff hostname.
  • Resolves relative URLs and deduplicates companies across listing pages.
  1. Enqueues detail requests for each discovered company URL:

    • user_data = {'depth': depth + 1, 'type': 'detail'}.
  2. Handles pagination:

  • Follows an explicit next-page link when present, otherwise uses Side X av Y to construct the next page URL.
  • Continues while max_results is not reached and depth < max_depth; max_results: 0 continues through available pages up to the depth limit.
  • The initial listing is depth 0; each next page increments depth.

3. Detail handling

For each detail request:

  1. Fetches the company detail page.
  2. Extracts the company name and industry labels only. The city/location hint is derived from the detail URL.
  3. Searches Tavily for the company website using the name, industry, and location.

4. Website validation & crawl

If Tavily returns a reliable company website candidate:

  1. Status check:

    • Checks robots.txt before requesting the website.
    • Performs up to two GET attempts with redirect following.
  • Marks website_details as "ok", "404", "unavailable", "robots_disallowed", or "n/a".
  1. Site crawl (when status is ok):

    • Normalizes the hostname; the bare hostname and its www form are treated as equivalent, while other subdomains are excluded from crawling.

    • Looks up a per-run cache:

    • If cached: reuse (emails, socials, phone, address) for this hostname.

    • If a crawl for this hostname is already running: await it instead of starting another.

    • If not cached:

      • Starts from the root URL.
    • Visits only robots-allowed HTML pages on the same hostname (including its www form), skipping binary extensions. * Prioritizes URLs containing contact-related keywords. * Stops after site_email_max_pages pages or when the queue empties.

    • Extracts phone, address, emails, and social links from each allowed company-site page. * Stores results in WEBSITE_CRAWL_CACHE.

  2. Contact extraction:

    • Extracts phone, address, email, and social links only from pages on the discovered company website.
    • If search finds no reliable site or robots disallows crawling, contact fields are "n/a".

The actor only reads social links from pages on the discovered company website. It does not use social links or emails from the Proff profile.

  • Parses JSON-LD sameAs arrays/strings and regular <a> tags.

  • Detects social domains using an exact/endswith match against:

    • facebook.com, instagram.com, linkedin.com, x.com, twitter.com, youtube.com, tiktok.com, pinterest.com.
  • Normalizes URLs by removing tracking parameters (utm_*, fbclid, etc.).

  • Fills the social_* fields if they exist; otherwise sets them to "n/a".

6. Contact fields

Phone, address, email, and social values come only from the discovered company's website pages. The Actor does not copy contact details from Proff or crawl third-party social profiles for emails. Missing values are emitted as "n/a".

7. Concurrency & stopping conditions

  • Multiple worker coroutines pull requests from the queue as long as stop_crawl is False.

  • max_results is enforced with a lock:

    • Detail URLs are deduplicated independently from result counting.
    • results_pushed increases only after a record is successfully saved.
  • When the successful push count reaches max_results, workers stop taking new work; any in-flight records are still checked against the cap before saving.


Debug logging

The actor writes concise, useful logs such as:

  • Enqueuing https://www.proff.no/bransjesøk?... Initial listing seeds.
  • Scraping https://www.proff.no/bransjesøk?... (depth=0, type=listing) ... Listing processing start.
  • Scraping https://www.proff.no/selskap/... (depth=1, type=detail) ... Detail processing start.
  • While crawling for contacts, skipping https://example.com/path: <error> Website crawl failures (non-fatal).
  • Website search failed for https://www.proff.no/selskap/...: <error> Search API failures are logged; the record is still saved with unavailable website/contact fields.
  • Worker N finished. Each worker’s completion summary.

Increase APIFY_LOG_LEVEL to DEBUG for more granular insights during development or troubleshooting.


Performance tips

  • Limit max_results when doing exploratory runs to keep datasets manageable and runs short.

  • Keep concurrency moderate (e.g. 5–10) when crawling many external sites; raise gradually if you have strong infrastructure/proxies.

  • Tune site_email_max_pages:

    • 1–2 for quick scans (basic contacts).
    • 3–5 for deeper email hunting.
  • Use sensible start_urls:

    • More focused Proff filters (region/county, query) mean less noise and fewer unnecessary detail pages.
  • Consider adding your own HTTP headers if you need a different language or user agent profile.


FAQ

I’m not technical. How am I supposed to use this?

  1. Find a Proff search page Go to Proff and run a bransjesøk (e.g. “Restauranter og kafeer” in a region/county). Copy the URL from your browser.

  2. Paste it into start_urls In the actor input, set:

    "start_urls": [
    { "url": "PASTE_YOUR_PROFF_URL_HERE" }
    ]

    You can add multiple listing URLs if you want to cover several regions or queries in one run.

  3. Decide how many results you want

    • For a small test, use "max_results": 50.
    • For a serious lead list, use 200–500 or leave 0 (no cap, but the run may be long).
  4. Choose how hard to search for emails

    • site_email_max_pages = 1–2 → faster, fewer emails, minimal crawling.
    • site_email_max_pages = 3–5 → slower, better chance to find contact pages.
  5. Run the actor Wait for the run to finish, then open the dataset in Apify and export as CSV/JSON/XLSX.


What counts as a “good” start_url?

Any Proff listing page that shows a list of companies with multiple pages when you scroll or paginate is fine, e.g.:

  • https://www.proff.no/bransjesøk?q=Restauranter%20og%20kafeer&region=Østlandet&county=Innlandet
  • https://www.proff.no/bransjesøk?q=barnehage&region=Hele%20Norge

Avoid linking directly to a single company detail page as a start_url; the actor handles those too, but you lose the whole “listing to many details” benefit.


Why does it sometimes return fewer records than max_results?

Common reasons:

  • The Proff listing(s) simply do not have that many companies matching your search.
  • Pagination stops when Side X av Y indicates there are no more pages.
  • Some detail pages may fail completely (rare), and the actor logs an error and moves on.

The actor guarantees not to exceed max_results, but it cannot invent records that Proff does not provide.


Why do some records only have email1 = "n/a"?

That means:

  • Tavily did not find a reliable company website, robots.txt disallowed the crawl, or the website did not publish an email in the pages visited.
  • Many businesses use contact forms or hide emails behind logins/JS widgets; those are not extracted.

You can still use the phone, address, and website fields for outreach or enrichment elsewhere.


Why are some emails freemail (gmail/outlook/etc.)?

When the website is reachable and valid:

  • The actor includes valid email addresses that the company's website publishes, including freemail addresses.

This means you will see combinations such as:

  • post@firma.no
  • navn.firma@gmail.com

The actor never falls back to email addresses shown on Proff or social profiles.


Why is the website sometimes "n/a" even though Proff shows something clickable?

The Actor discovers websites through Tavily rather than using clickable Proff links. "n/a" means:

  • Search returned no result with a sufficient company-name match.
  • Results pointed to Proff, Forvalt, a social site, or another unrelated directory.
  • The candidate site was unavailable or disallowed by robots.txt.

The Actor prefers "n/a" rather than guessing a website.


Troubleshooting

Actor exits immediately with no data

  • Check that start_urls is a non-empty array, each element an object with a non-empty url field.
  • The actor logs an error and exits if there are no valid start_urls.

Timeouts and partial data

  • Increase timeout_seconds slightly if you see frequent timeouts in logs for slower sites.
  • Reduce site_email_max_pages and/or concurrency to lighten the load.

Too many external-sites-related errors

  • Many external sites may block or throttle; this is normal at small scale.
  • If you rely heavily on site crawling, consider using a suitable proxy configuration on the Apify platform.

Roadmap / future improvements

  • Better Proff layout adaptation if/when Proff updates their DOM structure.
  • Company ID extraction from URLs for easier merging with other datasets.
  • Optional Proff organization number field (org.nr parsing).
  • Multi-country tuning for similar portals (e.g., Swedish company directories).
  • Configurable social crawl strategy (which networks to prioritize or exclude).
  • Schema validation for output with stricter types.

Supported & planned regions

RegionStatusDetailsLink
NorwayOptimizedProff.no—
SwedenPlannedAllabolag.se—

Create an issue or contact the author if you’d like a specific directory or country prioritized.


Changelog

  • 2026-10-28

    • Added Tavily website search using an encrypted secret input and company-name matching.
    • Added website_search and proff_only modes; Tavily credentials are required only for website search.
    • Added regression tests for mode-specific credential validation and Proff publisher-email filtering.
    • website_search crawls robots-allowed company pages; proff_only skips Tavily and the company-site crawl.
    • Preserved bounded pagination, result caps, and per-host contact crawl caching.
  • 2025-11-14

    • Reworked actor to target Proff.no instead of Google Maps Local results.
    • Added listing vs detail separation with Proff-specific detail link & pagination logic.
    • Implemented JSON-LD-first address extraction with Norwegian postcode awareness.
    • Hardened social extraction from JSON-LD sameAs and <a> tags with safe domain matching.
    • Introduced website crawl caching to avoid redundant crawling.
    • Enforced concurrency-safe max_results limits using async locks and shared counters.

Disclaimer & License

This Apify Actor is provided "as is", without warranty of any kind including but not limited to the warranties of merchantability, fitness for a particular purpose, and non-infringement. Please follow local laws, respect website terms of service, and do not use this code to spam or violate privacy regulations.

I will find you

Privacy & legality (Reminder): Always respect website robots.txt, terms of service, and applicable data protection laws (GDPR, etc.). Use responsibly and ethically. This Actor parses public HTML only.

© 2026 slash.nu. All rights reserved. Copying or modifying the source code is prohibited.