Learn how to generate a ready-to-use API request directly from a search you build in Tables.
Instead of writing your first API request from scratch, you can build and validate your search in Tables, then copy the matching API request in your preferred language. This lets you confirm that your search returns the right results before you write a single line of code.
This makes it easier to:
- Build complex searches using filters and signals.
- Verify that your search returns the expected results before writing code.
- Skip manually constructing API request payloads.
- Start from a working request in cURL, Python, or TypeScript.
In this article, you'll learn how to build a search in Tables, generate the matching API request in cURL, Python, or TypeScript, and copy it into your workflow.
Make sure you have the following:
- An active Lusha account with API access.
- An API key — copy it from your API Dashboard.
💡 Note: API access is required to use the Get API Request feature. If you don't see this option, check with your account Admin.
Available on all plans.
- Open Workspace from the left navigation by pressing + New table.
- Use AI search or the Filter panel on the left to build your search. You can filter by location, industry, job title, signals, and more.
- Review the results in the table. Adjust your filters until the contacts or companies shown match what you're looking for.
💡 Note: The table view lets you validate your search results visually — exactly what the API will return — before you run any code.
Once your search is ready, click Get API Request at the top of the page.
Choose your preferred language from the options:
- cURL
- Python
- TypeScript
The generated request updates automatically to match your current search.
💡 Note: The Get API Request panel stays in sync with your filters. If you change your search, the request updates to reflect it — no need to regenerate manually.
- Click Copy to copy the generated request to your clipboard.
- Paste it into your preferred development environment, script, or API client.
- If your account has an API key, Copy automatically pastes the request with your real, unmasked key already in place — it's ready to run as-is. If your account has no API key, the request keeps the
LUSHA_API_KEYplaceholder; replace it with your own key before running.
💡 Note: The on-screen preview always shows your key masked (prefix + bullets), even though Copy pastes the full key. If the key is still loading, Copy stays available and pastes the placeholder until the secret is ready.
⚠️ Important: Keep your API key private. Since Copy now includes your real key, avoid pasting the copied request into public repositories, shared docs, screenshots, or client-side code.
Once you run the request, you'll receive the same results you validated in Tables — formatted as a JSON response. Use this as the starting point for your integration instead of building the request body manually.
You're all set! Now you can build and validate API searches in Tables before writing a single line of code.
Related articles: