Blog

Enrich Company Records with a Web Search API

By Kartey R

Founder of Serpex

Updated 7 min read
Technology

Most company records arrive half empty: a name, maybe an email domain, maybe a city. A web search API fills the gaps that a static database can't, because it reads the web as it is today. One query per missing field is usually enough to find a company's official website, its social profile URLs, recent news and funding announcements. The part that takes care is checking each answer against what you already know before you write it to the record.

This post covers which fields search is good for, the query patterns that work, how to verify a match, and what it costs per record. The examples use Serpex, a web search API that returns up to 10 results per query and, on request, the top pages as Markdown in the same call, so you can confirm a funding amount without a second fetch. New accounts get 200 free credits with no card. The method works with any search API that returns URLs and snippets.

What search can fill, and how to check it

FieldQuery patternHow to confirm the match
Official website"Acme Robotics" official websiteThe result's domain matches the email domain on the record, or the company name appears in the page title
Social profilessite:x.com "Acme Robotics", site:github.com "Acme Robotics"The official website links to the same profile
Recent news"Acme Robotics" announcesThe page names the company and its city or domain, not just a similar name
Funding mentions"Acme Robotics" raises or "Acme Robotics" Series AThe amount and round appear in the page text, not only in the snippet
Hiringsite:acme-robotics.com careersThe page is on the company's own domain

Two habits make this work. Quote the company name, so the search doesn't match "Acme" and "Robotics" separately. And once you know the official domain, use it in later queries, because a domain is far less ambiguous than a name.

For news and funding, narrow the dates in the query with after: and before: ("Acme Robotics" raises after:2026-01-01), and still check the date on the page itself.

The request

A search is one POST. This is the cURL example from our Search API reference with the query changed:

bash
curl -X POST https://api.serpex.dev/api/search \
-H "Authorization: Bearer sk_your_api_key" \
-H "Content-Type: application/json" \
-d '{"q": "\"Acme Robotics\" official website"}'

For funding and news, where the snippet alone isn't proof, add "include_content": true and "content_results": 5. The API then fetches the top 5 result pages and returns their text as markdown in the same response.

The response

This is the response example from the same reference page, trimmed to the fields that matter here. Its query is a generic one, but the shape is what you'll parse:

json
{
"id": "3f6c2a9e-8b1d-4c57-9f0a-2d4e6b8c1a73",
"query": "best JavaScript frameworks 2025",
"results": [
{
"title": "Top JavaScript Frameworks in 2025",
"url": "https://example.com/js-frameworks",
"snippet": "React, Vue, and Svelte remain the top choices for JavaScript developers...",
"position": 1,
"content": "# Top JavaScript Frameworks in 2025\n\nReact, Vue, and Svelte remain the top choices for JavaScript developers heading into 2025..."
},
{
"title": "2025 Frontend Framework Comparison",
"url": "https://example.com/frontend-comparison",
"snippet": "A deep dive into performance and DX across the major frameworks...",
"position": 2,
"content_error": "blocked"
}
],
"metadata": {
"number_of_results": 10,
"credits_used": 3,
"from_cache": false,
"status": "success",
"content_requested": 5,
"content_delivered": 4
}
}

For enrichment, four fields matter:

  • url is the candidate value for website and social fields, and the source you store for everything else.
  • snippet is often enough to reject a wrong company quickly.
  • content is the page as markdown, present only when you asked for it and the fetch worked. That's where you confirm a funding amount or a date.
  • content_error replaces content when a page couldn't be fetched, for example blocked, timeout or a page that robots.txt disallows. A result carries one or the other, never both.

A small enrichment step in Python

This finds the official website for a record and only accepts a result whose domain matches the email domain you already have. It uses the Python SDK.

python
import os
from urllib.parse import urlparse
from serpex import SerpexClient
client = SerpexClient(os.environ["SERPEX_API_KEY"])
def host(url: str) -> str:
h = urlparse(url).netloc.lower()
return h[4:] if h.startswith("www.") else h
def find_website(company: str, email_domain: str):
response = client.search({"q": f'"{company}" official website'})
for r in response.results:
h = host(r.url)
if h == email_domain or h.endswith("." + email_domain):
return {"website": f"https://{h}", "source": r.url}
return None
record = {"name": "Acme Robotics", "email_domain": "acme-robotics.com"}
match = find_website(record["name"], record["email_domain"])

If nothing matches, the function returns None and the field stays empty. That's the right outcome. A wrong website is worse than a missing one, because everything you look up next is keyed on it.

For funding, run the search with include_content, then look for the company name and an amount in r.content rather than in the snippet. Keep the URL of the page you read as the source.

Rules that keep enriched data clean

  1. Store a source and a date with every field. The URL you read it from and the day you checked. When someone asks where a number came from, you can answer, and you know when it's due a recheck.
  2. Don't overwrite what a person typed. Write search results to a separate candidate field, and promote them only when they pass your checks or a person approves them.
  3. Match on two things, not one. Name plus domain, or name plus city. Plenty of companies share a name.
  4. Treat directories and news pages as leads, not answers. A directory page that mentions the company isn't its website. Follow it to the company's own domain.
  5. Leave blocked pages alone. Content fetching honours robots.txt, and a disallowed page comes back as content_error instead of text. Don't route around it.

