Skip to main content

Examples

We’ve provided code samples in Python, cURL, Ruby, Go and JavaScript. If you aren’t comfortable working in any of these languages, feel free to use this handy tool to convert code from cURL to the language of your choice.
Heads Up! Credit UsageCompany Search API calls cost the number of total search results returned.If you are making a search that could have a large number of results, make sure to use the size parameter to set the maximum number of results and cap your credit usage.
We want your feedback!Do you see a bug? Is there an example you’d like to see that’s not listed here?Head over to the public roadmap and submit a bug ticket or a feature request and receive automatic notifications as your bug is resolved or your request is implemented.

Basic Usage

“I want to make a query and save the results to a file.”

Using POST Requests

“I would like to use POST requests to query instead of GET requests so that I can make queries with a lot of parameters.”
Difference Between GET and POST RequestsSee this article for a comparison of the differences between GET and POST requests. The biggest difference is that POST requests don’t have any limit on the amount of data that you can pass in a request.

Company Search by Tags

“I want to find US-based companies tagged as ‘big data’ in the financial services industry.”

Sales and Marketing

“I want to find companies offering account-based marketing services in the United States.”

Investment Research

“I want to find 100 small biotech companies headquartered in the San Francisco area with under 50 employees .”

Bulk Retrieval

“I want to find all automotive companies in the Detroit area and save them to a CSV file.”
High Credit Usage Code BelowThe code example below illustrates retrieving all the company profiles in a metro area and is meant primarily for demonstrating the use of the scroll_token parameter when requesting large amounts of records. As a result, this code is mostly illustrative in meaning. It further can expend a lot of credits and doesn’t have any error handling. The MAX_NUM_RECORDS_LIMIT parameter in the example sets the maximum number of profiles that you will retrieve (and the maximum number of credits that you will expend), so please set that accordingly when testing this example.

Affiliate Lookup

(search by affiliated companies) “I want to find all companies that are affiliated with Amazon (whose Company ID is hWBI7x4FvSurVNWDXD4uFgQt5ges).”