<!--
{
  "availability" : [
    "iOS: 8.0.0 -",
    "iPadOS: 8.0.0 -",
    "macCatalyst: 8.0.0 -",
    "macOS: 10.10.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Foundation",
  "identifier" : "/documentation/Foundation/URLQueryItem",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "s:10Foundation12URLQueryItemV"
  },
  "title" : "URLQueryItem"
}
-->

# URLQueryItem

A single name-value pair from the query portion of a URL.

```
struct URLQueryItem
```

## Topics

### Creating Query Items

[`init(name:value:)`](/documentation/Foundation/URLQueryItem/init(name:value:))

Creates a new query item with the name and value you specify.

### Accessing the Item’s Components

[`name`](/documentation/Foundation/URLQueryItem/name)

The name of the query item.

[`value`](/documentation/Foundation/URLQueryItem/value)

The value for the query item.

### Using Reference Types

[`NSURLQueryItem`](/documentation/Foundation/NSURLQueryItem)

An object representing a single name/value pair for an item in the query portion of a URL.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)