Strapi Populate not working

Hi all - I am struggling to find a solution for my API data. My design is that “Albums” have a one-to-many relationship with “songs”. In general, an Album can have many songs, but a song can be part of one Album only.

http://localhost:1337/api/albums?populate=* - gives me all Album data (incl. Album cover image etc) but song does not have data for song file, song image etc

http://localhost:1337/api/albums?populate[songs][populate]=* - gives me all the song data (like song file, cover image etc) but the Album does not show data like Album cover image etc

I am not able to display all the Album data and the Song data in one api. Can someone please help me?

Thanks
J

4 Likes

After breaking my head, and pulling my hair, I was finally able to find a solution. I hate to say this, but making the API complex is such a foolish strategy. If the team is worried about performance, then they should allow for options and not completely disable it.

The solution.

  1. Install strapi-plugin-populate-deep - npm
  2. Build your admin
  3. Use /posts?populate=deep to get up to 5 levels deep of data. You can customize up to 10

Strapi, you have to strategize better, not get on the nerves of your users. A headless CMS should ideally simplify things, not complicate them.

Best of luck guys!

10 Likes

This was really helpful, THANK YOU! :fire:

1 Like

How to customize it?

I am also stuck as like you. I’ve item table which brings it’s details from item_detail table and item_dimensions table. but item_detail table have relation with item_offers table and item_dimensions table relation with unit table. which are not fetching while populate the item table can you give idea about how to customise it?

:smiling_face_with_three_hearts:Thank you mate for your help

Tried this but it did not help in my case where I have to populate a reference to a same collection type object. Got Your filters contain a field 'populate' that doesn't appear on your model definition nor its relations error every time I tried.

Sorry, But this plugin is not working for strapi 5

Don’t use populate deep, it’s a bad strategy for populating.

Build the queries you need. It’s just KOA.

Hi, how did you solve this problem?
I have a similar situation with Strapi version 5.
I don’t understand why the Slider does not display the img: {} and bg: {} properties, which are being pulled from Cloudinary.

https://localhost:1337/api/home-page?populate[builder][populate]=*

{
  "data": {
    "id": 2,
    "documentId": "xjluksmdonvvblyt17zjfshb",
    "title": "Home",
    "slug": "home",
    "description": null,
    "createdAt": "2025-05-27T14:42:13.627Z",
    "updatedAt": "2025-05-27T14:53:30.766Z",
    "publishedAt": "2025-05-27T14:53:35.058Z",
    "builder": [
      {
        "__component": "builder.slider",
        "id": 2,
        "Slide": [
          {
            "id": 3,
            "title": "100500+ Top Rated Online Сasino Reviews.",
            "description": "Looking for the best online casinos? If you share our passion, let our experts help you to discover the best online casino sites to suit your gambling needs. Compare 99+ online casino offers. Our reviews carefully analyze safety, reliability, variety of games, software, payment options, and more. Taking the hard work out of finding a great online casino, choose 99Casinos, and may the 🍀 luck be with you!",
            "url": "/"
          },
          {
            "id": 4,
            "title": "200500+ Top Rated Online Сasino Reviews.",
            "description": "Looking for the best online casinos? If you share our passion, let our experts help you to discover the best online casino sites to suit your gambling needs. Compare 99+ online casino offers. Our reviews carefully analyze safety, reliability, variety of games, software, payment options, and more. Taking the hard work out of finding a great online casino, choose 99Casinos, and may the 🍀 luck be with you!",
            "url": "/"
          }
        ]
      }
    ]
  },
  "meta": {

  }
}

I’m find solution:
https://localhost:1337/api/home-page?populate[builder][on][builder.slider][populate][Slide][populate]=*

And this:
https://localhost:1337/api/home-page?populate[builder][on][builder.section][populate]=*&populate[builder][on][builder.cards-block][populate][Cards][populate][0]=img&populate[builder][on][builder.slider][populate][Slide][populate]=*


If you’re looking for Strapi v5 support you can try strapi-plugin-populate-all - npm :slight_smile: