Python API: error when pulling down orders

Topic summary

Users report a connection failure when attempting to pull Shopify order data into a Python dataframe via a Custom App using the Admin API.

The Python script follows an external guide and targets the orders endpoint with API version 2022-01. The request includes query parameters: limit=250, fulfillment_status=unfulfilled, and since_id=0.

Error details: requests.exceptions.ConnectionError with HTTPSConnectionPool (port 443), “Max retries exceeded,” caused by NewConnectionError. This indicates the HTTP client could not establish an HTTPS connection after multiple attempts.

Configuration noted: hostname set to the shop name from the store URL, Admin API key used, secret key used as the password, resource set to orders. The original poster states they confirmed the API version is correct.

Another participant reports the exact same issue. No solutions, workarounds, or next steps are provided. The discussion remains open with unresolved questions about the underlying connection problem.

Summarized with AI on February 18. AI used: gpt-5.

Good morning,

I’m creating a Custom App which I would like to use to pull down order data from my Shopify account into a python dataframe.

I have followed the steps laid out here to create the App and then write the python script to pull down orders, including a 250 order limit.

However, when I try run this script, I get the following error:

requests.exceptions.ConnectionError: HTTPSConnectionPool(host=‘hostname’, port=443): Max retries exceeded with url: /admin/api/2022-01/orders.json?limit=250&fulfillment_status=unfulfilled&since_id=0 (Caused by NewConnectionError(’

I have confirmed that I am using the correct version.

Hostname: for the hostname I am using the name of my shop that appears in the URL.

API key: I’m using the Admin API key

Password: I’m using my secret key

Resource: orders

Any help would be appreciated.

Thanks,

Mike

I am facing the exact same problem while trying to import orders to python using the Shopify API.

Any help would be really appreciated.

Thanks