# Fetching all NFDs owned by an address

In order to fetch all NFDs owned by a particular account, use the v2/search api on the account, searching on owner.\
eg: Showing all NFDs owned by the nfdomains account.

<https://api.nf.domains/nfd/v2/search?owner=RSV2YCHXA7MWGFTX3WYI7TVGAS5W5XH5M7ZQVXPPRQ7DNTNW36OW2TRR6I&state=owned>

This will return the first 50 (by default) NFDs owned (not expired or for-sale) by this NFD.  The limit parameter can be changed to a maximum of 200.  To iterate, set offset accordingly to walk the results.

## Search NFDs via various filters

> Search NFDs via various filters

```json
{"openapi":"3.0.3","info":{"title":"NFD Management Service","version":"1.0"},"tags":[{"name":"nfd","description":"The nfd service provides apis for creating/searching/updating NFDs.  All changes occur via smart-contract calls with the endpoints returning transactions to sign for submission to an Algorand node"}],"servers":[{"url":"https://api.nf.domains"},{"url":"https://api.testnet.nf.domains"},{"url":"https://api.betanet.nf.domains"},{"url":"http://localhost:80"}],"paths":{"/nfd/v2/search":{"get":{"tags":["nfd"],"summary":"Search NFDs via various filters","description":"Search NFDs via various filters","operationId":"nfd#searchV2","parameters":[{"name":"name","in":"query","description":"name or partial match of NFD name to filter on","allowEmptyValue":true,"schema":{"type":"string","description":"name or partial match of NFD name to filter on"}},{"name":"category","in":"query","allowEmptyValue":true,"schema":{"type":"array","items":{"type":"string","description":"Category of NFD","enum":["curated","premium","common"]}}},{"name":"saleType","in":"query","allowEmptyValue":true,"schema":{"type":"array","items":{"type":"string","description":"Sale type of NFD","enum":["auction","buyItNow"]}}},{"name":"state","in":"query","allowEmptyValue":true,"schema":{"type":"array","items":{"type":"string","description":"State of NFD","enum":["reserved","forSale","owned","expired"]}}},{"name":"parentAppID","in":"query","description":"The parent NFD Application ID to find. Used for fetching segments of an NFD","allowEmptyValue":true,"schema":{"type":"integer","description":"The parent NFD Application ID to find. Used for fetching segments of an NFD","format":"int64"}},{"name":"length","in":"query","description":"Length of NFD","allowEmptyValue":true,"schema":{"type":"array","items":{"type":"string","enum":["1_letters","2_letters","3_letters","4_letters","5_letters","6_letters","7_letters","8_letters","9_letters","10+_letters"]},"description":"Length of NFD"}},{"name":"traits","in":"query","description":"Traits of NFD","allowEmptyValue":true,"schema":{"type":"array","items":{"type":"string","enum":["emoji","pristine","segment"]},"description":"Traits of NFD"}},{"name":"owner","in":"query","description":"An Algorand account address to find all NFDs owned by that address","allowEmptyValue":true,"schema":{"type":"string","description":"An Algorand Account address","pattern":"^[A-Z2-7]{57}[AEIMQUY4]$"}},{"name":"reservedFor","in":"query","description":"An Algorand account address to find all NFDs reserved for that address","allowEmptyValue":true,"schema":{"type":"string","description":"An Algorand Account address","pattern":"^[A-Z2-7]{57}[AEIMQUY4]$"}},{"name":"excludeUserReserved","in":"query","description":"Should NFDs reserved for an account (transfers for example or unclaimed winning auctions) be excluded","allowEmptyValue":true,"schema":{"type":"boolean","description":"Should NFDs reserved for an account (transfers for example or unclaimed winning auctions) be excluded"}},{"name":"prefix","in":"query","description":"The start of an NFD name, fetching multiple NFDs that have that prefix","allowEmptyValue":true,"schema":{"type":"string","description":"The start of an NFD name, fetching multiple NFDs that have that prefix","minLength":1,"maxLength":32}},{"name":"substring","in":"query","description":"Part of an NFD name, fetching multiple NFDs that have that substring (minimum 3 characters)","allowEmptyValue":true,"schema":{"type":"string","description":"Part of an NFD name, fetching multiple NFDs that have that substring (minimum 3 characters)","minLength":3,"maxLength":32}},{"name":"vproperty","in":"query","description":"Verified property name to search on - specify value with vvalue","allowEmptyValue":true,"schema":{"type":"string","description":"Verified property name to search on - specify value with vvalue","enum":["blueskydid","discord","telegram","twitter","github","email","domain","nostrpubkey"]}},{"name":"vvalue","in":"query","description":"Value to find in the vproperty field specified with the vproperty parameter","allowEmptyValue":true,"schema":{"type":"string","description":"Value to find in the vproperty field specified with the vproperty parameter"}},{"name":"segmentLocked","in":"query","description":"Whether to explicitly filter on segments being locked or unlocked.  Typically only valuable when filtering on unlocked","allowEmptyValue":true,"schema":{"type":"boolean","description":"Whether to explicitly filter on segments being locked or unlocked.  Typically only valuable when filtering on unlocked"}},{"name":"segmentRoot","in":"query","description":"Whether to explicitly filter on NFD roots or segments.  True to only see roots, False to only see segments.","allowEmptyValue":true,"schema":{"type":"boolean","description":"Whether to explicitly filter on NFD roots or segments.  True to only see roots, False to only see segments."}},{"name":"minPrice","in":"query","description":"Minimum price of NFD","allowEmptyValue":true,"schema":{"type":"integer","description":"Minimum price of NFD","format":"int64"}},{"name":"maxPrice","in":"query","description":"Maximum price of NFD","allowEmptyValue":true,"schema":{"type":"integer","description":"Maximum price of NFD","format":"int64"}},{"name":"minPriceUsd","in":"query","description":"Minimum price of NFD Segment in USD (cents)","allowEmptyValue":true,"schema":{"type":"integer","description":"Minimum price of NFD Segment in USD (cents)","format":"int64"}},{"name":"maxPriceUsd","in":"query","description":"Maximum price of NFD Segment in USD (cents)","allowEmptyValue":true,"schema":{"type":"integer","description":"Maximum price of NFD Segment in USD (cents)","format":"int64"}},{"name":"changedAfter","in":"query","description":"Fetch NFDs that changed after the specified timestamp","allowEmptyValue":true,"schema":{"type":"string","description":"Fetch NFDs that changed after the specified timestamp","format":"date-time"}},{"name":"expiresBefore","in":"query","description":"Return only NFDs with an expiration time at or before the specified timestamp","allowEmptyValue":true,"schema":{"type":"string","description":"Return only NFDs with an expiration time at or before the specified timestamp","format":"date-time"}},{"name":"limit","in":"query","description":"Limit the number of results returned - max 200","allowEmptyValue":true,"schema":{"type":"integer","description":"Limit the number of results returned - max 200","default":50,"format":"int64","minimum":1,"maximum":200}},{"name":"offset","in":"query","description":"Starting document in large list.  Fetch 1-100 [limit 100], pass offset 100 to fetch 100-200","allowEmptyValue":true,"schema":{"type":"integer","description":"Starting document in large list.  Fetch 1-100 [limit 100], pass offset 100 to fetch 100-200","default":0,"format":"int64","minimum":0}},{"name":"sort","in":"query","description":"What to sort on","allowEmptyValue":true,"schema":{"type":"string","description":"What to sort on","default":"createdDesc","enum":["createdDesc","timeChangedDesc","soldDesc","priceAsc","priceDesc","highestSaleDesc","saleTypeAsc","nameAsc","expiresAsc","expiresDesc"]}},{"name":"view","in":"query","description":"View of data to return, tiny (name, owner, caAlgo, unverifiedCaAlgo only), brief (default), or full","allowEmptyValue":true,"schema":{"type":"string","description":"View of data to return, tiny (name, owner, caAlgo, unverifiedCaAlgo only), brief (default), or full","default":"brief","enum":["tiny","thumbnail","brief","full"]}},{"name":"if-none-match","in":"header","description":"etag","allowEmptyValue":true,"schema":{"type":"string","description":"etag"}}],"responses":{"200":{"description":"OK response.","headers":{"ETag":{"description":"ETag","schema":{"type":"string","description":"ETag"}},"cache-control":{"description":"Cache-Control header","schema":{"type":"string","description":"Cache-Control header"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NfdV2SearchRecords"}}}},"304":{"description":"ETag not changed"},"400":{"description":"invalidAddress: invalidAddress is returned for an Algorand address that doesn't appear to be valid","content":{"application/vnd.goa.error":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"notFound: Not Found response.","content":{"application/vnd.goa.error":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"rateLimited: Too Many Requests response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimited"}}}}}}}},"components":{"schemas":{"NfdV2SearchRecords":{"type":"object","properties":{"cache-control":{"type":"string","description":"Cache-Control header"},"etag":{"type":"string","description":"ETag"},"match-check":{"type":"string","description":"Not returned, used in tagging for response to indicate if-none-match etag matched"},"nfds":{"$ref":"#/components/schemas/NfdRecordCollection"},"total":{"type":"integer","description":"total number of results, with data containing paged amount based on offset/limit","format":"int64"}},"description":"Collection of NFD browse results","required":["total","nfds"]},"NfdRecordCollection":{"type":"array","items":{"$ref":"#/components/schemas/NfdRecord"}},"NfdRecord":{"type":"object","properties":{"appID":{"type":"integer","description":"NFD Application ID","format":"int64"},"asaID":{"type":"integer","description":"NFD ASA ID","format":"int64"},"avatarOutdated":{"type":"boolean","description":"Whether the verified Avatar set in this NFD is newer (arc19) then is set into the NFD. This will only be present on direct NFD fetch and if true"},"caAlgo":{"type":"array","items":{"type":"string","description":"An Algorand Account address","pattern":"^[A-Z2-7]{57}[AEIMQUY4]$"},"description":"Verified Algorand addresses for this NFD"},"cache-control":{"type":"string","description":"Cache-Control header"},"category":{"type":"string","description":"Category of NFD","enum":["curated","premium","common"]},"currentAsOfBlock":{"type":"integer","description":"Round this data was last fetched from","format":"int64"},"depositAccount":{"type":"string","description":"An Algorand Account address","pattern":"^[A-Z2-7]{57}[AEIMQUY4]$"},"etag":{"type":"string","description":"ETag"},"expired":{"type":"boolean"},"match-check":{"type":"string","description":"Not returned, used in tagging for response to indicate if-none-match etag matched"},"metaTags":{"type":"array","items":{"type":"string"},"description":"Tags set by the system for tracking/analytics"},"name":{"type":"string"},"nfdAccount":{"type":"string","description":"An Algorand Account address","pattern":"^[A-Z2-7]{57}[AEIMQUY4]$"},"owner":{"type":"string","description":"An Algorand Account address","pattern":"^[A-Z2-7]{57}[AEIMQUY4]$"},"parentAppID":{"type":"integer","description":"NFD Application ID of Parent if this is a segment","format":"int64"},"properties":{"$ref":"#/components/schemas/NFDProperties"},"reservedFor":{"type":"string","description":"An Algorand Account address","pattern":"^[A-Z2-7]{57}[AEIMQUY4]$"},"saleType":{"type":"string","description":"Sale type of NFD","enum":["auction","buyItNow"]},"sellAmount":{"type":"integer","description":"amount NFD is being sold for (microAlgos)","format":"int64"},"seller":{"type":"string","description":"An Algorand Account address","pattern":"^[A-Z2-7]{57}[AEIMQUY4]$"},"sigNameAddress":{"type":"string","description":"An Algorand Account address","pattern":"^[A-Z2-7]{57}[AEIMQUY4]$"},"state":{"type":"string","description":"State of NFD","enum":["available","minting","reserved","forSale","owned","expired"]},"tags":{"type":"array","items":{"type":"string"},"description":"Tags assigned to this NFD"},"timeChanged":{"type":"string","format":"date-time"},"timeCreated":{"type":"string","format":"date-time"},"timeExpires":{"type":"string","format":"date-time"},"timePurchased":{"type":"string","format":"date-time"},"unverifiedCa":{"type":"object","description":"Unverified (non-algo) Crypto addresses for this NFD","additionalProperties":{"type":"array","items":{"type":"string"}}},"unverifiedCaAlgo":{"type":"array","items":{"type":"string","description":"An Algorand Account address","pattern":"^[A-Z2-7]{57}[AEIMQUY4]$"},"description":"Unverified Algorand addresses for this NFD"}},"description":"NFD contains all known information about an NFD record","required":["name"]},"NFDProperties":{"type":"object","properties":{"internal":{"type":"object","description":"Internal properties","additionalProperties":{"type":"string"}},"userDefined":{"type":"object","description":"User properties","additionalProperties":{"type":"string"}},"verified":{"type":"object","description":"Verified properties","additionalProperties":{"type":"string"}}},"description":"NFDProperties contains the expanded metadata stored within an NFD contracts' global-state"},"Error":{"type":"object","properties":{"fault":{"type":"boolean","description":"Is the error a server-side fault?"},"id":{"type":"string","description":"ID is a unique identifier for this particular occurrence of the problem."},"message":{"type":"string","description":"Message is a human-readable explanation specific to this occurrence of the problem."},"name":{"type":"string","description":"Name is the name of this class of errors."},"temporary":{"type":"boolean","description":"Is the error temporary?"},"timeout":{"type":"boolean","description":"Is the error a timeout?"}},"required":["name","id","message","temporary","timeout","fault"]},"RateLimited":{"type":"object","properties":{"limit":{"type":"integer","format":"int64"},"secsRemaining":{"type":"integer","format":"int64"}},"required":["limit","secsRemaining"]}}}}
```

