Skip to main content
With your content published, it’s time to retrieve it using the ButterCMS API. In this step, you’ll get your API token and learn how to fetch your content.

Get your API token

Before making API calls, you need your API token. You can find it in your account settings:
1

Open Settings

Hover over your profile icon in the top-right corner and select Settings from the popout menu.
2

Copy Your Read API Token

Your Read API Token is displayed in the API section. Click to copy it.

API token types

Token typePurposeClient-side safe?
Read API TokenFetch draft and published content
Write API TokenCreate and update content
For this Quickstart, you only need the Read API Token.
Never hardcode your API token directly in your source code. Always use environment variables or your hosting platform’s secrets management system.

Understanding the API endpoint

ButterCMS uses a REST API with a simple URL structure. For Pages, the basic GET endpoint is:
https://api.buttercms.com/v2/pages/{page_type}/{page_slug}/?auth_token={your_token}
For the landing page you created:
  • Page Type: landing-page
  • Page Slug: homepage
You can test your API connection with a simple cURL request:
curl "https://api.buttercms.com/v2/pages/landing-page/homepage/?auth_token=YOUR_API_TOKEN"
Or try it directly in your browser by replacing YOUR_API_TOKEN with your actual token.

Understanding the response

The API returns your content as structured JSON:
{
  "data": {
    "slug": "homepage",
    "name": "Homepage",
    "page_type": "landing-page",
    "fields": {
      "headline": "Welcome to Our Amazing Product",
      "hero_image": "https://cdn.buttercms.com/your-image-url",
      "body_content": "<p>Your rich text content here...</p>",
      "cta_button_text": "Start For Free",
      "cta_button_link": "/signup"
    }
  }
}
For a description of what attributes are available in the JSON response, check out our API Docs.

What you’ve accomplished

You’ve successfully fetched your first page from the ButterCMS API!
You now know how to:
  • ✅ Locate your API token
  • ✅ Construct API requests to fetch page content
  • ✅ Parse the JSON response

Next step

Next steps & resources

Explore advanced features and continue your ButterCMS journey.