# Can I Use Wolframplha's step by step api in python?

**URL:** <https://community.wolfram.com/t/can-i-use-wolframplhas-step-by-step-api-in-python/22953>\
**Category:** Questions\
**Tags:** wolfram-alpha, curated-data, external-interfaces\
**Created:** [October 11, 2023, 4:22pm UTC](https://community.wolfram.com/t/can-i-use-wolframplhas-step-by-step-api-in-python/22953 "2023-10-11T16:22:49Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![vilion1310](https://avatars.discourse-cdn.com/v4/letter/v/c89c15/32.png) [@vilion1310](https://community.wolfram.com/u/vilion1310)\
**Post date:** [October 11, 2023, 4:22pm UTC](https://community.wolfram.com/t/can-i-use-wolframplhas-step-by-step-api-in-python/22953/1 "2023-10-11T16:22:49Z")

</div>

I’m a beginner to python and i wanna do simple code that shows step by step output for user’s mathematical problem’s however i tried to use step by step api app key i can’t get the step by step i just get answer as an output here’s my code:

```
import requests

app_id = 'xxxxxx'

def query_wolfram_alpha(input_query):
    base_url = 'http://api.wolframalpha.com/v2/query'
    params = {
        'input': input_query,
        'format': 'plaintext',
        'output': 'JSON',
        'appid': app_id,
    }

    response = requests.get(base_url, params=params)
    data = response.json()

    
    if 'pods' in data['queryresult']:
        
        result_pod = next((pod for pod in data['queryresult']['pods'] if pod['title'] == 'Result'), None)

        if result_pod:
            
            result_text = result_pod['subpods'][0]['plaintext']
            print(f"Solution: {result_text}")
        else:
            print("No solution found.")
    else:
        print("No solution found.")

query = 'expand (9x+3)^6'
query_wolfram_alpha(query)

```

---

<div class="post-metadata">

**Author:** ![lavinmirchandani3](https://avatars.discourse-cdn.com/v4/letter/l/7ea924/32.png) [@lavinmirchandani3](https://community.wolfram.com/u/lavinmirchandani3)\
**Post date:** [June 17, 2024, 5:23am UTC](https://community.wolfram.com/t/can-i-use-wolframplhas-step-by-step-api-in-python/22953/2 "2024-06-17T05:23:09Z")

</div>

Hey did you figure out how to do this?

---

<div class="post-metadata">

**Author:** ![bpdesigneering](https://avatars.discourse-cdn.com/v4/letter/b/71e660/32.png) [@bpdesigneering](https://community.wolfram.com/u/bpdesigneering)\
**Post date:** [November 14, 2024, 1:37pm UTC](https://community.wolfram.com/t/can-i-use-wolframplhas-step-by-step-api-in-python/22953/3 "2024-11-14T13:37:35Z")

</div>

Hi, did anybody find a solution ?
