NabUNC Posted June 23, 2022 Posted June 23, 2022 Hi y'all. I'm trying to do something simple, and think I'm close, but getting a little tripped up. Hope someone can help? I'm trying to use the API to pull in the list of product names that are on my Commerce site. I'm working in Python because of other data processing steps. cURL works fine in Terminal, but I'm not able to pipe the output into a pandas dataframe. import json import pandas as pd import requests headers = { "Authorization": "Bearer xxxxxxxxxxxx", "User-Agent": "Get all samples", "Content-Type": "application/json", } response = requests.get("https://api.squarespace.com/1.0/commerce/products", headers=headers) response.raise_for_status() df = pd.DataFrame(response("name")) Can anyone help with this last step? Thanks so much in advance!
Enny.nz Posted November 25, 2023 Posted November 25, 2023 Hey! did you ever managed to get this done. I'm looking for a solution too 🙂
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment