You are using a placeholder while building your string, but you may use it incorrectly.
Maybe try:
int numberOfDays = 7;
StringBuilder sb = new StringBuilder();
sb.Append("http://api.apixu.com/v1/forecast.xml?key=<redacted>&q=");
sb.Append(txtcity.Text);
sb.AppendFormat("&days={0}", numberOfDays);
Depending on C# version you are using, you may also try:
sb.Append($"&days={numberOfDays}");
(notice the
$
sign in front of the string in the second version).
You could also group this into a single statement, eliminating the need to create a new StringBuilder everytime the method is called:
string key = "<redacted>";
string city = txtcity.Text;
int numberOfDays = 7;
string requestText = $"http://api.apixu.com/v1/forecast.xml?key={key}&q={city}&days={numberOfDays}";
Finally, there seems to be a C# specific API that you could try to use:
apixu/apixu-csharp
[
^]
Hope this helps. Kindly.