# Site Map Endpoint not getting the same values as UI.

**URL:** <https://community.hubspot.com/t/site-map-endpoint-not-getting-the-same-values-as-ui/17431>\
**Category:** APIs & Integrations\
**Tags:** cms-content\
**Created:** [November 26, 2019, 6:08pm UTC](https://community.hubspot.com/t/site-map-endpoint-not-getting-the-same-values-as-ui/17431 "2019-11-26T18:08:59Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![rchee](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/rchee/32/53869_2.png) [@rchee](https://community.hubspot.com/u/rchee)\
**Post date:** [November 26, 2019, 6:08pm UTC](https://community.hubspot.com/t/site-map-endpoint-not-getting-the-same-values-as-ui/17431/1 "2019-11-26T18:08:59Z")

</div>

I’m trying to get which pages (site pages, landing page and blog posts) are in the site map, just like it is in the UI [https://app.hubspot.com/settings/4\*\*\*\*\*7/marketing/domains/sitemaps/www.\*\*\*.\*\*\*](https://app.hubspot.com/settings/4615917/marketing/domains/sitemaps/www.maxg.ai), throught the site-maps api “/content/api/v2/site-maps”. The api returns the site maps and there the fields “blog\_posts”, “site\_page” and “landing\_page” are empty.

Shouldn’t these fields have the Id of the pages? All i have is Ids in “video\_metas” and “image\_metas”.

```auto
{
 "blog_posts": [],
 "content_options": {},
 "created": 1541171167832,
 "created_by_id": 811527,
 "deleted_at": 0,
 "domain": "www. ****.***",
 "has_user_changes": false,
 "id": 6442679814,
 "image_metas": {
 "6219818671": [
 ...
 ],
 ...
 },
 "initiated_at": 1541171167832,
 "knowledge_articles": [],
 "landing_pages": [],
 "name": "default",
 "portal_id": 4 ***** 7,
 "site_pages": [],
 "updated": 1574250280193,
 "updated_by_id": 100,
 "video_metas": {
 "6910796359": [
 ...
 ],
 ...
 }
}

```

---

<div class="post-metadata">

**Author:** ![sharonlicari](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/sharonlicari/32/101479_2.png) [@sharonlicari](https://community.hubspot.com/u/sharonlicari)\
**Post date:** [December 9, 2019, 10:23am UTC](https://community.hubspot.com/t/site-map-endpoint-not-getting-the-same-values-as-ui/17431/2 "2019-12-09T10:23:40Z")

</div>

Hey @rchee

I apologize for the delay in getting back to you. I am wondering if you were able to resolve this or if you still need assistance on this matter?

Thank you

Sharon

---

<div class="post-metadata">

**Author:** ![rchee](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/rchee/32/53869_2.png) [@rchee](https://community.hubspot.com/u/rchee)\
**Post date:** [December 9, 2019, 12:02pm UTC](https://community.hubspot.com/t/site-map-endpoint-not-getting-the-same-values-as-ui/17431/3 "2019-12-09T12:02:22Z")

</div>

Thank you @sharonlicari for the late reply. I wasnt able to resolve the issue. As the json i posted before shows, the fields blog\_posts, landing\_pages and site\_pages are empty arrays. Shouldn’t it have the pages i have in the site map in it?

---

<div class="post-metadata">

**Author:** ![IsaacTakushi](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/isaactakushi/32/70387_2.png) [@IsaacTakushi](https://community.hubspot.com/u/IsaacTakushi)\
**Post date:** [December 12, 2019, 1:21pm UTC](https://community.hubspot.com/t/site-map-endpoint-not-getting-the-same-values-as-ui/17431/4 "2019-12-12T13:21:44Z")

</div>

Hi, @rchee.

Happy to help here. I’d like to try and replicate this behavior, but your email doesn’t appear associated with a HubSpot account.  
Could you share the full request URL with me via DM? Please obscure all but the first five characters of your `hapikey`.

---

<div class="post-metadata">

**Author:** ![IsaacTakushi](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/isaactakushi/32/70387_2.png) [@IsaacTakushi](https://community.hubspot.com/u/IsaacTakushi)\
**Post date:** [December 13, 2019, 4:20pm UTC](https://community.hubspot.com/t/site-map-endpoint-not-getting-the-same-values-as-ui/17431/5 "2019-12-13T16:20:03Z")

</div>

Hi, @rchee.

The team confirmed that the [CMS Site Maps API](https://developers.hubspot.com/docs/methods/site-maps/get_site_maps) **currently only returns pages _excluded_ from site maps.**

Since you have not excluded any pages, the `site-pages`, `landing-pages`, and `blog-posts` arrays appear empty.

We recognize that this is counterintutive, so we will be addressing the issue in upcoming API releases. Apologies for the confusion.

In the meantime, we recommend using the following request to the [CMS Page Publishing API](https://developers.hubspot.com/docs/methods/pages/get_pages) to see the pages which also appear on your sitemap:

`https://api.hubapi.com/content/api/v2/pages?state __in=PUBLISHED_AB&state__ in=PUBLISHED&state__in=PUBLISHED_OR_SCHEDULED`
