HTTP Requests with RapidApi

Describe the issue/error/question

Hi,

I’m struggling setup some APIs that I choose on RapidApi into n8n. The apis work properly into my python script but I would like to use them into n8n to create some workflow automations.

I’m using this one : https://rapidapi.com/fayeznazzal98/api/awesome-indeed/

What is the error message (if any)?



I got those two errors (looks like the api key is not the good one but into my python script I’m using the same one and it works (so I think I’m missing something into the setup part)

Please share the workflow

This is the way I setup the node : 

{
  "nodes": [
    {
      "parameters": {
        "url": "https://awesome-indeed.p.rapidapi.com/indeed_jobs_detailed",
        "options": {},
        "headerParametersUi": {
          "parameter": [
            {
              "name": "headers",
              "value": "{'x-rapidapi-host': \"awesome-indeed.p.rapidapi.com\",'x-rapidapi-key':\"MY-RAPIDAPI-KEY\"}"
            }
          ]
        },
        "queryParametersUi": {
          "parameter": [
            {
              "name": "params",
              "value": "{\"search_query\":\"growth hacker\",\"page\":\"1\",\"country_code\":\"fr\",\"sort_by\":\"date\"}"
            }
          ]
        }
      },
      "name": "HTTP Request",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 1,
      "position": [
        640,
        300
      ]
    }
  ],
  "connections": {}
}
(Select the nodes and use the keyboard shortcuts CMD+C/CTRL+C and CMD+V/CTRL+V to copy and paste the workflow respectively)

Share the output returned by the last node

Could someone can tell me what did I do wrong ? Thanks :smile:

Information on your n8n setup

  • n8n version: n8n cloud
  • Database you’re using (default: SQLite):
  • Running n8n with the execution process [own(default), main]:
  • Running n8n via [Docker, npm, n8n.cloud, desktop app]:

Hey @jeremy_FRANCOIS,

The workflow below shows 2 different ways you can get it working, The first breaks down the request so rather than using JSON you put in each option and value.

The second approach uses the json you have provided which a slight character change to swap the ' for " and checks the JSON/RAW Parameters option.

image

Example Workflow

Hopefully this helps :+1:

1 Like

Awesome ! thanks a lot @Jon :raised_hands:

1 Like