# Grok Bot

استخدم نتائج Felo Data API في Grok Bot. يحتفظ الوكيل بنموذجه الأصلي.

استخدم نتائج Felo Data API في Grok Bot. يحتفظ الوكيل بنموذجه الأصلي.

## قبل البدء

أنشئ مفتاح API وتحقق من الرصيد. يستخدم المثال Tavily Search؛ لبقية الواجهات معلمات وأسعار خاصة.

- [API Keys](https://openapi.felo.ai/console/api-keys)
- [Data APIs](https://openapi.felo.ai/ar/apis)
- [Tavily](https://openapi.felo.ai/ar/apis/tavily)

## إعداد التطبيق

**Grok Bot → cloud computer → terminal → Python tool → private Skill**

## ربط أداة البحث

احفظ أداة Python في بيئة تنفيذ الوكيل. شغّل configure بنفسك هناك، ثم اطلب من الوكيل تشغيل search. يلزم Python 3.9+ وشبكة؛ مفتاح حاسوب آخر لن ينتقل تلقائيًا.

[felo-data-search.py](https://openapi.felo.ai/docs-assets/integrations/felo-data-search.py)

```bash
python3 felo-data-search.py configure
python3 felo-data-search.py search "Felo API Platform documentation"
```

| Tool | Value |
| --- | --- |
| Name | `felo_data_search` |
| Command | `python3 /ABSOLUTE/PATH/felo-data-search.py search "QUERY"` |
| Output | `results[].title`, `results[].url`, `results[].content` |

## طلب Data API

| Field | Value |
| --- | --- |
| Method | `POST` |
| URL | `https://openapi.felo.ai/v1/beta/tavily/search` |
| Authorization | `Bearer YOUR_FELO_API_KEY` |
| OpenAPI credential | `X-API-Key: YOUR_FELO_API_KEY` |
| Content-Type | `application/json` |
| query | `Felo API Platform documentation` |
| max_results | `3` |
| Output | `results[].title`, `results[].url`, `results[].content` |

```json
{
  "query": "Felo API Platform documentation",
  "max_results": 3
}
```

```bash
export FELO_API_KEY='YOUR_FELO_API_KEY'
curl 'https://openapi.felo.ai/v1/beta/tavily/search' \
  -H "Authorization: Bearer $FELO_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
  "query": "Felo API Platform documentation",
  "max_results": 3
}'
```

## التحقق

تحقق من title وurl وcontent داخل results. اطلب ملخصًا بروابط المصادر وراجع استخدام Felo في لوحة التحكم. المصفوفة الفارغة صالحة أيضًا.

## حل المشكلات

401: المفتاح وAuthorization؛ 402: الرصيد؛ 400: JSON وquery. أعد 429/5xx بفواصل متزايدة واحتفظ بـrequest_id. تحقق أيضًا من أذونات Workspace أو مفتاح بيئة التنفيذ.

## وثائق Felo ذات الصلة

- [Data API](https://openapi.felo.ai/ar/docs/guides/data-api.md)
- [API Reference](https://openapi.felo.ai/ar/docs/data-api)
- [Authentication](https://openapi.felo.ai/ar/docs/authentication.md)
- [Apps & Agents](https://openapi.felo.ai/ar/apps)

## الوثائق الرسمية للتطبيق

- [Grok Bot](https://docs.x.ai/grok-bot/overview)
- [Grok Bot Tools](https://docs.x.ai/grok-bot/skills-routines-and-automations)
