
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
Official Node.js client library for interacting with the Lightfeed API. Extract, search, and filter web data with a simple and intuitive interface.
npm install lightfeed
import { LightfeedClient } from 'lightfeed';
// Initialize client with your API key
const client = new LightfeedClient({
apiKey: 'YOUR_API_KEY'
});
// Retrieve records
async function getRecentRecords() {
try {
const response = await client.getRecords('your-database-id', {
start_time: '2024-01-01T00:00:00Z',
limit: 100
});
console.log(`Retrieved ${response.results.length} records`);
console.log(response.results);
} catch (error) {
console.error('Error retrieving records:', error);
}
}
// Search records
async function searchForCompanies() {
try {
const response = await client.searchRecords('your-database-id', {
search: {
text: 'innovative AI solutions',
threshold: 0.3
},
filter: {
condition: 'AND',
rules: [
{
column: 'industry',
operator: 'equals',
value: 'Technology'
}
]
}
});
console.log(`Found ${response.results.length} matching records`);
} catch (error) {
console.error('Error searching records:', error);
}
}
interface LightfeedConfig {
apiKey: string;
baseUrl?: string; // defaults to 'https://api.lightfeed.ai'
timeout?: number; // defaults to 30000 (30 seconds)
}
getRecordsRetrieves records from a database with optional filtering by time range.
client.getRecords(databaseId: string, params?: GetRecordsParams): Promise<RecordsResponse>
Parameters:
databaseId (string): The ID of your Lightfeed databaseparams (optional): Query parameters
start_time (string, optional): Start of time range (ISO 8601)end_time (string, optional): End of time range (ISO 8601)limit (number, optional): Maximum records to return (default: 100, max: 500)cursor (string, optional): Pagination cursorReturns: Records response containing results and pagination information
For detailed specifications and examples, see Get Records API
searchRecordsPerforms semantic search on your database records with optional filtering.
client.searchRecords(databaseId: string, params: SearchRecordsParams): Promise<RecordsResponse>
Parameters:
databaseId (string): The ID of your Lightfeed databaseparams: Search parameters
search.text (string): The text to search forsearch.threshold (number, optional): Minimum relevance score (0-1)filter (object, optional): Filtering conditionstime_range (object, optional): Time range constraintspagination (object, optional): Pagination optionsReturns: Records response containing results with relevance scores
For detailed specifications and examples, see Search Records API
filterRecordsApplies complex filtering conditions to database records.
client.filterRecords(databaseId: string, params: FilterRecordsParams): Promise<RecordsResponse>
Parameters:
databaseId (string): The ID of your Lightfeed databaseparams: Filter parameters
filter (object): Filtering conditions using rules and operatorstime_range (object, optional): Time range constraintspagination (object, optional): Pagination optionsReturns: Records response containing filtered results
For detailed specifications and examples, see Filter Records API
All API requests require authentication using your Lightfeed API key. You can generate an API key in the Lightfeed dashboard under "API Keys".
const client = new LightfeedClient({
apiKey: 'YOUR_API_KEY'
});
The client library handles HTTP errors from the API and converts them into structured LightfeedError objects.
try {
const records = await client.getRecords('your-database-id');
} catch (error) {
console.error(`Error ${error.status}: ${error.message}`);
// Handle specific error types
switch (error.status) {
case 401:
console.log('Authentication failed. Please check your API key');
break;
case 404:
console.log('Database not found');
break;
// ...
}
}
For comprehensive documentation and guides, visit the Lightfeed Documentation.
If you need assistance with your implementation:
FAQs
Lightfeed API Client for Node.js
We found that lightfeed demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.