食物、健康与自然

Affirmations API

2,520 affirmations across 56 curated categories with personalization, thought reframing, breathing bundles, and multi-format responses. Perfect for wellness, fitness, and lifestyle applications.

请求标头

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

端点

GET /v1/affirmations

List Affirmations (Paginated)

代码示例

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

试一试

  
GET /v1/affirmations/categories

Get All Categories

代码示例

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

试一试

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

Random Affirmation by Category

代码示例

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

试一试

  
GET /v1/affirmations/random

Get Random Affirmation

代码示例

curl --request GET \
  --url 'https://affirmations-api-by-apirobots.p.rapidapi.com/v1/affirmations/random' \
  --header 'x-rapidapi-key: YOUR_API_KEY' \
  --header 'x-rapidapi-host: affirmations-api-by-apirobots.p.rapidapi.com'

试一试

  
GET /v1/affirmations/today

Get Today's Affirmation

代码示例

curl --request GET \
  --url 'https://affirmations-api-by-apirobots.p.rapidapi.com/v1/affirmations/today' \
  --header 'x-rapidapi-key: YOUR_API_KEY' \
  --header 'x-rapidapi-host: affirmations-api-by-apirobots.p.rapidapi.com'

试一试

  
GET /v1/affirmations/daily

Response Example:

代码示例

curl --request GET \
  --url 'https://affirmations-api-by-apirobots.p.rapidapi.com/v1/affirmations/daily' \
  --header 'x-rapidapi-key: YOUR_API_KEY' \
  --header 'x-rapidapi-host: affirmations-api-by-apirobots.p.rapidapi.com'

试一试

  
GET /v1/affirmations/batch

Get a Batch of Affirmations

代码示例

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

试一试

  
POST /v1/affirmations/personalize

Get a Personalized Affirmation (POST)

代码示例

curl --request POST \
  --url 'https://affirmations-api-by-apirobots.p.rapidapi.com/v1/affirmations/personalize' \
  --header 'x-rapidapi-key: YOUR_API_KEY' \
  --header 'x-rapidapi-host: affirmations-api-by-apirobots.p.rapidapi.com'
POST /v1/affirmations/reframe

Reframe a Negative Thought (POST)

代码示例

curl --request POST \
  --url 'https://affirmations-api-by-apirobots.p.rapidapi.com/v1/affirmations/reframe' \
  --header 'x-rapidapi-key: YOUR_API_KEY' \
  --header 'x-rapidapi-host: affirmations-api-by-apirobots.p.rapidapi.com'
GET /v1/affirmations/bundle

Get an Affirmation Bundle

代码示例

curl --request GET \
  --url 'https://affirmations-api-by-apirobots.p.rapidapi.com/v1/affirmations/bundle' \
  --header 'x-rapidapi-key: YOUR_API_KEY' \
  --header 'x-rapidapi-host: affirmations-api-by-apirobots.p.rapidapi.com'

试一试

  
GET /v1/affirmations/schedule

Get a Daily Schedule

代码示例

curl --request GET \
  --url 'https://affirmations-api-by-apirobots.p.rapidapi.com/v1/affirmations/schedule' \
  --header 'x-rapidapi-key: YOUR_API_KEY' \
  --header 'x-rapidapi-host: affirmations-api-by-apirobots.p.rapidapi.com'

试一试

  

集成及使用指南

Elevate Your Mind, Transform Your Life with Powerful AI-Powered Positive Affirmations 🌟

🧘 Unleash the Power of Positive Thinking

Our cutting-edge Affirmations API delivers instantly personalized, inspiring messages to boost mental wellness, motivation, and personal growth. With 2,520 affirmations across 56 curated categories and multi-format response support (JSON or plain text), this API is your all-in-one solution for wellness, meditation, and personal development applications.

