The entry point for Recipe Search API v2 is
https://api.edamam.com/api/recipes/v2
.
The way pagination works in recipe search API has changed significantly from
version 1. The parameters from
and to
are no longer supported. Instead,
responses will contain a pre-constructed URL for the next request in
_links.next.href
. If this path is not present, then this was the last page and
there are no more results.
Each request now has to have a mandatory type
parameter with the value public
.
This is added to enable us to add future extensions to the API without breaking
the existing integrations.
The r
parameter is replaced with a URL path parameter. The search response now
contains pre-constructed URLs for each returned recipe in
hits[]._links.self.href
.
If you have saved recipe URIs, which you were using with the r
parameter in
version 1, you would need to construct the new request manually.
A recipe URI has the form:
http://www.edamam.com/ontologies/edamam.owl#recipe_0123456789abcdef0123456789abcdef.
The part after #recipe_
is called the hash. A request to v1 in the form of
https://api.edamam.com/search?r=http%3A%2F%2Fwww.edamam.com%2Fontologies%2Fedamam.owl%23recipe_0123456789abcdef0123456789abcdef&app_id=YOUR_APP_ID&app_key=YOUR_APP_KEY
will become the following request in v2:
https://api.edamam.com/api/recipes/v2/0123456789abcdef0123456789abcdef?app_id=YOUR_APP_ID&app_key=YOUR_APP_KEY&type=public
The result of this request is just a single Hit
, instead of an array. Please
consult the Recipe Search API v2 documentation for details.
Filtering by cuisine, meal and dish types has the same syntax as before, but
with stricter semantics. For example specifying a cuisineType=Eastern%20Europe
will not return recipes from other “eastern” or other “European” cuisines.
Version 1 of the Recipe Search API returns the full information for each recipe. This make the result size large, which results in higher bandwith usage. Also, the processing of the response may require more CPU and RAM.
There are many use-cases where only a subset of the data is needed. In version 2
of the API one can use the field
parameters to specify which parts of the
results are needed. Please refer to the Recipe Search API v2 documentation for
details.
Finding it difficult to make api calls and migrate to version 2