The gist
Given a company's name and/or website (typically pulled from Attio), call PitchBook's search API and return the matching record so a downstream step can grab the PitchBook ID and stitch it back onto the CRM record.
The flow
- Inputs come in.
api_key,company_name,company_website— passed viainput_data(Zapier "Run Python" convention, but any host that supplies a dict works). - Pick the better signal. Website beats name for disambiguation, so use it when present; otherwise fall back to name.
- Authenticated GET to PitchBook search with the
PB-Tokenheader. - Raise on API errors — auth/network failures should fail loud so the automation surfaces them instead of writing garbage back to Attio.
- Return the JSON for the next step (parse out the ID, write it back to the company record in Attio, etc.).
Why this exists
PitchBook IDs are the join key between Attio and every PitchBook-backed enrichment. Resolving them once at the moment a company enters the CRM makes every downstream lookup deterministic.