# 실시간 읽기

> 웹과 공공 등록부 실시간 탐색. 도구 9개와 매개변수, 호출 예제.

Source: https://piqline.com/ko/docs/api/reference/direct

웹과 공개 네트워크를 실시간으로 읽습니다. 크레딧을 사용하며, 워크스페이스에는 아무것도 저장되지 않습니다.

각 호출은 `Authorization: Bearer`에 키를 넣은 `POST` 요청입니다. JSON 본문이 도구의 입력이며, 응답은 `{ "tool": "nom", "output": … }` 형태입니다. 예제에는 필수 매개변수만 포함되어 있습니다. 매개변수 설명은 에이전트가 읽는 설명과 같습니다.

### `readPage`

공개 웹 페이지를 읽습니다: 제목, 본문(6,000자), 발견된 피드, 링크 30개.

`POST https://piqline.com/api/v1/tools/readPage`

유형: 실시간 읽기. 스코프: `explore`.

| 매개변수 | 형식 | 필수 | 설명 |
| --- | --- | --- | --- |
| `url` | `string` | 예 |  |

```bash tab="curl"
curl -s https://piqline.com/api/v1/tools/readPage \
  -H "Authorization: Bearer $PIQLINE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://exemple.fr/article"}'
```
```javascript tab="JavaScript"
const response = await fetch("https://piqline.com/api/v1/tools/readPage", {
  method: "POST",
  headers: {
    Authorization: "Bearer " + process.env.PIQLINE_API_KEY,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "url": "https://exemple.fr/article"
  }),
});
const { output } = await response.json();
```
```python tab="Python"
import os
import requests

response = requests.post(
    "https://piqline.com/api/v1/tools/readPage",
    headers={"Authorization": "Bearer " + os.environ["PIQLINE_API_KEY"]},
    json={
        "url": "https://exemple.fr/article",
    },
)
output = response.json()["output"]
```

### `searchWeb`

공개 웹을 검색하여 후보 URL을 찾습니다.

`POST https://piqline.com/api/v1/tools/searchWeb`

유형: 실시간 읽기. 스코프: `explore`.

| 매개변수 | 형식 | 필수 | 설명 |
| --- | --- | --- | --- |
| `query` | `string` | 예 |  |
| `limit` | `integer` | 아니요 |  |

```bash tab="curl"
curl -s https://piqline.com/api/v1/tools/searchWeb \
  -H "Authorization: Bearer $PIQLINE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"query":"levée de fonds"}'
```
```javascript tab="JavaScript"
const response = await fetch("https://piqline.com/api/v1/tools/searchWeb", {
  method: "POST",
  headers: {
    Authorization: "Bearer " + process.env.PIQLINE_API_KEY,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "query": "levée de fonds"
  }),
});
const { output } = await response.json();
```
```python tab="Python"
import os
import requests

response = requests.post(
    "https://piqline.com/api/v1/tools/searchWeb",
    headers={"Authorization": "Bearer " + os.environ["PIQLINE_API_KEY"]},
    json={
        "query": "levée de fonds",
    },
)
output = response.json()["output"]
```

### `browserRead`

강제 브라우저로 동적 페이지나 보호된 페이지를 읽습니다. `readPage`와 같은 형태입니다.

`POST https://piqline.com/api/v1/tools/browserRead`

유형: 실시간 읽기. 스코프: `explore`.

| 매개변수 | 형식 | 필수 | 설명 |
| --- | --- | --- | --- |
| `url` | `string` | 예 |  |

```bash tab="curl"
curl -s https://piqline.com/api/v1/tools/browserRead \
  -H "Authorization: Bearer $PIQLINE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://exemple.fr/article"}'
```
```javascript tab="JavaScript"
const response = await fetch("https://piqline.com/api/v1/tools/browserRead", {
  method: "POST",
  headers: {
    Authorization: "Bearer " + process.env.PIQLINE_API_KEY,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "url": "https://exemple.fr/article"
  }),
});
const { output } = await response.json();
```
```python tab="Python"
import os
import requests

response = requests.post(
    "https://piqline.com/api/v1/tools/browserRead",
    headers={"Authorization": "Bearer " + os.environ["PIQLINE_API_KEY"]},
    json={
        "url": "https://exemple.fr/article",
    },
)
output = response.json()["output"]
```

