This folder contains example code demonstrating how to use the Tomba Go client library.
Before running any example, make sure to replace ta_xxxxx and ts_xxxxx with your actual Tomba API key and secret.
client := tomba.New("your_api_key", "your_api_secret")Get your API keys at https://app.tomba.io/api-keys
cp tomba.env.example tomba.envUpdate the development environment with your TOMBA_API_KEY and TOMBA_SECRET_KEY
echo "export TOMBA_API_KEY=ta_xxxxx" >> tomba.env
echo "export TOMBA_SECRET_KEY=ts_xxxxx" >> tomba.envsource tomba.envGet information about your Tomba account.
go run account.goSearch for email addresses associated with a domain.
Basic Usage:
client.DomainSearch(tomba.Params{
"domain": "tomba.io",
})Advanced Usage with Query Parameters:
client.DomainSearch(tomba.Params{
"domain": "stripe.com", // Domain name or company name
"country": "US", // Filter by country
"limit": 50, // Number of results per page (max 100)
"page": 1, // Page number for pagination
"department": "engineering", // Filter by department
})Available department values: executive, it, finance, management, communication, marketing, sales, legal, hr, support, engineering
go run domain_search.goFind the email address of a person.
Using full_name:
client.EmailFinder(tomba.Params{
"domain": "asana.com",
"full_name": "dustin moskovitz",
})Using first_name + last_name:
client.EmailFinder(tomba.Params{
"domain": "stripe.com",
"first_name": "Patrick",
"last_name": "Collison",
})With enrich_mobile (get phone number):
client.EmailFinder(tomba.Params{
"domain": "tomba.io",
"full_name": "Mohamed Ben Rebia",
"enrich_mobile": true,
})go run email_finder.goVerify the deliverability of an email address.
Basic Usage:
client.EmailVerifier(tomba.Params{
"email": "b.mohamed@tomba.io",
})With enrich_mobile:
client.EmailVerifier(tomba.Params{
"email": "b.mohamed@tomba.io",
"enrich_mobile": true,
})go run email_verifier.goLook up person and company data based on an email.
Basic Usage:
client.Enrichment(tomba.Params{
"email": "b.mohamed@tomba.io",
})With enrich_mobile:
client.Enrichment(tomba.Params{
"email": "b.mohamed@tomba.io",
"enrich_mobile": true,
})go run enrichment.goFind email address from a LinkedIn profile URL.
Basic Usage:
client.LinkedinFinder(tomba.Params{
"url": "https://www.linkedin.com/in/alex-maccaw-ab592978",
})With enrich_mobile:
client.LinkedinFinder(tomba.Params{
"url": "https://www.linkedin.com/in/alex-maccaw-ab592978",
"enrich_mobile": true,
})With full (returns array of FinderData):
client.LinkedinFinder(tomba.Params{
"url": "https://www.linkedin.com/in/davidebarros",
"full": true,
})go run linkedin_finder.goFind the email address of the author of a blog post.
client.AuthorFinder("https://clearbit.com/blog/company-name-to-domain-api")go run author_finder.goSearch for companies using natural language queries or structured filters.
Natural Language Query:
client.SearchCompanies(&models.RevealSearchRequest{
Query: "Real Estate in France",
})Using Structured Filters:
client.SearchCompanies(&models.RevealSearchRequest{
Page: 1,
Filters: &models.RevealSearchFilters{
Company: &models.RevealCompanyFilters{
LocationCountry: &models.RevealCircularFilter{
Include: []string{"US", "UK"},
},
Industry: &models.RevealCircularFilter{
Include: []string{"Technology"},
},
Size: &models.RevealCircularFilter{
Include: []string{"101-500", "501-1000"},
},
},
},
})Available filter options:
LocationCountry- Country codes (e.g., "US", "UK", "FR")LocationCity- City namesLocationState- State/province namesIndustry- Industry sectorsSize- Company size ranges (e.g., "1-10", "11-50", "51-100", "101-500", "501-1000", "1001-5000", "5001+")Type- Company type (e.g., "Private", "Public")Keywords- Keywords to search forFounded- Year foundedTechnologies- Technologies used by the companySimilar- Similar company domainsRevenue- Revenue rangesSIC- SIC codesNAICS- NAICS codes
go run search_companies.go- count.go - Get the total number of emails for a domain
- status.go - Check if a domain is webmail or disposable
- source.go - Get email sources
- similar_domains.go - Find similar domains
- technology_check.go - Get technologies used by a domain
- phone_validator.go - Validate a phone number and get its information
- logs.go - View your API request logs
- usage.go - Check your monthly API usage
See the bulks/ folder for bulk operation examples.
For full API documentation, visit https://docs.tomba.io