## The NfdV2SearchRecords object

```json
{"openapi":"3.0.3","info":{"title":"NFD Management Service","version":"1.0"},"components":{"schemas":{"NfdV2SearchRecords":{"type":"object","properties":{"cache-control":{"type":"string","description":"Cache-Control header"},"etag":{"type":"string","description":"ETag"},"match-check":{"type":"string","description":"Not returned, used in tagging for response to indicate if-none-match etag matched"},"nfds":{"$ref":"#/components/schemas/NfdRecordCollection"},"total":{"type":"integer","description":"total number of results, with data containing paged amount based on offset/limit","format":"int64"}},"description":"Collection of NFD browse results","required":["total","nfds"]},"NfdRecordCollection":{"type":"array","items":{"$ref":"#/components/schemas/NfdRecord"}},"NfdRecord":{"type":"object","properties":{"appID":{"type":"integer","description":"NFD Application ID","format":"int64"},"asaID":{"type":"integer","description":"NFD ASA ID","format":"int64"},"avatarOutdated":{"type":"boolean","description":"Whether the verified Avatar set in this NFD is newer (arc19) then is set into the NFD. This will only be present on direct NFD fetch and if true"},"caAlgo":{"type":"array","items":{"type":"string","description":"An Algorand Account address","pattern":"^[A-Z2-7]{57}[AEIMQUY4]$"},"description":"Verified Algorand addresses for this NFD"},"cache-control":{"type":"string","description":"Cache-Control header"},"category":{"type":"string","description":"Category of NFD","enum":["curated","premium","common"]},"currentAsOfBlock":{"type":"integer","description":"Round this data was last fetched from","format":"int64"},"depositAccount":{"type":"string","description":"An Algorand Account address","pattern":"^[A-Z2-7]{57}[AEIMQUY4]$"},"etag":{"type":"string","description":"ETag"},"expired":{"type":"boolean"},"match-check":{"type":"string","description":"Not returned, used in tagging for response to indicate if-none-match etag matched"},"metaTags":{"type":"array","items":{"type":"string"},"description":"Tags set by the system for tracking/analytics"},"name":{"type":"string"},"nfdAccount":{"type":"string","description":"An Algorand Account address","pattern":"^[A-Z2-7]{57}[AEIMQUY4]$"},"owner":{"type":"string","description":"An Algorand Account address","pattern":"^[A-Z2-7]{57}[AEIMQUY4]$"},"parentAppID":{"type":"integer","description":"NFD Application ID of Parent if this is a segment","format":"int64"},"properties":{"$ref":"#/components/schemas/NFDProperties"},"reservedFor":{"type":"string","description":"An Algorand Account address","pattern":"^[A-Z2-7]{57}[AEIMQUY4]$"},"saleType":{"type":"string","description":"Sale type of NFD","enum":["auction","buyItNow"]},"sellAmount":{"type":"integer","description":"amount NFD is being sold for (microAlgos)","format":"int64"},"seller":{"type":"string","description":"An Algorand Account address","pattern":"^[A-Z2-7]{57}[AEIMQUY4]$"},"sigNameAddress":{"type":"string","description":"An Algorand Account address","pattern":"^[A-Z2-7]{57}[AEIMQUY4]$"},"state":{"type":"string","description":"State of NFD","enum":["available","minting","reserved","forSale","owned","expired"]},"tags":{"type":"array","items":{"type":"string"},"description":"Tags assigned to this NFD"},"timeChanged":{"type":"string","format":"date-time"},"timeCreated":{"type":"string","format":"date-time"},"timeExpires":{"type":"string","format":"date-time"},"timePurchased":{"type":"string","format":"date-time"},"unverifiedCa":{"type":"object","description":"Unverified (non-algo) Crypto addresses for this NFD","additionalProperties":{"type":"array","items":{"type":"string"}}},"unverifiedCaAlgo":{"type":"array","items":{"type":"string","description":"An Algorand Account address","pattern":"^[A-Z2-7]{57}[AEIMQUY4]$"},"description":"Unverified Algorand addresses for this NFD"}},"description":"NFD contains all known information about an NFD record","required":["name"]},"NFDProperties":{"type":"object","properties":{"internal":{"type":"object","description":"Internal properties","additionalProperties":{"type":"string"}},"userDefined":{"type":"object","description":"User properties","additionalProperties":{"type":"string"}},"verified":{"type":"object","description":"Verified properties","additionalProperties":{"type":"string"}}},"description":"NFDProperties contains the expanded metadata stored within an NFD contracts' global-state"}}}}
```
