So you need company data—clean, up-to-date, maybe with some bells and whistles like revenue and headcount—and you want to get it out of Thecompaniesapi, fast. Maybe you’re building a sales list. Maybe you’re feeding a CRM. Either way, you want the data, not a two-hour lecture on “synergy.” This guide’s for you.
We’ll walk through the exact steps to export enriched company data from Thecompaniesapi. No fluff, no hand-waving. Just the real-world process, with a few hard-won tips and warnings about what doesn't work as advertised.
Step 1: Get Access to Thecompaniesapi
You can’t export anything if you don’t have access. Obvious, sure, but let’s run through it so you don’t get derailed later.
- Sign up: Go to the Thecompaniesapi homepage and create an account. Some features might be locked behind a paid plan—check what’s included before you get too far.
- API Key: Once you’re in, find your API key. It’s usually in your dashboard under “API access” or “credentials.” Keep this key secret. Treat it like a password.
Pro tip: If you’re just testing things out, see if there’s a free trial or sandbox environment. No sense burning through credits on your first export.
Step 2: Figure Out What “Enriched” Means for You
Thecompaniesapi claims to provide “enriched” company data. That can mean a lot of things:
- Basic info: Name, website, industry, location
- Financials: Revenue, employee count, funding
- Contacts: Decision makers, emails, phone numbers
- Extras: Tech stack, social profiles, growth signals
Before you do anything, decide what you actually need. Pulling every available field will eat up credits, slow down your export, and leave you with a messy spreadsheet. Be ruthless—99% of the time, you want just a handful of fields.
What to ignore: Don’t get distracted by “novelty data” like company logos or social media follower counts, unless you have a clear use for them. They just bloat your files.
Step 3: Build Your Query or List
How you get data out depends on what you’re starting with.
Option A: You Have a List of Companies
Say you’ve got a spreadsheet of domains or company names. Here’s what to do:
- Format your list: Make sure your data is clean—no weird characters, consistent column headers, no trailing spaces.
- Batch limits: Thecompaniesapi usually has a batch endpoint. Check the docs for how many companies you can send in one go (often 50-100). Don’t try to send 10,000 at once or you’ll hit a wall.
Option B: You Want to Search or Filter
If you don’t have a list, you can use their search or filter features:
- Filter by industry, location, size, etc.: Use parameters in the API to drill down.
- Pagination: The API probably limits how many records you get per call. Be ready to paginate and stitch results together.
Warning: API search isn’t as flexible as a Google search. Be specific, and expect to do some trial and error to get the filters right.
Step 4: Make the API Calls
You’ve got your API key and your query. Time to actually pull the data.
- Read the docs: Seriously, skim the API documentation. There are often gotchas—rate limits, required headers, unexpected error codes.
- Choose your tool: You can use:
- cURL: Good for a quick test.
- Postman: Nice for seeing responses before you write code.
- Python/JS script: Best for real exports, especially if you want to automate.
-
Example request (Python):
python import requests
API_KEY = "your_api_key" headers = {"Authorization": f"Bearer {API_KEY}"} payload = {"domains": ["example.com", "anotherco.com"]}
response = requests.post( "https://api.thecompaniesapi.com/v1/enrich", json=payload, headers=headers ) print(response.json())
Watch for:
- Rate limits: Most APIs throttle you. If you start getting errors, slow down and check headers for rate limit info.
- Errors and retries: Sometimes companies can’t be matched (typos, weird names, etc.). Log failures and retry or review later.
Step 5: Handle the Exported Data
The API will give you data in JSON format. That’s great if you’re a developer, but most people want a CSV or Excel file.
- Convert JSON to CSV: Use a Python script, online converter, or even Excel’s Power Query.
- Field mapping: Not all fields are always present. Some companies might be missing revenue (private companies, anyone?), so plan for blanks.
Pro tip:
Don’t assume every record will be perfect. You’ll get missing data, weird formatting, or outdated info—especially for smaller or international companies. Do a spot check before you hand it off to your boss or import into a CRM.
Step 6: Clean and Deduplicate
This part isn’t glamorous, but it matters.
- Deduplicate: Companies can show up more than once, especially if you search by domain and name. Use domain as your unique key if possible.
- Normalize fields: Make sure industries, locations, and other fields use consistent formats. “United States,” “USA,” and “U.S.” should all be one thing.
- Check for garbage data: Sometimes you’ll get “N/A” or placeholder values. Decide how you want to handle those—blank them out, flag them, or drop the rows.
What to ignore:
Don’t waste time perfectly formatting logos, social links, or obscure fields unless you have a real use for them. Focus on what you’ll actually use.
Step 7: Export to Your Desired Format
Once you’ve got clean, deduped data, export it to what you need:
- CSV: Plays nicely with Excel, Google Sheets, and CRMs.
- Excel: Good for sharing with less technical folks.
- Direct CRM import: If your CRM accepts bulk imports, map your fields and go for it.
Warning:
Always test with a small batch first. Nothing is more frustrating than importing 5,000 companies and realizing you mismapped the “phone number” and “website” fields.
Step 8: Automate (If Needed)
If you’ll need to do this export regularly, don’t repeat yourself:
- Write a script: Python is great for this. Save your API key, query, and export steps.
- Schedule: Use cron (Linux) or Task Scheduler (Windows) to run exports daily, weekly, or monthly.
- Handle failures: Build in simple error-handling. Log failed lookups, and maybe even send yourself an email if something breaks.
Pro tip:
Don’t try to automate everything right away. Get the manual process working first, then automate.
A Few Things That Don’t Work (or Aren’t Worth It)
- Pulling every possible field: Creates a messy file and burns API credits for no reason.
- Expecting 100% match rates: Some companies just don’t have public data, or the data is outdated. Accept it and move on.
- Chasing “real-time” enrichment: Unless you absolutely need up-to-the-minute data, batch exports work fine and are way less stressful.
Wrapping Up
Exporting enriched company data from Thecompaniesapi isn’t rocket science, but it does take a little planning and some cleanup. Don’t overcomplicate it: get the access, pull what you need (not everything), clean it up, and get on with your day. Start small, iterate, and remember—perfect is the enemy of done. Good luck!