# HTTPError: 404 Client Error: Not Found for url

**URL:** <https://forum.ecmwf.int/t/httperror-404-client-error-not-found-for-url/6934>\
**Category:** CAMS - Access and Login\
**Tags:** cams, api\
**Created:** [15 October 2024 22:18 UTC](https://forum.ecmwf.int/t/httperror-404-client-error-not-found-for-url/6934 "2024-10-15T22:18:17Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ondrej\_Vlcek](https://forum.ecmwf.int/letter_avatar_proxy/v4/letter/o/76d3ee/32.png) [@Ondrej\_Vlcek](https://forum.ecmwf.int/u/Ondrej_Vlcek)\
**Post date:** [15 October 2024 22:18 UTC](https://forum.ecmwf.int/t/httperror-404-client-error-not-found-for-url/6934/1 "2024-10-15T22:18:17Z")

</div>

Hi, I am trying to use the following code for download cams data:

```auto
#!/usr/bin/python3.9

import cdsapi

dataset = "cams-europe-air-quality-forecasts"
request = {
    "variable": [
        "particulate_matter_10um",
    ],
    "model": ["ensemble"],
    "level": ["0"],
    "date": ["2024-10-15/2024-10-15"],
    "type": ["forecast"],
    "time": ["00:00"],
    "leadtime_hour": [
         "0",
         "1",
         "2",
    ],
    "data_format": "netcdf_zip"
}
target = 'trial_output.ncdf'

client = cdsapi.Client()
client.retrieve(dataset, request, target)

```

My `~/.cdsapirc` file is following (key corresponds to the one displayed at [Climate Data Store](https://cds.climate.copernicus.eu/how-to-api) after logging):

```auto
url: https://cds.climate.copernicus.eu/api
key: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx

```

When running the script from commandline, I recieve this error:

```auto
...
File "/usr/local/lib/python3.9/site-packages/cads_api_client/processing.py", line 86, in cads_raise_for_status
    raise requests.HTTPError(message, response=response)
requests.exceptions.HTTPError: 404 Client Error: Not Found for url: https://cds.climate.copernicus.eu/api/retrieve/v1/jobs/job_id?log=True&request=True
job not found
job job_id not found

```

However, I can see under my CAMS account that the request with corresponding job\_id (e.g. c5dfc58e-7319-4c57-9be6-822e95552c29) was created and available for download a bit later. How can I make cdsapi to wait with download until the request is fulfilled?

---

<div class="post-metadata">

**Author:** ![Kevin\_Marsh](https://forum.ecmwf.int/user_avatar/forum.ecmwf.int/kevin_marsh/32/368_2.png) [@Kevin\_Marsh](https://forum.ecmwf.int/u/Kevin_Marsh)\
**Post date:** [16 October 2024 09:26 UTC](https://forum.ecmwf.int/t/httperror-404-client-error-not-found-for-url/6934/2 "2024-10-16T09:26:58Z")

</div>

Hi, you are requesting a dataset which is on the ADS, but you are using your CDS credentials in the .cdsapirc file, so the dataset is ‘not found’.  
They are separate systems, so you need to use your ADS details from [Atmosphere Data Store](https://ads.atmosphere.copernicus.eu/how-to-api) in your .cdsapirc file in this case.

( Its also a good idea to try a small download from the ADS web interface beforehand to make sure you have agreed to the relevant licences )

---

<div class="post-metadata">

**Author:** ![Ondrej\_Vlcek](https://forum.ecmwf.int/letter_avatar_proxy/v4/letter/o/76d3ee/32.png) [@Ondrej\_Vlcek](https://forum.ecmwf.int/u/Ondrej_Vlcek)\
**Post date:** [16 October 2024 12:20 UTC](https://forum.ecmwf.int/t/httperror-404-client-error-not-found-for-url/6934/3 "2024-10-16T12:20:56Z")

</div>

> [@Ondrej\_Vlcek](#):
>
> ~/.cdsapirc

Thank you Kevin. I set correct url in `~/.cdsapirc` ([https://ads.atmosphere.copernicus.eu/api](https://ads.atmosphere.copernicus.eu/api)) and now it works.
