Jump to content

NabUNC

Member
  • Posts

    1
  • Joined

  • Last visited

Everything posted by NabUNC

  1. 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!
×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.