🌈 Key Features

  • Vast Affirmation Library: 2,520 unique affirmations from 8 curated data sources — deduplicated, normalized, and tag-standardized
  • 56 Categories: Covering love, health, beauty, gratitude, spiritual growth, happiness, money & success, blessings, sleep & relaxation, anxiety relief, self-love, motivation, and more
  • Instant Retrieval: Real-time, personalized affirmations with multi-format responses (JSON via ?format=json or plain text via ?format=text)
  • Flexible Filtering: Category filtering, full-text search, pagination, and randomization
  • Daily Deterministic Affirmation: Consistent daily affirmation via the /today and /daily endpoints
  • Personalization: Insert user names and target specific moods/goals via /personalize
  • Thought Reframing: Transform negative thoughts into positive affirmations via /reframe
  • Bundles & Schedules: Affirmation + breathing exercise bundles via /bundle and recommended daily schedules by timezone via /schedule
  • Batch Retrieval: Shuffled batches of affirmations via /batch
  • Enterprise Reliability: 99.99% uptime guarantee and scalable enterprise-grade infrastructure

📊 Affirmation Categories (56 total)

Core Categories: Love, Health, Beauty, Gratitude, Spiritual Growth, Happiness, Money & Success, Blessings, Sleep & Relaxation

Additional Categories: Anxiety Relief, Self-Love, Self-Worth, Romantic Love, Positive Thinking, Confidence, Motivation & Productivity, Joy & Positivity, Inner Peace & Calm, Mental Health, Career & Confidence, Creativity, Emotional Healing, Friendships & Connection, Grief & Healing, Habit, Morning Affirmations, Evening Affirmations, Family Harmony, Focus & Study, Loneliness & Connection, Manifestation & Attraction, Mental Clarity & Focus, Presence & Mindfulness, Prosperity & Financial Abundance, Purpose & Life Direction, Recovery, Relationships, Resilience, Self-Love & Self-Worth, Spiritual Connection & Faith, Success & Achievement, Crisis Support, Depression Support, and more.

🔧 API Endpoints

1. List Affirmations (Paginated)

GET /v1/affirmations

Query Parameters:

ParameterTypeDefaultDescription
categorystring–Filter by affirmation category
langstringenLanguage code
limitinteger10Items per page
pageinteger1Page number
searchstring–Full-text search

Response Schema:

{
    "items": [
        {
            "id": 123,
            "text": "I make decisions that come from my heart",
            "category": "love",
            "mood": "romantic",
            "lang": "en",
            "length": 45
        }
    ],
    "meta": {
        "count": 2520,
        "currentPage": 1,
        "itemsPerPage": 10,
        "numberOfPages": 252
    }
}

2. Get All Categories

GET /v1/affirmations/categories

Response:

[
    "love",
    "health",
    "beauty",
    "gratitude",
    "spiritual",
    "happiness",
    "money",
    "blessing",
    "sleep",
    "anxiety",
    "self-love",
    "motivation",
    "success",
    "inspiration"
    // ... and 42 more categories
]

3. Random Affirmation by Category

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

Response Example:

{
    "id": 42,
    "text": "I make decisions that come from my heart",
    "category": "love",
    "mood": "romantic",
    "lang": "en",
    "length": 45
}

4. Get Random Affirmation

GET /v1/affirmations/random

Query Parameters:

ParameterTypeDefaultDescription
categorystring–Optional category filter
formatstringjsonResponse format: json or text
langstringenLanguage code

Response Example (JSON):

{
    "id": 7,
    "text": "I am free spirited and positive.",
    "category": "beauty",
    "mood": "inspired",
    "lang": "en",
    "length": 32
}

Response Example (Plain Text):

I am free spirited and positive.

5. Get Today’s Affirmation

GET /v1/affirmations/today

Query Parameters:

ParameterTypeDefaultDescription
categorystring–Optional category filter
langstringenLanguage code

Returns the deterministic affirmation of the day — the same affirmation is returned for all users on a given day.

Response Example:

{
    "id": 88,
    "text": "Each new day brings fresh opportunities for growth.",
    "category": "motivation",
    "mood": "hopeful",
    "lang": "en",
    "length": 48
}

Alias: GET /v1/affirmations/daily — returns the same deterministic daily affirmation.

6. Get a Batch of Affirmations

GET /v1/affirmations/batch

Query Parameters:

ParameterTypeDefaultDescription
categorystring–Optional category filter
langstringenLanguage code
limitinteger10Number of affirmations to return

Response:

[
    {
        "id": 12,
        "text": "I am confident in my abilities.",
        "category": "confidence",
        "mood": "empowered",
        "lang": "en",
        "length": 34
    },
    ...
]

