Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Join the FabCon + SQLCon recap series. Up next: Power BI, Real-Time Intelligence, IQ and AI, and Data Factory take center stage. All sessions are available on-demand after the live show. Register now

Reply
webportal
Impactful Individual
Impactful Individual

Send post request to Algorithmia API

Hello,

 

I'm trying to get data from an Algorithmia API into Power BI Desktop.

 

Basically, trying to convert this:

curl -X POST -d '"Test"' -H 'Content-Type: application/json' -H 'Authorization: Simple simAOH0ixjNUwV/qBMh1BW1fbKH1' https://api.algorithmia.com/v1/algo/tone/DemoAlgo/0.1.0?timeout=300

 

Into Power Query M:

 

let
url= "https://api.algorithmia.com/v1/algo/tone/DemoAlgo/0.1.0",
auth_key = "'Simple simAOH0ixjNUwV/qBMh1BW1fbKH1'",
header = [#"Authorization" = auth_key, #"Content-Type" = "application/json"],
query = "'Test'",
webdata = Web.Contents(url, [Headers=header, Query = query]),
response = Json.Document(webdata)
in
response

 

 

This is returning NOT found error: 404.

 

Can anyone help?

 

Thanks in advance!

1 ACCEPTED SOLUTION
webportal
Impactful Individual
Impactful Individual

I got it with:

 

let 
    url= "https://api.algorithmia.com/v1/algo/tone/DemoAlgo/0.1.0?timeout=300",
    auth_key = "simAOH0ixjNUwV/qBMh1BW1fbKH1",
    header = [#"Authorization" = auth_key, #"Content-Type" = "application/json"],
    post_contents = """Teste""",
    
    webdata = Web.Contents(url, [Content=Text.ToBinary(post_contents), Headers=header]),
    response = Json.Document(webdata)
in
    response

 

Should anyone have the same issue.

View solution in original post

2 REPLIES 2
webportal
Impactful Individual
Impactful Individual

I got it with:

 

let 
    url= "https://api.algorithmia.com/v1/algo/tone/DemoAlgo/0.1.0?timeout=300",
    auth_key = "simAOH0ixjNUwV/qBMh1BW1fbKH1",
    header = [#"Authorization" = auth_key, #"Content-Type" = "application/json"],
    post_contents = """Teste""",
    
    webdata = Web.Contents(url, [Content=Text.ToBinary(post_contents), Headers=header]),
    response = Json.Document(webdata)
in
    response

 

Should anyone have the same issue.

webportal
Impactful Individual
Impactful Individual

Also tried with:

 

let 
    url= "https://api.algorithmia.com/v1/algo/tone/DemoAlgo/0.1.0?timeout=300",
    auth_key = "simAOH0ixjNUwV/qBMh1BW1fbKH1",
    header = [#"Authorization" = auth_key, #"Content-Type" = "application/json"],
    post_contents = "Teste",
    webdata = Web.Contents(url, [Content=Text.ToBinary(post_contents), Headers=header]),
    response = Json.Document(webdata)
in 
    response

 

This returns:

(400): Bad Request

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

Check out the April 2026 Power BI update to learn about new features.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

FabCon and SQLCon Highlights Carousel

FabCon &SQLCon Highlights

Experience the highlights from FabCon & SQLCon, available live and on-demand starting April 14th.