Getting Started with LaborLens API
Get up and running with the LaborLens API in just a few minutes. This guide will walk you through authentication, API key creation, and making your first API call.
Quick Start
-
Create Your Account & API Key
To access the LaborLens API, you'll need to create an account and generate an API key:
- Sign up: Click the "Login" button in the top navigation and create your account
- Access API Keys: Navigate to Access & Usage in the portal
- Generate Key: Click "Create API Key"
- Save Securely: Your API key will be available, and retrievable immediately. Be sure to protect these credentials.
Keep your API key secure! Never share it publicly or commit it to version control. Store it securely as an environment variable.
-
Make Your First API Call
Test your setup with a simple request to get available industries:
CodeYou should receive a JSON response with industry classifications used throughout the dataset.
-
Search for Plan Sponsors
Try a basic search to find plan sponsors:
CodeThis searches for sponsors with "microsoft" in their name and returns key information.
-
Get Detailed Sponsor Information
Use a sponsor ID from your search results to get complete details:
CodeThis returns comprehensive information about the sponsor, their plans, and filing history.
Authentication
The LaborLens API uses Bearer Token authentication. Include your API key in the Authorization header of every request:
Code
Rate Limits
The API is rate-limited to 50 requests per minute per API key. Rate limit information is included in response headers:
X-RateLimit-Limit: Maximum requests per windowX-RateLimit-Remaining: Remaining requests in current windowX-RateLimit-Reset: Time when rate limit resets
Available Endpoints
The LaborLens API provides four main endpoints:
| Endpoint | Purpose | Use Case |
|---|---|---|
GET /industries | Get industry classifications | Discover filter options for searches |
POST /search | Search plan sponsors | Find companies matching specific criteria |
GET /sponsor/{id} | Get sponsor details | Deep dive into a specific company's plans |
GET /filing/{ack_id} | Get filing details | Access specific regulatory filing data |
Common Search Patterns
Find Companies by Industry
Code
Find Large Retirement Plans
Code
Search by Company Name
Code
Pagination Example: Fetching All Results
When working with large datasets, you'll often need to paginate through results. Here's a complete Python example that demonstrates how to fetch all plan sponsors from a specific industry:
Code
This example demonstrates:
- Pagination Logic: Incrementing the
startparameter until no more results are returned - Rate Limiting: The loop naturally respects rate limits as it makes sequential requests
- Data Export: Saving all results to a CSV file for analysis
- Progress Tracking: Logging the pagination progress
Replace YOUR_API_KEY_HERE with your actual API key. For production code, always store API keys as environment variables using os.environ.get('LABORLENS_API_KEY').
Error Handling
The API returns standard HTTP status codes:
200: Success400: Bad Request (invalid parameters)401: Unauthorized (invalid/missing API key)429: Rate Limit Exceeded500: Internal Server Error
Error responses include detailed information to help debug issues:
Code
Next Steps
- Explore the full API Reference for detailed endpoint documentation
- Check your usage and manage API keys in Access & Usage
- Review the About page to understand the full scope of available data
Ready to start building? Head over to the API Reference to see all available parameters and response schemas.
Support
Need help getting started or have questions about the API? Contact our support team at support@laborlens.io.