Jump to content
  • 0

Place API Results into Caspio tables



I would like to place the results of an API request into Caspio table record fields. I have been successful in accomplishing this with google address geocoding.  However, I would like to use a reverse geocoding API from the Census Bureau and I cannot insert the results. I seem to be able to receive the proper response using the Chrome console. But, I  cannot receive the request and insert it into a table record field. Right now, I am just to try to insert one response value. Below is the script that I am inserting into the Footer (with fixed lat/long values to test).





var longitude = '-78.8904516'
var latitude = '36.0054348'
var url1 = 'https://geocoding.geo.census.gov/geocoder/geographies/coordinates?x=' + longitude + '&y=' + latitude + '&benchmark=4&vintage=4&layers=10&format=jsonp'

function gogeo() {
    url: url1,
    dataType: 'jsonp',
    success: function(Response) {
    error: function(error) {

    return Response.result;

    function successCallback(Response){
         var geoid1 = Response.result.geographies["Census Block Groups"]["0"].GEOID;
         geoid1 = Number(geoid1);
        document.getElementById("InsertRecordgeoid").value =geoid1;



Share this post

Link to post
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now