# Check if a URL is valid and store response

**URL:** <https://community.glideapps.com/t/check-if-a-url-is-valid-and-store-response/78669>\
**Category:** Ask for Help\
**Created:** [December 18, 2024, 2:50am UTC](https://community.glideapps.com/t/check-if-a-url-is-valid-and-store-response/78669 "2024-12-18T02:50:36Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![blairrorani](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/blairrorani/32/43426_2.png) [@blairrorani](https://community.glideapps.com/u/blairrorani)\
**Post date:** [December 18, 2024, 2:50am UTC](https://community.glideapps.com/t/check-if-a-url-is-valid-and-store-response/78669/1 "2024-12-18T02:50:36Z")

</div>

Using Get Webpage Source works for valid URLs and not for invalid ones.

If a URL is invalid, I get a red error message.  
How do I capture the fact that this URL is invalid beyond seeing the error message?

---

<div class="post-metadata">

**Author:** ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)\
**Post date:** [December 18, 2024, 4:26am UTC](https://community.glideapps.com/t/check-if-a-url-is-valid-and-store-response/78669/2 "2024-12-18T04:26:37Z")

</div>

I guess my question would be what is your criteria for a “valid” URL?

eg. is it:

- based on the structure of the URL?
- whether or not the domain resolves to a valid IP address?
- whether or not the website is online?
- whether or not the website accepts connections?
- whether or not the website requires authentication?
- something else?

---

<div class="post-metadata">

**Author:** ![blairrorani](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/blairrorani/32/43426_2.png) [@blairrorani](https://community.glideapps.com/u/blairrorani)\
**Post date:** [December 18, 2024, 1:03pm UTC](https://community.glideapps.com/t/check-if-a-url-is-valid-and-store-response/78669/3 "2024-12-18T13:03:26Z")

</div>

I’m asking Chat GPT 4o to find the URL.  
Sometimes the URL is incorrect, e.g. .com.au instead of .com, or [pureorganic.com](http://pureorganic.com) vs [pure-organic.com](http://pure-organic.com).

So based on “is this the correct URL for the company”.

If there is a technical issue with accessing the URL then that is fine, I at least want to have the correct one, but am not sure how to determine this.

If URL is wrong, then I can enter it manually after finding the right one based on company name.

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [December 18, 2024, 11:35pm UTC](https://community.glideapps.com/t/check-if-a-url-is-valid-and-store-response/78669/4 "2024-12-18T23:35:45Z")

</div>

What about sending a GET request to the URL? I think it probably returns something that you can determine an error, if it is not a valid URL.

---

<div class="post-metadata">

**Author:** ![Jakub\_Molak](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jakub_molak/32/81347_2.png) [@Jakub\_Molak](https://community.glideapps.com/u/Jakub_Molak)\
**Post date:** [December 19, 2024, 4:56pm UTC](https://community.glideapps.com/t/check-if-a-url-is-valid-and-store-response/78669/5 "2024-12-19T16:56:31Z")

</div>

👍 this would work, only issue I could see with that is if the url chatgpt generates is still a valid link but incorrect to the company

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [December 20, 2024, 12:15am UTC](https://community.glideapps.com/t/check-if-a-url-is-valid-and-store-response/78669/6 "2024-12-20T00:15:52Z")

</div>

![CleanShot 2024-12-20 at 07.14.28](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/f/6/f6637d35af442ff77d9a61b526b22a789d421820.png)

Or maybe do something like this, but I don’t know how you plan to construct the flow to test. Under the hood this column probably does a GET request as well.

I wouldn’t trust 4o’s ability to find the URLs though, it’s very likely it makes up URLs.