### `waybackHistory`

URL의 Wayback Machine 캡처: 첫 캡처와 최근 캡처.

`POST https://piqline.com/api/v1/tools/waybackHistory`

유형: 실시간 읽기. 스코프: `explore`.

| 매개변수 | 형식 | 필수 | 설명 |
| --- | --- | --- | --- |
| `url` | `string` | 예 |  |

```bash tab="curl"
curl -s https://piqline.com/api/v1/tools/waybackHistory \
  -H "Authorization: Bearer $PIQLINE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://exemple.fr/article"}'
```
```javascript tab="JavaScript"
const response = await fetch("https://piqline.com/api/v1/tools/waybackHistory", {
  method: "POST",
  headers: {
    Authorization: "Bearer " + process.env.PIQLINE_API_KEY,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "url": "https://exemple.fr/article"
  }),
});
const { output } = await response.json();
```
```python tab="Python"
import os
import requests

response = requests.post(
    "https://piqline.com/api/v1/tools/waybackHistory",
    headers={"Authorization": "Bearer " + os.environ["PIQLINE_API_KEY"]},
    json={
        "url": "https://exemple.fr/article",
    },
)
output = response.json()["output"]
```

### `registryLookup`

공개 등록부에서 회사를 조회합니다: Sirene(프랑스), EDGAR(미국), Companies House(영국), OpenCorporates.

`POST https://piqline.com/api/v1/tools/registryLookup`

유형: 실시간 읽기. 스코프: `explore`.

| 매개변수 | 형식 | 필수 | 설명 |
| --- | --- | --- | --- |
| `registry` | `sirene \| edgar \| companies_house \| opencorporates` | 예 |  |
| `query` | `string` | 예 |  |

```bash tab="curl"
curl -s https://piqline.com/api/v1/tools/registryLookup \
  -H "Authorization: Bearer $PIQLINE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"registry":"sirene","query":"levée de fonds"}'
```
```javascript tab="JavaScript"
const response = await fetch("https://piqline.com/api/v1/tools/registryLookup", {
  method: "POST",
  headers: {
    Authorization: "Bearer " + process.env.PIQLINE_API_KEY,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "registry": "sirene",
    "query": "levée de fonds"
  }),
});
const { output } = await response.json();
```
```python tab="Python"
import os
import requests

response = requests.post(
    "https://piqline.com/api/v1/tools/registryLookup",
    headers={"Authorization": "Bearer " + os.environ["PIQLINE_API_KEY"]},
    json={
        "registry": "sirene",
        "query": "levée de fonds",
    },
)
output = response.json()["output"]
```

### `socialCatalog`

소셜 네트워크 읽기 엔드포인트(최대 40개)를 나열하며, 플랫폼별로 필터링할 수 있습니다.

`POST https://piqline.com/api/v1/tools/socialCatalog`

유형: 실시간 읽기. 스코프: `explore`.

| 매개변수 | 형식 | 필수 | 설명 |
| --- | --- | --- | --- |
| `platform` | `string` | 아니요 |  |

```bash tab="curl"
curl -s https://piqline.com/api/v1/tools/socialCatalog \
  -H "Authorization: Bearer $PIQLINE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```
```javascript tab="JavaScript"
const response = await fetch("https://piqline.com/api/v1/tools/socialCatalog", {
  method: "POST",
  headers: {
    Authorization: "Bearer " + process.env.PIQLINE_API_KEY,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({}),
});
const { output } = await response.json();
```
```python tab="Python"
import os
import requests

response = requests.post(
    "https://piqline.com/api/v1/tools/socialCatalog",
    headers={"Authorization": "Bearer " + os.environ["PIQLINE_API_KEY"]},
    json={},
)
output = response.json()["output"]
```

### `socialCall`

소셜 네트워크 읽기 엔드포인트를 호출하여 간략한 항목을 최대 20개 반환합니다.

`POST https://piqline.com/api/v1/tools/socialCall`

