API endpoint detection (apidetect.py)
Fill endpoints[] on catalog YAML after the record exists. The script GETs known URL templates for a software.id and writes types/URLs that respond.
This is enrichment, not discovery and not a dataset crawl. Find catalogs with discovery.md; add YAML with cli.md; then optionally run apidetect. To list datasets inside a catalog, use harvest.md.
Do not treat scripts/apidetect_urlmaps_draft.py as a CLI. Draft maps are merged into CATALOGS_URLMAP inside apidetect.py at import time.
When to run
- After adding or retagging a catalog whose
software.idhas a URL map - When quality reports
MISSING_ENDPOINTSandapi: true - In
--dryrunfirst; write YAML only when probes match the live site
Skip software IDs with no map. Do not guess dump paths by hand. custom catalogs are skipped by quality fixers and by detect CLI unless you pass --include-custom.
Harvestable dumps (DCAT /data.json, /catalog.xml, /catalog.rdf, OAI-PMH, CSW, SPARQL) are written to endpoints[]. Do not use catalog_export.
Commands
From the repository root:
python scripts/apidetect.py detect-single catalogdatagov --dryrun
python scripts/apidetect.py detect-single cdi00001616 --dryrun
python scripts/apidetect.py detect-software ckan --dryrun
python scripts/apidetect.py detect-software ckan --max-endpoints 1 --dryrun
python scripts/apidetect.py detect-software ckan --action update --dryrun
python scripts/apidetect.py detect-software custom --include-custom --dryrun
python scripts/apidetect.py detect-country US --dryrun
python scripts/apidetect.py detect-cattype "Open data portal" --dryrun
--workers (default 8) runs catalog jobs in parallel. --probe-workers (default 8) runs URL-map HTTP probes for one catalog in parallel. Use --workers 1 --probe-workers 1 to restore sequential behaviour. detect-single looks up {id}.yaml by filename first instead of walking every entity file.
--dryrun prints planned endpoints and does not write YAML. Omit it to insert. --action insert is the default and skips records that already have endpoints. Use --action update to add newly mapped protocols (OAI, DCAT RDF, SPARQL, TAP, OData) without replacing existing URLs.
--include-custom is required to probe software.id: custom with the dump map (/catalog.xml, OAI-PMH, CSW, SPARQL, …). Quality fixers never set this flag.
--mode entries (default) walks data/entities/. Use --mode scheduled for unverified files.
detect-all walks every mapped software.id — too heavy for a normal contribution; prefer detect-single or detect-software.
Software IDs with URL maps
Maps exist for the IDs in CATALOGS_URLMAP (built-in plus draft merge from apidetect_urlmaps_draft.py). The software index apidetect column is yes when a map exists. High-traffic examples:
| Area | software.id |
|---|---|
| Open data | ckan, dkan, ekan, opendatasoft, socrata, udata, magda, jkan, junar, entryscape, drupal, wordpress, triplydb, piveau, idra, resourcecontracts, gisopendataportal, datafair, lkod, ouropendata, dataeye, opengov, odweb, atmmaggioli, simaiopendata, bitrix, gipuzkoairekia |
| Geo | geonetwork, geonode, geoserver, arcgishub, arcgisserver, pycsw, pygeoapi, mapproxy, qwc2, mapstore, gausswebcity, lizmap, mapbender, geomapfish, getsdiportal, terria, gvsigonline, erdasapollo, wis20box, koordinates, nextgisweb, tianditu, openeo, isogeo, mapgisigserver, cubewerx, haleconnect, palapa, stacbrowser, qgisserver, mapserver, deegree, gc2, micka, supermapiportal, g3wsuite, geonature, hajk, tergis, geocortex, activemapgis, opendatacube, datacubews, origo, esrigeo |
| Scientific | dataverse, dspace, invenio, inveniordm, eprints, hyrax, opus, esploro, pure, weko3, elsevierdigitalcommons, opendap, opendaphyrax, thredds, erddap, ipt, galaxy, ramadda, ala, figshare, redivis, radar, breedbase, tripal, veupathdb, massbank, iochembd, esgf, omekas, contentdm, symbiota, frostserver, cbioportal, bexis2, intermine, kadi4mat, omero, xnat, wikibase, huggingface, openalex, idigbio, inaturalist, clld, minerva, aubrey, gringlobal, synapse, yoda, dataone, codalab, tr32db, vufind, librecat, islandora, archipelago, divaportal, icat, talkbank, materialscloud, phaidra, greenstone, dlibra |
| Indicators / microdata | pxweb, pxstat, opensdg, statsuite, istatdatabrowser, sdmxri, nada, nesstar, redatam, colectica, obibamica, knoema, dhis2, edatos, superset, dgbasweb, swing, ibisph, superstar, duva, beyond2020 |
| Metadata | fusionregistry, aristotlemdr, mwmb, fairdatapoint, datahubproject |
If detect-single reports no map for the ID, stop. Do not copy URLs from a different platform. Most map-viewer IDs and BI/query UIs are listed in NO_STANDARD_PROBE (apidetect_urlmaps_draft.py); the software index shows — for those IDs.
After a successful run
python scripts/builder.py validate-yaml --idfor that catalogid- Set
api/api_statustogether when an API is confirmed (data-model.md) - Prefer endpoint
typevalues already used for thatsoftware.id(vocabularies.md). TAP capabilities aretap:capabilities, DHuS product queries areodata, pygeoapi/collectionsisogc:features, OpenDataSoft catalog APIs areopendatasoftapi, Data Fair isdatafairapi, Our Open Data/api/package_listisouropendata:packages, cBioPortal studies arecbioportal:studies, Hugging Face ishuggingface:api, OMERO projects areomero:projects, SciCat lists arescicat:datasets, Kadi4Mat iskadi4mat:records/kadi4mat:collections, MyTardis dataset lists aremytardis:datasets, InterMine isintermine:version, XNAT project lists arexnat:projects, Dataverse version/search isdataverseapi, PxWeb ispxwebapi, eDatos / Superset / GC2 / Nextstrain / SEEK/api/ MINERVA project lists / Islandora Solr Dataset select / PHAIDRA Dataset Solr select arerest, and VuFind / LibreCat / Archipelago Dataset search, Figshare/articles/dataset/, DiVA smash search, TalkBank/data.html, Materials Cloud/explore, ICAT/icat/portlet/, and GRIN-Global/gringlobal/areindex. Palapa GeoServer WMS iswms130. Esri Geoportal CSW GetCapabilities iscsw202. EPrints/cgi/opensearchdescription, GeoBlacklight/catalog/opensearch.xml, Micka/opensearch, TriplyDB/opensearch.xml, Socrata/opensearch.xml, GeoNode/catalogue/opensearch, Esri Geoportal/openSearchDescription, and GeoNetwork/portal.opensearchareopensearch. Piveau/api/sparqlissparql. DaCHS/oai.xml, hale»connect/csw?mode=oaipmh, dLibra/dlibra/oai-pmh-repository.xml, Elsevier/oai, WEKO3/oai, pycsw/?mode=oaipmh, and LibreCat/oaiIdentify areoaipmh20. ArcGIS Hub/data.jsonand OpenDataSoft/data.jsonaredcatus11. SuperMap iPortal/iportal/web/maps.jsonand/iportal/web/datas.jsonaresupermapiportal:maps/supermapiportal:datas. Gipuzkoa Irekia/catalog.xmlisdcat:xml,/catalog.rdfisdcatap,/catalog.jsonldisdcat:jsonld, and/api/feed/dcatisdcatap201. DKAN/jsonapi/dataset/datasetisdrupal:jsonapi. pygeoapi/collections?f=jsonisogc:features. DataPress/api/3/action/package_searchisckan:package-search. VuFind/api?openapiand PHAIDRA/api/openapiareopenapi. OpenSDG/reporting-status/isopensdg:reporting-statusand/indicators.jsonisopensdg:catalog. DKAN/api/3isckan. Aristotle/api/v4/metadataisaristotlemdr:metadata. GET SDI / gvSIG/geonetwork/srv/eng/cswand MapStore/geoserver/cswGetCapabilities arecsw202. Bitrix/opendata/isbitrix:catalog. STAC origin-link/api/stac/v1/isstacserverapiand stac-fastapi/apiisopenapi. BIShttps://stats.bis.org/api/v1/dataflow, ILOSTAThttps://sdmx.ilo.org/rest/dataflow, and UNICEFhttps://sdmx.data.unicef.org/ws/public/sdmxapi/rest/dataflowaresdmx:dataflows(absolute_urlon the API host). PxWeb table-tree/pxweb/{lang}/paths are stripped so/api/v1/attaches at the/PXWebmount or origin. ESGF/searchMetagrid UI is stripped so/esg-search/searchattaches at origin. RADAR/radar/{lang}/homeis stripped so/radar/api/datasetsattaches at origin. pycsw catalog links that already are the CSW path get?service=CSW&version=2.0.2&request=GetCapabilities(typedcsw202) instead of/csw/csw. Rasdaman/rasdaman/owslinks get?service=WCS/?service=WMSGetCapabilities (wcs201/wms130) instead of/rasdaman/ows/rasdaman/ows. MapServer catalog links that already are the CGI/OWS path get?SERVICE=WMS&VERSION=1.3.0&REQUEST=GetCapabilities(wms130) instead of a guessed/geomet. QGIS Server OWS-mount links (for example/belb) get the same query-on-link WMS GetCapabilities instead of/belb/ows. Gen3 DRS service-info isga4gh:drs. FDSN station version isfdsnws:stationand WFCatalog query iswfcatalog:query. HajkappConfig.jsonishajk:config. DataONE member-node roots aredataone:mnand/cn/v2/query/solr/isdataone:query. Piveau/api/hub/searchispiveau:search. Omeka S Dataset items areomekas:items. SmartMet/edr/collectionsisogc:edr. CONTENTdm/digital/api/collectionsiscontentdm:collections. Idra/Idra/api/v1/cataloguesisidra:catalogues. DANDI dandisets, CELLxGENE datasets, MGnify studies, MetaboLights studies, BioStudies search, and SIDRA aggregates usedandi:dandisets,cellxgene:datasets,mgnify:studies,metabolights:studies,biostudies:search, andsidra:agregados.
Related
- cli.md
- harvest.md (dataset crawl recipes; not this script)
- liveness.md (URL reachability of
link, not API maps) - architecture.md
- quality-rules.md