Why can I not import API Json into Excel when I can import it with Python?

Viewed 59

I am a bit of a Python novice here and definitely am a novice when it comes to the use of APIs. However, I think a solution to my problem here might be fairly straight forward.

I am trying to use a REST API provided by a property management company in order to import data from the company to my company's excel sheet. The api provides data in json format. Additionally, the api username and password need to be provided in the same url as the api.

The api link itself looks like this (with private info in italics) -

https://apiusername:apipassword@mycompanyname.appfolio.com/api/v1/reports/general.json

Using import requests in python, I was able to run this code successfully and have it return what seems like a dictionary.

import requests

url='https://*apiusername*:*apipassword*@*mycompanyname*.appfolio.com/api/v1/reports/general.json'

response = requests.get(url)

print(response.json())

Ideally. I would like to avoid the use of python and import the api data directly into excel. I'm assuming that since the api works just fine in python, it would work in excel as well.

I've gone into excel and tried import data from Web and ODataFeed. When I type in my api url however, excel returns through the anonymous access web content section, "we couldn't authenticate with the credentials provided. please try again."

I'm not really sure how to get around this, so any help would be appreciated. I hope I am missing something fairly obvious. Perhaps it would be easier to import with python and then put the imported data into an excel sheet from there.

Any help is appreciated. Thanks!

0 Answers
Related