Hey Guys, can some help me building a complex table?
Sure, happy to help. Can you share what you’re trying to build? We’ll walk you through it.
Build a state-specific OpenCorporates scraper for statutory agent addresses. The input will be "company name" + "possible state they operate in". They output needs to be the "statutory agent name" and "statutory mailing address".
this
Hey! Set up your Clay table first 1. Add a State column and list the two-letter abbreviations (CA, NY, etc.). 2. Add a Jurisdiction Code column and run an AI Formula: Return "us_" + LOWER(/State/) This converts each state to its OpenCorporates jurisdiction code (CA → us_ca). Scrape OpenCorporates for the statutory agent 1. Pick the jurisdiction — read it from the Jurisdiction Code column. 2. Search the company GET https://api.opencorporates.com/companies/{jurisdiction_code}?q={company_name} Filter for the best name match. 3. Fetch the company record • Grab company_number from the match. GET https://api.opencorporates.com/companies/{jurisdiction_code}/{company_number} 4. Extract the agent details from the JSON: • registered_agent_name • registered_address (or registered_address_in_full) 5. Handle multiple possible states — loop through your list and stop at the first state that returns a match. 6. Output two fields in Clay: • Statutory Agent Name • Statutory Mailing Address That’s it—generate the jurisdiction codes, run the API calls, and capture the two required fields. Let me know if you have more questions.
can you share a clay table link?
im getting error 401
Hi, I can’t share a Clay table link, but you can create your own table in Clay and add the setup there. If you’re still getting a 401 error, check the API docs to confirm your authentication details. If it continues to fail, share the setup so we can see what might be causing the issue. Let me know if you have more questions.