Json. post and json.get give no response when web scraping

So I’m trying to grab all the jobs available in the UK from this site: https://www.ubisoft.com/en-us/company/careers/search?countries=gb and when going into the network setting there is a json file with the data needed https://avcvysejs1-dsn.algolia.net/1/indexes/*/queries?x-algolia-agent=Algolia%20for%20JavaScript%20(4.8.4)%3B%20Browser%20(lite)%3B%20JS%20Helper%20(3.3.4)%3B%20react%20(16.12.0)%3B%20react-instantsearch%20(6.8.3)&x-algolia-api-key=1291fd5d5cd5a76a225fc6b00f7b296a&x-algolia-application-id=AVCVYSEJS1 and it uses Request Method: POST network settings

However when I wrote a script to get that data

    data = []
    url = "https://avcvysejs1-dsn.algolia.net/1/indexes/*/queries?x-algolia-agent=Algolia%20for%20JavaScript%20(4.8.4)%3B%20Browser%20(lite)%3B%20JS%20Helper%20(3.3.4)%3B%20react%20(16.12.0)%3B%20react-instantsearch%20(6.8.3)&x-algolia-api-key=1291fd5d5cd5a76a225fc6b00f7b296a&x-algolia-application-id=AVCVYSEJS1"
    r = requests.post(url)
    json = r.json()
    print(json)

but get the result

{'message': 'No content in POST request', 'status': 400}

and when I change it to r = requests.post(url) I get the result

{'message': 'indexName is not valid', 'status': 400}

Answer

To get correct response from the server, send payload with the request:

import requests
from bs4 import BeautifulSoup

api_url = "https://avcvysejs1-dsn.algolia.net/1/indexes/*/queries"

params = {
    "x-algolia-agent": "Algolia for JavaScript (4.8.4); Browser (lite); JS Helper (3.3.4); react (16.12.0); react-instantsearch (6.8.3)",
    "x-algolia-api-key": "1291fd5d5cd5a76a225fc6b00f7b296a",
    "x-algolia-application-id": "AVCVYSEJS1",
}

payload = """{"requests":[{"indexName":"jobs_en-us_default","params":"highlightPreTag=%3Cais-highlight-0000000000%3E&highlightPostTag=%3C%2Fais-highlight-0000000000%3E&query=&maxValuesPerFacet=100&page=0&facets=%5B%22jobFamily%22%2C%22team%22%2C%22countryCode%22%2C%22city%22%2C%22contractType%22%2C%22graduateProgram%22%5D&tagFilters=&facetFilters=%5B%5B%22countryCode%3Agb%22%5D%5D"},{"indexName":"jobs_en-us_default","params":"highlightPreTag=%3Cais-highlight-0000000000%3E&highlightPostTag=%3C%2Fais-highlight-0000000000%3E&query=&maxValuesPerFacet=100&page=0&hitsPerPage=1&attributesToRetrieve=%5B%5D&attributesToHighlight=%5B%5D&attributesToSnippet=%5B%5D&tagFilters=&analytics=false&clickAnalytics=false&facets=countryCode"}]}"""

data = requests.post(api_url, params=params, data=payload).json()

for h in data["results"][0]["hits"]:
    print(h["title"])
    print(
        BeautifulSoup(h["additionalInformation"], "html.parser").get_text(
            strip=True, separator=" "
        )
    )
    print("-" * 80)

Prints:

Lead Concept Artist [New IP] (433)
Benefits & Relocation Flexible working, 22 days annual leave + Christmas shutdown, private healthcare (with option to add immediate family), life insurance & income protection, workplace pension scheme, paid volunteering days, annual fitness & well-being allowance, games, technology & merchandise, subsidised travel and many more... Relocation assistance is available to anyone currently living 50 miles or more from the studio location. Please contact a member of the talent acquisition team to find out what we have to offer and how we can support with your move here... relocation really doesn't have to be a daunting prospect. Find out more about Ubisoft Reflections: https://reflections.ubisoft.com/about/ubisoft-reflections/ Facebook: https://www.facebook.com/pg/Ubisoft.Reflections Twitter: https://twitter.com/UbiReflections Ubisoft offers the same job opportunities to all, without any distinction of gender, ethnicity, religion, sexual orientation, social status, disability or age. Ubisoft ensures the development of an inclusive work environment which mirrors the diversity of our gamers community.
--------------------------------------------------------------------------------
Player Support Product Lead
Benefits With Ubisoft CRC, you'll receive a competitive salary along with: Personal performance bonus Private Health Insurance (including eye care and dental) Life Assurance Long Term Disability Insurance Pension Significant discount on the world’s best video games Access to Ubisoft's back catalogue on PC Perks: We work in the heart of Newcastle city centre, right on top of Haymarket metro station in a lively, international and creative space. We have a kitchen stocked with  cereals, fruits, unlimited filtered water, teas, coffee Regular professional and social events Monthly Ubidrinks Flexible working hours A casual dress code Fun, we like to work hard but have a laugh too! For the safety of all our teams we are currently working remotely. We hope to return to our CRC home very soon and anticipate a blended working pattern combining office and home based working in the future Ubisoft is committed to creating an inclusive work environment that reflects the diversity of our player community. We are an equal opportunity employer. Qualified applicants will receive consideration for employment without regard to their race, ethnicity, religion, gender, sexual orientation, age or disability status.
--------------------------------------------------------------------------------

...and so on.