# Facebook

> Facebook. 8 Tools, mit ihren Parametern und Aufrufbeispielen.

Source: https://piqline.com/de/docs/api/reference/facebook

Tools des Facebook-Agenten: Marketplace-Anzeigen und öffentliche Gruppen, live gelesen.

Jeder Aufruf ist eine `POST`-Anfrage mit dem Schlüssel in `Authorization: Bearer`. Der JSON-Body ist die Eingabe des Tools, und die Antwort hat die Form `{ "tool": "nom", "output": … }`. Die Beispiele enthalten nur die erforderlichen Parameter. Die Parameterbeschreibungen sind die, die die Agenten lesen.

### `findMarketplaceLocation`

Wandelt den Namen einer Stadt oder Gegend in Marketplace-Koordinaten um.

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

Typ: Live-Lesen. Scopes: `explore`.

| Parameter | Typ | Erforderlich | Beschreibung |
| --- | --- | --- | --- |
| `query` | `string` | Ja | City or area name, e.g. 'Lyon' or 'Austin, Texas' |

```bash tab="curl"
curl -s https://piqline.com/api/v1/tools/findMarketplaceLocation \
  -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/findMarketplaceLocation", {
  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/findMarketplaceLocation",
    headers={"Authorization": "Bearer " + os.environ["PIQLINE_API_KEY"]},
    json={
        "query": "levée de fonds",
    },
)
output = response.json()["output"]
```

### `searchMarketplace`

Durchsucht öffentliche Marketplace-Anzeigen nach Stichwort rund um einen Ort (Stadt oder Koordinaten), über höchstens 3 Seiten.

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

Typ: Live-Lesen. Scopes: `explore`.

| Parameter | Typ | Erforderlich | Beschreibung |
| --- | --- | --- | --- |
| `query` | `string` | Ja | Search keyword(s) |
| `location` | `string` | Nein | City or area name; ignored when lat and lng are both given |
| `lat` | `number` | Nein |  |
| `lng` | `number` | Nein |  |
| `radiusKm` | `integer` | Nein |  |
| `minPrice` | `number` | Nein |  |
| `maxPrice` | `number` | Nein |  |
| `count` | `integer` | Nein |  |
| `pages` | `integer` | Nein | Pages to chain in one call (1 credit each); dedupes listings |
| `sortBy` | `suggested \| creation_time_descend \| distance_ascend \| price_ascend \| price_descend` | Nein |  |
| `delivery` | `all \| local_pickup \| shipping` | Nein |  |
| `condition` | `new \| used_like_new \| used_good \| used_fair` | Nein |  |
| `dateListed` | `all \| last_24_hours \| last_7_days \| last_30_days` | Nein |  |
| `availability` | `available \| sold \| all` | Nein |  |
| `categoryId` | `string` | Nein | Numeric Marketplace category id, as returned in listings |
| `exclude` | `array<string>` | Nein | Drop listings whose title contains any of these words (e.g. 'pièces', 'cadre seul') |
| `include` | `array<string>` | Nein | Keep only listings whose title contains at least one of these words |
| `cursor` | `string` | Nein | Opaque cursor from a previous page |

```bash tab="curl"
curl -s https://piqline.com/api/v1/tools/searchMarketplace \
  -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/searchMarketplace", {
  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/searchMarketplace",
    headers={"Authorization": "Bearer " + os.environ["PIQLINE_API_KEY"]},
    json={
        "query": "levée de fonds",
    },
)
output = response.json()["output"]
```

### `getMarketplaceListing`

Detail einer Anzeige: Beschreibung, Attribute, Fotos, Lieferung, genaues Datum, wenn Facebook es liefert.

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

Typ: Live-Lesen. Scopes: `explore`.

| Parameter | Typ | Erforderlich | Beschreibung |
| --- | --- | --- | --- |
| `listing` | `string` | Ja | Listing id or Marketplace item URL |

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

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

### `getMarketplaceListings`

Detail von 2 bis 6 Anzeigen auf einmal, als Vergleichstabelle.

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

Typ: Live-Lesen. Scopes: `explore`.

| Parameter | Typ | Erforderlich | Beschreibung |
| --- | --- | --- | --- |
| `listings` | `array<string>` | Ja | Listing ids or Marketplace item URLs |

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

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

### `getFacebookGroup`

Öffentliches Profil einer Gruppe: Datenschutz, Größe, Aktivität, Kategorien, Regeln.

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

Typ: Live-Lesen. Scopes: `explore`.

| Parameter | Typ | Erforderlich | Beschreibung |
| --- | --- | --- | --- |
| `group` | `string` | Ja | Group URL, numeric id, or vanity slug |

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

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

### `getFacebookGroupPosts`

Beiträge einer öffentlichen Gruppe, in Seiten zu 3 (höchstens 6 Seiten).

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

Typ: Live-Lesen. Scopes: `explore`.

| Parameter | Typ | Erforderlich | Beschreibung |
| --- | --- | --- | --- |
| `group` | `string` | Ja | Group URL, numeric id, or vanity slug |
| `sortBy` | `CHRONOLOGICAL \| CHRONOLOGICAL_LISTINGS \| TOP_POSTS \| RECENT_ACTIVITY` | Nein |  |
| `pages` | `integer` | Nein |  |
| `keywords` | `array<string>` | Nein | Keep only posts containing at least one of these terms |
| `since` | `string` | Nein | ISO date; posts older than this are dropped and chronological paging stops there |
| `cursor` | `string` | Nein |  |

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

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

### `getFacebookPost`

Detail eines öffentlichen Beitrags oder Reels: Text, Autor, Datum, Reaktionen, Aufrufe.

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

Typ: Live-Lesen. Scopes: `explore`.

| Parameter | Typ | Erforderlich | Beschreibung |
| --- | --- | --- | --- |
| `post` | `string` | Ja | Post or reel URL |

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

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

### `getFacebookPostComments`

Kommentare zu einem öffentlichen Beitrag, filterbar nach Stichwörtern (höchstens 3 Seiten).

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

Typ: Live-Lesen. Scopes: `explore`.

| Parameter | Typ | Erforderlich | Beschreibung |
| --- | --- | --- | --- |
| `post` | `string` | Ja | Post or reel URL |
| `pages` | `integer` | Nein |  |
| `keywords` | `array<string>` | Nein |  |
| `cursor` | `string` | Nein |  |

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

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