I see you are using requests library. From version 2.4.2 onwards, you can use json as parameter. It should have better json encoding than data.

requests.post('https://getpocket.com/v3/send', json={
    'consumer_key': consumer_key,
    'access_token': access_token,
    'actions': [{
        'item_id':'1000000000',
        'action':'archive'
     }]
})

See here for more information: http://docs.python-requests.org/en/master/user/quickstart/#more-complicated-post-requests

EDIT: If only action key should be a json string, you can try following:

import simplejson as json

requests.post('https://getpocket.com/v3/send', data={
        'consumer_key': consumer_key,
        'access_token': access_token,
        'actions': json.dumps([{
            'item_id':'1000000000',
            'action':'archive'
         }])
    })

I would recommend simplejson over json package as it is updated more frequently.

Answer from mdpt on Stack Overflow
🌐
Codegive
codegive.com › blog › python_requests_json_array.php
Python Requests JSON Array (2026): Master API Data Parsing & Unlock Effortless Integration Secrets!
March 24, 2026 - To parse a JSON array from a Python Requests response, first make the request, then access the response body as JSON using response.json(). This method automatically decodes the JSON data into a Python list, which is the equivalent of a JSON array.
Discussions

How to parse JSON Array of objects in python - Stack Overflow
Given that typeof(response) gives me requests.models.Response, how can I parse it in Python? ... You need to use the json module. ... Possible duplicate of Convert string to JSON using Python if not, then it's an array which means its already parsed as json, so I'm not sure what you're asking ... More on stackoverflow.com
🌐 stackoverflow.com
How to send an array using requests.post (Python)? "Value Error: Too many values to unpack" - Stack Overflow
I'm trying to send an array(list) of requests to the WheniWork API using requests.post, and I keep getting one of two errors. When I send the list as a list, I get an unpacking error, and when I se... More on stackoverflow.com
🌐 stackoverflow.com
arrays - Python 3 requests library and json within a list - Stack Overflow
That's how you would access you ... far as Python is concerned) once you have the array. The access you described above, response.json()['data']['next_Data'] would return {'actual_data': ['data1', 'data2', 'data3']} and doing a for loop on that dictionary/hash/object would yield the key: 'actual_data' and trying x['actual_data'] would give you a TypeError since the indices are supposed to be integers. ... Sign up to request clarification ... More on stackoverflow.com
🌐 stackoverflow.com
How do I store JSON response to Array - Python request - Stack Overflow
I can't find a solution because the lack of understanding of programming. I have created multiple Python Scripts where I do API calls to get results, the results are converted to JSON. I want to st... More on stackoverflow.com
🌐 stackoverflow.com
🌐
YouTube
youtube.com › codecraze
python requests post json array - YouTube
Download this code from https://codegive.com Sure, I'd be happy to provide a tutorial on making a POST request with a JSON array using the Python requests li...
Published: January 19, 2024
Views: 57
🌐
ReqBin
reqbin.com › json › python › uzykkick › json-array-example
Python | What is JSON Array?
Convert your JSON Array request to the PHP, JavaScript/AJAX, Node.js, Curl/Bash, Python, Java, C#/.NET code snippets using the Python code generator.
🌐
Python Pool
pythonpool.com › home › blog › python requests json: a comprehensive guide
Python Requests JSON: A Comprehensive Guide - Python Pool
February 25, 2023 - You can use the Python Requests ... endpoint that returns a JSON array, you can use the Requests library to make a request to that endpoint and receive the JSON array as a response....
🌐
ReqBin
reqbin.com › code › python › g4nr6w3u › python-parse-json-example
How to parse a JSON with Python?
You can access an element from a JSON array by its index in a Python object. ... import json json_str = """ { "Orders": [ {"Id": 78912}, {"Id": 88953} ] } """'' data = json.loads(json_str) order_1_id = data['Orders'][0]['Id'] order_2_id = ...
Find elsewhere
🌐
Tech With Tech
techwithtech.com › home › json object vs. json array explained with python
JSON Object vs. JSON Array Explained With Python - Tech With Tech
November 6, 2022 - For example, when retrieving the response from an HTTP request. The difference between a JSON object and a JSON array is just a matter of taste. If you’re in charge of development it’s up to you. In the following, you will learn exactly what JSON objects and JSON arrays are and how they differ from each other explained with Python...
🌐
DEV Community
dev.to › nurarif151 › how-to-get-a-get-response-as-an-array-in-python-3kem
"How to Get a 'GET' Response as an Array in Python - DEV Community
January 8, 2023 - import requests url = 'https://api.example.com/endpoint' response = requests.get(url) Next, we can use the json() method to convert the response to a dictionary. ... Now, let's say that the data we want is stored in the 'results' key of the ...
🌐
PYnative
pynative.com › home › python › json › parse a json response using python requests library
Parse a JSON response using Python requests library
May 14, 2021 - We will parse JSON response into Python Dictionary so you can access JSON data using key-value pairs. Also, you can prettyPrint JSON in the readable format. ... The response of the GET request contains information we called it as a payload. We can find this information in the message body.
🌐
Stack Overflow
stackoverflow.com › questions › 17736871 › python-3-requests-library-and-json-within-a-list
arrays - Python 3 requests library and json within a list - Stack Overflow
That's how you would access you array of data (actually a list as far as Python is concerned) once you have the array. The access you described above, response.json()['data']['next_Data'] would return {'actual_data': ['data1', 'data2', 'data3']} and doing a for loop on that dictionary/hash/object would yield the key: 'actual_data' and trying x['actual_data'] would give you a TypeError since the indices are supposed to be integers. ... Sign up to request clarification or add additional context in comments.
🌐
ReqBin
reqbin.com › code › python › rituxo3j › python-requests-json-example
How do I get JSON using the Python Requests?
To request JSON data from the server using the Python Requests library, call the request.get() method and pass the target URL as a first parameter. The Python Requests Library has a built-in JSON decoder and automatically converts JSON strings ...
🌐
GeeksforGeeks
geeksforgeeks.org › response-json-python-requests
response.json() - Python requests - GeeksforGeeks
April 28, 2025 - To print the JSON data fetched we have used json() method which prints the JSON data in the Python dictionary format as seen in the output. In this way, we can pas parse JSON responses in Python. ... # import requests module import requests # Making a get request response = requests.get('https://api.github.com') # print response print(response) # print json content print(response.json())
🌐
Stack Overflow
stackoverflow.com › questions › 27034521 › handling-python-requests-json-response
arrays - Handling Python Requests JSON Response - Stack Overflow
November 20, 2014 - Trying to handle some JSON response to a Python Requests call to an API, in Python--a language I'm still learning. Here's the structure of the sample returned JSON data: {"sports":[{"searchtype":"
🌐
TechTutorialsX
techtutorialsx.com › home › python › python: parsing json
Python: Parsing JSON - techtutorialsx
March 14, 2019 - As we will see when printing the response, an array of 10 user objects will be returned in the JSON response. You can check bellow, in figure 1, the structure of the object representing each user. Figure 1 - JSON structure of a user, returned in the HTTP GET request. So, our data object will be a Python list, with an entry for each user object.
🌐
Stack Overflow
stackoverflow.com › questions › 69465274 › posting-a-json-array-with-requests
python - Posting a JSON array with Requests - Stack Overflow
October 6, 2021 - I needed to do a little deconstruction as urllib's encoding which is used by requests does not play well with arrays. This got me the result I was looking for. sessionjson_arr = [{ "item_price_id":website_response_json['benefits'][0]['benefits_items'][0]['item_price_id'], "item_name":website_response_json['benefits'][0]['benefits_items'][0]['item_name'], "benefit_full_price":website_response_json['benefits'][0]['benefits_items'][0]['benefit_full_price'], "benefit_discount_price":website_response_json['benefits'][0]['benefits_items'][0]['benefit_discount_price'], "benefit_vip_full_price":websit
🌐
PYnative
pynative.com › home › python › json › python post json using requests library
Python Post JSON using requests library
May 14, 2021 - Using requests, you’ll pass the payload to the corresponding function’s data parameter. Data can be anything including JSON, dictionary, a list of tuples, bytes, or a file-like object. In this example, I am sending the following JSON data. ... If you have data in the form of a dictionary or any Python object, you can convert it into JSON like this.