How to Skip Trace Property Owners using BatchData with Python

Поделиться
HTML-код
  • Опубликовано: 4 дек 2024

Комментарии • 8

  • @automeight
    @automeight 2 года назад

    Amazing! I love how you broke down the code in pieces. By any chance do you have any material on uploading a CSV with addresses, running the whole script on every row and returning a csv with the skiptraced data for every property?

    • @TechInRealEstate
      @TechInRealEstate  2 года назад

      Thanks for watching Joel, I do not have that content up yet, but I plan to in the coming weeks 👍

  • @BibleSamurai
    @BibleSamurai 2 года назад

    Kinda like the other person asked, do you have a vid to skip trace a full list yourself using python?

    • @TechInRealEstate
      @TechInRealEstate  2 года назад

      Hi Jean I don’t have a current video but it’s on my list to add. It would require a FOR LOOP in Python to go through each row in a file, call the skip tracing api, then store the value into a list and add it back to the file at the end of the loop

    • @BibleSamurai
      @BibleSamurai 2 года назад

      @@TechInRealEstate interesting 🤔. I'll just wait for that video then. 😁. I havent coded in a hot minute.

    • @BibleSamurai
      @BibleSamurai Год назад

      what i got so far:
      import requests
      import pandas as pd
      # Replace Your-Api Key with the key provided by Skip Engine
      headers = {
      'Content-Type': 'applicaion/json',
      'x-api-key': 'd50f9812-535c-491c-b82d-f14b80a92562'
      }
      # Read the Excel file and store it in a DataFram
      df = pd.read_excel('Copy of Palm Bay, FL DataBase.xlsx')
      df.head()
      Key FName LName Address1 City State Zip MailingAddress1 MailingCity MailingState MailingZip Phone Landline Email
      0 1 RAFAEL H QUINTERO 1275 LAMPLIGHTER DR NW PALM BAY FL 32907 7901 CAPWOOD AVENUE TAMPA FL 33637.0 NaN NaN NaN
      1 2 RITA ROSE 1224 BEI CT NW PALM BAY FL 32907 66 GROVE PARK CRES NaN CANADA NaN NaN NaN NaN
      2 3 FRANCIS J CUMMINGS 1354 AMADOR AVE NW PALM BAY FL 32907 24 Elm Tree CIR Newville PA 17241.0 NaN NaN NaN
      3 4 Nicole Besancon 817 ROSTOCK CIR NW PALM BAY FL 32907-9043 817 NW Rostock CIR Palm Bay FL 32907.0 NaN NaN NaN
      4 5 E CAMERON JR HITCHCOCK NaN PALM BAY FL 32907 164 ALCAZAR ST ROYAL PALM BCH FL 33411.0 NaN NaN NaN
      # Create an empty list to store the results
      results = []
      # Iterate through each row in the DataFrame
      for index, row in df.iterrows():
      # Extract the required information from the row
      key = row["Key"]
      fname = row["FName"]
      lname = row["LName"]
      address1 = row["Address1"]
      city = row["City"]
      state = row["State"]
      zip = row["Zip"]
      mailing_address1 = row["MailingAddress1"]
      mailing_city = row["MailingCity"]
      mailing_state = row["MailingState"]
      mailing_zip = row["MailingZip"]
      # Prepare the data for the Api Request
      data = {
      "Key": key,
      "FName": fname,
      "LName": lname,
      "Address1": address1,
      "City": city,
      "State": state,
      "Zip": zip,
      "MailingAddress1": mailing_address1,
      "MailingCity": mailing_city,
      "MailingState": mailing_state,
      "MailingZip": mailing_zip
      }
      # Send Requests
      try:
      # Send the API request and store the response in a variable
      response = requests.post('api.skipengine.com/v1/service', headers=headers, json=data)
      # Extract the relevant data from the response
      phone_number = response.json()["Phone"]
      # Append the data to the results list
      results.append({"Key": key, "Phone": phone_number})
      except:
      # Append the data to the results list
      results.append({"Key": key, "Phone": "Not found"})
      # Create a new DataFrame from the results list
      results_df = pd.DataFrame(results)
      # Export the results to a new Excel file
      results_df.to_excel('C:\\Users\\tidan\\PYTHON DOJO\palmbay_skipped.xlsx')
      # Read File
      df_skipped = pd.read_excel('palmbay_skipped.xlsx')
      print(df_skipped)
      ####### Trying to figure out why this output is like this
      Unnamed: 0 Key Phone
      0 0 18459 Not found

    • @TechInRealEstate
      @TechInRealEstate  Год назад

      @@BibleSamurai thanks for sending! do you mind emailing me at arielherrera@analyticsariel.com with the notebook and palmbay_skipped.xlsx file? I can take try running it and seeing why the output seems off