Wash and scrub the clams clean. Soak in cold water.
Bring a large pot of salted water to a boil. Add spaghetti to boiling water, and cook until al-dente; following packaging instructions, the pasta will finish cooking in the sauce. Drain and set aside.
In a large saucepan, add olive oil and onion over medium heat, and sauté until golden brown. Add garlic and chilli flakes, and sauté until fragrant. Add the clams, chicken broth, vinegar, salt, and pepper; cover the pan and bring to a simmer on medium-high heat. Cook for about 5 minutes; the clam should open. Discard any clams that do not open up.
Add the drained pasta and toss the ingredients together. Add some reserved cooking water if necessary to keep the mixture moist. Finally, add butter, lemon juice, lemon zest, and parsley and adjust the seasoning with salt and pepper.