---
title: "SKIndexCopyDocumentURLsForDocumentIDs(_:_:_:_:)"
framework: Core Services
role: symbol
role_heading: Function
platforms: [macOS 10.4+]
path: coreservices/1443501-skindexcopydocumenturlsfordocume
---

# SKIndexCopyDocumentURLsForDocumentIDs(_:_:_:_:)

Gets document URLs based on document IDs.

## Declaration

```swift
func SKIndexCopyDocumentURLsForDocumentIDs(_ inIndex: SKIndex!, _ inCount: CFIndex, _ inDocumentIDsArray: UnsafeMutablePointer<SKDocumentID>!, _ outDocumentURLsArray: UnsafeMutablePointer<Unmanaged<CFURL>?>!)
```

## Parameters

- `inIndex`: The index containing the document information.
- `inCount`: The number of document IDs in inDocumentIDsArray.
- `inDocumentIDsArray`: Points to an array of document IDs corresponding to the document URLs (CFURL objects) you want.
- `outDocumentURLsArray`: On input, a pointer to an array for document URLs (CFURL objects). On output, points to the previously allocated array, which now contains document URLs corresponding to the document IDs in inDocumentIDArray. When finished with the document URL array, dispose of it by calling doc://com.apple.documentation/documentation/corefoundation/cfrelease on each array element.

## Discussion

Discussion The SKIndexCopyDocumentURLsForDocumentIDs(_:_:_:_:) function lets you get a batch of document URLs (CFURL objects) in one step, based on a list of document IDs. If you want to get Search Kit Document URL objects (SKDocumentRefs) instead, use SKIndexCopyDocumentRefsForDocumentIDs(_:_:_:_:).

## See Also

### Working with Documents and Terms

- [SKDocumentCreateWithURL(_:)](coreservices/1442564-skdocumentcreatewithurl.md)
- [SKDocumentCreate(_:_:_:)](coreservices/1443212-skdocumentcreate.md)
- [SKDocumentCopyURL(_:)](coreservices/1449624-skdocumentcopyurl.md)
- [SKDocumentGetName(_:)](coreservices/1442657-skdocumentgetname.md)
- [SKDocumentGetParent(_:)](coreservices/1444449-skdocumentgetparent.md)
- [SKDocumentGetSchemeName(_:)](coreservices/1448262-skdocumentgetschemename.md)
- [SKDocumentGetTypeID()](coreservices/1448891-skdocumentgettypeid.md)
- [SKIndexCopyDocumentForDocumentID(_:_:)](coreservices/1442760-skindexcopydocumentfordocumentid.md)
- [SKIndexCopyInfoForDocumentIDs(_:_:_:_:_:)](coreservices/1445499-skindexcopyinfofordocumentids.md)
- [SKIndexCopyDocumentRefsForDocumentIDs(_:_:_:_:)](coreservices/1445305-skindexcopydocumentrefsfordocume.md)
- [SKIndexCopyDocumentIDArrayForTermID(_:_:)](coreservices/1448003-skindexcopydocumentidarrayforter.md)
- [SKIndexCopyTermIDArrayForDocumentID(_:_:)](coreservices/1446868-skindexcopytermidarrayfordocumen.md)
- [SKIndexCopyTermStringForTermID(_:_:)](coreservices/1442802-skindexcopytermstringfortermid.md)
- [SKIndexGetTermIDForTermString(_:_:)](coreservices/1448558-skindexgettermidfortermstring.md)
- [SKIndexSetDocumentProperties(_:_:_:)](coreservices/1444576-skindexsetdocumentproperties.md)
- [SKIndexCopyDocumentProperties(_:_:)](coreservices/1449500-skindexcopydocumentproperties.md)
- [SKIndexGetDocumentState(_:_:)](coreservices/1443396-skindexgetdocumentstate.md)
- [SKIndexGetDocumentTermCount(_:_:)](coreservices/1448341-skindexgetdocumenttermcount.md)
- [SKIndexGetDocumentTermFrequency(_:_:_:)](coreservices/1447537-skindexgetdocumenttermfrequency.md)
- [SKIndexGetTermDocumentCount(_:_:)](coreservices/1444015-skindexgettermdocumentcount.md)
- [SKIndexGetDocumentID(_:_:)](coreservices/1444437-skindexgetdocumentid.md)
