1.0.1 โข Published 1 year ago
@atharvh01/linkedin-jobs-api v1.0.1
LinkedIn Jobs API
An unofficial API to fetch job listings from LinkedIn. This API allows you to search for jobs using keywords, location, and date filters.
Created by: Atharv Hatwar
Features
- ๐ Search jobs by keywords
- ๐ Filter by location
- ๐ Filter by posting date
- ๐งน Clean and formatted job data
- ๐ CORS enabled
- โ ๏ธ Error handling
- ๐ก๏ธ Rate limiting protection
Installation
npm install @atharvh01/linkedin-jobs-apiQuick Start
import express from 'express';
import { searchJobs } from '@atharvh01/linkedin-jobs-api';
const app = express();
const PORT = 3000;
app.get('/api/search', searchJobs);
app.listen(PORT, () => {
console.log(`Server running on port ${PORT}`);
});API Endpoints
Search Jobs
GET /api/searchQuery Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| keywords | string | Yes | Search terms (e.g., "react developer") |
| location | string | Yes | Job location (e.g., "remote", "Pune") |
| dateSincePosted | string | No | Filter by post date (past_24h, past_week, past_month) |
Example Request
GET /api/search?keywords=react&location=remote&dateSincePosted=past_24hExample Response
{
"success": true,
"count": 2,
"jobs": [
{
"title": "Senior React Developer",
"company": "Example Corp",
"location": "Remote",
"link": "https://www.linkedin.com/jobs/view/123456789",
"postedDate": "2023-12-20T10:00:00.000Z",
"description": "We are looking for a Senior React Developer..."
}
]
}Error Handling
The API returns appropriate error messages and status codes:
{
"success": false,
"error": {
"message": "Keywords parameter is required",
"status": 400
}
}Rate Limiting
To prevent abuse, the API implements rate limiting:
- 100 requests per hour per IP
- Customizable limits through configuration
Testing
# Run the test suite
npm test
# Test specific endpoints
npm run test:apiContributing
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
License
This project is licensed under the MIT License - see the LICENSE file for details.
Author
Atharv Hatwar
- GitHub: atharvhatwar
Legal Notice
This package is for educational purposes only. Please review LinkedIn's terms of service before using this API in production.