الطعام والصحة والطبيعة

واجهة التأكيدات الجديدة API

تأكيدات يومية تضم 19 فئة، مع تخصيص وإعادة صياغة الأفكار وحزم تمارين التنفس واستجابات متعددة الصيغ. معرّفات ثابتة، وبحث، وترقيم صفحات، ووثائق جاهزة لـ Postman لتطبيقات العافية والودجات وروبوتات المحادثة.

طلب الرؤوس

Name Required Description
X-RapidAPI-Key required Your RapidAPI key. Get one free.
X-RapidAPI-Host required new-affirmations-api.p.rapidapi.com

نقاط النهاية

GET /v1/affirmations

قائمة التأكيدات

حدود

NameTypeRequiredDefaultConstraints
categorystringoptional—اختياري
searchstringoptional—اختياري
pagestringoptional—الافتراضي: 1
limitstringoptional—الافتراضي: 10
langstringoptional—الافتراضي: en

أمثلة على الكود

curl --request GET \
  --url 'https://new-affirmations-api.p.rapidapi.com/v1/affirmations?category=example&search=example' \
  --header 'x-rapidapi-key: YOUR_API_KEY' \
  --header 'x-rapidapi-host: new-affirmations-api.p.rapidapi.com'
GET /v1/affirmations/random

تأكيد عشوائي

حدود

NameTypeRequiredDefaultConstraints
categorystringoptional—اختياري
langstringoptional—الافتراضي: en
formatstringoptional—الافتراضي: json

أمثلة على الكود

curl --request GET \
  --url 'https://new-affirmations-api.p.rapidapi.com/v1/affirmations/random?category=example&lang=example' \
  --header 'x-rapidapi-key: YOUR_API_KEY' \
  --header 'x-rapidapi-host: new-affirmations-api.p.rapidapi.com'
GET /v1/affirmations/categories/{category}/random

تأكيد عشوائي حسب الفئة

حدود

NameTypeRequiredDefaultConstraints
categorystringoptional—مطلوب

أمثلة على الكود

curl --request GET \
  --url 'https://new-affirmations-api.p.rapidapi.com/v1/affirmations/categories/{category}/random?category=example' \
  --header 'x-rapidapi-key: YOUR_API_KEY' \
  --header 'x-rapidapi-host: new-affirmations-api.p.rapidapi.com'
GET /v1/affirmations/categories

قائمة الفئات

أمثلة على الكود

curl --request GET \
  --url 'https://new-affirmations-api.p.rapidapi.com/v1/affirmations/categories' \
  --header 'x-rapidapi-key: YOUR_API_KEY' \
  --header 'x-rapidapi-host: new-affirmations-api.p.rapidapi.com'
GET /v1/affirmations/batch

تأكيدات مجمّعة

حدود

NameTypeRequiredDefaultConstraints
categorystringoptional—اختياري
limitstringoptional—الافتراضي: 10
langstringoptional—الافتراضي: en

أمثلة على الكود

curl --request GET \
  --url 'https://new-affirmations-api.p.rapidapi.com/v1/affirmations/batch?category=example&limit=example' \
  --header 'x-rapidapi-key: YOUR_API_KEY' \
  --header 'x-rapidapi-host: new-affirmations-api.p.rapidapi.com'
GET /v1/affirmations/today

تأكيد اليوم

حدود

NameTypeRequiredDefaultConstraints
categorystringoptional—اختياري
langstringoptional—الافتراضي: en

أمثلة على الكود

curl --request GET \
  --url 'https://new-affirmations-api.p.rapidapi.com/v1/affirmations/today?category=example&lang=example' \
  --header 'x-rapidapi-key: YOUR_API_KEY' \
  --header 'x-rapidapi-host: new-affirmations-api.p.rapidapi.com'
POST /v1/affirmations/personalize

التخصيص

حدود

NameTypeRequiredDefaultConstraints
moodstringoptional—اختياري
goalstringoptional—اختياري
namestringoptional—اختياري

أمثلة على الكود

curl --request POST \
  --url 'https://new-affirmations-api.p.rapidapi.com/v1/affirmations/personalize?mood=example&goal=example' \
  --header 'x-rapidapi-key: YOUR_API_KEY' \
  --header 'x-rapidapi-host: new-affirmations-api.p.rapidapi.com'
POST /v1/affirmations/reframe

إعادة صياغة فكرة سلبية

حدود

NameTypeRequiredDefaultConstraints
negativeThoughtstringoptional—مطلوب