유형: 실시간 읽기. 스코프: `explore`.

| 매개변수 | 형식 | 필수 | 설명 |
| --- | --- | --- | --- |
| `endpointId` | `string` | 예 |  |
| `params` | `object` | 예 |  |

```bash tab="curl"
curl -s https://piqline.com/api/v1/tools/socialCall \
  -H "Authorization: Bearer $PIQLINE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"endpointId":"5a0e9c1f-2b7d-4e63-8f14-d3c8a6b92e70","params":{}}'
```
```javascript tab="JavaScript"
const response = await fetch("https://piqline.com/api/v1/tools/socialCall", {
  method: "POST",
  headers: {
    Authorization: "Bearer " + process.env.PIQLINE_API_KEY,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "endpointId": "5a0e9c1f-2b7d-4e63-8f14-d3c8a6b92e70",
    "params": {}
  }),
});
const { output } = await response.json();
```
```python tab="Python"
import os
import requests

response = requests.post(
    "https://piqline.com/api/v1/tools/socialCall",
    headers={"Authorization": "Bearer " + os.environ["PIQLINE_API_KEY"]},
    json={
        "endpointId": "5a0e9c1f-2b7d-4e63-8f14-d3c8a6b92e70",
        "params": {},
    },
)
output = response.json()["output"]
```

### `previewSource`

구독하기 전에 소스의 실시간 샘플(5~10개 항목)을 가져옵니다.

`POST https://piqline.com/api/v1/tools/previewSource`

유형: 실시간 읽기. 스코프: `explore`.

| 매개변수 | 형식 | 필수 | 설명 |
| --- | --- | --- | --- |
| `platform` | `instagram \| tiktok \| youtube \| twitter \| x \| threads \| linkedin \| reddit \| …` | 예 |  |
| `target` | `string` | 예 |  |
| `kind` | `page \| group \| marketplace \| profile \| live \| company \| search` | 아니요 |  |

```bash tab="curl"
curl -s https://piqline.com/api/v1/tools/previewSource \
  -H "Authorization: Bearer $PIQLINE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"platform":"instagram","target":"texte"}'
```
```javascript tab="JavaScript"
const response = await fetch("https://piqline.com/api/v1/tools/previewSource", {
  method: "POST",
  headers: {
    Authorization: "Bearer " + process.env.PIQLINE_API_KEY,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "platform": "instagram",
    "target": "texte"
  }),
});
const { output } = await response.json();
```
```python tab="Python"
import os
import requests

response = requests.post(
    "https://piqline.com/api/v1/tools/previewSource",
    headers={"Authorization": "Bearer " + os.environ["PIQLINE_API_KEY"]},
    json={
        "platform": "instagram",
        "target": "texte",
    },
)
output = response.json()["output"]
```

### `whoSaidItFirst`

웹에서 어떤 정보를 누가 가장 먼저 게시했는지를 페이지 단위로, 그리고 사용자의 소스가 그것을 언제 보았는지 알려 줍니다. 주제 또는 항목에서 시작하며, 비공개 워크스페이스 타임라인으로 보관됩니다.

`POST https://piqline.com/api/v1/tools/whoSaidItFirst`

유형: 실시간 읽기. 스코프: `explore`.

| 매개변수 | 형식 | 필수 | 설명 |
| --- | --- | --- | --- |
| `query` | `string` | 아니요 |  |
| `itemId` | `string` | 아니요 |  |

```bash tab="curl"
curl -s https://piqline.com/api/v1/tools/whoSaidItFirst \
  -H "Authorization: Bearer $PIQLINE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```
```javascript tab="JavaScript"
const response = await fetch("https://piqline.com/api/v1/tools/whoSaidItFirst", {
  method: "POST",
  headers: {
    Authorization: "Bearer " + process.env.PIQLINE_API_KEY,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({}),
});
const { output } = await response.json();
```
```python tab="Python"
import os
import requests

response = requests.post(
    "https://piqline.com/api/v1/tools/whoSaidItFirst",
    headers={"Authorization": "Bearer " + os.environ["PIQLINE_API_KEY"]},
    json={},
)
output = response.json()["output"]
```
