Lee Foot

eCommerce Link Builder

Find stockist pages for the brands you sell by searching Google for "[Brand] Stockists".

View the source

#about

Finds manufacturer stockist pages for the brands you sell, as link opportunities.

A script searches Google for "[Brand Name] Stockists" through the DataForSEO SERP API and keeps only the position 1 organic result.

It works in two steps: send queues one search per brand (estimated at $0.0006 each), and collect fetches them, which can take 25 minutes or more.

Homepages and duplicate URLs are removed, and no other relevance check is made.

Searches default to the UK.

Platform
Python script (requires Python 3.x)
Input
Brand names listDataForSEO login and password
Output
CSV with stockist page opportunities

Use cases

  • Finding manufacturer pages that list authorised stockists
  • Getting listed on "Where to buy" pages
  • B2B link building for distributors and resellers
  • Building relationships with brand manufacturers

#features

  • DataForSEO SERP API, Standard queue (send now, collect later)
  • Position 1 filtering (top result only)
  • URL depth calculation to exclude homepages
  • Any country and language via location and language code constants
  • Configurable 'Stockists' query suffix
  • Estimated API cost printed before sending, with a confirmation prompt
  • collect --wait checks every 60 seconds until every search is done (up to 90 minutes)
  • Deduplicates results by URL

#how-to-use

  1. Create brands.txt with brand names you stock (one per line)
  2. Set DataForSEO credentials via environment variables or the script constants
  3. Set the location and language code constants if needed
  4. Run send to queue a '[Brand] Stockists' search for each brand; it saves a job file
  5. About 30 minutes later, run collect (or collect --wait) to fetch the results
  6. Review filtered results (position 1, non-homepage URLs, deduplicated)
  7. Results save automatically to brand_links_output.csv (query, URL, title, description)

#faq

Why does it take two steps?
Google now routes result links through google.com/goto, and DataForSEO's instant (Live) requests leave many of them unresolved, so the real URL and domain are missing. Its Standard queue resolves them, but a search can take 25 minutes or more. So the tool sends the searches and gives you a job file, and you collect the results from that file later. DataForSEO keeps finished searches for 30 days.
Why do some of my brands return no results at all?
Two filters remove results silently. Only the position 1 organic result for each '[Brand] Stockists' search is kept, so a stockist page ranking second yields nothing for that brand. Any URL with a depth of exactly 2 slashes (a bare homepage such as https://brand.com) is also removed, so if the top result is the brand's homepage the brand disappears from the output. Duplicated URLs across brands are then deduplicated, keeping the first. A top result that DataForSEO returns as an unresolved google.com/goto link is also left out, and the script prints how many there were.
What does it cost to run?
The script uses the paid DataForSEO SERP API (Standard queue) and sends one search per brand in brands.txt, so cost scales with the number of brands. send prints an estimated cost ($0.0006 per brand) and asks you to confirm before anything is sent (--yes skips the prompt). Collecting the results costs nothing.
How do I set it up and change the target country?
Credentials come from the DATAFORSEO_LOGIN and DATAFORSEO_PASSWORD environment variables, or the matching constants at the top of the script (they ship as placeholders). Put one brand per line in a brands.txt file in the same folder. Country and language are set via the LOCATION_CODE and LANGUAGE_CODE constants; UK (2826) and US (2840) codes are included, and any DataForSEO location code works. The 'Stockists' suffix is also a constant (STOCKISTS_SUFFIX) so you can switch to 'Dealers', 'Where to buy' and so on.
Why is a non-stockist page in my results?
The script trusts Google's top result for the query and applies no content check, so any page that happens to rank 1 for '[Brand] Stockists' gets through as long as it is not a homepage. Results with a missing URL, title or description are dropped, but relevance still needs a manual review pass of the output CSV (brand_links_output.csv, UTF-8 with BOM).

/contact

Want me to run this for you? I run this tool as a managed service, or build something custom around your data. You get the insights without touching the code.