Get Adobe Segment definition in JSON format | Community
Skip to main content
Level 2
July 6, 2025
Solved

Get Adobe Segment definition in JSON format

  • July 6, 2025
  • 3 replies
  • 664 views

Hello Everyone, 

 

I am checking  the possibility of extracting the definition of segment into a JSON format. The scope of segment definition  is the filters that compromise the build of the segments , like the dimensions used, other segments etc.,

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Jennifer_Dungan

I am unaware of any feature that currently allows us to get our segment definitions in JSON... I have actually talked to some people at Adobe about that.. allowing us to export and import segment definitions in JSON format (since I believe they are saved in the format)... whether or not that happens is unknown, but it would certainly make it easier to share and diagnose segment issues with other people (like here in the forums) so much easier.....

 

You could try the audiences API as was suggested... but not all segments are "audiences" and I don't know if that would return what you need or not... 

 

You could try the Segments API, since there are retrieve and update endpoints?

https://developer.adobe.com/analytics-apis/docs/2.0/guides/endpoints/segments/

3 replies

abhinavbalooni
Community Advisor
Community Advisor
July 6, 2025

Hey @avinash2711

 

You can try parsing the JSON response of the audience definition endpoint.

 

Here's the link to the documentation:

https://experienceleague.adobe.com/en/docs/experience-platform/segmentation/api/audiences

 

Hope this will help.

Let us know if you run into issues.

 

Cheers,

Abhinav

 

abhinavbalooni
Community Advisor
Community Advisor
July 7, 2025

My bad.

 

Didn't realise this one was an Adobe Analytics thread. Thought was replying to an AEP query.

 

@jennifer_dungan and @vinay_chauhan are right in that case.

 

Cheers,

Abhinav

Jennifer_Dungan
Community Advisor and Adobe Champion
Jennifer_DunganCommunity Advisor and Adobe ChampionAccepted solution
Community Advisor and Adobe Champion
July 7, 2025

I am unaware of any feature that currently allows us to get our segment definitions in JSON... I have actually talked to some people at Adobe about that.. allowing us to export and import segment definitions in JSON format (since I believe they are saved in the format)... whether or not that happens is unknown, but it would certainly make it easier to share and diagnose segment issues with other people (like here in the forums) so much easier.....

 

You could try the audiences API as was suggested... but not all segments are "audiences" and I don't know if that would return what you need or not... 

 

You could try the Segments API, since there are retrieve and update endpoints?

https://developer.adobe.com/analytics-apis/docs/2.0/guides/endpoints/segments/

Vinay_Chauhan
Community Advisor and Adobe Champion
Community Advisor and Adobe Champion
July 7, 2025

Hi @avinash2711 

You're on the right track and yes, segment definitions are stored in JSON internally, but unfortunately, Adobe doesn’t expose them in a clean, exportable JSON format (yet) through the UI.

If your segment is tied to Adobe Audience Manager or Real-Time CDP, then the Adobe Experience Platform Audiences API can give you the audience definition in JSON. That said, it only works for platform-based segments not for segments created in Adobe Analytics Workspace.

For Analytics segments specifically, the Segments API (v2) is your best bet. It doesn’t return a fully structured JSON of the logic (like nested conditions), but it will give you metadata like container type, report suite, tags, and basic rules. You can fetch those via the GET /segments endpoint.

 

So in short:

  • No native JSON export for Analytics segments

  • Segments API can give partial metadata

  • Audiences API is only useful if your segment lives in AEP/CDP

It would definitely be helpful if Adobe made it easier to export/import segment logic especially for QA or sharing between environments. Fingers crossed for that in a future release.

Hope this helps!