أمثلة على الكود

curl --request POST \
  --url 'https://new-affirmations-api.p.rapidapi.com/v1/affirmations/reframe?negativeThought=example' \
  --header 'x-rapidapi-key: YOUR_API_KEY' \
  --header 'x-rapidapi-host: new-affirmations-api.p.rapidapi.com'
GET /v1/affirmations/bundle

حزمة التأكيد + التنفس

حدود

NameTypeRequiredDefaultConstraints
categorystringoptional—اختياري

أمثلة على الكود

curl --request GET \
  --url 'https://new-affirmations-api.p.rapidapi.com/v1/affirmations/bundle?category=example' \
  --header 'x-rapidapi-key: YOUR_API_KEY' \
  --header 'x-rapidapi-host: new-affirmations-api.p.rapidapi.com'
GET /v1/affirmations/schedule

الجدول المقترح

حدود

NameTypeRequiredDefaultConstraints
timezonestringoptional—اختياري

أمثلة على الكود

curl --request GET \
  --url 'https://new-affirmations-api.p.rapidapi.com/v1/affirmations/schedule?timezone=example' \
  --header 'x-rapidapi-key: YOUR_API_KEY' \
  --header 'x-rapidapi-host: new-affirmations-api.p.rapidapi.com'

مثال تفاعلي

new-affirmations-api
$ GET /v1/affirmations
{
  "id": 1874329517,
  "text": "I am confident, capable, and ready for today.",
  "category": "confidence",
  "mood": "confidence",
  "lang": "en",
  "length": 42
}

دليل التكامل والاستخدام

From infinite loops to instant wellness: the Affirmations API has been rebuilt to deliver personalized, daily positivity with zero friction. Every affirmation now ships with a stable ID, clean trimmed data, and a rich schema — alongside search, pagination, batch and daily endpoints, a full wellness toolkit, and plain-text responses for SMS and voice assistants.

🚀 What’s New

  • Stable IDs – Every affirmation carries a consistent hash-based id, so widgets, notifications, and caches stay in sync.
  • Clean data, automatically – Text and category fields are trimmed of stray whitespace before they reach your app.
  • Smart categories – The 19 categories are derived directly from the dataset and sorted, with no hardcoded drift.
  • Helpful errors – Unknown categories return a clear 404 instead of hanging or looping.
  • Richer schema – Each affirmation returns id, text, category, mood, lang, and length.
  • Find what you need – Search and pagination on the list endpoint, plus a configurable batch endpoint.
  • Deterministic daily picks – /today returns the same affirmation of the day for every user.
  • Wellness toolkit – Personalize by name, reframe negative thoughts, and pair affirmations with breathing exercises.

🛠 API Endpoints

1. List Affirmations

GET /v1/affirmations

Parameters:

  • category (optional): Filter the list by category, such as confidence or self-love.
  • search (optional): Full-text search across affirmation text.
  • page (default: 1): Page number for pagination.
  • limit (default: 10): Results per page, up to a maximum of 50.
  • lang (default: en): Language code. English content is returned in this release.

2. Random Affirmation

GET /v1/affirmations/random

Parameters:

  • category (optional): Return a random affirmation from a specific category.
  • lang (default: en): Language code. English content is returned in this release.
  • format (default: json): Use json for the full object or text for a plain-text response.

3. Random Affirmation by Category

GET /v1/affirmations/categories/{category}/random

Parameters:

  • category (required): The category to pick from, such as sleep. Unknown categories return a clear 404.

4. List Categories

GET /v1/affirmations/categories

Returns the complete, sorted list of categories — from anxiety-relief and calm to confidence, focus, gratitude, parenting, resilience, self-love, sleep, success, and more.

5. Batch Affirmations

GET /v1/affirmations/batch

Parameters:

  • category (optional): Filter the batch by category.
  • limit (default: 10): Number of affirmations to return, up to a maximum of 50.
  • lang (default: en): Language code. English content is returned in this release.

6. Today’s Affirmation

GET /v1/affirmations/today

Parameters:

  • category (optional): Return the deterministic daily pick within a category.
  • lang (default: en): Language code. English content is returned in this release.

The /daily alias returns the same affirmation of the day.

7. Personalize

POST /v1/affirmations/personalize

Body:

  • mood (optional): Mood or category to draw from, such as confidence. Defaults to happiness.
  • goal (optional): The intention behind the affirmation.
  • name (optional): A name to weave into the affirmation, for example “I am confident, Ava.”

