@goperigon/perigon-ts 1.1.0 → 1.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +43 -17
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -101,7 +101,7 @@ console.log(journalist.name);
|
|
|
101
101
|
|
|
102
102
|
### Articles – search and filter news (`/v1/all`)<br>
|
|
103
103
|
|
|
104
|
-
**Docs →** <https://
|
|
104
|
+
**Docs →** <https://dev.perigon.io/reference?endpoint=11>
|
|
105
105
|
|
|
106
106
|
```ts
|
|
107
107
|
const { articles } = await perigon.searchArticles({
|
|
@@ -112,7 +112,7 @@ const { articles } = await perigon.searchArticles({
|
|
|
112
112
|
|
|
113
113
|
### Articles – date range filter<br>
|
|
114
114
|
|
|
115
|
-
**Docs →** <https://
|
|
115
|
+
**Docs →** <https://dev.perigon.io/reference?endpoint=11>
|
|
116
116
|
|
|
117
117
|
```ts
|
|
118
118
|
await perigon.searchArticles({
|
|
@@ -124,7 +124,7 @@ await perigon.searchArticles({
|
|
|
124
124
|
|
|
125
125
|
### Articles – restrict to a source<br>
|
|
126
126
|
|
|
127
|
-
**Docs →** <https://
|
|
127
|
+
**Docs →** <https://dev.perigon.io/reference?endpoint=11>
|
|
128
128
|
|
|
129
129
|
```ts
|
|
130
130
|
await perigon.searchArticles({ source: ["nytimes.com"] });
|
|
@@ -132,7 +132,7 @@ await perigon.searchArticles({ source: ["nytimes.com"] });
|
|
|
132
132
|
|
|
133
133
|
### Companies – fetch structured company data (`/v1/companies`)<br>
|
|
134
134
|
|
|
135
|
-
**Docs →** <https://
|
|
135
|
+
**Docs →** <https://dev.perigon.io/reference?endpoint=2>
|
|
136
136
|
|
|
137
137
|
```ts
|
|
138
138
|
const { results } = await perigon.searchCompanies({
|
|
@@ -143,7 +143,7 @@ const { results } = await perigon.searchCompanies({
|
|
|
143
143
|
|
|
144
144
|
### Journalists – search and detail look‑up (`/v1/journalists`)<br>
|
|
145
145
|
|
|
146
|
-
**Docs →** <https://
|
|
146
|
+
**Docs →** <https://dev.perigon.io/reference?endpoint=2>
|
|
147
147
|
|
|
148
148
|
```ts
|
|
149
149
|
const { results } = await perigon.searchJournalists1({
|
|
@@ -155,15 +155,26 @@ const journalist = await perigon.getJournalistById({ id: results[0].id });
|
|
|
155
155
|
|
|
156
156
|
### Stories – discover related article clusters (`/v1/stories`)<br>
|
|
157
157
|
|
|
158
|
-
**Docs →** <https://
|
|
158
|
+
**Docs →** <https://dev.perigon.io/reference?endpoint=7>
|
|
159
159
|
|
|
160
160
|
```ts
|
|
161
161
|
await perigon.searchStories({ q: "climate change", size: 5 });
|
|
162
162
|
```
|
|
163
163
|
|
|
164
|
+
### Wikipedia – search Wikipedia pages (`/v1/wikipedia`)<br>
|
|
165
|
+
|
|
166
|
+
**Docs →** <https://dev.perigon.io/reference?endpoint=13>
|
|
167
|
+
|
|
168
|
+
```ts
|
|
169
|
+
const { pages } = await perigon.searchWikipedia({
|
|
170
|
+
q: "artificial intelligence",
|
|
171
|
+
size: 5,
|
|
172
|
+
});
|
|
173
|
+
```
|
|
174
|
+
|
|
164
175
|
### Vector search – semantic retrieval (`/v1/vector`)<br>
|
|
165
176
|
|
|
166
|
-
**Docs →** <https://
|
|
177
|
+
**Docs →** <https://dev.perigon.io/reference?endpoint=10>
|
|
167
178
|
|
|
168
179
|
```ts
|
|
169
180
|
await perigon.vectorSearchArticles({
|
|
@@ -174,9 +185,22 @@ await perigon.vectorSearchArticles({
|
|
|
174
185
|
});
|
|
175
186
|
```
|
|
176
187
|
|
|
188
|
+
### Wikipedia vector search – semantic Wikipedia retrieval (`/v1/vector/wikipedia`)<br>
|
|
189
|
+
|
|
190
|
+
**Docs →** <https://dev.perigon.io/reference?endpoint=12>
|
|
191
|
+
|
|
192
|
+
```ts
|
|
193
|
+
await perigon.vectorSearchWikipedia({
|
|
194
|
+
wikipediaSearchParams: {
|
|
195
|
+
prompt: "quantum computing breakthroughs",
|
|
196
|
+
size: 5,
|
|
197
|
+
},
|
|
198
|
+
});
|
|
199
|
+
```
|
|
200
|
+
|
|
177
201
|
### Summarizer – generate an instant summary (`/v1/summarizer`)<br>
|
|
178
202
|
|
|
179
|
-
**Docs →** <https://
|
|
203
|
+
**Docs →** <https://dev.perigon.io/reference?endpoint=8>
|
|
180
204
|
|
|
181
205
|
```ts
|
|
182
206
|
const { summary } = await perigon.searchSummarizer({
|
|
@@ -188,20 +212,22 @@ console.log(summary);
|
|
|
188
212
|
|
|
189
213
|
### Topics – explore taxonomy (`/v1/topics`)<br>
|
|
190
214
|
|
|
191
|
-
**Docs →** <https://
|
|
215
|
+
**Docs →** <https://dev.perigon.io/reference?endpoint=9>
|
|
192
216
|
|
|
193
217
|
```ts
|
|
194
218
|
await perigon.searchTopics({ size: 10 });
|
|
195
219
|
```
|
|
196
220
|
|
|
197
|
-
| Action | Code Example
|
|
198
|
-
| --------------------------------------- |
|
|
199
|
-
| Filter by source | `await perigon.searchArticles({ source: ['nytimes.com'] })`
|
|
200
|
-
| Limit by date range | `await perigon.searchArticles({ q: 'business', from: '2025‑04‑01', to: '2025‑04‑08' })`
|
|
201
|
-
| Company lookup | `await perigon.searchCompanies({ name: 'Apple', size: 5 })`
|
|
202
|
-
|
|
|
203
|
-
|
|
|
204
|
-
|
|
|
221
|
+
| Action | Code Example |
|
|
222
|
+
| --------------------------------------- | --------------------------------------------------------------------------------------------------------------- |
|
|
223
|
+
| Filter by source | `await perigon.searchArticles({ source: ['nytimes.com'] })` |
|
|
224
|
+
| Limit by date range | `await perigon.searchArticles({ q: 'business', from: '2025‑04‑01', to: '2025‑04‑08' })` |
|
|
225
|
+
| Company lookup | `await perigon.searchCompanies({ name: 'Apple', size: 5 })` |
|
|
226
|
+
| Wikipedia page search | `await perigon.searchWikipedia({ q: 'machine learning', size: 5 })` |
|
|
227
|
+
| Summarize any query | `await perigon.searchSummarizer({ q: 'renewable energy', size: 20 })` |
|
|
228
|
+
| Semantic / vector search | `await perigon.vectorSearchArticles({ articleSearchParams: { prompt: 'advancements in AI', size: 5 }})` |
|
|
229
|
+
| Wikipedia semantic search | `await perigon.vectorSearchWikipedia({ wikipediaSearchParams: { prompt: 'quantum physics', size: 5 }})` |
|
|
230
|
+
| Retrieve available taxonomic **topics** | `await perigon.searchTopics({ size: 10 })` |
|
|
205
231
|
|
|
206
232
|
---
|
|
207
233
|
|