65
Views
6
Comments
Solved
Check if streets , city ,state and pincode are valid and correct
Question
Application Type
Reactive

Hi,

I have a use case where i take street name, city, and zip code from user end as free text, and state is to be selected from a dropdown holding all states and form a valid address.

How do i check if the address formed is valid address and exists. if the state is California , then zip code, streets etc should be from California .

Please suggest any forge component or solution to achieve this. 

2025-12-17 21-10-06
Shlok Agrawal
Solution

Hey Sneha 

I am sure google will provide some test keys, you have to generate them. https://developers.google.com/maps/documentation/address-validation/get-api-key

Thanks
Shlok Agrawal

2023-01-26 16-03-24
Ana Agostinho

Hello Sneha Kumari, 

I believe what you want is an API instead of a forge component. If you just google it, you will find a huge amount of them. Chose the one that fits you the best :) 

In order to integrate APIs in Outsystems, check the following links: 

Best regards, 

Ana

UserImage.jpg
vikas sharma
Champion

Hi,

Yes. Simply if you want to validate that address is validate you should have some source for this. So achieve this there may be many approaches depends on your implementation.

1. As Ana suggested you can use any external API to validate the address.

2. You can also use Google's API to validate address. But it will be paid on the uses basis.

3. You can store data in OS database itself and create entities for City, Zip, State etc. So against these entities values you can check.

regards

2025-12-17 21-10-06
Shlok Agrawal

Hey @Sneha Kumari 

The most comfortable way that I would suggest could be one of 2  

Method 1) Have all the city, state and pincode database saved with you and then validate.

Method 2) Use some consume some rest API service and get response from them, for this please refer https://developers.google.com/maps/documentation/address-validation. Here you will find details of how to implement it the  

Thanks
Shlok Agrawal

UserImage.jpg
Sneha Kumari

Hi @Shlok Agrawal  I am going with method 2 which you suggested , but the issue i am facing is , i am getting error 403 due to api key. Do i need to purchase it? or is it available for free? 

2025-04-17 05-42-16
Ajit Kurane

Hi Sneha,

You can try it out below for testing purpose,

http://api.zippopotam.us


Thanks.

2025-12-17 21-10-06
Shlok Agrawal
Solution

Hey Sneha 

I am sure google will provide some test keys, you have to generate them. https://developers.google.com/maps/documentation/address-validation/get-api-key

Thanks
Shlok Agrawal

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.