Understanding API Keys
A simple guide to what API keys are and how they work with Link Health Monitor
What Are API Keys?
Think of an API key like a special password that lets your apps and tools talk to Link Health Monitor automatically. Instead of logging in through your browser each time, your code can use an API key to access your account programmatically.
In simple terms: An API key is a secure way for your software to say "I'm authorized to access this account" without you having to manually log in every time.
Why Use API Keys?
API keys unlock powerful automation capabilities:
- Automate repetitive tasks - Schedule crawls to run automatically every week
- Build custom integrations - Connect Link Health Monitor with your existing tools
- Create dashboards - Pull link health data into your own reporting systems
- CI/CD workflows - Check your site's links every time you deploy new code
For example, you could write a simple script that automatically crawls all your domains every Monday morning and emails you a summary report.
How Do They Work?
When you create an API key in Link Health Monitor, you get a long string that looks like this:
lhm_live_a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6
You'll include this key in your code whenever you want to interact with your Link Health Monitor account. The key tells our system "yes, this request is authorized to access this account's data."
The Basic Flow
- You create an API key in your account settings
- You copy the key into your application or script
- Your code sends requests to Link Health Monitor with the key attached
- Link Health Monitor verifies the key and processes your request
- You get your data back - crawl results, domain info, link health data, etc.
Using API Keys with SDKs
An SDK (Software Development Kit) is a code library that makes it easier to work with API keys. Instead of writing complex code from scratch, you can use simple commands.
Example: Starting a Crawl
Without an SDK (complex):
// You'd need to write all this HTTP request code manually fetch('https://seocrawler.app/api/v1/crawls', { method: 'POST', headers: { 'Authorization': 'Bearer lhm_live_your_key_here', 'Content-Type': 'application/json' }, body: JSON.stringify({ domain_id: 'abc-123', options: { max_urls: 500 } }) })
With an SDK (simple):
// Much cleaner and easier to understand const api = new LinkHealthAPI('lhm_live_your_key_here') await api.startCrawl('abc-123', { max_urls: 500 })
The SDK handles all the complicated parts behind the scenes. You just tell it what you want to do, and it takes care of formatting requests, handling errors, and parsing responses.
Creating Your First API Key
API keys are available on the Agency plan. You'll need to upgrade your subscription to access this feature.
To create an API key:
- Navigate to Settings → API Keys in your dashboard
- Click Create API Key
- Give your key a descriptive name (like "Production Server" or "Weekly Reports Script")
- Choose what permissions the key should have
- Click Create
- Copy the key immediately - you won't be able to see it again!
Security Best Practices
API keys are powerful, so it's important to keep them safe:
Do This ✅
- Store keys securely - Use environment variables or secure vaults
- Use descriptive names - "Production Server", not "Key 1"
- Create separate keys - One for development, one for production
- Revoke unused keys - Delete old keys you're not using anymore
Don't Do This ❌
- Never commit keys to Git - Don't put them in your code repository
- Don't share keys publicly - Keep them out of screenshots and documentation
- Don't email keys - Use secure sharing methods if you must share
- Don't use the same key everywhere - Create separate keys for different tools
What Can You Do with API Keys?
Once you have an API key, you can:
- Manage domains - Add, verify, and list your domains
- Control crawls - Start crawls, check status, retrieve results
- Export reports - Download link health data programmatically
- Set up webhooks - Get notified when crawls complete
- Build integrations - Connect with Slack, email, dashboards, and more
Common Use Cases
1. Weekly Automated Reports
Set up a script that runs every Monday, crawls your sites, and emails you a summary of any broken links.
2. Development Workflow
Add a step to your deployment pipeline that crawls your staging site before going live, ensuring no broken links make it to production.
3. Client Dashboards
If you manage websites for clients, pull link health data into your own custom dashboard or reporting tool.
4. Multi-Site Monitoring
Monitor hundreds of domains automatically without manual intervention - perfect for agencies or large organizations.
Getting Started
Ready to try it out?
- Upgrade to Agency - API access requires the Agency plan
- Create your first key - Go to Settings → API Keys
- Read the API docs - Check out our API Introduction for detailed guides
- Start small - Try listing your domains first, then work up to starting crawls
Need Help?
If you run into any issues or have questions about API keys:
- Read the full API documentation - API Introduction
- Contact support - We're here to help you get set up
- Check API status - Visit our status page if things aren't working
Remember: API keys give full access to your account, just like your password. Treat them with the same level of security, and you'll be able to unlock powerful automation while keeping your data safe.