7. Get a Personalized Affirmation (POST)

POST /v1/affirmations/personalize

Request Body:

{
    "mood": "confidence",
    "goal": "success",
    "name": "Alex"
}

Returns an affirmation matched to the given mood with the user’s name inserted into the message.

Response Example:

{
    "id": 156,
    "text": "Alex, you are confident and capable of achieving great success.",
    "category": "confidence",
    "mood": "confidence",
    "lang": "en",
    "length": 58
}

8. Reframe a Negative Thought (POST)

POST /v1/affirmations/reframe

Request Body:

{
    "negativeThought": "I can't do this."
}

Returns a positive reframe of the given negative thought.

Response Example:

{
    "reframed": "I am capable of learning and growing through this challenge."
}

9. Get an Affirmation Bundle

GET /v1/affirmations/bundle

Query Parameters:

ParameterTypeDefaultDescription
categorystring–Optional category filter

Returns an affirmation paired with a matching breathing exercise — perfect for meditation and wellness apps.

Response Example:

{
    "affirmation": {
        "id": 55,
        "text": "With every breath, I release tension and welcome peace.",
        "category": "sleep",
        "mood": "calm",
        "lang": "en",
        "length": 47
    },
    "breathingExercise": {
        "name": "Box Breathing",
        "inhaleSeconds": 4,
        "holdSeconds": 4,
        "exhaleSeconds": 4,
        "holdEmptySeconds": 4,
        "cycles": 4
    }
}

10. Get a Daily Schedule

GET /v1/affirmations/schedule

Query Parameters:

ParameterTypeDefaultDescription
timezonestring–Timezone identifier (e.g., America/New_York)

Returns recommended morning and evening times for affirmation practice based on the given timezone.

Response Example:

{
    "timezone": "America/New_York",
    "morning": "07:00",
    "evening": "20:00",
    "suggestedAffirmations": [
        {
            "category": "morning",
            "text": "Today is a new beginning filled with possibilities."
        },
        {
            "category": "evening",
            "text": "I release today's worries and welcome restful sleep."
        }
    ]
}

💡 Use Cases

  • Mental Health Apps — Daily mood support and positive reinforcement
  • Personal Development Platforms — Self-improvement and goal-setting content
  • Meditation & Wellness Tools — Mindfulness prompts and breathing pairings
  • Educational Resources — Social-emotional learning content
  • Productivity Enhancement — Morning motivation and focus boosters
  • Sleep & Relaxation Apps — Evening wind-down affirmations
  • Journaling Apps — Daily reflection prompts

🌟 Why Choose Our Affirmations API?

  • Scientifically Crafted Messages from 8 trusted sources
  • Always Fresh & Unique — 2,520 deduplicated affirmations across 56 categories
  • 99.99% Uptime Guarantee — Enterprise-grade reliability
  • Scalable Enterprise Solution — Handle large volumes efficiently
  • Easy Integration — Simple RESTful API design with JSON or text responses
  • No Machine Learning Required — Ready-to-use content out of the box
  • Multi-Format Support — JSON for apps, plain text for displays and widgets

Get Your API Key Now! 🔑

📖 Integration Guidelines

  • RESTful API design
  • JSON and plain text responses
  • Optional category filtering on most endpoints
  • Pagination support for list endpoints
  • Language support via lang parameter (default: en)

📞 Support Channels

Transform your digital experience, one affirmation at a time!

API Robots APIs:

  • We provide and develop high-quality APIs.
  • Our APIs have a 99.99% uptime.
  • Our aim is to achieve the lowest possible latency.

Support: https://www.apirobots.pro/

订阅和许可

通过 RapidAPI 上的商业就绪层访问此 API。专为副项目、初创公司和大批量生产架构设计的灵活计划。

查看定价并订阅

开发者支持

需要集成帮助或有自定义端点请求?我们的工程团队随时为身份验证、有效负载模式和高频速率限制增加提供协助。

联系 API 工程部

系统性能

全天候 24/7 监控,正常运行时间 SLA 达 99.9%。构建在具有全球分布式边缘缓存的云原生微服务之上,以确保超低延迟响应时间。

所有系统均可运行