Is api exist in hubspot to check website page with specified url exist in hubspot

nutan1
Participant

we have 100 of countries exist.Now I have created same URL structure for pages to the countries that we have for e.g India URL is https://dev.transfast.com/india for Pakistan https://dev.transfast.com/pakistan but for some countries we have yet not build any pages. and now my need is to hide those country on main page which have no page exist in Hubspot for e.g we have country Benin for which we have not build page yet.So here we have domain and country name.Now I want to use Hubspot API to check is page with URL https://dev.transfast.com/benin exist in Hubspot

0 Upvotes
2 Replies 2
lscanlan
HubSpot Alumni

Hi @nutan1,

 

Could you pull all of the pages in your account through the CMS Page Publishing API? Here's our documentation for it: https://developers.hubspot.com/docs/methods/pages/get_pages . Both the "absolute_url" and the "slug" are returned in the response for each page. You could loop through all of the page objects to see if your page exists. Other than this, so far as I know it's not possible to check specifically for a page by its URL. Does this help with what you're trying to do?

 

 - Leland

Leland Scanlan

HubSpot Developer Support
0 Upvotes
nutan1
Participant

I have checked above provided solution with additional filter using parameter 'name' with 'icontains'. Is there any way to work same thing using parameter 'absolute_url' instead of parameter 'name'.

 

0 Upvotes