The Company postcode (company_postcode) filter enables you to narrow your results to a specific postcode level.

Search modes

Exact match

Use this option if you are searching companies located at a specific postcode. To perform an exact match search, use equals in the relation parameter.

The following example shows how to search for any company that is located at postcode "94123":

{
  "attribute": "company_postcode",
  "relation": "equals",
  "value": "94123"
}

Multiple exact match

If you want to perform an exact match search for multiple postcodes simultaneously, input the postcodes you are interested in as an array and change the relation to in.

In the example below, the API will return results where any of the companies in our database have an address registered under any of the postcodes "94123", "99950", or "36925".

{
  "attribute": "company_postcode",
  "relation": "in",
  "value": ["94123", "99950", "36925"]
}

Exclude postcodes

You can also use the relation parameter to filter out specific postcodes from the search. You have two options: use not_equals to exclude a single postcode, or not_in to exclude a list of postcodes.

In the provided example, the postcodes listed in the value parameter ("94123", "99950", and "36925") will be excluded from the search.

{
  "attribute": "company_postcode",
  "relation": "not_in",
  "value": ["94123", "99950", "36925"]
}

Strictness level

📘

Note

By default, the Company postcode filter will only search the company's main location ( default strictness: 1).

You can extend or refine your search to include a company's secondary location postcodes by providing a strictness parameter for the postcode filter:

  • strictness: 1 - searches the postcode only for the main location of the companies.
  • strictness: 2 - searches the postcode only for the secondary locations of the companies.
  • strictness: 3 - includes both the main and secondary locations of the companies in the postcode search.

For example, the following filter will return all the companies that have their secondary location ("strictness": 2) in the "94123" postcode:

{
  "attribute": "company_postcode",
  "relation": "equals",
  "value": "94123",
  "strictness": 2
}

📖

Reference

To view all available filter relations and accepted types, please check the Filter Relations section.