8. Reframe a Negative Thought

POST /v1/affirmations/reframe

Body:

  • negativeThought (required): The thought to reframe, for example “I always fail”.

Returns a reframed statement alongside a matching resilience affirmation.

9. Affirmation + Breathing Bundle

GET /v1/affirmations/bundle

Parameters:

  • category (optional): The category to draw from. The sleep category returns the 4-7-8 breathing exercise; all other categories return box breathing.

10. Suggested Schedule

GET /v1/affirmations/schedule

Parameters:

  • timezone (optional): Timezone label for the suggested slots, for example Europe/Berlin. Defaults to UTC.

📦 Response Examples

Random affirmation:

{
  "id": 1874329517,
  "text": "I am confident, capable, and ready for today.",
  "category": "confidence",
  "mood": "confidence",
  "lang": "en",
  "length": 42
}

Personalized affirmation:

{
  "id": 55123874,
  "text": "I am confident, Ava.",
  "category": "confidence",
  "mood": "confidence",
  "lang": "en",
  "length": 20
}

Reframed thought:

{
  "reframe": "Even though \"I always fail\", I choose to believe: I am learning and growing every day.",
  "affirmation": {
    "id": 912345678,
    "text": "I am learning and growing every day.",
    "category": "resilience",
    "mood": "resilience",
    "lang": "en",
    "length": 36
  }
}

Wellness bundle:

{
  "affirmation": {
    "id": 44556677,
    "text": "I release the day and welcome rest.",
    "category": "sleep",
    "mood": "sleep",
    "lang": "en",
    "length": 36
  },
  "breathing": {
    "name": "4-7-8",
    "steps": ["Inhale 4s", "Hold 7s", "Exhale 8s"]
  }
}

Suggested schedule:

{
  "morning": "08:00 Europe/Berlin",
  "evening": "21:00 Europe/Berlin",
  "timezone": "Europe/Berlin"
}

✨ Multi-Format Responses

The random endpoint speaks both JSON and plain text. Use ?format=json (the default) for the full structured object in web and mobile apps, or ?format=text for a ready-to-send string in SMS flows, voice assistants, and widgets.

🎯 Built For

  • Developers building wellness apps, chatbots, and motivation features who want a stable, well-documented API.
  • Product managers raising engagement with daily notifications, streaks, and deterministic daily content.
  • Wellness app creators who need reliable, categorized affirmation content at scale.
  • Enterprise teams that expect scalable, SDK-style endpoints with Postman-ready onboarding.

🌟 Why Choose the Affirmations API?

  • Reliable by design: Stable IDs, trimmed data, and clear 404s mean fewer surprises in production.
  • Depth when you need it: 19 categories spanning everything from anxiety relief to self-love.
  • More than one call: Personalization, reframing, breathing bundles, and scheduling in a single API.
  • Developer friendly: Search, pagination, batching, multi-format responses, and ready-to-use snippets.
  • Wellness ready: 99.99% uptime with low-latency responses for everyday positive moments.

🚀 Get Started

  • Postman collection: Import docs/affirmations-postman.json to explore every endpoint in one click.
  • Code snippets: Copy ready-to-run examples for cURL, JavaScript, and Python from docs/affirmations-snippets.md.
  • LLM-ready: docs/llms.txt gives AI agents a structured summary of the API.

Start building positive moments today — call the today endpoint for a deterministic daily affirmation, then add personalization and breathing bundles to complete the wellness experience.

الاشتراك والترخيص

يمكنك الوصول إلى واجهة برمجة التطبيقات هذه بمستويات جاهزة للاستخدام التجاري على RapidAPI. خطط مرنة مصممة للمشاريع الجانبية والشركات الناشئة وهياكل الإنتاج كبيرة الحجم.

عرض الأسعار والاشتراك

دعم المطورين

هل تحتاج إلى مساعدة في التكامل أو لديك طلب نقطة نهاية مخصص؟ فريقنا الهندسي موجود هنا للمساعدة في المصادقة ومخططات الحمولة وزيادة حدود معدل التردد العالي.

تواصل مع هندسة API

أداء النظام

مراقبة على مدار 24 ساعة طوال أيام الأسبوع مع وقت تشغيل بنسبة 99.9% لاتفاقية مستوى الخدمة. تم تصميمه فوق خدمات صغيرة سحابية أصلية مع تخزين مؤقت على الحافة موزع عالميًا لضمان أوقات استجابة منخفضة للغاية.

جميع الأنظمة التشغيلية