
Product
Introducing Reports: An Extensible Reporting Framework for Socket Data
Explore exportable charts for vulnerabilities, dependencies, and usage with Reports, Socket’s new extensible reporting framework.
@goperigon/perigon-ts
Advanced tools
TypeScript client for the Perigon API
Fully-typed TypeScript SDK for the Perigon API. Access news articles, AI summaries, entity data, and more with complete type safety.
npm install @goperigon/perigon-ts
# yarn add @goperigon/perigon-ts
# pnpm add @goperigon/perigon-ts
# bun add @goperigon/perigon-ts
import { Configuration, V1Api } from "@goperigon/perigon-ts";
const perigon = new V1Api(
new Configuration({
apiKey: process.env.PERIGON_API_KEY,
}),
);
try {
const { articles } = await perigon.searchArticles({
q: "artificial intelligence",
size: 5,
});
console.log(`Found ${articles.length} articles`);
} catch (error) {
console.error("API Error:", error.message);
}
Get your API key from perigon.io:
# Environment variable (recommended)
export PERIGON_API_KEY="your_api_key_here"
// Or pass directly
const perigon = new V1Api(
new Configuration({
apiKey: "your_api_key_here",
}),
);
const { articles, numResults } = await perigon.searchArticles({
q: "technology AND startups",
source: ["techcrunch.com"],
from: "2024-01-01",
size: 10,
});
searchArticles – Search news articles with advanced filtering by keywords, sources, dates, and morevectorSearchArticles – Find semantically similar articles using AI-powered vector searchconst { results } = await perigon.searchCompanies({ name: "Apple", size: 5 });
searchCompanies – Find companies with detailed business information, financials, and metadatasearchPeople – Search for notable people and public figures across news and mediasearchJournalists – Discover journalists and reporters by name, publication, or expertisegetJournalistById – Get comprehensive profile data for a specific journalistconst { results } = await perigon.searchStories({
q: "climate change",
size: 5,
});
searchStories – Find related article clusters and trending story threadssearchTopics – Browse structured topic taxonomy and content categoriessearchSources – Discover news sources, publications, and media outletsconst { summary } = await perigon.searchSummarizer({
q: "renewable energy",
size: 10,
});
searchSummarizer – Generate AI-powered summaries from multiple articles on any topicconst { results } = await perigon.searchWikipedia({
q: "machine learning",
size: 10,
});
searchWikipedia – Search Wikipedia articles with full-text matching and filteringvectorSearchWikipedia – Find semantically related Wikipedia content using vector similarityAll errors extend ResponseError and include status & body properties:
try {
const result = await perigon.searchArticles({ q: "test" });
} catch (error) {
if (error.status === 401) console.error("Invalid API key");
else if (error.status === 429) console.error("Rate limit exceeded");
else console.error("API Error:", error.message);
}
MIT © Perigon
FAQs
Typescript client for Perigon API
The npm package @goperigon/perigon-ts receives a total of 201 weekly downloads. As such, @goperigon/perigon-ts popularity was classified as not popular.
We found that @goperigon/perigon-ts demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 5 open source maintainers 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.

Product
Explore exportable charts for vulnerabilities, dependencies, and usage with Reports, Socket’s new extensible reporting framework.

Product
Socket for Jira lets teams turn alerts into Jira tickets with manual creation, automated ticketing rules, and two-way sync.

Company News
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.