What it costs per record

Say you run four searches per record: website, social profiles, and news as plain searches, and funding with page content for the top 5 results. On Serpex that's 1 + 1 + 1 + 3 = 6 credits per record.

RecordsCreditsAt $0.80 per 1,000 (Starter)At $0.65 (Standard)At $0.50 (Scale)
1,0006,000$4.80$3.90$3.00
10,00060,000$48.00$39.00$30.00
100,000600,000$480.00$390.00$300.00

A few billing rules bring the real number down. The content search is billed on pages actually delivered, and costs 1 credit if none come back. Errors are never charged. A search that returns nothing is free unless it's confirmed as genuinely empty. And repeating the same request from your organization within 5 minutes costs 0, so a retry inside that window doesn't double the bill. Prices checked on our pricing page on 3 October 2026, and new accounts get 200 free credits with no card.

When search is the wrong tool

Search is good at the long tail and at fresh facts: the startup no database has caught yet, last week's funding round, a new careers page. It's a poor way to fill the same fifty fields for a million companies. At that scale a company dataset is usually the better buy, and search is better used to check and update the records that matter most.

If what you need is the exact Google results page for a company name, with ads and rankings, that's a SERP API's job. SerpApi vs Serper vs DataForSEO compares the three main ones, and Search API Pricing in 2026 has the wider price table.

FAQ

How many searches does one record need?

Usually one per missing field. Start with the website, because once you have the domain every later query gets more precise.

Can I use site: in a query?

Yes. site:example.com restricts results to one domain, which is how you find a careers page or check a social profile handle.

Should I trust the snippet?

For rejecting a wrong match, yes. For a number such as a funding amount, read the page text with include_content and store the URL of the page you read.

Does this work from no-code tools?

Yes. Any tool that can send an HTTP POST with a header can call the API. There's a walkthrough for web search in n8n, and the same request works from other automation tools that can make HTTP calls.

Try Serpex

Sign up for 200 free credits, no card required, and run the website step on a sample of your own records. The docs cover the Search API and the Python SDK, and pricing has the per-1,000 rates used in the cost table above, with credits that never expire.

Serpex Blog

Related Articles

More content you might be interested in

Oct 24, 2026 · 8 min read

Vibe Coding Web Search: Add a Search API With Cursor, Claude Code or Lovable

Add web search to an app you build with AI, no coding needed: get a key, give your agent the docs, keep the key server-side. Cursor, Claude Code, Lovable.

Technology
Read More
Oct 24, 2026 · 14 min read

Search APIs for Enterprise AI (2026): Security, Rate Limits and Cost at Scale

Questions to ask before signing a search API contract for enterprise AI: security, retention, SLAs, rate limits, billing, and cost at 1M-10M searches.

Technology
Read More
Oct 23, 2026 · 15 min read

PHP2Shell vs the Knowledge Cutoff: CVE-2026-109618, Tested Oct 2026

Only 3 of 36 top-3 search results for PHP2Shell came from the PHP project. We built a 91-line agent that checks CVE-2026-109618 against primary sources.

Technology
Read More
Oct 19, 2026 · 19 min read

Which Search API Is Cheapest at 100k, 1M and 10M Searches a Month? (Prices Checked October 2026)

Search API costs at 100k, 1M and 10M searches a month, checked Oct 23, 2026. Lowest list: $0.20/1k. Serpex: $0.50-$0.80, from $0.20 at 10M+.

Technology
Read More
Oct 19, 2026 · 8 min read

How to Add Web Search to an AI Workflow or RAG Pipeline (Python, 2026)

How to add web search to an AI workflow or RAG pipeline in Python (2026): one call returns pages as Markdown to chunk, rank and cite, with real monthly costs.

Technology
Read More
Oct 19, 2026 · 8 min read

Tavily Pricing in 2026: What 10k, 100k and 1M Searches Cost

Tavily pricing in 2026: $8 per 1,000 credits pay as you go, $5 on Growth. Monthly cost at 10k, 100k and 1M searches, advanced depth, Extract and alternatives.

Technology
Read More
Oct 19, 2026 · 8 min read

Serper vs Tavily (2026): Pricing, Output and Which to Use

Serper vs Tavily in 2026: Serper costs $0.30 to $1.00 per 1,000 searches, Tavily $5 to $8. Free tiers, output, page content, LangChain support and which to use.

Technology
Read More
Oct 19, 2026 · 8 min read

Google Custom Search API Is Closing: What to Use by January 1, 2027

The Google Custom Search JSON API is closed to new users and existing ones must move by January 1, 2027. Replacements and 2026 costs at 10k and 100k searches.

Technology
Read More
Oct 3, 2026 · 7 min read

Web Search in n8n: HTTP Request, AI Agent or Community Node

Add web search to an n8n workflow with the HTTP Request node, use it as an AI Agent tool with $fromAI(), or install the n8n-nodes-serpex community node.

Technology
Read More