List Moroccan consulates
Good to know. Directory captured on 31 October 2026: 56 consulates in 15 countries. Contacts are not verified in real time; redistribution permission has not been obtained.
Read the response
data: The requested results, as an object or an array.
meta: Dataset sources, license and dates. null means unknown or unavailable.
meta.pagination: Lists: 100 results by default, 500 maximum. Use limit and offset; meta.pagination.next_offset is null on the last page.
Illustrative example: With limit=10 and offset=0, the first page holds at most 10 results. If next_offset is 10, request the next page with offset=10 and the same filters. Stop when next_offset is null.
API v2 is the canonical path. Older /api/v1 paths remain compatibility aliases for the currently published behavior, including pagination; no removal date is scheduled.
Response fields 15
[] means each item in a list. null means unknown or unavailable, never zero. The guide language does not translate source values.
dataobject[]Requested result: a single object or a list.
data[].idstringIdentifier of this item in the dataset; not necessarily an official code.
data[].nameobjectResource name, grouped by language where applicable.
data[].name.frstringFrench value; null when no translation is provided.
data[].countryobjectHost country of the consulate.
data[].country.codestringTwo-letter ISO host-country code.
data[].country.namestringFrench name of the host country.
data[].citystringCity stated by the source; not necessarily an administrative code.
data[].addressstring | nullPostal address as published.
data[].phonesobject[]Institutional telephone values retained from the source.
data[].phones[].rawstringSource value after removing identified mobile segments; may remain ambiguous.
data[].phones[].e164string | nullHost-country international phone number; null when ambiguous or invalid. Does not prove reachability.
data[].websitestring | nullWebsite link supplied by the source; null when absent or excluded during review.
data[].source_namesstring[]Associated source panel titles, including merged duplicates.
data[].quality_flagsstring[]Known issues: duplicate, incomplete contact, ambiguous phone or excluded link.
Data structure
{
"type": "object",
"additionalProperties": false,
"required": [
"data",
"meta"
],
"properties": {
"data": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"required": [
"id",
"name",
"country",
"city",
"address",
"phones",
"website",
"source_names",
"quality_flags"
],
"properties": {
"id": {
"type": "string",
"maxLength": 100,
"pattern": "^[a-z]{2}-[a-z0-9]+(?:-[a-z0-9]+)*$"
},
"name": {
"type": "object",
"additionalProperties": false,
"required": [
"fr"
],
"properties": {
"fr": {
"type": "string",
"minLength": 1
}
}
},
"country": {
"type": "object",
"additionalProperties": false,
"required": [
"code",
"name"
],
"properties": {
"code": {
"type": "string",
"pattern": "^[A-Z]{2}$"
},
"name": {
"type": "string",
"minLength": 1
}
}
},
"city": {
"type": "string",
"minLength": 1
},
"address": {
"anyOf": [
{
"type": "string",
"minLength": 1
},
{
"type": "string",
"nullable": true,
"enum": [
null
]
}
]
},
"phones": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"required": [
"raw",
"e164"
],
"properties": {
"raw": {
"type": "string",
"minLength": 1
},
"e164": {
"anyOf": [
{
"type": "string",
"pattern": "^\\+[1-9][0-9]{6,14}$"
},
{
"type": "string",
"nullable": true,
"enum": [
null
]
}
]
}
}
}
},
"website": {
"anyOf": [
{
"type": "string",
"format": "uri",
"pattern": "^https?://"
},
{
"type": "string",
"nullable": true,
"enum": [
null
]
}
]
},
"source_names": {
"type": "array",
"minItems": 1,
"items": {
"type": "string",
"minLength": 1
}
},
"quality_flags": {
"type": "array",
"items": {
"type": "string",
"minLength": 1
}
}
}
}
},
"meta": {
"type": "object",
"additionalProperties": false,
"required": [
"dataset",
"total",
"license",
"terms_url",
"redistribution_status",
"retrieved_at",
"source_updated_at",
"transformation_version",
"coverage",
"sources",
"pagination"
],
"properties": {
"dataset": {
"enum": [
"moroccan-consulates"
]
},
"total": {
"type": "integer",
"minimum": 0
},
"license": {
"type": "string",
"nullable": true,
"enum": [
null
]
},
"terms_url": {
"type": "string",
"format": "uri"
},
"redistribution_status": {
"enum": [
"permission-not-obtained"
]
},
"retrieved_at": {
"type": "string",
"format": "date"
},
"source_updated_at": {
"type": "string",
"nullable": true,
"enum": [
null
]
},
"transformation_version": {
"type": "string",
"minLength": 1
},
"coverage": {
"type": "object",
"additionalProperties": false,
"required": [
"records",
"countries",
"complete",
"real_time",
"limitations"
],
"properties": {
"records": {
"type": "integer",
"minimum": 1
},
"countries": {
"type": "integer",
"minimum": 1
},
"complete": {
"enum": [
false
]
},
"real_time": {
"enum": [
false
]
},
"limitations": {
"type": "array",
"items": {
"type": "string",
"minLength": 1
}
}
}
},
"sources": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"required": [
"dataset",
"producer",
"source_url"
],
"properties": {
"dataset": {
"type": "string",
"minLength": 1
},
"producer": {
"type": "string",
"minLength": 1
},
"source_url": {
"type": "string",
"format": "uri"
}
}
}
},
"pagination": {
"type": "object",
"additionalProperties": false,
"required": [
"limit",
"offset",
"count",
"has_more",
"next_offset"
],
"properties": {
"limit": {
"type": "integer",
"minimum": 1,
"maximum": 500
},
"offset": {
"type": "integer",
"minimum": 0,
"maximum": 2147483647
},
"count": {
"type": "integer",
"minimum": 0,
"maximum": 500
},
"has_more": {
"type": "boolean"
},
"next_offset": {
"anyOf": [
{
"type": "integer",
"minimum": 0,
"maximum": 2147483647
},
{
"type": "string",
"nullable": true,
"enum": [
null
]
}
]
}
}
}
}
}
}
}Sources and pagination 25
metaobjectResult context: sources, dates, license and pagination where applicable.
meta.datasetstringName of the dataset for this result or source.
Accepted values:
"moroccan-consulates"meta.totalintegerNumber of matching records before pagination; not the size of this page.
meta.licensenullnull: no open license identified for this directory.
Accepted values:
nullmeta.terms_urlstringTerms of use published by the source website.
meta.redistribution_statusstringpermission-not-obtained: no written redistribution permission obtained.
Accepted values:
"permission-not-obtained"meta.retrieved_atstringDate the project retrieved the source file; not the observation date.
meta.source_updated_atnullLast update reported by the source; not the retrieval date.
Accepted values:
nullmeta.transformation_versionstringVersion of the dataset conversion rules; separate from the API version.
meta.coverageobjectGeographic and time coverage actually available.
meta.coverage.recordsintegerNumber of consulates in the entire snapshot before filtering.
meta.coverage.countriesintegerNumber of countries represented in the entire snapshot.
meta.coverage.completebooleanfalse: exhaustive coverage of the consular network is not verified.
Accepted values:
falsemeta.coverage.real_timebooleanfalse means observations are historical, without live updates.
Accepted values:
falsemeta.coverage.limitationsstring[]Known source or coverage limitations; read before using the data.
meta.sourcesobject[]Sources used for this result, with their publishers and licenses.
meta.sources[].datasetstringName of the dataset for this result or source.
meta.sources[].producerstringOrganization publishing the original data.
meta.sources[].source_urlstringSource publication or dataset landing page.
meta.paginationobjectInformation for reading a collection one page at a time.
meta.pagination.limitintegerRequested maximum records per page: default 100, maximum 500.
meta.pagination.offsetintegerMatching records skipped before this page, after filtering. The first page starts at 0.
meta.pagination.countintegerNumber of records actually returned on this page.
meta.pagination.has_morebooleantrue when another page of records remains.
meta.pagination.next_offsetinteger | nullUse as offset for the next page; null at the end. Keep the same filters.
Errors
400: Invalid or missing parameter.
Errors return error.code, error.message and error.request_id.
errorobjectDetails of a failed request; replaces data and meta.
error.codestringStable error code, such as RESOURCE_NOT_FOUND; use it in application logic.
error.messagestringHuman-readable error explanation; use code for application logic.
error.request_idstringIdentifier for this request, useful when reporting a problem.