> For the complete documentation index, see [llms.txt](https://docs.humdata.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.humdata.org/build/hdx-apis/hapi/api-reference/metadata.md).

# Metadata

## Get information about the sources of the data in HDX HAPI

> Get information about the \<a href="[https://data.humdata.org/dataset">HDX](https://data.humdata.org/dataset">HDX) Datasets\</a> that are used as data sources\
> for HDX HAPI. Datasets contain one or more resources, which are the sources of the data found in HDX HAPI.

```json
{"openapi":"3.1.0","info":{"title":"HDX HAPI","version":"0.9.13"},"servers":[{"url":"https://hapi.humdata.org","description":"Production"}],"paths":{"/api/v2/metadata/dataset":{"get":{"tags":["Metadata"],"summary":"Get information about the sources of the data in HDX HAPI","description":"Get information about the <a href=\"https://data.humdata.org/dataset\">HDX Datasets</a> that are used as data sources\nfor HDX HAPI. Datasets contain one or more resources, which are the sources of the data found in HDX HAPI.","operationId":"get_dataset_api_v2_metadata_dataset_get","parameters":[{"name":"app_identifier","in":"query","required":true,"schema":{"anyOf":[{"type":"string","maxLength":512},{"type":"null"}],"description":"base64 encoded application name and email, as in `base64(\"app_name:email\")`. This value can also be passed in the `X-HDX-HAPI-APP-IDENTIFIER` header. See the *encoded_app_identifier* endpoint.","title":"App Identifier"},"description":"base64 encoded application name and email, as in `base64(\"app_name:email\")`. This value can also be passed in the `X-HDX-HAPI-APP-IDENTIFIER` header. See the *encoded_app_identifier* endpoint."},{"name":"dataset_hdx_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":36},{"type":"null"}],"description":"Filter the response by the dataset ID (dataset_hdx_id), which is a unique and fixed identifier of a Dataset on HDX. A URL in the pattern of `https://data.humdata.org/dataset/[dataset_hdx_id]` will load the dataset page on HDX.","title":"Dataset Hdx Id"},"description":"Filter the response by the dataset ID (dataset_hdx_id), which is a unique and fixed identifier of a Dataset on HDX. A URL in the pattern of `https://data.humdata.org/dataset/[dataset_hdx_id]` will load the dataset page on HDX."},{"name":"dataset_hdx_stub","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"description":"Filter the response by the URL-safe name (dataset_hdx_stub) of the dataset as displayed on HDX. This name is unique but can change. A URL in the pattern of `https://data.humdata.org/dataset/[dataset_hdx_stub]` will load the dataset page on HDX.","title":"Dataset Hdx Stub"},"description":"Filter the response by the URL-safe name (dataset_hdx_stub) of the dataset as displayed on HDX. This name is unique but can change. A URL in the pattern of `https://data.humdata.org/dataset/[dataset_hdx_stub]` will load the dataset page on HDX."},{"name":"dataset_hdx_title","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":1024},{"type":"null"}],"description":"Filter the response by the title of the dataset as it appears in the HDX interface. This name is not unique and can change.","title":"Dataset Hdx Title"},"description":"Filter the response by the title of the dataset as it appears in the HDX interface. This name is not unique and can change."},{"name":"hdx_provider_stub","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"description":"Filter the response by the URL-safe name of the provider (organization) of the dataset on HDX. A URL in the pattern of `https://data.humdata.org/organization/[hdx_provider_stub]` will load the provider's page on HDX.","title":"Hdx Provider Stub"},"description":"Filter the response by the URL-safe name of the provider (organization) of the dataset on HDX. A URL in the pattern of `https://data.humdata.org/organization/[hdx_provider_stub]` will load the provider's page on HDX."},{"name":"hdx_provider_name","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":512},{"type":"null"}],"description":"Filter the response by the display name of the provider (organization) of the dataset on HDX.","title":"Hdx Provider Name"},"description":"Filter the response by the display name of the provider (organization) of the dataset on HDX."},{"name":"output_format","in":"query","required":false,"schema":{"$ref":"#/components/schemas/OutputFormat","default":"json"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":10000,"minimum":0,"description":"Maximum number of records to return. The system will not return more than 10,000 records.","default":10000,"title":"Limit"},"description":"Maximum number of records to return. The system will not return more than 10,000 records."},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Number of records to skip in the response. Use in conjunction with the limit parameter to paginate.","default":0,"title":"Offset"},"description":"Number of records to skip in the response. Use in conjunction with the limit parameter to paginate."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HapiGenericResponse_DatasetResponse_"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestResponse"}}},"description":"Bad Request"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseValidationResponse"}}},"description":"Internal Server Error"}}}}},"components":{"schemas":{"OutputFormat":{"type":"string","enum":["csv","json"],"title":"OutputFormat"},"HapiGenericResponse_DatasetResponse_":{"properties":{"data":{"items":{"$ref":"#/components/schemas/DatasetResponse"},"type":"array","title":"Data"}},"type":"object","required":["data"],"title":"HapiGenericResponse[DatasetResponse]"},"DatasetResponse":{"properties":{"dataset_hdx_id":{"type":"string","maxLength":36,"title":"Dataset Hdx Id","description":"The dataset ID (dataset_hdx_id), which is a unique and fixed identifier of a Dataset on HDX. A URL in the pattern of `https://data.humdata.org/dataset/[dataset_hdx_id]` will load the dataset page on HDX."},"dataset_hdx_stub":{"type":"string","maxLength":128,"title":"Dataset Hdx Stub","description":"The URL-safe name (dataset_hdx_stub) of the dataset as displayed on HDX. This name is unique but can change. A URL in the pattern of `https://data.humdata.org/dataset/[dataset_hdx_stub]` will load the dataset page on HDX."},"dataset_hdx_title":{"type":"string","maxLength":1024,"title":"Dataset Hdx Title","description":"The title of the dataset as it appears in the HDX interface. This name is not unique and can change."},"hdx_provider_stub":{"type":"string","maxLength":128,"title":"Hdx Provider Stub","description":"The URL-safe name of the provider (organization) of the dataset on HDX. A URL in the pattern of `https://data.humdata.org/organization/[hdx_provider_stub]` will load the provider's page on HDX."},"hdx_provider_name":{"type":"string","maxLength":512,"title":"Hdx Provider Name","description":"The display name of the provider (organization) of the dataset on HDX."},"hdx_link":{"type":"string","maxLength":2083,"minLength":1,"format":"uri","title":"Hdx Link","readOnly":true},"hdx_api_link":{"type":"string","maxLength":2083,"minLength":1,"format":"uri","title":"Hdx Api Link","readOnly":true},"provider_hdx_link":{"type":"string","maxLength":2083,"minLength":1,"format":"uri","title":"Provider Hdx Link","readOnly":true},"provider_hdx_api_link":{"type":"string","maxLength":2083,"minLength":1,"format":"uri","title":"Provider Hdx Api Link","readOnly":true}},"type":"object","required":["dataset_hdx_id","dataset_hdx_stub","dataset_hdx_title","hdx_provider_stub","hdx_provider_name","hdx_link","hdx_api_link","provider_hdx_link","provider_hdx_api_link"],"title":"DatasetResponse"},"BadRequestResponse":{"properties":{"detail":{"type":"string","title":"Detail"}},"type":"object","required":["detail"],"title":"BadRequestResponse"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"ResponseValidationResponse":{"properties":{"error_sample_list":{"items":{},"type":"array","title":"Error Sample List"},"error":{"type":"string","title":"Error"}},"type":"object","required":["error_sample_list","error"],"title":"ResponseValidationResponse"}}}}
```

## Get information about the sources of the data in HDX HAPI

> Get information about the resources that are used as data sources for HDX HAPI. Datasets contain one or\
> more resources, which are the sources of the data found in HDX HAPI.

```json
{"openapi":"3.1.0","info":{"title":"HDX HAPI","version":"0.9.13"},"servers":[{"url":"https://hapi.humdata.org","description":"Production"}],"paths":{"/api/v2/metadata/resource":{"get":{"tags":["Metadata"],"summary":"Get information about the sources of the data in HDX HAPI","description":"Get information about the resources that are used as data sources for HDX HAPI. Datasets contain one or\nmore resources, which are the sources of the data found in HDX HAPI.","operationId":"get_resources_api_v2_metadata_resource_get","parameters":[{"name":"app_identifier","in":"query","required":true,"schema":{"anyOf":[{"type":"string","maxLength":512},{"type":"null"}],"description":"base64 encoded application name and email, as in `base64(\"app_name:email\")`. This value can also be passed in the `X-HDX-HAPI-APP-IDENTIFIER` header. See the *encoded_app_identifier* endpoint.","title":"App Identifier"},"description":"base64 encoded application name and email, as in `base64(\"app_name:email\")`. This value can also be passed in the `X-HDX-HAPI-APP-IDENTIFIER` header. See the *encoded_app_identifier* endpoint."},{"name":"resource_hdx_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":36},{"type":"null"}],"description":"Filter the response by the resource ID, which is a unique and fixed identifier of a resource on HDX. A URL in the pattern of `https://data.humdata.org/dataset/[dataset_hdx_id]/resource/[resource_hdx_id]` will load the resource page on HDX.","title":"Resource Hdx Id"},"description":"Filter the response by the resource ID, which is a unique and fixed identifier of a resource on HDX. A URL in the pattern of `https://data.humdata.org/dataset/[dataset_hdx_id]/resource/[resource_hdx_id]` will load the resource page on HDX."},{"name":"format","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}],"description":"Filter the response by the format of the resource on HDX. These are typically file formats (i.e. CSV, XLSX), but can also include APIs and web apps.","title":"Format"},"description":"Filter the response by the format of the resource on HDX. These are typically file formats (i.e. CSV, XLSX), but can also include APIs and web apps."},{"name":"update_date_min","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"string","format":"date"},{"type":"null"}],"description":"Minimum date that datasets was last updated, e.g. 2020-01-01 or 2020-01-01T00:00:00","title":"Update Date Min"},"description":"Minimum date that datasets was last updated, e.g. 2020-01-01 or 2020-01-01T00:00:00"},{"name":"update_date_max","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"string","format":"date"},{"type":"null"}],"description":"Maximum date that datasets was last updated, e.g. 2020-01-01 or 2020-01-01T00:00:00","title":"Update Date Max"},"description":"Maximum date that datasets was last updated, e.g. 2020-01-01 or 2020-01-01T00:00:00"},{"name":"is_hxl","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Filter the response by whether or not the resource contains <a href=\"https://hxlstandard.org/\">HXL tags</a>.","title":"Is Hxl"},"description":"Filter the response by whether or not the resource contains <a href=\"https://hxlstandard.org/\">HXL tags</a>."},{"name":"dataset_hdx_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":36},{"type":"null"}],"description":"Filter the response by the dataset ID (dataset_hdx_id), which is a unique and fixed identifier of a dataset on HDX. A URL in the pattern of `https://data.humdata.org/dataset/[dataset_hdx_id]` will load the dataset page on HDX. See the <a href=\"/docs#/Metadata/get_dataset_api_v1_metadata_dataset_get\" target=\"_blank\">dataset endpoint</a> for details. ","title":"Dataset Hdx Id"},"description":"Filter the response by the dataset ID (dataset_hdx_id), which is a unique and fixed identifier of a dataset on HDX. A URL in the pattern of `https://data.humdata.org/dataset/[dataset_hdx_id]` will load the dataset page on HDX. See the <a href=\"/docs#/Metadata/get_dataset_api_v1_metadata_dataset_get\" target=\"_blank\">dataset endpoint</a> for details. "},{"name":"dataset_hdx_stub","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"description":"Filter the response by the URL-safe name (dataset_hdx_stub) of the dataset as displayed on HDX. This name is unique but can change. A URL in the pattern of `https://data.humdata.org/dataset/[dataset_hdx_stub]` will load the dataset page on HDX. See the <a href=\"/docs#/Metadata/get_dataset_api_v1_metadata_dataset_get\" target=\"_blank\">dataset endpoint</a> for details.","title":"Dataset Hdx Stub"},"description":"Filter the response by the URL-safe name (dataset_hdx_stub) of the dataset as displayed on HDX. This name is unique but can change. A URL in the pattern of `https://data.humdata.org/dataset/[dataset_hdx_stub]` will load the dataset page on HDX. See the <a href=\"/docs#/Metadata/get_dataset_api_v1_metadata_dataset_get\" target=\"_blank\">dataset endpoint</a> for details."},{"name":"dataset_hdx_title","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":1024},{"type":"null"}],"description":"Filter the response by the title of the dataset as it appears in the HDX interface. This name is not unique and can change. See the <a href=\"/docs#/Metadata/get_dataset_api_v1_metadata_dataset_get\" target=\"_blank\">dataset endpoint</a> for details.","title":"Dataset Hdx Title"},"description":"Filter the response by the title of the dataset as it appears in the HDX interface. This name is not unique and can change. See the <a href=\"/docs#/Metadata/get_dataset_api_v1_metadata_dataset_get\" target=\"_blank\">dataset endpoint</a> for details."},{"name":"dataset_hdx_provider_stub","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"description":"Filter the response by the URL-safe name of the provider (organization) of the dataset on HDX. A URL in the pattern of `https://data.humdata.org/organization/[dataset_hdx_provider_stub]` will load the provider's page on HDX.","title":"Dataset Hdx Provider Stub"},"description":"Filter the response by the URL-safe name of the provider (organization) of the dataset on HDX. A URL in the pattern of `https://data.humdata.org/organization/[dataset_hdx_provider_stub]` will load the provider's page on HDX."},{"name":"dataset_hdx_provider_name","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":512},{"type":"null"}],"description":"Filter the response by the display name of the provider (organization) of the dataset on HDX.","title":"Dataset Hdx Provider Name"},"description":"Filter the response by the display name of the provider (organization) of the dataset on HDX."},{"name":"output_format","in":"query","required":false,"schema":{"$ref":"#/components/schemas/OutputFormat","default":"json"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":10000,"minimum":0,"description":"Maximum number of records to return. The system will not return more than 10,000 records.","default":10000,"title":"Limit"},"description":"Maximum number of records to return. The system will not return more than 10,000 records."},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Number of records to skip in the response. Use in conjunction with the limit parameter to paginate.","default":0,"title":"Offset"},"description":"Number of records to skip in the response. Use in conjunction with the limit parameter to paginate."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HapiGenericResponse_ResourceResponse_"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestResponse"}}},"description":"Bad Request"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseValidationResponse"}}},"description":"Internal Server Error"}}}}},"components":{"schemas":{"OutputFormat":{"type":"string","enum":["csv","json"],"title":"OutputFormat"},"HapiGenericResponse_ResourceResponse_":{"properties":{"data":{"items":{"$ref":"#/components/schemas/ResourceResponse"},"type":"array","title":"Data"}},"type":"object","required":["data"],"title":"HapiGenericResponse[ResourceResponse]"},"ResourceResponse":{"properties":{"resource_hdx_id":{"type":"string","maxLength":36,"title":"Resource Hdx Id","description":"The resource ID, which is a unique and fixed identifier of a resource on HDX. A URL in the pattern of `https://data.humdata.org/dataset/[dataset_hdx_id]/resource/[resource_hdx_id]` will load the resource page on HDX."},"dataset_hdx_id":{"type":"string","maxLength":36,"title":"Dataset Hdx Id","description":"The dataset ID (dataset_hdx_id), which is a unique and fixed identifier of a Dataset on HDX. A URL in the pattern of `https://data.humdata.org/dataset/[dataset_hdx_id]` will load the dataset page on HDX."},"name":{"type":"string","maxLength":256,"title":"Name","description":"The resource name on HDX. In combination with the dataset UUIDsfrom the `dataset_hdx_id` and `resource_hdx_id` fields respectively, it can be used to construct a URL to download the resource: `https://data.humdata.org/dataset/[dataset_hdx_id]/resource/[resource_hdx_id]/download/[name]`, which can be found in the `download_url` field."},"format":{"type":"string","maxLength":32,"title":"Format","description":"The format of the resource on HDX. These are typically file formats (i.e. CSV, XLSX), but can also include APIs and web apps."},"update_date":{"type":"string","format":"date-time","title":"Update Date","description":"The date the resource was last updated"},"is_hxl":{"type":"boolean","title":"Is Hxl","description":"whether or not the resource contains <a href=\"https://hxlstandard.org/\">HXL tags</a>."},"download_url":{"type":"string","maxLength":2083,"minLength":1,"format":"uri","title":"Download Url","description":"A URL to directly download the resource file from HDX, in the format specified in the `format` field."},"hapi_updated_date":{"type":"string","format":"date-time","title":"Hapi Updated Date","description":"The date that the resource was ingested into HDX HAPI"},"dataset_hdx_stub":{"type":"string","maxLength":128,"title":"Dataset Hdx Stub","description":"The URL-safe name (dataset_hdx_stub) of the dataset as displayed on HDX. This name is unique but can change. A URL in the pattern of `https://data.humdata.org/dataset/[dataset_hdx_stub]` will load the dataset page on HDX."},"dataset_hdx_title":{"type":"string","maxLength":1024,"title":"Dataset Hdx Title","description":"The title of the dataset as it appears in the HDX interface. This name is not unique and can change."},"dataset_hdx_provider_stub":{"type":"string","maxLength":128,"title":"Dataset Hdx Provider Stub","description":"Filter the response by the URL-safe name of the provider (organization) of the dataset on HDX. A URL in the pattern of `https://data.humdata.org/organization/[dataset_hdx_provider_stub]` will load the provider's page on HDX."},"dataset_hdx_provider_name":{"type":"string","maxLength":512,"title":"Dataset Hdx Provider Name","description":"Filter the response by the display name of the provider (organization) of the dataset on HDX."},"hdx_link":{"type":"string","maxLength":2083,"minLength":1,"format":"uri","title":"Hdx Link","readOnly":true},"hdx_api_link":{"type":"string","maxLength":2083,"minLength":1,"format":"uri","title":"Hdx Api Link","readOnly":true},"dataset_hdx_link":{"type":"string","maxLength":2083,"minLength":1,"format":"uri","title":"Dataset Hdx Link","readOnly":true},"dataset_hdx_api_link":{"type":"string","maxLength":2083,"minLength":1,"format":"uri","title":"Dataset Hdx Api Link","readOnly":true},"provider_hdx_link":{"type":"string","maxLength":2083,"minLength":1,"format":"uri","title":"Provider Hdx Link","readOnly":true},"provider_hdx_api_link":{"type":"string","maxLength":2083,"minLength":1,"format":"uri","title":"Provider Hdx Api Link","readOnly":true}},"type":"object","required":["resource_hdx_id","dataset_hdx_id","name","format","update_date","is_hxl","download_url","hapi_updated_date","dataset_hdx_stub","dataset_hdx_title","dataset_hdx_provider_stub","dataset_hdx_provider_name","hdx_link","hdx_api_link","dataset_hdx_link","dataset_hdx_api_link","provider_hdx_link","provider_hdx_api_link"],"title":"ResourceResponse"},"BadRequestResponse":{"properties":{"detail":{"type":"string","title":"Detail"}},"type":"object","required":["detail"],"title":"BadRequestResponse"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"ResponseValidationResponse":{"properties":{"error_sample_list":{"items":{},"type":"array","title":"Error Sample List"},"error":{"type":"string","title":"Error"}},"type":"object","required":["error_sample_list","error"],"title":"ResponseValidationResponse"}}}}
```

## Get the list of locations (typically countries) included in HDX HAPI

> Not all data are available for all locations. Learn more about the scope of data coverage in HDX HAPI in the \<a href="[https://hdx-hapi.readthedocs.io/en/latest/">Overview](https://hdx-hapi.readthedocs.io/en/latest/">Overview) and Getting Started\</a> documentation.

```json
{"openapi":"3.1.0","info":{"title":"HDX HAPI","version":"0.9.13"},"servers":[{"url":"https://hapi.humdata.org","description":"Production"}],"paths":{"/api/v2/metadata/location":{"get":{"tags":["Metadata"],"summary":"Get the list of locations (typically countries) included in HDX HAPI","description":"Not all data are available for all locations. Learn more about the scope of data coverage in HDX HAPI in the <a href=\"https://hdx-hapi.readthedocs.io/en/latest/\">Overview and Getting Started</a> documentation.","operationId":"get_location_api_v2_metadata_location_get","parameters":[{"name":"app_identifier","in":"query","required":true,"schema":{"anyOf":[{"type":"string","maxLength":512},{"type":"null"}],"description":"base64 encoded application name and email, as in `base64(\"app_name:email\")`. This value can also be passed in the `X-HDX-HAPI-APP-IDENTIFIER` header. See the *encoded_app_identifier* endpoint.","title":"App Identifier"},"description":"base64 encoded application name and email, as in `base64(\"app_name:email\")`. This value can also be passed in the `X-HDX-HAPI-APP-IDENTIFIER` header. See the *encoded_app_identifier* endpoint."},{"name":"id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Filter the response by a location (typically a country) reference number.","title":"Id"},"description":"Filter the response by a location (typically a country) reference number."},{"name":"code","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"description":"Filter the response by a location (typically a country). The location codes use the ISO-3 (ISO 3166 alpha-3) codes.","title":"Code"},"description":"Filter the response by a location (typically a country). The location codes use the ISO-3 (ISO 3166 alpha-3) codes."},{"name":"name","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":512},{"type":"null"}],"description":"Filter the response by a location (typically a country). The location names are based on the \"short name\" from the <a href=\"https://unstats.un.org/unsd/methodology/m49/#fn2\">UN M49 Standard</a>.","title":"Name"},"description":"Filter the response by a location (typically a country). The location names are based on the \"short name\" from the <a href=\"https://unstats.un.org/unsd/methodology/m49/#fn2\">UN M49 Standard</a>."},{"name":"has_hrp","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Filter the response by the has_hrp flag. The has_hrp flag indicates whether a country has a Humanitarian Response Plan.","title":"Has Hrp"},"description":"Filter the response by the has_hrp flag. The has_hrp flag indicates whether a country has a Humanitarian Response Plan."},{"name":"in_gho","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Filter the response by the in_gho flag. The in_gho flag indicates whether a country is in the <a href=\"https://humanitarianaction.info/\">Global Humanitarian Overview</a>.","title":"In Gho"},"description":"Filter the response by the in_gho flag. The in_gho flag indicates whether a country is in the <a href=\"https://humanitarianaction.info/\">Global Humanitarian Overview</a>."},{"name":"start_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter entries to include rows where the reference period overlaps with or extends beyond this date, e.g. 2020, 2020-01, 2020-01-01 or 2020-01-01T00:00:00","title":"Start Date"},"description":"Filter entries to include rows where the reference period overlaps with or extends beyond this date, e.g. 2020, 2020-01, 2020-01-01 or 2020-01-01T00:00:00"},{"name":"end_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter entries to include rows where the reference period overlaps with or begins prior to this date, e.g. 2020, 2020-01, 2020-01-01, 2020-01-01 or 2020-01-01T23:59:59","title":"End Date"},"description":"Filter entries to include rows where the reference period overlaps with or begins prior to this date, e.g. 2020, 2020-01, 2020-01-01, 2020-01-01 or 2020-01-01T23:59:59"},{"name":"output_format","in":"query","required":false,"schema":{"$ref":"#/components/schemas/OutputFormat","default":"json"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":10000,"minimum":0,"description":"Maximum number of records to return. The system will not return more than 10,000 records.","default":10000,"title":"Limit"},"description":"Maximum number of records to return. The system will not return more than 10,000 records."},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Number of records to skip in the response. Use in conjunction with the limit parameter to paginate.","default":0,"title":"Offset"},"description":"Number of records to skip in the response. Use in conjunction with the limit parameter to paginate."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HapiGenericResponse_LocationResponse_"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestResponse"}}},"description":"Bad Request"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseValidationResponse"}}},"description":"Internal Server Error"}}}}},"components":{"schemas":{"OutputFormat":{"type":"string","enum":["csv","json"],"title":"OutputFormat"},"HapiGenericResponse_LocationResponse_":{"properties":{"data":{"items":{"$ref":"#/components/schemas/LocationResponse"},"type":"array","title":"Data"}},"type":"object","required":["data"],"title":"HapiGenericResponse[LocationResponse]"},"LocationResponse":{"properties":{"id":{"type":"integer","title":"Id","description":"A location (typically a country), using the unique identifier (id) from the location table associated with each entry."},"code":{"type":"string","maxLength":128,"title":"Code","description":"A location (typically a country). The location names are based on the \"short name\" from the <a href=\"https://unstats.un.org/unsd/methodology/m49/#fn2\">UN M49 Standard</a>."},"name":{"type":"string","maxLength":512,"title":"Name","description":"A location (typically a country). The location codes use the ISO-3 (ISO 3166 alpha-3) codes."},"has_hrp":{"type":"boolean","title":"Has Hrp","description":"The has_hrp flag. The has_hrp flag indicates whether a country has a Humanitarian Response Plan."},"in_gho":{"type":"boolean","title":"In Gho","description":"The in_gho flag. The in_gho flag indicates whether a country is in the <a href=\"https://humanitarianaction.info/\">Global Humanitarian Overview</a>."},"from_cods":{"type":"boolean","title":"From Cods"},"reference_period_start":{"type":"string","format":"date-time","title":"Reference Period Start","description":"The start date for which the data are applicable"},"reference_period_end":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Reference Period End","description":"The end date for which the data are applicable"}},"type":"object","required":["id","code","name","has_hrp","in_gho","from_cods","reference_period_start","reference_period_end"],"title":"LocationResponse"},"BadRequestResponse":{"properties":{"detail":{"type":"string","title":"Detail"}},"type":"object","required":["detail"],"title":"BadRequestResponse"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"ResponseValidationResponse":{"properties":{"error_sample_list":{"items":{},"type":"array","title":"Error Sample List"},"error":{"type":"string","title":"Error"}},"type":"object","required":["error_sample_list","error"],"title":"ResponseValidationResponse"}}}}
```

## Get the list of first-level subnational administrative divisions available in HDX HAPI

> Not all data are available for all locations. Learn more about the scope of data coverage in HDX HAPI in the \<a href="[https://hdx-hapi.readthedocs.io/en/latest/">Overview](https://hdx-hapi.readthedocs.io/en/latest/">Overview) and Getting Started\</a> documentation.

```json
{"openapi":"3.1.0","info":{"title":"HDX HAPI","version":"0.9.13"},"servers":[{"url":"https://hapi.humdata.org","description":"Production"}],"paths":{"/api/v2/metadata/admin1":{"get":{"tags":["Metadata"],"summary":"Get the list of first-level subnational administrative divisions available in HDX HAPI","description":"Not all data are available for all locations. Learn more about the scope of data coverage in HDX HAPI in the <a href=\"https://hdx-hapi.readthedocs.io/en/latest/\">Overview and Getting Started</a> documentation.","operationId":"get_admin1_api_v2_metadata_admin1_get","parameters":[{"name":"app_identifier","in":"query","required":true,"schema":{"anyOf":[{"type":"string","maxLength":512},{"type":"null"}],"description":"base64 encoded application name and email, as in `base64(\"app_name:email\")`. This value can also be passed in the `X-HDX-HAPI-APP-IDENTIFIER` header. See the *encoded_app_identifier* endpoint.","title":"App Identifier"},"description":"base64 encoded application name and email, as in `base64(\"app_name:email\")`. This value can also be passed in the `X-HDX-HAPI-APP-IDENTIFIER` header. See the *encoded_app_identifier* endpoint."},{"name":"id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Filter the response by a location (typically a country), using the unique identifier (id) from the location table associated with each entry.","title":"Id"},"description":"Filter the response by a location (typically a country), using the unique identifier (id) from the location table associated with each entry."},{"name":"location_ref","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Filter the response by a location (typically a country) reference number.","title":"Location Ref"},"description":"Filter the response by a location (typically a country) reference number."},{"name":"code","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"description":"Filter the response by the 1st subnational administrative divisions. The admin1 codes refer to the p-codes in the <a href=\"https://data.humdata.org/dashboards/cod?\">Common Operational Datasets</a>.","title":"Code"},"description":"Filter the response by the 1st subnational administrative divisions. The admin1 codes refer to the p-codes in the <a href=\"https://data.humdata.org/dashboards/cod?\">Common Operational Datasets</a>."},{"name":"name","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":512},{"type":"null"}],"description":"Filter the response by the 1st subnational administrative divisions. The admin1 names refer to either the <a href=\"https://data.humdata.org/dashboards/cod?\">Common Operational Datasets</a> or those provided in the original data source.","title":"Name"},"description":"Filter the response by the 1st subnational administrative divisions. The admin1 names refer to either the <a href=\"https://data.humdata.org/dashboards/cod?\">Common Operational Datasets</a> or those provided in the original data source."},{"name":"location_code","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"description":"Filter the response by a location (typically a country). The location codes use the ISO-3 (ISO 3166 alpha-3) codes. See the <a href=\"/docs#/Metadata/get_locations_api_v1_metadata_location_get\" target=\"_blank\">location endpoint</a> for details.","title":"Location Code"},"description":"Filter the response by a location (typically a country). The location codes use the ISO-3 (ISO 3166 alpha-3) codes. See the <a href=\"/docs#/Metadata/get_locations_api_v1_metadata_location_get\" target=\"_blank\">location endpoint</a> for details."},{"name":"location_name","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":512},{"type":"null"}],"description":"Filter the response by a location (typically a country). The location names are based on the \"short name\" from the <a href=\"https://unstats.un.org/unsd/methodology/m49/#fn2\">UN M49 Standard</a>. See the <a href=\"/docs#/Metadata/get_locations_api_v1_metadata_location_get\" target=\"_blank\">location endpoint</a> for details.","title":"Location Name"},"description":"Filter the response by a location (typically a country). The location names are based on the \"short name\" from the <a href=\"https://unstats.un.org/unsd/methodology/m49/#fn2\">UN M49 Standard</a>. See the <a href=\"/docs#/Metadata/get_locations_api_v1_metadata_location_get\" target=\"_blank\">location endpoint</a> for details."},{"name":"start_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter entries to include rows where the reference period overlaps with or extends beyond this date, e.g. 2020, 2020-01, 2020-01-01 or 2020-01-01T00:00:00","title":"Start Date"},"description":"Filter entries to include rows where the reference period overlaps with or extends beyond this date, e.g. 2020, 2020-01, 2020-01-01 or 2020-01-01T00:00:00"},{"name":"end_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter entries to include rows where the reference period overlaps with or begins prior to this date, e.g. 2020, 2020-01, 2020-01-01, 2020-01-01 or 2020-01-01T23:59:59","title":"End Date"},"description":"Filter entries to include rows where the reference period overlaps with or begins prior to this date, e.g. 2020, 2020-01, 2020-01-01, 2020-01-01 or 2020-01-01T23:59:59"},{"name":"output_format","in":"query","required":false,"schema":{"$ref":"#/components/schemas/OutputFormat","default":"json"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":10000,"minimum":0,"description":"Maximum number of records to return. The system will not return more than 10,000 records.","default":10000,"title":"Limit"},"description":"Maximum number of records to return. The system will not return more than 10,000 records."},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Number of records to skip in the response. Use in conjunction with the limit parameter to paginate.","default":0,"title":"Offset"},"description":"Number of records to skip in the response. Use in conjunction with the limit parameter to paginate."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HapiGenericResponse_Admin1Response_"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestResponse"}}},"description":"Bad Request"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseValidationResponse"}}},"description":"Internal Server Error"}}}}},"components":{"schemas":{"OutputFormat":{"type":"string","enum":["csv","json"],"title":"OutputFormat"},"HapiGenericResponse_Admin1Response_":{"properties":{"data":{"items":{"$ref":"#/components/schemas/Admin1Response"},"type":"array","title":"Data"}},"type":"object","required":["data"],"title":"HapiGenericResponse[Admin1Response]"},"Admin1Response":{"properties":{"id":{"type":"integer","title":"Id","description":"1st subnational administrative division, using the unique identifier (id) from the admin1 table associated with each entry."},"location_ref":{"type":"integer","title":"Location Ref","description":"A location (typically a country) reference number."},"code":{"type":"string","maxLength":128,"title":"Code","description":"The 1st subnational administrative divisions. The admin1 codes refer to the p-codes in the <a href=\"https://data.humdata.org/dashboards/cod?\">Common Operational Datasets</a>."},"name":{"type":"string","maxLength":512,"title":"Name","description":"The 1st subnational administrative divisions. The admin1 names refer to either the <a href=\"https://data.humdata.org/dashboards/cod?\">Common Operational Datasets</a> or those provided in the original data source."},"from_cods":{"type":"boolean","title":"From Cods"},"reference_period_start":{"type":"string","format":"date-time","title":"Reference Period Start","description":"The start date for which the data are applicable"},"reference_period_end":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Reference Period End","description":"The end date for which the data are applicable"},"location_code":{"type":"string","maxLength":128,"title":"Location Code","description":"A location (typically a country). The location codes use the ISO-3 (ISO 3166 alpha-3) codes."},"location_name":{"type":"string","maxLength":512,"title":"Location Name","description":"A location (typically a country). The location names are based on the \"short name\" from the <a href=\"https://unstats.un.org/unsd/methodology/m49/#fn2\">UN M49 Standard</a>."}},"type":"object","required":["id","location_ref","code","name","from_cods","reference_period_start","reference_period_end","location_code","location_name"],"title":"Admin1Response"},"BadRequestResponse":{"properties":{"detail":{"type":"string","title":"Detail"}},"type":"object","required":["detail"],"title":"BadRequestResponse"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"ResponseValidationResponse":{"properties":{"error_sample_list":{"items":{},"type":"array","title":"Error Sample List"},"error":{"type":"string","title":"Error"}},"type":"object","required":["error_sample_list","error"],"title":"ResponseValidationResponse"}}}}
```

## Get the list of second-level administrative divisions available in HDX HAPI

> Not all data are available for all locations. Learn more about the scope of data coverage in HDX HAPI in the \<a href="[https://hdx-hapi.readthedocs.io/en/latest/">Overview](https://hdx-hapi.readthedocs.io/en/latest/">Overview) and Getting Started\</a> documentation.

```json
{"openapi":"3.1.0","info":{"title":"HDX HAPI","version":"0.9.13"},"servers":[{"url":"https://hapi.humdata.org","description":"Production"}],"paths":{"/api/v2/metadata/admin2":{"get":{"tags":["Metadata"],"summary":"Get the list of second-level administrative divisions available in HDX HAPI","description":"Not all data are available for all locations. Learn more about the scope of data coverage in HDX HAPI in the <a href=\"https://hdx-hapi.readthedocs.io/en/latest/\">Overview and Getting Started</a> documentation.","operationId":"get_admin2_api_v2_metadata_admin2_get","parameters":[{"name":"app_identifier","in":"query","required":true,"schema":{"anyOf":[{"type":"string","maxLength":512},{"type":"null"}],"description":"base64 encoded application name and email, as in `base64(\"app_name:email\")`. This value can also be passed in the `X-HDX-HAPI-APP-IDENTIFIER` header. See the *encoded_app_identifier* endpoint.","title":"App Identifier"},"description":"base64 encoded application name and email, as in `base64(\"app_name:email\")`. This value can also be passed in the `X-HDX-HAPI-APP-IDENTIFIER` header. See the *encoded_app_identifier* endpoint."},{"name":"id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Filter the response by a location (typically a country), using the unique identifier (id) from the location table associated with each entry.","title":"Id"},"description":"Filter the response by a location (typically a country), using the unique identifier (id) from the location table associated with each entry."},{"name":"admin1_ref","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Filter the response by a location (typically a country) reference number.","title":"Admin1 Ref"},"description":"Filter the response by a location (typically a country) reference number."},{"name":"location_ref","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Filter the response by a location (typically a country) reference number.","title":"Location Ref"},"description":"Filter the response by a location (typically a country) reference number."},{"name":"code","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"description":"Filter the response by the 2nd subnational administrative divisions. The admin2 codes refer to the p-codes in the <a href=\"https://data.humdata.org/dashboards/cod?\">Common Operational Datasets</a>.","title":"Code"},"description":"Filter the response by the 2nd subnational administrative divisions. The admin2 codes refer to the p-codes in the <a href=\"https://data.humdata.org/dashboards/cod?\">Common Operational Datasets</a>."},{"name":"name","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":512},{"type":"null"}],"description":"Filter the response by the 2nd subnational administrative divisions. The admin2 names refer to either the <a href=\"https://data.humdata.org/dashboards/cod?\">Common Operational Datasets</a> or those provided in the original data source.","title":"Name"},"description":"Filter the response by the 2nd subnational administrative divisions. The admin2 names refer to either the <a href=\"https://data.humdata.org/dashboards/cod?\">Common Operational Datasets</a> or those provided in the original data source."},{"name":"admin1_code","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"description":"Filter the response by the 1st subnational administrative divisions. The admin1 codes refer to the p-codes in the <a href=\"https://data.humdata.org/dashboards/cod?\">Common Operational Datasets</a>. See the <a href=\"/docs#/Metadata/get_admin1_api_v1_metadata_admin1_get\" target=\"_blank\">admin1 endpoint</a> for details.","title":"Admin1 Code"},"description":"Filter the response by the 1st subnational administrative divisions. The admin1 codes refer to the p-codes in the <a href=\"https://data.humdata.org/dashboards/cod?\">Common Operational Datasets</a>. See the <a href=\"/docs#/Metadata/get_admin1_api_v1_metadata_admin1_get\" target=\"_blank\">admin1 endpoint</a> for details."},{"name":"admin1_name","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":512},{"type":"null"}],"description":"Filter the response by the 1st subnational administrative divisions. The admin1 names refer to either the <a href=\"https://data.humdata.org/dashboards/cod?\">Common Operational Datasets</a> or those provided in the original data source. See the <a href=\"/docs#/Metadata/get_admin1_api_v1_metadata_admin1_get\" target=\"_blank\">admin1 endpoint</a> for details.","title":"Admin1 Name"},"description":"Filter the response by the 1st subnational administrative divisions. The admin1 names refer to either the <a href=\"https://data.humdata.org/dashboards/cod?\">Common Operational Datasets</a> or those provided in the original data source. See the <a href=\"/docs#/Metadata/get_admin1_api_v1_metadata_admin1_get\" target=\"_blank\">admin1 endpoint</a> for details."},{"name":"location_code","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"description":"Filter the response by a location (typically a country). The location codes use the ISO-3 (ISO 3166 alpha-3) codes. See the <a href=\"/docs#/Metadata/get_locations_api_v1_metadata_location_get\" target=\"_blank\">location endpoint</a> for details.","title":"Location Code"},"description":"Filter the response by a location (typically a country). The location codes use the ISO-3 (ISO 3166 alpha-3) codes. See the <a href=\"/docs#/Metadata/get_locations_api_v1_metadata_location_get\" target=\"_blank\">location endpoint</a> for details."},{"name":"location_name","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":512},{"type":"null"}],"description":"Filter the response by a location (typically a country). The location names are based on the \"short name\" from the <a href=\"https://unstats.un.org/unsd/methodology/m49/#fn2\">UN M49 Standard</a>. See the <a href=\"/docs#/Metadata/get_locations_api_v1_metadata_location_get\" target=\"_blank\">location endpoint</a> for details.","title":"Location Name"},"description":"Filter the response by a location (typically a country). The location names are based on the \"short name\" from the <a href=\"https://unstats.un.org/unsd/methodology/m49/#fn2\">UN M49 Standard</a>. See the <a href=\"/docs#/Metadata/get_locations_api_v1_metadata_location_get\" target=\"_blank\">location endpoint</a> for details."},{"name":"start_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter entries to include rows where the reference period overlaps with or extends beyond this date, e.g. 2020, 2020-01, 2020-01-01 or 2020-01-01T00:00:00","title":"Start Date"},"description":"Filter entries to include rows where the reference period overlaps with or extends beyond this date, e.g. 2020, 2020-01, 2020-01-01 or 2020-01-01T00:00:00"},{"name":"end_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter entries to include rows where the reference period overlaps with or begins prior to this date, e.g. 2020, 2020-01, 2020-01-01, 2020-01-01 or 2020-01-01T23:59:59","title":"End Date"},"description":"Filter entries to include rows where the reference period overlaps with or begins prior to this date, e.g. 2020, 2020-01, 2020-01-01, 2020-01-01 or 2020-01-01T23:59:59"},{"name":"output_format","in":"query","required":false,"schema":{"$ref":"#/components/schemas/OutputFormat","default":"json"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":10000,"minimum":0,"description":"Maximum number of records to return. The system will not return more than 10,000 records.","default":10000,"title":"Limit"},"description":"Maximum number of records to return. The system will not return more than 10,000 records."},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Number of records to skip in the response. Use in conjunction with the limit parameter to paginate.","default":0,"title":"Offset"},"description":"Number of records to skip in the response. Use in conjunction with the limit parameter to paginate."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HapiGenericResponse_Admin2Response_"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestResponse"}}},"description":"Bad Request"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseValidationResponse"}}},"description":"Internal Server Error"}}}}},"components":{"schemas":{"OutputFormat":{"type":"string","enum":["csv","json"],"title":"OutputFormat"},"HapiGenericResponse_Admin2Response_":{"properties":{"data":{"items":{"$ref":"#/components/schemas/Admin2Response"},"type":"array","title":"Data"}},"type":"object","required":["data"],"title":"HapiGenericResponse[Admin2Response]"},"Admin2Response":{"properties":{"id":{"type":"integer","title":"Id","description":"2nd subnational administrative division, using the unique identifier (id) from the admin2 table associated with each entry."},"admin1_ref":{"type":"integer","title":"Admin1 Ref","description":"The 2nd subnational administrative division reference number."},"code":{"type":"string","maxLength":128,"title":"Code","description":"The 2nd subnational administrative divisions. The admin2 codes refer to the p-codes in the <a href=\"https://data.humdata.org/dashboards/cod?\">Common Operational Datasets</a>."},"name":{"type":"string","maxLength":512,"title":"Name","description":"The 2nd subnational administrative divisions. The admin2 names refer to either the <a href=\"https://data.humdata.org/dashboards/cod?\">Common Operational Datasets</a> or those provided in the original data source."},"from_cods":{"type":"boolean","title":"From Cods"},"reference_period_start":{"type":"string","format":"date-time","title":"Reference Period Start","description":"The start date for which the data are applicable"},"reference_period_end":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Reference Period End","description":"The end date for which the data are applicable"},"admin1_code":{"type":"string","maxLength":128,"title":"Admin1 Code","description":"The 1st subnational administrative divisions. The admin1 codes refer to the p-codes in the <a href=\"https://data.humdata.org/dashboards/cod?\">Common Operational Datasets</a>."},"admin1_name":{"type":"string","maxLength":512,"title":"Admin1 Name","description":"The 1st subnational administrative divisions. The admin1 names refer to either the <a href=\"https://data.humdata.org/dashboards/cod?\">Common Operational Datasets</a> or those provided in the original data source."},"location_code":{"type":"string","maxLength":128,"title":"Location Code","description":"A location (typically a country). The location codes use the ISO-3 (ISO 3166 alpha-3) codes."},"location_name":{"type":"string","maxLength":512,"title":"Location Name","description":"A location (typically a country). The location names are based on the \"short name\" from the <a href=\"https://unstats.un.org/unsd/methodology/m49/#fn2\">UN M49 Standard</a>."},"location_ref":{"type":"integer","title":"Location Ref","description":"A location (typically a country) reference number."}},"type":"object","required":["id","admin1_ref","code","name","from_cods","reference_period_start","reference_period_end","admin1_code","admin1_name","location_code","location_name","location_ref"],"title":"Admin2Response"},"BadRequestResponse":{"properties":{"detail":{"type":"string","title":"Detail"}},"type":"object","required":["detail"],"title":"BadRequestResponse"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"ResponseValidationResponse":{"properties":{"error_sample_list":{"items":{},"type":"array","title":"Error Sample List"},"error":{"type":"string","title":"Error"}},"type":"object","required":["error_sample_list","error"],"title":"ResponseValidationResponse"}}}}
```

## Get information about how currencies are classified

> Provide currency information to use in conjunction with the food-prices endpoint

```json
{"openapi":"3.1.0","info":{"title":"HDX HAPI","version":"0.9.13"},"servers":[{"url":"https://hapi.humdata.org","description":"Production"}],"paths":{"/api/v2/metadata/currency":{"get":{"tags":["Metadata"],"summary":"Get information about how currencies are classified","description":"Provide currency information to use in conjunction with the food-prices endpoint","operationId":"get_currency_api_v2_metadata_currency_get","parameters":[{"name":"app_identifier","in":"query","required":true,"schema":{"anyOf":[{"type":"string","maxLength":512},{"type":"null"}],"description":"base64 encoded application name and email, as in `base64(\"app_name:email\")`. This value can also be passed in the `X-HDX-HAPI-APP-IDENTIFIER` header. See the *encoded_app_identifier* endpoint.","title":"App Identifier"},"description":"base64 encoded application name and email, as in `base64(\"app_name:email\")`. This value can also be passed in the `X-HDX-HAPI-APP-IDENTIFIER` header. See the *encoded_app_identifier* endpoint."},{"name":"code","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}],"description":"Filter the response by the currency code.","title":"Code"},"description":"Filter the response by the currency code."},{"name":"output_format","in":"query","required":false,"schema":{"$ref":"#/components/schemas/OutputFormat","default":"json"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":10000,"minimum":0,"description":"Maximum number of records to return. The system will not return more than 10,000 records.","default":10000,"title":"Limit"},"description":"Maximum number of records to return. The system will not return more than 10,000 records."},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Number of records to skip in the response. Use in conjunction with the limit parameter to paginate.","default":0,"title":"Offset"},"description":"Number of records to skip in the response. Use in conjunction with the limit parameter to paginate."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HapiGenericResponse_CurrencyResponse_"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestResponse"}}},"description":"Bad Request"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseValidationResponse"}}},"description":"Internal Server Error"}}}}},"components":{"schemas":{"OutputFormat":{"type":"string","enum":["csv","json"],"title":"OutputFormat"},"HapiGenericResponse_CurrencyResponse_":{"properties":{"data":{"items":{"$ref":"#/components/schemas/CurrencyResponse"},"type":"array","title":"Data"}},"type":"object","required":["data"],"title":"HapiGenericResponse[CurrencyResponse]"},"CurrencyResponse":{"properties":{"code":{"type":"string","maxLength":32,"title":"Code","description":"ISO-4217 currency code"},"name":{"type":"string","maxLength":512,"title":"Name","description":"Currency name"}},"type":"object","required":["code","name"],"title":"CurrencyResponse"},"BadRequestResponse":{"properties":{"detail":{"type":"string","title":"Detail"}},"type":"object","required":["detail"],"title":"BadRequestResponse"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"ResponseValidationResponse":{"properties":{"error_sample_list":{"items":{},"type":"array","title":"Error Sample List"},"error":{"type":"string","title":"Error"}},"type":"object","required":["error_sample_list","error"],"title":"ResponseValidationResponse"}}}}
```

## GET /api/v2/metadata/org

> Get the list of organizations represented in the data available in HDX HAPI

```json
{"openapi":"3.1.0","info":{"title":"HDX HAPI","version":"0.9.13"},"servers":[{"url":"https://hapi.humdata.org","description":"Production"}],"paths":{"/api/v2/metadata/org":{"get":{"tags":["Metadata"],"summary":"Get the list of organizations represented in the data available in HDX HAPI","operationId":"get_org_api_v2_metadata_org_get","parameters":[{"name":"app_identifier","in":"query","required":true,"schema":{"anyOf":[{"type":"string","maxLength":512},{"type":"null"}],"description":"base64 encoded application name and email, as in `base64(\"app_name:email\")`. This value can also be passed in the `X-HDX-HAPI-APP-IDENTIFIER` header. See the *encoded_app_identifier* endpoint.","title":"App Identifier"},"description":"base64 encoded application name and email, as in `base64(\"app_name:email\")`. This value can also be passed in the `X-HDX-HAPI-APP-IDENTIFIER` header. See the *encoded_app_identifier* endpoint."},{"name":"acronym","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}],"description":"Filter the response by the standard acronym used to represent the organization. When data is brought into the HDX HAPI database, an attempt is made to standardize the acronyms.","title":"Acronym"},"description":"Filter the response by the standard acronym used to represent the organization. When data is brought into the HDX HAPI database, an attempt is made to standardize the acronyms."},{"name":"name","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":512},{"type":"null"}],"description":"Filter the response by the standard name used to represent the organization. When data is brought into the HDX HAPI database, an attempt is made to standardize the acronyms.","title":"Name"},"description":"Filter the response by the standard name used to represent the organization. When data is brought into the HDX HAPI database, an attempt is made to standardize the acronyms."},{"name":"org_type_code","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}],"description":"Filter the response by the organization type code.","title":"Org Type Code"},"description":"Filter the response by the organization type code."},{"name":"org_type_description","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":512},{"type":"null"}],"description":"Filter the response by the organization type description. See the <a href=\"/docs#/Metadata/get_org_type_api_v1_metadata_org_type_get\" target=\"_blank\">org type endpoint</a> for details.","title":"Org Type Description"},"description":"Filter the response by the organization type description. See the <a href=\"/docs#/Metadata/get_org_type_api_v1_metadata_org_type_get\" target=\"_blank\">org type endpoint</a> for details."},{"name":"output_format","in":"query","required":false,"schema":{"$ref":"#/components/schemas/OutputFormat","default":"json"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":10000,"minimum":0,"description":"Maximum number of records to return. The system will not return more than 10,000 records.","default":10000,"title":"Limit"},"description":"Maximum number of records to return. The system will not return more than 10,000 records."},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Number of records to skip in the response. Use in conjunction with the limit parameter to paginate.","default":0,"title":"Offset"},"description":"Number of records to skip in the response. Use in conjunction with the limit parameter to paginate."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HapiGenericResponse_OrgResponse_"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestResponse"}}},"description":"Bad Request"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseValidationResponse"}}},"description":"Internal Server Error"}}}}},"components":{"schemas":{"OutputFormat":{"type":"string","enum":["csv","json"],"title":"OutputFormat"},"HapiGenericResponse_OrgResponse_":{"properties":{"data":{"items":{"$ref":"#/components/schemas/OrgResponse"},"type":"array","title":"Data"}},"type":"object","required":["data"],"title":"HapiGenericResponse[OrgResponse]"},"OrgResponse":{"properties":{"acronym":{"type":"string","maxLength":32,"title":"Acronym","description":"The organization acronym"},"name":{"type":"string","maxLength":512,"title":"Name","description":"The organization name"},"org_type_code":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}],"title":"Org Type Code","description":"The code referring to the organization type"},"org_type_description":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}],"title":"Org Type Description","description":"A description of the organization type"}},"type":"object","required":["acronym","name","org_type_code","org_type_description"],"title":"OrgResponse"},"BadRequestResponse":{"properties":{"detail":{"type":"string","title":"Detail"}},"type":"object","required":["detail"],"title":"BadRequestResponse"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"ResponseValidationResponse":{"properties":{"error_sample_list":{"items":{},"type":"array","title":"Error Sample List"},"error":{"type":"string","title":"Error"}},"type":"object","required":["error_sample_list","error"],"title":"ResponseValidationResponse"}}}}
```

## Get information about how organizations are classified in HDX HAPI

> There is no agreed standard for the classification of organizations. The codes and descriptions used in HDX HAPI\
> are based on \<a href="[https://data.humdata.org/dataset/organization-types-beta">this](https://data.humdata.org/dataset/organization-types-beta">this) dataset\</a>.

```json
{"openapi":"3.1.0","info":{"title":"HDX HAPI","version":"0.9.13"},"servers":[{"url":"https://hapi.humdata.org","description":"Production"}],"paths":{"/api/v2/metadata/org-type":{"get":{"tags":["Metadata"],"summary":"Get information about how organizations are classified in HDX HAPI","description":"There is no agreed standard for the classification of organizations. The codes and descriptions used in HDX HAPI\nare based on <a href=\"https://data.humdata.org/dataset/organization-types-beta\">this dataset</a>.","operationId":"get_org_type_api_v2_metadata_org_type_get","parameters":[{"name":"app_identifier","in":"query","required":true,"schema":{"anyOf":[{"type":"string","maxLength":512},{"type":"null"}],"description":"base64 encoded application name and email, as in `base64(\"app_name:email\")`. This value can also be passed in the `X-HDX-HAPI-APP-IDENTIFIER` header. See the *encoded_app_identifier* endpoint.","title":"App Identifier"},"description":"base64 encoded application name and email, as in `base64(\"app_name:email\")`. This value can also be passed in the `X-HDX-HAPI-APP-IDENTIFIER` header. See the *encoded_app_identifier* endpoint."},{"name":"code","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}],"description":"Filter the response by the organization type code.","title":"Code"},"description":"Filter the response by the organization type code."},{"name":"description","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":512},{"type":"null"}],"description":"Filter the response by the organization type description.","title":"Description"},"description":"Filter the response by the organization type description."},{"name":"output_format","in":"query","required":false,"schema":{"$ref":"#/components/schemas/OutputFormat","default":"json"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":10000,"minimum":0,"description":"Maximum number of records to return. The system will not return more than 10,000 records.","default":10000,"title":"Limit"},"description":"Maximum number of records to return. The system will not return more than 10,000 records."},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Number of records to skip in the response. Use in conjunction with the limit parameter to paginate.","default":0,"title":"Offset"},"description":"Number of records to skip in the response. Use in conjunction with the limit parameter to paginate."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HapiGenericResponse_OrgTypeResponse_"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestResponse"}}},"description":"Bad Request"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseValidationResponse"}}},"description":"Internal Server Error"}}}}},"components":{"schemas":{"OutputFormat":{"type":"string","enum":["csv","json"],"title":"OutputFormat"},"HapiGenericResponse_OrgTypeResponse_":{"properties":{"data":{"items":{"$ref":"#/components/schemas/OrgTypeResponse"},"type":"array","title":"Data"}},"type":"object","required":["data"],"title":"HapiGenericResponse[OrgTypeResponse]"},"OrgTypeResponse":{"properties":{"code":{"type":"string","maxLength":32,"title":"Code","description":" The code referring to the organization type, derived either from the [OCHA Digital Services organization types list](https://data.humdata.org/dataset/organization-types-beta), or created for HDX HAPI"},"description":{"type":"string","maxLength":512,"title":"Description","description":"A description of the organization type"}},"type":"object","required":["code","description"],"title":"OrgTypeResponse"},"BadRequestResponse":{"properties":{"detail":{"type":"string","title":"Detail"}},"type":"object","required":["detail"],"title":"BadRequestResponse"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"ResponseValidationResponse":{"properties":{"error_sample_list":{"items":{},"type":"array","title":"Error Sample List"},"error":{"type":"string","title":"Error"}},"type":"object","required":["error_sample_list","error"],"title":"ResponseValidationResponse"}}}}
```

## Get information about how humanitarian response activities are classified

> There are a variety of standards for the naming of humanitarian sectors. The codes and descriptions used\
> in HDX HAPI are based on\
> \<a href="[https://data.humdata.org/organization/54255d0b-c6b1-4517-9722-17321f6634ab">this](https://data.humdata.org/organization/54255d0b-c6b1-4517-9722-17321f6634ab">this) dataset\</a>.

```json
{"openapi":"3.1.0","info":{"title":"HDX HAPI","version":"0.9.13"},"servers":[{"url":"https://hapi.humdata.org","description":"Production"}],"paths":{"/api/v2/metadata/sector":{"get":{"tags":["Metadata"],"summary":"Get information about how humanitarian response activities are classified","description":"There are a variety of standards for the naming of humanitarian sectors. The codes and descriptions used\nin HDX HAPI are based on\n<a href=\"https://data.humdata.org/organization/54255d0b-c6b1-4517-9722-17321f6634ab\">this dataset</a>.","operationId":"get_sector_api_v2_metadata_sector_get","parameters":[{"name":"app_identifier","in":"query","required":true,"schema":{"anyOf":[{"type":"string","maxLength":512},{"type":"null"}],"description":"base64 encoded application name and email, as in `base64(\"app_name:email\")`. This value can also be passed in the `X-HDX-HAPI-APP-IDENTIFIER` header. See the *encoded_app_identifier* endpoint.","title":"App Identifier"},"description":"base64 encoded application name and email, as in `base64(\"app_name:email\")`. This value can also be passed in the `X-HDX-HAPI-APP-IDENTIFIER` header. See the *encoded_app_identifier* endpoint."},{"name":"code","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}],"description":"Filter the response by the sector code.","title":"Code"},"description":"Filter the response by the sector code."},{"name":"name","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":512},{"type":"null"}],"description":"Filter the response by the sector name.","title":"Name"},"description":"Filter the response by the sector name."},{"name":"output_format","in":"query","required":false,"schema":{"$ref":"#/components/schemas/OutputFormat","default":"json"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":10000,"minimum":0,"description":"Maximum number of records to return. The system will not return more than 10,000 records.","default":10000,"title":"Limit"},"description":"Maximum number of records to return. The system will not return more than 10,000 records."},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Number of records to skip in the response. Use in conjunction with the limit parameter to paginate.","default":0,"title":"Offset"},"description":"Number of records to skip in the response. Use in conjunction with the limit parameter to paginate."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HapiGenericResponse_SectorResponse_"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestResponse"}}},"description":"Bad Request"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseValidationResponse"}}},"description":"Internal Server Error"}}}}},"components":{"schemas":{"OutputFormat":{"type":"string","enum":["csv","json"],"title":"OutputFormat"},"HapiGenericResponse_SectorResponse_":{"properties":{"data":{"items":{"$ref":"#/components/schemas/SectorResponse"},"type":"array","title":"Data"}},"type":"object","required":["data"],"title":"HapiGenericResponse[SectorResponse]"},"SectorResponse":{"properties":{"code":{"type":"string","maxLength":32,"title":"Code","description":"The sector code, derived either from the [Global Coordination Groups](https://data.humdata.org/dataset/global-coordination-groups-beta?) dataset, or created for HDX HAPI"},"name":{"type":"string","maxLength":512,"title":"Name","description":"The name of the sector"}},"type":"object","required":["code","name"],"title":"SectorResponse"},"BadRequestResponse":{"properties":{"detail":{"type":"string","title":"Detail"}},"type":"object","required":["detail"],"title":"BadRequestResponse"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"ResponseValidationResponse":{"properties":{"error_sample_list":{"items":{},"type":"array","title":"Error Sample List"},"error":{"type":"string","title":"Error"}},"type":"object","required":["error_sample_list","error"],"title":"ResponseValidationResponse"}}}}
```

## Get the list of WFP commodities

> Provide commodity information to use in conjunction with the food-prices endpoint

```json
{"openapi":"3.1.0","info":{"title":"HDX HAPI","version":"0.9.13"},"servers":[{"url":"https://hapi.humdata.org","description":"Production"}],"paths":{"/api/v2/metadata/wfp-commodity":{"get":{"tags":["Metadata"],"summary":"Get the list of WFP commodities","description":"Provide commodity information to use in conjunction with the food-prices endpoint","operationId":"get_wfp_commodities_api_v2_metadata_wfp_commodity_get","parameters":[{"name":"app_identifier","in":"query","required":true,"schema":{"anyOf":[{"type":"string","maxLength":512},{"type":"null"}],"description":"base64 encoded application name and email, as in `base64(\"app_name:email\")`. This value can also be passed in the `X-HDX-HAPI-APP-IDENTIFIER` header. See the *encoded_app_identifier* endpoint.","title":"App Identifier"},"description":"base64 encoded application name and email, as in `base64(\"app_name:email\")`. This value can also be passed in the `X-HDX-HAPI-APP-IDENTIFIER` header. See the *encoded_app_identifier* endpoint."},{"name":"code","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}],"description":"Filter the response by the unique code identifying the commodity.","title":"Code"},"description":"Filter the response by the unique code identifying the commodity."},{"name":"category","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/CommodityCategory"},{"type":"null"}],"description":"Filter the response by the food group that the commodity belongs to, available values are described <a href=\"https://hdx-hapi.readthedocs.io/en/latest/data_usage_guides/enums/#commodity-category\">here.</a>","title":"Category"},"description":"Filter the response by the food group that the commodity belongs to, available values are described <a href=\"https://hdx-hapi.readthedocs.io/en/latest/data_usage_guides/enums/#commodity-category\">here.</a>"},{"name":"name","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":512},{"type":"null"}],"description":"Filter the response by the name of the commodity.","title":"Name"},"description":"Filter the response by the name of the commodity."},{"name":"output_format","in":"query","required":false,"schema":{"$ref":"#/components/schemas/OutputFormat","default":"json"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":10000,"minimum":0,"description":"Maximum number of records to return. The system will not return more than 10,000 records.","default":10000,"title":"Limit"},"description":"Maximum number of records to return. The system will not return more than 10,000 records."},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Number of records to skip in the response. Use in conjunction with the limit parameter to paginate.","default":0,"title":"Offset"},"description":"Number of records to skip in the response. Use in conjunction with the limit parameter to paginate."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HapiGenericResponse_WfpCommodityResponse_"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestResponse"}}},"description":"Bad Request"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseValidationResponse"}}},"description":"Internal Server Error"}}}}},"components":{"schemas":{"CommodityCategory":{"type":"string","enum":["cereals and tubers","meat, fish and eggs","milk and dairy","miscellaneous food","non-food","oil and fats","pulses and nuts","vegetables and fruits"],"title":"CommodityCategory"},"OutputFormat":{"type":"string","enum":["csv","json"],"title":"OutputFormat"},"HapiGenericResponse_WfpCommodityResponse_":{"properties":{"data":{"items":{"$ref":"#/components/schemas/WfpCommodityResponse"},"type":"array","title":"Data"}},"type":"object","required":["data"],"title":"HapiGenericResponse[WfpCommodityResponse]"},"WfpCommodityResponse":{"properties":{"code":{"type":"string","maxLength":32,"title":"Code","description":"The unique code identifying the commodity"},"category":{"$ref":"#/components/schemas/CommodityCategory","description":"The food group that the commodity belongs to, available values are described <a href=\"https://hdx-hapi.readthedocs.io/en/latest/data_usage_guides/enums/#commodity-category\">here.</a>"},"name":{"type":"string","maxLength":512,"title":"Name","description":"The name of the commodity"}},"type":"object","required":["code","category","name"],"title":"WfpCommodityResponse"},"BadRequestResponse":{"properties":{"detail":{"type":"string","title":"Detail"}},"type":"object","required":["detail"],"title":"BadRequestResponse"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"ResponseValidationResponse":{"properties":{"error_sample_list":{"items":{},"type":"array","title":"Error Sample List"},"error":{"type":"string","title":"Error"}},"type":"object","required":["error_sample_list","error"],"title":"ResponseValidationResponse"}}}}
```

## Get the list of WFP markets.

> Provide physical market location information to use in conjunction with the food-prices endpoint

```json
{"openapi":"3.1.0","info":{"title":"HDX HAPI","version":"0.9.13"},"servers":[{"url":"https://hapi.humdata.org","description":"Production"}],"paths":{"/api/v2/metadata/wfp-market":{"get":{"tags":["Metadata"],"summary":"Get the list of WFP markets.","description":"Provide physical market location information to use in conjunction with the food-prices endpoint","operationId":"get_wfp_market_api_v2_metadata_wfp_market_get","parameters":[{"name":"app_identifier","in":"query","required":true,"schema":{"anyOf":[{"type":"string","maxLength":512},{"type":"null"}],"description":"base64 encoded application name and email, as in `base64(\"app_name:email\")`. This value can also be passed in the `X-HDX-HAPI-APP-IDENTIFIER` header. See the *encoded_app_identifier* endpoint.","title":"App Identifier"},"description":"base64 encoded application name and email, as in `base64(\"app_name:email\")`. This value can also be passed in the `X-HDX-HAPI-APP-IDENTIFIER` header. See the *encoded_app_identifier* endpoint."},{"name":"code","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}],"description":"Filter the response by the unique code identifying the market.","title":"Code"},"description":"Filter the response by the unique code identifying the market."},{"name":"name","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":512},{"type":"null"}],"description":"Filter the response by the name of the market.","title":"Name"},"description":"Filter the response by the name of the market."},{"name":"has_hrp","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Filter the response by the has_hrp flag. The has_hrp flag indicates whether a country has a Humanitarian Response Plan.","title":"Has Hrp"},"description":"Filter the response by the has_hrp flag. The has_hrp flag indicates whether a country has a Humanitarian Response Plan."},{"name":"in_gho","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Filter the response by the in_gho flag. The in_gho flag indicates whether a country is in the <a href=\"https://humanitarianaction.info/\">Global Humanitarian Overview</a>.","title":"In Gho"},"description":"Filter the response by the in_gho flag. The in_gho flag indicates whether a country is in the <a href=\"https://humanitarianaction.info/\">Global Humanitarian Overview</a>."},{"name":"location_code","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"description":"Filter the response by a location (typically a country). The location codes use the ISO-3 (ISO 3166 alpha-3) codes. See the <a href=\"/docs#/Metadata/get_locations_api_v1_metadata_location_get\" target=\"_blank\">location endpoint</a> for details.","title":"Location Code"},"description":"Filter the response by a location (typically a country). The location codes use the ISO-3 (ISO 3166 alpha-3) codes. See the <a href=\"/docs#/Metadata/get_locations_api_v1_metadata_location_get\" target=\"_blank\">location endpoint</a> for details."},{"name":"location_name","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":512},{"type":"null"}],"description":"Filter the response by a location (typically a country). The location names are based on the \"short name\" from the <a href=\"https://unstats.un.org/unsd/methodology/m49/#fn2\">UN M49 Standard</a>. See the <a href=\"/docs#/Metadata/get_locations_api_v1_metadata_location_get\" target=\"_blank\">location endpoint</a> for details.","title":"Location Name"},"description":"Filter the response by a location (typically a country). The location names are based on the \"short name\" from the <a href=\"https://unstats.un.org/unsd/methodology/m49/#fn2\">UN M49 Standard</a>. See the <a href=\"/docs#/Metadata/get_locations_api_v1_metadata_location_get\" target=\"_blank\">location endpoint</a> for details."},{"name":"admin1_code","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"description":"Filter the response by the 1st subnational administrative divisions. The admin1 codes refer to the p-codes in the <a href=\"https://data.humdata.org/dashboards/cod?\">Common Operational Datasets</a>. See the <a href=\"/docs#/Metadata/get_admin1_api_v1_metadata_admin1_get\" target=\"_blank\">admin1 endpoint</a> for details.","title":"Admin1 Code"},"description":"Filter the response by the 1st subnational administrative divisions. The admin1 codes refer to the p-codes in the <a href=\"https://data.humdata.org/dashboards/cod?\">Common Operational Datasets</a>. See the <a href=\"/docs#/Metadata/get_admin1_api_v1_metadata_admin1_get\" target=\"_blank\">admin1 endpoint</a> for details."},{"name":"admin1_name","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":512},{"type":"null"}],"description":"Filter the response by the 1st subnational administrative divisions. The admin1 names refer to either the <a href=\"https://data.humdata.org/dashboards/cod?\">Common Operational Datasets</a> or those provided in the original data source. See the <a href=\"/docs#/Metadata/get_admin1_api_v1_metadata_admin1_get\" target=\"_blank\">admin1 endpoint</a> for details.","title":"Admin1 Name"},"description":"Filter the response by the 1st subnational administrative divisions. The admin1 names refer to either the <a href=\"https://data.humdata.org/dashboards/cod?\">Common Operational Datasets</a> or those provided in the original data source. See the <a href=\"/docs#/Metadata/get_admin1_api_v1_metadata_admin1_get\" target=\"_blank\">admin1 endpoint</a> for details."},{"name":"admin2_code","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"description":"Filter the response by the 2nd subnational administrative divisions. The admin2 codes refer to the p-codes in the <a href=\"https://data.humdata.org/dashboards/cod?\">Common Operational Datasets</a>. See the <a href=\"/docs#/Metadata/get_admin2_api_v1_metadata_admin2_get\" target=\"_blank\">admin2 endpoint</a> for details.","title":"Admin2 Code"},"description":"Filter the response by the 2nd subnational administrative divisions. The admin2 codes refer to the p-codes in the <a href=\"https://data.humdata.org/dashboards/cod?\">Common Operational Datasets</a>. See the <a href=\"/docs#/Metadata/get_admin2_api_v1_metadata_admin2_get\" target=\"_blank\">admin2 endpoint</a> for details."},{"name":"admin2_name","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":512},{"type":"null"}],"description":"Filter the response by the 2nd subnational administrative divisions. The admin2 names refer to either the <a href=\"https://data.humdata.org/dashboards/cod?\">Common Operational Datasets</a> or those provided in the original data source. See the <a href=\"/docs#/Metadata/get_admin2_api_v1_metadata_admin2_get\" target=\"_blank\">admin2 endpoint</a> for details.","title":"Admin2 Name"},"description":"Filter the response by the 2nd subnational administrative divisions. The admin2 names refer to either the <a href=\"https://data.humdata.org/dashboards/cod?\">Common Operational Datasets</a> or those provided in the original data source. See the <a href=\"/docs#/Metadata/get_admin2_api_v1_metadata_admin2_get\" target=\"_blank\">admin2 endpoint</a> for details."},{"name":"admin_level","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/AdminLevel"},{"type":"null"}],"description":"Filter the response by admin level.","title":"Admin Level"},"description":"Filter the response by admin level."},{"name":"output_format","in":"query","required":false,"schema":{"$ref":"#/components/schemas/OutputFormat","default":"json"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":10000,"minimum":0,"description":"Maximum number of records to return. The system will not return more than 10,000 records.","default":10000,"title":"Limit"},"description":"Maximum number of records to return. The system will not return more than 10,000 records."},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Number of records to skip in the response. Use in conjunction with the limit parameter to paginate.","default":0,"title":"Offset"},"description":"Number of records to skip in the response. Use in conjunction with the limit parameter to paginate."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HapiGenericResponse_WfpMarketResponse_"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestResponse"}}},"description":"Bad Request"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseValidationResponse"}}},"description":"Internal Server Error"}}}}},"components":{"schemas":{"AdminLevel":{"type":"string","enum":["0","1","2"],"title":"AdminLevel"},"OutputFormat":{"type":"string","enum":["csv","json"],"title":"OutputFormat"},"HapiGenericResponse_WfpMarketResponse_":{"properties":{"data":{"items":{"$ref":"#/components/schemas/WfpMarketResponse"},"type":"array","title":"Data"}},"type":"object","required":["data"],"title":"HapiGenericResponse[WfpMarketResponse]"},"WfpMarketResponse":{"properties":{"location_code":{"type":"string","maxLength":128,"title":"Location Code","description":"A location (typically a country). The location codes use the ISO-3 (ISO 3166 alpha-3) codes."},"location_name":{"type":"string","maxLength":512,"title":"Location Name","description":"A location (typically a country). The location names are based on the \"short name\" from the <a href=\"https://unstats.un.org/unsd/methodology/m49/#fn2\">UN M49 Standard</a>."},"admin1_code":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Admin1 Code","description":"The 1st subnational administrative divisions. The admin1 codes refer to the p-codes in the <a href=\"https://data.humdata.org/dashboards/cod?\">Common Operational Datasets</a>."},"admin1_name":{"anyOf":[{"type":"string","maxLength":512},{"type":"null"}],"title":"Admin1 Name","description":"The 1st subnational administrative divisions. The admin1 names refer to either the <a href=\"https://data.humdata.org/dashboards/cod?\">Common Operational Datasets</a> or those provided in the original data source."},"admin2_code":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Admin2 Code","description":"The 2nd subnational administrative divisions. The admin2 codes refer to the p-codes in the <a href=\"https://data.humdata.org/dashboards/cod?\">Common Operational Datasets</a>."},"admin2_name":{"anyOf":[{"type":"string","maxLength":512},{"type":"null"}],"title":"Admin2 Name","description":"The 2nd subnational administrative divisions. The admin2 names refer to either the <a href=\"https://data.humdata.org/dashboards/cod?\">Common Operational Datasets</a> or those provided in the original data source."},"admin_level":{"type":"integer","title":"Admin Level","description":"Admin level."},"code":{"type":"string","maxLength":32,"title":"Code","description":"The unique code identifying the market"},"name":{"type":"string","maxLength":512,"title":"Name","description":"The name of the market"},"lat":{"anyOf":[{"type":"number","maximum":90,"minimum":-90},{"type":"null"}],"title":"Lat","description":"The market's latitude"},"lon":{"anyOf":[{"type":"number","maximum":180,"minimum":-180},{"type":"null"}],"title":"Lon","description":"The market's longitude"}},"type":"object","required":["location_code","location_name","admin1_code","admin1_name","admin2_code","admin2_name","admin_level","code","name","lat","lon"],"title":"WfpMarketResponse"},"BadRequestResponse":{"properties":{"detail":{"type":"string","title":"Detail"}},"type":"object","required":["detail"],"title":"BadRequestResponse"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"ResponseValidationResponse":{"properties":{"error_sample_list":{"items":{},"type":"array","title":"Error Sample List"},"error":{"type":"string","title":"Error"}},"type":"object","required":["error_sample_list","error"],"title":"ResponseValidationResponse"}}}}
```

## Get information about the availability of data for different geographic admin levels

> Provide currency information to use in conjunction with the food-prices endpoint

```json
{"openapi":"3.1.0","info":{"title":"HDX HAPI","version":"0.9.13"},"servers":[{"url":"https://hapi.humdata.org","description":"Production"}],"paths":{"/api/v2/metadata/data-availability":{"get":{"tags":["Metadata"],"summary":"Get information about the availability of data for different geographic admin levels","description":"Provide currency information to use in conjunction with the food-prices endpoint","operationId":"get_data_availability_api_v2_metadata_data_availability_get","parameters":[{"name":"app_identifier","in":"query","required":true,"schema":{"anyOf":[{"type":"string","maxLength":512},{"type":"null"}],"description":"base64 encoded application name and email, as in `base64(\"app_name:email\")`. This value can also be passed in the `X-HDX-HAPI-APP-IDENTIFIER` header. See the *encoded_app_identifier* endpoint.","title":"App Identifier"},"description":"base64 encoded application name and email, as in `base64(\"app_name:email\")`. This value can also be passed in the `X-HDX-HAPI-APP-IDENTIFIER` header. See the *encoded_app_identifier* endpoint."},{"name":"category","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"description":"Filter the response by a data category","title":"Category"},"description":"Filter the response by a data category"},{"name":"subcategory","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"description":"Filter the response by a data subcategory","title":"Subcategory"},"description":"Filter the response by a data subcategory"},{"name":"hapi_updated_date_min","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"string","format":"date"},{"type":"null"}],"description":"Minimum date that datasets was last updated, e.g. 2020-01-01 or 2020-01-01T00:00:00","title":"Hapi Updated Date Min"},"description":"Minimum date that datasets was last updated, e.g. 2020-01-01 or 2020-01-01T00:00:00"},{"name":"hapi_updated_date_max","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"string","format":"date"},{"type":"null"}],"description":"Maximum date that datasets was last updated, e.g. 2020-01-01 or 2020-01-01T00:00:00","title":"Hapi Updated Date Max"},"description":"Maximum date that datasets was last updated, e.g. 2020-01-01 or 2020-01-01T00:00:00"},{"name":"output_format","in":"query","required":false,"schema":{"$ref":"#/components/schemas/OutputFormat","default":"json"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":10000,"minimum":0,"description":"Maximum number of records to return. The system will not return more than 10,000 records.","default":10000,"title":"Limit"},"description":"Maximum number of records to return. The system will not return more than 10,000 records."},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Number of records to skip in the response. Use in conjunction with the limit parameter to paginate.","default":0,"title":"Offset"},"description":"Number of records to skip in the response. Use in conjunction with the limit parameter to paginate."},{"name":"location_code","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"description":"Filter the response by a location (typically a country). The location codes use the ISO-3 (ISO 3166 alpha-3) codes. See the <a href=\"/docs#/Metadata/get_locations_api_v1_metadata_location_get\" target=\"_blank\">location endpoint</a> for details.","title":"Location Code"},"description":"Filter the response by a location (typically a country). The location codes use the ISO-3 (ISO 3166 alpha-3) codes. See the <a href=\"/docs#/Metadata/get_locations_api_v1_metadata_location_get\" target=\"_blank\">location endpoint</a> for details."},{"name":"location_name","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":512},{"type":"null"}],"description":"Filter the response by a location (typically a country). The location names are based on the \"short name\" from the <a href=\"https://unstats.un.org/unsd/methodology/m49/#fn2\">UN M49 Standard</a>. See the <a href=\"/docs#/Metadata/get_locations_api_v1_metadata_location_get\" target=\"_blank\">location endpoint</a> for details.","title":"Location Name"},"description":"Filter the response by a location (typically a country). The location names are based on the \"short name\" from the <a href=\"https://unstats.un.org/unsd/methodology/m49/#fn2\">UN M49 Standard</a>. See the <a href=\"/docs#/Metadata/get_locations_api_v1_metadata_location_get\" target=\"_blank\">location endpoint</a> for details."},{"name":"admin1_code","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"description":"Filter the response by the 1st subnational administrative divisions. The admin1 codes refer to the p-codes in the <a href=\"https://data.humdata.org/dashboards/cod?\">Common Operational Datasets</a>. See the <a href=\"/docs#/Metadata/get_admin1_api_v1_metadata_admin1_get\" target=\"_blank\">admin1 endpoint</a> for details.","title":"Admin1 Code"},"description":"Filter the response by the 1st subnational administrative divisions. The admin1 codes refer to the p-codes in the <a href=\"https://data.humdata.org/dashboards/cod?\">Common Operational Datasets</a>. See the <a href=\"/docs#/Metadata/get_admin1_api_v1_metadata_admin1_get\" target=\"_blank\">admin1 endpoint</a> for details."},{"name":"admin1_name","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":512},{"type":"null"}],"description":"Filter the response by the 1st subnational administrative divisions. The admin1 names refer to either the <a href=\"https://data.humdata.org/dashboards/cod?\">Common Operational Datasets</a> or those provided in the original data source. See the <a href=\"/docs#/Metadata/get_admin1_api_v1_metadata_admin1_get\" target=\"_blank\">admin1 endpoint</a> for details.","title":"Admin1 Name"},"description":"Filter the response by the 1st subnational administrative divisions. The admin1 names refer to either the <a href=\"https://data.humdata.org/dashboards/cod?\">Common Operational Datasets</a> or those provided in the original data source. See the <a href=\"/docs#/Metadata/get_admin1_api_v1_metadata_admin1_get\" target=\"_blank\">admin1 endpoint</a> for details."},{"name":"admin2_code","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"description":"Filter the response by the 2nd subnational administrative divisions. The admin2 codes refer to the p-codes in the <a href=\"https://data.humdata.org/dashboards/cod?\">Common Operational Datasets</a>. See the <a href=\"/docs#/Metadata/get_admin2_api_v1_metadata_admin2_get\" target=\"_blank\">admin2 endpoint</a> for details.","title":"Admin2 Code"},"description":"Filter the response by the 2nd subnational administrative divisions. The admin2 codes refer to the p-codes in the <a href=\"https://data.humdata.org/dashboards/cod?\">Common Operational Datasets</a>. See the <a href=\"/docs#/Metadata/get_admin2_api_v1_metadata_admin2_get\" target=\"_blank\">admin2 endpoint</a> for details."},{"name":"admin2_name","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":512},{"type":"null"}],"description":"Filter the response by the 2nd subnational administrative divisions. The admin2 names refer to either the <a href=\"https://data.humdata.org/dashboards/cod?\">Common Operational Datasets</a> or those provided in the original data source. See the <a href=\"/docs#/Metadata/get_admin2_api_v1_metadata_admin2_get\" target=\"_blank\">admin2 endpoint</a> for details.","title":"Admin2 Name"},"description":"Filter the response by the 2nd subnational administrative divisions. The admin2 names refer to either the <a href=\"https://data.humdata.org/dashboards/cod?\">Common Operational Datasets</a> or those provided in the original data source. See the <a href=\"/docs#/Metadata/get_admin2_api_v1_metadata_admin2_get\" target=\"_blank\">admin2 endpoint</a> for details."},{"name":"admin_level","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/AdminLevel"},{"type":"null"}],"description":"Filter the response by admin level.","title":"Admin Level"},"description":"Filter the response by admin level."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HapiGenericResponse_AvailabilityResponse_"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestResponse"}}},"description":"Bad Request"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseValidationResponse"}}},"description":"Internal Server Error"}}}}},"components":{"schemas":{"OutputFormat":{"type":"string","enum":["csv","json"],"title":"OutputFormat"},"AdminLevel":{"type":"string","enum":["0","1","2"],"title":"AdminLevel"},"HapiGenericResponse_AvailabilityResponse_":{"properties":{"data":{"items":{"$ref":"#/components/schemas/AvailabilityResponse"},"type":"array","title":"Data"}},"type":"object","required":["data"],"title":"HapiGenericResponse[AvailabilityResponse]"},"AvailabilityResponse":{"properties":{"location_code":{"type":"string","maxLength":128,"title":"Location Code","description":"A location (typically a country). The location codes use the ISO-3 (ISO 3166 alpha-3) codes."},"location_name":{"type":"string","maxLength":512,"title":"Location Name","description":"A location (typically a country). The location names are based on the \"short name\" from the <a href=\"https://unstats.un.org/unsd/methodology/m49/#fn2\">UN M49 Standard</a>."},"admin1_code":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Admin1 Code","description":"The 1st subnational administrative divisions. The admin1 codes refer to the p-codes in the <a href=\"https://data.humdata.org/dashboards/cod?\">Common Operational Datasets</a>."},"admin1_name":{"anyOf":[{"type":"string","maxLength":512},{"type":"null"}],"title":"Admin1 Name","description":"The 1st subnational administrative divisions. The admin1 names refer to either the <a href=\"https://data.humdata.org/dashboards/cod?\">Common Operational Datasets</a> or those provided in the original data source."},"admin2_code":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Admin2 Code","description":"The 2nd subnational administrative divisions. The admin2 codes refer to the p-codes in the <a href=\"https://data.humdata.org/dashboards/cod?\">Common Operational Datasets</a>."},"admin2_name":{"anyOf":[{"type":"string","maxLength":512},{"type":"null"}],"title":"Admin2 Name","description":"The 2nd subnational administrative divisions. The admin2 names refer to either the <a href=\"https://data.humdata.org/dashboards/cod?\">Common Operational Datasets</a> or those provided in the original data source."},"admin_level":{"type":"integer","title":"Admin Level","description":"Admin level."},"category":{"type":"string","maxLength":32,"title":"Category","description":"HAPI category"},"subcategory":{"type":"string","maxLength":512,"title":"Subcategory","description":"HAPI subcategory"},"hapi_updated_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Hapi Updated Date","description":"Date that dataset was last updated, e.g. 2020-01-01 or 2020-01-01T00:00:00"}},"type":"object","required":["location_code","location_name","admin1_code","admin1_name","admin2_code","admin2_name","admin_level","category","subcategory","hapi_updated_date"],"title":"AvailabilityResponse"},"BadRequestResponse":{"properties":{"detail":{"type":"string","title":"Detail"}},"type":"object","required":["detail"],"title":"BadRequestResponse"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"ResponseValidationResponse":{"properties":{"error_sample_list":{"items":{},"type":"array","title":"Error Sample List"},"error":{"type":"string","title":"Error"}},"type":"object","required":["error_sample_list","error"],"title":"ResponseValidationResponse"}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.humdata.org/build/hdx-apis/hapi/api-reference/metadata.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
