Skip to main content
People Data Labs (PDL) v5 search takes an Elasticsearch query or a SQL statement. CompanyEnrich V2 search takes a filter object. This page shows how to rewrite common PDL queries and which ones have no equivalent. There is no automatic translator. A query language allows combinations that a filter object cannot express, and a translation that silently drops part of a query would return, and charge for, the wrong records. Rewrite each query by hand and check it with the free count endpoint.

How the two search models differ

Translate a query in four steps

1

Split the query into conditions

List each term, terms, range, and exists clause, or each condition in the SQL WHERE. Note any should or OR: an OR across different fields needs one search per branch.
2

Map each condition

Find the pattern in the tables below. Convert values with the value translations, and look up IDs and codes with the free geo, industry, keyword, and position endpoints.
3

Count it for free

Send the filter to the company or people count endpoint. Compare total with PDL’s total for the original query. A large gap usually means a condition was dropped or a value was not converted.
4

Fetch one page

Run the search with a small pageSize and check the records against what you expect. An empty search still costs one result’s base price.
For example, this PDL query:
becomes this CompanyEnrich search:

Company search patterns

People search patterns

Person filters such as domain, position, seniority, and department match the person’s current job. Conditions on the employer, such as its size or industry, go in a company query, which takes the company search filters.

Queries that do not translate

  • OR across different fields. Run one search per branch and deduplicate the results by id. Each search is charged separately.
  • Wildcards, prefixes, and suffixes on fields other than names and domains. query matches company names, keywords, and domain prefixes.
  • exists on any field. The require filter covers 13 company features. People search has no require.
  • Person locations below country level, and any filter on emails, phones, skills, or salary.
  • The PDL dataset parameter.

Totals and pagination

Search responses do not include a total. The free count endpoints return total, the number of matching records, and count, the number your plan lets you retrieve. Pages hold 1 to 100 results, set with pageSize. Pass the nextCursor of one page as cursor to get the next, until nextCursor is omitted. A cursor expires 24 hours after the first page. PDL scroll tokens do not carry over.

When a description works better than filters

A PDL match query on summary or tags searches text. In CompanyEnrich, describe the companies in a semantic search instead:
Semantic search ranks results by meaning and reports the filters it inferred in interpretation. It costs 2 credits per company returned instead of 1. To find companies like ones you already know, use a lookalike search, which costs 5 per company.

Migration overview

Endpoint mapping, request and response differences, and the parity check.

Field mapping

Every field, with value translations.

Company Search API filters

Every company filter and its matching rules.

People Search API filters

Every people filter and the company query.